]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/bluetooth/hci.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux-2.6-omap-h63xx.git] / include / net / bluetooth / hci.h
index b2bdb1aa04291c7104113ef93532dcb26c166a44..93ce272a5d27edbe37fef616217e3e37f3fcfb14 100644 (file)
 #define HCI_NOTIFY_VOICE_SETTING       3
 
 /* HCI device types */
-#define HCI_VHCI       0
+#define HCI_VIRTUAL    0
 #define HCI_USB                1
 #define HCI_PCCARD     2
 #define HCI_UART       3
 #define HCI_RS232      4
 #define HCI_PCI                5
+#define HCI_SDIO       6
 
 /* HCI device quirks */
 enum {
@@ -296,6 +297,7 @@ struct hci_cp_host_buffer_size {
 
 /* Link Control */
 #define OGF_LINK_CTL   0x01 
+
 #define OCF_CREATE_CONN                0x0005
 struct hci_cp_create_conn {
        bdaddr_t bdaddr;
@@ -306,6 +308,11 @@ struct hci_cp_create_conn {
        __u8     role_switch;
 } __attribute__ ((packed));
 
+#define OCF_CREATE_CONN_CANCEL 0x0008
+struct hci_cp_create_conn_cancel {
+       bdaddr_t bdaddr;
+} __attribute__ ((packed));
+
 #define OCF_ACCEPT_CONN_REQ    0x0009
 struct hci_cp_accept_conn_req {
        bdaddr_t bdaddr;
@@ -339,6 +346,8 @@ struct hci_cp_inquiry {
 
 #define OCF_INQUIRY_CANCEL     0x0002
 
+#define OCF_EXIT_PERIODIC_INQ  0x0004
+
 #define OCF_LINK_KEY_REPLY     0x000B
 struct hci_cp_link_key_reply {
        bdaddr_t bdaddr;
@@ -700,6 +709,24 @@ struct hci_sco_hdr {
        __u8    dlen;
 } __attribute__ ((packed));
 
+#ifdef __KERNEL__
+#include <linux/skbuff.h>
+static inline struct hci_event_hdr *hci_event_hdr(const struct sk_buff *skb)
+{
+       return (struct hci_event_hdr *)skb->data;
+}
+
+static inline struct hci_acl_hdr *hci_acl_hdr(const struct sk_buff *skb)
+{
+       return (struct hci_acl_hdr *)skb->data;
+}
+
+static inline struct hci_sco_hdr *hci_sco_hdr(const struct sk_buff *skb)
+{
+       return (struct hci_sco_hdr *)skb->data;
+}
+#endif
+
 /* Command opcode pack/unpack */
 #define hci_opcode_pack(ogf, ocf)      (__u16) ((ocf & 0x03ff)|(ogf << 10))
 #define hci_opcode_ogf(op)             (op >> 10)
@@ -730,13 +757,13 @@ struct sockaddr_hci {
 struct hci_filter {
        unsigned long type_mask;
        unsigned long event_mask[2];
-       __u16   opcode;
+       __le16   opcode;
 };
 
 struct hci_ufilter {
        __u32   type_mask;
        __u32   event_mask[2];
-       __u16   opcode;
+       __le16   opcode;
 };
 
 #define HCI_FLT_TYPE_BITS      31