Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5c4a42a authored by Marcel Holtmann's avatar Marcel Holtmann
Browse files

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.

Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent 5c3d3b4c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;