From 1004e8bf19082b16ccc257e07cd5894441e11a71 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 3 Jun 2015 16:49:16 +0700 Subject: [PATCH] Bluetooth: Reorganize buffer variable for smaller size Reorganize and compress some of the buffer variable to achieve smaller struct size. Change-Id: I1ce711c22844470403b085b0f13e77f762f25262 Signed-off-by: Johan Hedberg --- include/bluetooth/buf.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/include/bluetooth/buf.h b/include/bluetooth/buf.h index 63f5e9b79cb..8145cea73a7 100644 --- a/include/bluetooth/buf.h +++ b/include/bluetooth/buf.h @@ -76,15 +76,13 @@ struct bt_buf { struct bt_buf_acl_data acl; }; - /* Reference count */ - uint8_t ref; - - /* Type of data contained in the buffer */ - uint8_t type; - /* Buffer data variables */ - uint8_t len; uint8_t *data; + uint8_t len; + + uint8_t ref:5, /* Reference count */ + type:3; /* Type of data contained in the buffer */ + uint8_t buf[BT_BUF_MAX_DATA]; };