Bluetooth: Make bt_cb()->pkt_type and bt_cb()->except HCI specific
Subsystems (2)
Marcel Holtmann
maintainerPATCH 1/1 Bluetooth: Make bt_cb()->pkt_type and bt_cb()->except HCI specific
The two fields for pkt_type and expect inside the bt_cb() structure are highly HCI specific and only used by HCI drivers. So instead of keeping them global, move them into the union entry for HCI.
Signed-off-by Marcel Holtmann <[email protected]>
--- include/net/bluetooth/bluetooth.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
include/net/bluetooth/bluetooth.h +4 -4
@@ -300,6 +300,8 @@ typedef void (*hci_req_complete_skb_t)(struct hci_dev *hdev, u8 status,#define HCI_REQ_SKB BIT(1)struct hci_ctrl { +__u8 pkt_type; +__u16 expect;__u16 opcode;u8 req_flags;u8 req_event;
@@ -310,9 +312,7 @@ struct hci_ctrl { };struct bt_skb_cb { -__u8 pkt_type;__u8 force_active; -__u16 expect;__u8 incoming:1 ;union {struct l2cap_ctrl l2cap;
@@ -321,8 +321,8 @@ 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_pkt_type (skb) bt_cb((skb))->hci.pkt_type +#define hci_skb_expect (skb) bt_cb((skb))->hci.expect#define hci_skb_opcode (skb) bt_cb((skb))->hci.opcodestatic inline struct sk_buff *bt_skb_alloc (unsigned int len,gfp_t how)
Signature · 1 line
2.5.0
Marcel Holtmann
maintainerHi Johan,
Quoted 8 lines
The two fields for
pkt_typeand expect inside thebt_cb()structure are highly HCI specific and only used by HCI drivers. So instead of keeping them global, move them into the union entry for HCI.Signed-off-by Marcel Holtmann <[email protected]>---
include/net/bluetooth/bluetooth.h| 8 ++++----1 file changed, 4 insertions(+), 4 deletions(-)
actually there might be some side affects with this patch. I have not tracked down if it is this one or some of my experimental patches. However I do not think it is safe to apply this one at the moment.
Regards
Marcel