aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth/bluetooth.h
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2015-11-05 02:31:40 -0500
committerMarcel Holtmann <marcel@holtmann.org>2015-11-19 11:50:27 -0500
commit44d271377479c4d4fe7f2d07d188656684773fbd (patch)
tree0fad2880c4becec52d10825c5b4d951b38233d5f /include/net/bluetooth/bluetooth.h
parent5fcc86bd2695d4ccad2d87cb424f4c01a4e544f3 (diff)
Bluetooth: Compress the size of struct hci_ctrl
We can reduce the size of the hci_ctrl struct by converting 'bool req_start' to 'u8 req_flags' and making the two function pointers a union (since only one is ever set at a time). Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth/bluetooth.h')
-rw-r--r--include/net/bluetooth/bluetooth.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index a85e6d3d75ef..8d38f411009c 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -296,12 +296,17 @@ typedef void (*hci_req_complete_t)(struct hci_dev *hdev, u8 status, u16 opcode);
296typedef void (*hci_req_complete_skb_t)(struct hci_dev *hdev, u8 status, 296typedef void (*hci_req_complete_skb_t)(struct hci_dev *hdev, u8 status,
297 u16 opcode, struct sk_buff *skb); 297 u16 opcode, struct sk_buff *skb);
298 298
299#define HCI_REQ_START BIT(0)
300#define HCI_REQ_SKB BIT(1)
301
299struct hci_ctrl { 302struct hci_ctrl {
300 __u16 opcode; 303 __u16 opcode;
301 bool req_start; 304 u8 req_flags;
302 u8 req_event; 305 u8 req_event;
303 hci_req_complete_t req_complete; 306 union {
304 hci_req_complete_skb_t req_complete_skb; 307 hci_req_complete_t req_complete;
308 hci_req_complete_skb_t req_complete_skb;
309 };
305}; 310};
306 311
307struct bt_skb_cb { 312struct bt_skb_cb {