Bluetooth: Refactor buffer HCI user data
To accommodate for ACL user data move the HCI command/event data into its own struct and put it inside a union in bt_buf. Change-Id: I680500b15709d14b1e9f70ced88664d607a6568c Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
0c397c6ca2
commit
5626788eb7
3 changed files with 19 additions and 10 deletions
|
@ -48,13 +48,19 @@ enum bt_buf_type {
|
|||
BT_ACL_IN, /* Incoming ACL data */
|
||||
};
|
||||
|
||||
/* HCI command specific info */
|
||||
struct bt_buf_hci_data {
|
||||
struct nano_sem *sync;
|
||||
uint16_t opcode;
|
||||
};
|
||||
|
||||
struct bt_buf {
|
||||
/* FIFO uses first 4 bytes itself, reserve space */
|
||||
int __unused;
|
||||
|
||||
/* HCI command specific info */
|
||||
struct nano_sem *sync;
|
||||
uint16_t opcode;
|
||||
union {
|
||||
struct bt_buf_hci_data hci;
|
||||
};
|
||||
|
||||
/* Type of data contained in the buffer */
|
||||
uint8_t type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue