mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
Bluetooth: Refactor HCI request variables into own struct
In order to shrink the size of bt_skb_cb, this patch moves the HCI request related variables into their own req_ctrl struct. Additionall the L2CAP and HCI request structs are placed inside the same union since they will never be used at the same time for the same skb. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
a4368ff3ed
commit
db6e3e8d01
5 changed files with 22 additions and 16 deletions
|
@ -278,16 +278,22 @@ struct hci_dev;
|
|||
|
||||
typedef void (*hci_req_complete_t)(struct hci_dev *hdev, u8 status, u16 opcode);
|
||||
|
||||
struct req_ctrl {
|
||||
bool start;
|
||||
u8 event;
|
||||
hci_req_complete_t complete;
|
||||
};
|
||||
|
||||
struct bt_skb_cb {
|
||||
__u8 pkt_type;
|
||||
__u8 force_active;
|
||||
__u16 opcode;
|
||||
__u16 expect;
|
||||
__u8 incoming:1;
|
||||
__u8 req_start:1;
|
||||
u8 req_event;
|
||||
hci_req_complete_t req_complete;
|
||||
struct l2cap_ctrl l2cap;
|
||||
union {
|
||||
struct l2cap_ctrl l2cap;
|
||||
struct req_ctrl req;
|
||||
};
|
||||
};
|
||||
#define bt_cb(skb) ((struct bt_skb_cb *)((skb)->cb))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue