diff options
Diffstat (limited to 'include/net/bluetooth/hci.h')
-rw-r--r-- | include/net/bluetooth/hci.h | 83 |
1 files changed, 81 insertions, 2 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 40129b3838b2..8e54f825153c 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -102,6 +102,28 @@ enum { | |||
102 | */ | 102 | */ |
103 | HCI_QUIRK_FIXUP_BUFFER_SIZE, | 103 | HCI_QUIRK_FIXUP_BUFFER_SIZE, |
104 | 104 | ||
105 | /* When this quirk is set, then a controller that does not | ||
106 | * indicate support for Inquiry Result with RSSI is assumed to | ||
107 | * support it anyway. Some early Bluetooth 1.2 controllers had | ||
108 | * wrongly configured local features that will require forcing | ||
109 | * them to enable this mode. Getting RSSI information with the | ||
110 | * inquiry responses is preferred since it allows for a better | ||
111 | * user expierence. | ||
112 | * | ||
113 | * This quirk must be set before hci_register_dev is called. | ||
114 | */ | ||
115 | HCI_QUIRK_FIXUP_INQUIRY_MODE, | ||
116 | |||
117 | /* When this quirk is set, then the HCI Read Local Supported | ||
118 | * Commands command is not supported. In general Bluetooth 1.2 | ||
119 | * and later controllers should support this command. However | ||
120 | * some controllers indicate Bluetooth 1.2 support, but do | ||
121 | * not support this command. | ||
122 | * | ||
123 | * This quirk must be set before hci_register_dev is called. | ||
124 | */ | ||
125 | HCI_QUIRK_BROKEN_LOCAL_COMMANDS, | ||
126 | |||
105 | /* When this quirk is set, then no stored link key handling | 127 | /* When this quirk is set, then no stored link key handling |
106 | * is performed. This is mainly due to the fact that the | 128 | * is performed. This is mainly due to the fact that the |
107 | * HCI Delete Stored Link Key command is advertised, but | 129 | * HCI Delete Stored Link Key command is advertised, but |
@@ -162,8 +184,7 @@ enum { | |||
162 | */ | 184 | */ |
163 | enum { | 185 | enum { |
164 | HCI_DUT_MODE, | 186 | HCI_DUT_MODE, |
165 | HCI_FORCE_SC, | 187 | HCI_FORCE_BREDR_SMP, |
166 | HCI_FORCE_LESC, | ||
167 | HCI_FORCE_STATIC_ADDR, | 188 | HCI_FORCE_STATIC_ADDR, |
168 | }; | 189 | }; |
169 | 190 | ||
@@ -343,6 +364,7 @@ enum { | |||
343 | #define HCI_LE_ENCRYPTION 0x01 | 364 | #define HCI_LE_ENCRYPTION 0x01 |
344 | #define HCI_LE_CONN_PARAM_REQ_PROC 0x02 | 365 | #define HCI_LE_CONN_PARAM_REQ_PROC 0x02 |
345 | #define HCI_LE_PING 0x10 | 366 | #define HCI_LE_PING 0x10 |
367 | #define HCI_LE_DATA_LEN_EXT 0x20 | ||
346 | #define HCI_LE_EXT_SCAN_POLICY 0x80 | 368 | #define HCI_LE_EXT_SCAN_POLICY 0x80 |
347 | 369 | ||
348 | /* Connection modes */ | 370 | /* Connection modes */ |
@@ -833,11 +855,26 @@ struct hci_cp_set_event_flt { | |||
833 | #define HCI_CONN_SETUP_AUTO_OFF 0x01 | 855 | #define HCI_CONN_SETUP_AUTO_OFF 0x01 |
834 | #define HCI_CONN_SETUP_AUTO_ON 0x02 | 856 | #define HCI_CONN_SETUP_AUTO_ON 0x02 |
835 | 857 | ||
858 | #define HCI_OP_READ_STORED_LINK_KEY 0x0c0d | ||
859 | struct hci_cp_read_stored_link_key { | ||
860 | bdaddr_t bdaddr; | ||
861 | __u8 read_all; | ||
862 | } __packed; | ||
863 | struct hci_rp_read_stored_link_key { | ||
864 | __u8 status; | ||
865 | __u8 max_keys; | ||
866 | __u8 num_keys; | ||
867 | } __packed; | ||
868 | |||
836 | #define HCI_OP_DELETE_STORED_LINK_KEY 0x0c12 | 869 | #define HCI_OP_DELETE_STORED_LINK_KEY 0x0c12 |
837 | struct hci_cp_delete_stored_link_key { | 870 | struct hci_cp_delete_stored_link_key { |
838 | bdaddr_t bdaddr; | 871 | bdaddr_t bdaddr; |
839 | __u8 delete_all; | 872 | __u8 delete_all; |
840 | } __packed; | 873 | } __packed; |
874 | struct hci_rp_delete_stored_link_key { | ||
875 | __u8 status; | ||
876 | __u8 num_keys; | ||
877 | } __packed; | ||
841 | 878 | ||
842 | #define HCI_MAX_NAME_LENGTH 248 | 879 | #define HCI_MAX_NAME_LENGTH 248 |
843 | 880 | ||
@@ -1371,6 +1408,39 @@ struct hci_cp_le_conn_param_req_neg_reply { | |||
1371 | __u8 reason; | 1408 | __u8 reason; |
1372 | } __packed; | 1409 | } __packed; |
1373 | 1410 | ||
1411 | #define HCI_OP_LE_SET_DATA_LEN 0x2022 | ||
1412 | struct hci_cp_le_set_data_len { | ||
1413 | __le16 handle; | ||
1414 | __le16 tx_len; | ||
1415 | __le16 tx_time; | ||
1416 | } __packed; | ||
1417 | struct hci_rp_le_set_data_len { | ||
1418 | __u8 status; | ||
1419 | __le16 handle; | ||
1420 | } __packed; | ||
1421 | |||
1422 | #define HCI_OP_LE_READ_DEF_DATA_LEN 0x2023 | ||
1423 | struct hci_rp_le_read_def_data_len { | ||
1424 | __u8 status; | ||
1425 | __le16 tx_len; | ||
1426 | __le16 tx_time; | ||
1427 | } __packed; | ||
1428 | |||
1429 | #define HCI_OP_LE_WRITE_DEF_DATA_LEN 0x2024 | ||
1430 | struct hci_cp_le_write_def_data_len { | ||
1431 | __le16 tx_len; | ||
1432 | __le16 tx_time; | ||
1433 | } __packed; | ||
1434 | |||
1435 | #define HCI_OP_LE_READ_MAX_DATA_LEN 0x202f | ||
1436 | struct hci_rp_le_read_max_data_len { | ||
1437 | __u8 status; | ||
1438 | __le16 tx_len; | ||
1439 | __le16 tx_time; | ||
1440 | __le16 rx_len; | ||
1441 | __le16 rx_time; | ||
1442 | } __packed; | ||
1443 | |||
1374 | /* ---- HCI Events ---- */ | 1444 | /* ---- HCI Events ---- */ |
1375 | #define HCI_EV_INQUIRY_COMPLETE 0x01 | 1445 | #define HCI_EV_INQUIRY_COMPLETE 0x01 |
1376 | 1446 | ||
@@ -1796,6 +1866,15 @@ struct hci_ev_le_remote_conn_param_req { | |||
1796 | __le16 timeout; | 1866 | __le16 timeout; |
1797 | } __packed; | 1867 | } __packed; |
1798 | 1868 | ||
1869 | #define HCI_EV_LE_DATA_LEN_CHANGE 0x07 | ||
1870 | struct hci_ev_le_data_len_change { | ||
1871 | __le16 handle; | ||
1872 | __le16 tx_len; | ||
1873 | __le16 tx_time; | ||
1874 | __le16 rx_len; | ||
1875 | __le16 rx_time; | ||
1876 | } __packed; | ||
1877 | |||
1799 | #define HCI_EV_LE_DIRECT_ADV_REPORT 0x0B | 1878 | #define HCI_EV_LE_DIRECT_ADV_REPORT 0x0B |
1800 | struct hci_ev_le_direct_adv_info { | 1879 | struct hci_ev_le_direct_adv_info { |
1801 | __u8 evt_type; | 1880 | __u8 evt_type; |