]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
Bluetooth: Add hci_skb_* helper wrappers for bt_cb(skb) access
authorMarcel Holtmann <marcel@holtmann.org>
Thu, 5 Nov 2015 06:09:59 +0000 (07:09 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 19 Nov 2015 16:50:26 +0000 (17:50 +0100)
For all the HCI driver related variables accesssed via bt_cb(skb),
provide helper wrappers.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
include/net/bluetooth/bluetooth.h

index 42844d7b154af95a393ba6c7157323d3405099a1..663e0ef1eaa0425cc5befcff5741d0fcb7600dbb 100644 (file)
@@ -316,6 +316,10 @@ struct bt_skb_cb {
 };
 #define bt_cb(skb) ((struct bt_skb_cb *)((skb)->cb))
 
+#define hci_skb_pkt_type(skb) bt_cb((skb))->pkt_type
+#define hci_skb_expect(skb) bt_cb((skb))->expect
+#define hci_skb_opcode(skb) bt_cb((skb))->hci.opcode
+
 static inline struct sk_buff *bt_skb_alloc(unsigned int len, gfp_t how)
 {
        struct sk_buff *skb;