Bluetooth: Refactor L2CAP variables into l2cap_ctrl
We're getting very close to the maximum possible size of bt_skb_cb. To
prepare to shrink the struct with the help of a union this patch moves
all L2CAP related variables into the l2cap_ctrl struct. To later add
other 'ctrl' structs the L2CAP one is renamed simple 'l2cap' instead
of 'control'.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 33a5e00..d8367cc 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -269,6 +269,9 @@
__u16 reqseq;
__u16 txseq;
__u8 retries;
+ __le16 psm;
+ bdaddr_t bdaddr;
+ struct l2cap_chan *chan;
};
struct hci_dev;
@@ -284,10 +287,7 @@
__u8 req_start:1;
u8 req_event;
hci_req_complete_t req_complete;
- struct l2cap_chan *chan;
- struct l2cap_ctrl control;
- bdaddr_t bdaddr;
- __le16 psm;
+ struct l2cap_ctrl l2cap;
};
#define bt_cb(skb) ((struct bt_skb_cb *)((skb)->cb))