Bluetooth: Connection Parameter Update Procedure
[pandora-kernel.git] / include / net / bluetooth / hci.h
index 4261a67..95b7547 100644 (file)
@@ -104,6 +104,15 @@ enum {
        HCI_RESET,
 };
 
+/* BR/EDR and/or LE controller flags: the flags defined here should represent
+ * states configured via debugfs for debugging and testing purposes only.
+ */
+enum {
+       HCI_DUT_MODE,
+       HCI_FORCE_SC,
+       HCI_FORCE_STATIC_ADDR,
+};
+
 /*
  * BR/EDR and/or LE controller flags: the flags defined here should represent
  * states from the controller.
@@ -115,10 +124,8 @@ enum {
        HCI_MGMT,
        HCI_PAIRABLE,
        HCI_SERVICE_CACHE,
-       HCI_DEBUG_KEYS,
-       HCI_DUT_MODE,
-       HCI_FORCE_SC,
-       HCI_FORCE_STATIC_ADDR,
+       HCI_KEEP_DEBUG_KEYS,
+       HCI_USE_DEBUG_KEYS,
        HCI_UNREGISTER,
        HCI_USER_CHANNEL,
 
@@ -139,7 +146,6 @@ enum {
        HCI_PERIODIC_INQ,
        HCI_FAST_CONNECTABLE,
        HCI_BREDR_ENABLED,
-       HCI_6LOWPAN_ENABLED,
        HCI_LE_SCAN_INTERRUPTED,
 };
 
@@ -347,17 +353,9 @@ enum {
 #define HCI_LK_CHANGED_COMBINATION     0x06
 #define HCI_LK_UNAUTH_COMBINATION_P256 0x07
 #define HCI_LK_AUTH_COMBINATION_P256   0x08
-/* The spec doesn't define types for SMP keys, the _MASTER suffix is implied */
-#define HCI_SMP_STK                    0x80
-#define HCI_SMP_STK_SLAVE              0x81
-#define HCI_SMP_LTK                    0x82
-#define HCI_SMP_LTK_SLAVE              0x83
-
-/* Long Term Key types */
-#define HCI_LTK_UNAUTH                 0x00
-#define HCI_LTK_AUTH                   0x01
 
 /* ---- HCI Error Codes ---- */
+#define HCI_ERROR_UNKNOWN_CONN_ID      0x02
 #define HCI_ERROR_AUTH_FAILURE         0x05
 #define HCI_ERROR_MEMORY_EXCEEDED      0x07
 #define HCI_ERROR_CONNECTION_TIMEOUT   0x08
@@ -367,6 +365,7 @@ enum {
 #define HCI_ERROR_REMOTE_POWER_OFF     0x15
 #define HCI_ERROR_LOCAL_HOST_TERM      0x16
 #define HCI_ERROR_PAIRING_NOT_ALLOWED  0x18
+#define HCI_ERROR_INVALID_LL_PARAMS    0x1E
 #define HCI_ERROR_ADVERTISING_TIMEOUT  0x3c
 
 /* Flow control modes */
@@ -536,6 +535,11 @@ struct hci_cp_read_remote_version {
        __le16   handle;
 } __packed;
 
+#define HCI_OP_READ_CLOCK_OFFSET       0x041f
+struct hci_cp_read_clock_offset {
+       __le16   handle;
+} __packed;
+
 #define HCI_OP_SETUP_SYNC_CONN         0x0428
 struct hci_cp_setup_sync_conn {
        __le16   handle;
@@ -1054,6 +1058,17 @@ struct hci_cp_write_page_scan_activity {
        __le16   window;
 } __packed;
 
+#define HCI_OP_READ_TX_POWER           0x0c2d
+struct hci_cp_read_tx_power {
+       __le16   handle;
+       __u8     type;
+} __packed;
+struct hci_rp_read_tx_power {
+       __u8     status;
+       __le16   handle;
+       __s8     tx_power;
+} __packed;
+
 #define HCI_OP_READ_PAGE_SCAN_TYPE     0x0c46
 struct hci_rp_read_page_scan_type {
        __u8     status;
@@ -1064,6 +1079,28 @@ struct hci_rp_read_page_scan_type {
        #define PAGE_SCAN_TYPE_STANDARD         0x00
        #define PAGE_SCAN_TYPE_INTERLACED       0x01
 
+#define HCI_OP_READ_RSSI               0x1405
+struct hci_cp_read_rssi {
+       __le16   handle;
+} __packed;
+struct hci_rp_read_rssi {
+       __u8     status;
+       __le16   handle;
+       __s8     rssi;
+} __packed;
+
+#define HCI_OP_READ_CLOCK              0x1407
+struct hci_cp_read_clock {
+       __le16   handle;
+       __u8     which;
+} __packed;
+struct hci_rp_read_clock {
+       __u8     status;
+       __le16   handle;
+       __le32   clock;
+       __le16   accuracy;
+} __packed;
+
 #define HCI_OP_READ_LOCAL_AMP_INFO     0x1409
 struct hci_rp_read_local_amp_info {
        __u8     status;
@@ -1270,6 +1307,23 @@ struct hci_rp_le_read_supported_states {
        __u8    le_states[8];
 } __packed;
 
+#define HCI_OP_LE_CONN_PARAM_REQ_REPLY 0x2020
+struct hci_cp_le_conn_param_req_reply {
+       __le16  handle;
+       __le16  interval_min;
+       __le16  interval_max;
+       __le16  latency;
+       __le16  timeout;
+       __le16  min_ce_len;
+       __le16  max_ce_len;
+} __packed;
+
+#define HCI_OP_LE_CONN_PARAM_REQ_NEG_REPLY     0x2021
+struct hci_cp_le_conn_param_req_neg_reply {
+       __le16  handle;
+       __u8    reason;
+} __packed;
+
 /* ---- HCI Events ---- */
 #define HCI_EV_INQUIRY_COMPLETE                0x01
 
@@ -1649,6 +1703,15 @@ struct hci_ev_le_conn_complete {
        __u8     clk_accurancy;
 } __packed;
 
+#define HCI_EV_LE_CONN_UPDATE_COMPLETE 0x03
+struct hci_ev_le_conn_update_complete {
+       __u8     status;
+       __le16   handle;
+       __le16   interval;
+       __le16   latency;
+       __le16   supervision_timeout;
+} __packed;
+
 #define HCI_EV_LE_LTK_REQ              0x05
 struct hci_ev_le_ltk_req {
        __le16  handle;
@@ -1656,6 +1719,15 @@ struct hci_ev_le_ltk_req {
        __le16  ediv;
 } __packed;
 
+#define HCI_EV_LE_REMOTE_CONN_PARAM_REQ        0x06
+struct hci_ev_le_remote_conn_param_req {
+       __le16 handle;
+       __le16 interval_min;
+       __le16 interval_max;
+       __le16 latency;
+       __le16 timeout;
+} __packed;
+
 /* Advertising report event types */
 #define LE_ADV_IND             0x00
 #define LE_ADV_DIRECT_IND      0x01