Skip to contentSkip to conversation

Bluetooth: Add hci_skb_* helper wrappers for bt_cb(skb) access

PATCH In review Marcel Holtmann 2 participants 2 messages Nov 5, 2015

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/3 Bluetooth: Add hci_skb_* helper wrappers for bt_cb(skb) access

For all the HCI driver related variables accesssed via bt_cb(skb), provide helper wrappers.

---
 include/net/bluetooth/bluetooth.h | 4 ++++
 1 file changed, 4 insertions(+)
include/net/bluetooth/bluetooth.h +4 -0
index fde1791c24b0..b98cd7aea2fa 100644
@@ -317,6 +317,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;
Signature · 1 line
2.5.0
#1 lore raw

Hi Marcel,

Quoted 7 lines · Marcel Holtmann

For all the HCI driver related variables accesssed via bt_cb(skb), provide helper wrappers.

---
 include/net/bluetooth/bluetooth.h | 4 ++++
 1 file changed, 4 insertions(+)

All three patches have been applied to bluetooth-next. Thanks.

Johan