diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/bluetooth/hci.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 41456c148842..93ce272a5d27 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -709,6 +709,24 @@ struct hci_sco_hdr { | |||
709 | __u8 dlen; | 709 | __u8 dlen; |
710 | } __attribute__ ((packed)); | 710 | } __attribute__ ((packed)); |
711 | 711 | ||
712 | #ifdef __KERNEL__ | ||
713 | #include <linux/skbuff.h> | ||
714 | static inline struct hci_event_hdr *hci_event_hdr(const struct sk_buff *skb) | ||
715 | { | ||
716 | return (struct hci_event_hdr *)skb->data; | ||
717 | } | ||
718 | |||
719 | static inline struct hci_acl_hdr *hci_acl_hdr(const struct sk_buff *skb) | ||
720 | { | ||
721 | return (struct hci_acl_hdr *)skb->data; | ||
722 | } | ||
723 | |||
724 | static inline struct hci_sco_hdr *hci_sco_hdr(const struct sk_buff *skb) | ||
725 | { | ||
726 | return (struct hci_sco_hdr *)skb->data; | ||
727 | } | ||
728 | #endif | ||
729 | |||
712 | /* Command opcode pack/unpack */ | 730 | /* Command opcode pack/unpack */ |
713 | #define hci_opcode_pack(ogf, ocf) (__u16) ((ocf & 0x03ff)|(ogf << 10)) | 731 | #define hci_opcode_pack(ogf, ocf) (__u16) ((ocf & 0x03ff)|(ogf << 10)) |
714 | #define hci_opcode_ogf(op) (op >> 10) | 732 | #define hci_opcode_ogf(op) (op >> 10) |