Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
[deliverable/linux.git] / include / net / bluetooth / hci.h
index 5de351e49d49cd45e4ead19ccefabb9a6fcb83c0..2a6b0b8b71201dac383ee058a9df6f7f595a150e 100644 (file)
@@ -31,6 +31,7 @@
 #define HCI_MAX_FRAME_SIZE     (HCI_MAX_ACL_SIZE + 4)
 
 #define HCI_LINK_KEY_SIZE      16
+#define HCI_AMP_LINK_KEY_SIZE  (2 * HCI_LINK_KEY_SIZE)
 
 /* HCI dev events */
 #define HCI_DEV_REG                    1
@@ -58,6 +59,9 @@
 #define HCI_BREDR      0x00
 #define HCI_AMP                0x01
 
+/* First BR/EDR Controller shall have ID = 0 */
+#define HCI_BREDR_ID   0
+
 /* HCI device quirks */
 enum {
        HCI_QUIRK_RESET_ON_CLOSE,
@@ -135,10 +139,8 @@ enum {
 #define HCIINQUIRY     _IOR('H', 240, int)
 
 /* HCI timeouts */
-#define HCI_CONNECT_TIMEOUT    (40000) /* 40 seconds */
 #define HCI_DISCONN_TIMEOUT    (2000)  /* 2 seconds */
 #define HCI_PAIRING_TIMEOUT    (60000) /* 60 seconds */
-#define HCI_IDLE_TIMEOUT       (6000)  /* 6 seconds */
 #define HCI_INIT_TIMEOUT       (10000) /* 10 seconds */
 #define HCI_CMD_TIMEOUT                (1000)  /* 1 seconds */
 #define HCI_ACL_TX_TIMEOUT     (45000) /* 45 seconds */
@@ -525,6 +527,28 @@ struct hci_cp_io_capability_neg_reply {
        __u8     reason;
 } __packed;
 
+#define HCI_OP_CREATE_PHY_LINK         0x0435
+struct hci_cp_create_phy_link {
+       __u8     phy_handle;
+       __u8     key_len;
+       __u8     key_type;
+       __u8     key[HCI_AMP_LINK_KEY_SIZE];
+} __packed;
+
+#define HCI_OP_ACCEPT_PHY_LINK         0x0436
+struct hci_cp_accept_phy_link {
+       __u8     phy_handle;
+       __u8     key_len;
+       __u8     key_type;
+       __u8     key[HCI_AMP_LINK_KEY_SIZE];
+} __packed;
+
+#define HCI_OP_DISCONN_PHY_LINK        0x0437
+struct hci_cp_disconn_phy_link {
+       __u8     phy_handle;
+       __u8     reason;
+} __packed;
+
 #define HCI_OP_SNIFF_MODE              0x0803
 struct hci_cp_sniff_mode {
        __le16   handle;
@@ -820,6 +844,31 @@ struct hci_rp_read_local_amp_info {
        __le32   be_flush_to;
 } __packed;
 
+#define HCI_OP_READ_LOCAL_AMP_ASSOC    0x140a
+struct hci_cp_read_local_amp_assoc {
+       __u8     phy_handle;
+       __le16   len_so_far;
+       __le16   max_len;
+} __packed;
+struct hci_rp_read_local_amp_assoc {
+       __u8     status;
+       __u8     phy_handle;
+       __le16   rem_len;
+       __u8     frag[0];
+} __packed;
+
+#define HCI_OP_WRITE_REMOTE_AMP_ASSOC  0x140b
+struct hci_cp_write_remote_amp_assoc {
+       __u8     phy_handle;
+       __le16   len_so_far;
+       __le16   rem_len;
+       __u8     frag[0];
+} __packed;
+struct hci_rp_write_remote_amp_assoc {
+       __u8     status;
+       __u8     phy_handle;
+} __packed;
+
 #define HCI_OP_LE_SET_EVENT_MASK       0x2001
 struct hci_cp_le_set_event_mask {
        __u8     mask[8];
@@ -1146,6 +1195,12 @@ struct extended_inquiry_info {
        __u8     data[240];
 } __packed;
 
+#define HCI_EV_KEY_REFRESH_COMPLETE    0x30
+struct hci_ev_key_refresh_complete {
+       __u8    status;
+       __le16  handle;
+} __packed;
+
 #define HCI_EV_IO_CAPA_REQUEST         0x31
 struct hci_ev_io_capa_request {
        bdaddr_t bdaddr;
@@ -1192,6 +1247,39 @@ struct hci_ev_le_meta {
        __u8     subevent;
 } __packed;
 
+#define HCI_EV_PHY_LINK_COMPLETE       0x40
+struct hci_ev_phy_link_complete {
+       __u8     status;
+       __u8     phy_handle;
+} __packed;
+
+#define HCI_EV_CHANNEL_SELECTED                0x41
+struct hci_ev_channel_selected {
+       __u8     phy_handle;
+} __packed;
+
+#define HCI_EV_DISCONN_PHY_LINK_COMPLETE       0x42
+struct hci_ev_disconn_phy_link_complete {
+       __u8     status;
+       __u8     phy_handle;
+       __u8     reason;
+} __packed;
+
+#define HCI_EV_LOGICAL_LINK_COMPLETE           0x45
+struct hci_ev_logical_link_complete {
+       __u8     status;
+       __le16   handle;
+       __u8     phy_handle;
+       __u8     flow_spec_id;
+} __packed;
+
+#define HCI_EV_DISCONN_LOGICAL_LINK_COMPLETE   0x46
+struct hci_ev_disconn_logical_link_complete {
+       __u8     status;
+       __le16   handle;
+       __u8     reason;
+} __packed;
+
 #define HCI_EV_NUM_COMP_BLOCKS         0x48
 struct hci_comp_blocks_info {
        __le16   handle;
@@ -1292,7 +1380,6 @@ struct hci_sco_hdr {
        __u8    dlen;
 } __packed;
 
-#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;
This page took 0.027955 seconds and 5 git commands to generate.