aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth/hci.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/bluetooth/hci.h')
-rw-r--r--include/net/bluetooth/hci.h59
1 files changed, 45 insertions, 14 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 8e54f825153c..d95da83cb1b0 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -160,6 +160,14 @@ enum {
160 * during the hdev->setup vendor callback. 160 * during the hdev->setup vendor callback.
161 */ 161 */
162 HCI_QUIRK_STRICT_DUPLICATE_FILTER, 162 HCI_QUIRK_STRICT_DUPLICATE_FILTER,
163
164 /* When this quirk is set, LE scan and BR/EDR inquiry is done
165 * simultaneously, otherwise it's interleaved.
166 *
167 * This quirk can be set before hci_register_dev is called or
168 * during the hdev->setup vendor callback.
169 */
170 HCI_QUIRK_SIMULTANEOUS_DISCOVERY,
163}; 171};
164 172
165/* HCI device flags */ 173/* HCI device flags */
@@ -179,13 +187,14 @@ enum {
179 HCI_RESET, 187 HCI_RESET,
180}; 188};
181 189
182/* BR/EDR and/or LE controller flags: the flags defined here should represent 190/* HCI socket flags */
183 * states configured via debugfs for debugging and testing purposes only.
184 */
185enum { 191enum {
186 HCI_DUT_MODE, 192 HCI_SOCK_TRUSTED,
187 HCI_FORCE_BREDR_SMP, 193 HCI_MGMT_INDEX_EVENTS,
188 HCI_FORCE_STATIC_ADDR, 194 HCI_MGMT_UNCONF_INDEX_EVENTS,
195 HCI_MGMT_EXT_INDEX_EVENTS,
196 HCI_MGMT_GENERIC_EVENTS,
197 HCI_MGMT_OOB_DATA_EVENTS,
189}; 198};
190 199
191/* 200/*
@@ -217,6 +226,8 @@ enum {
217 HCI_HS_ENABLED, 226 HCI_HS_ENABLED,
218 HCI_LE_ENABLED, 227 HCI_LE_ENABLED,
219 HCI_ADVERTISING, 228 HCI_ADVERTISING,
229 HCI_ADVERTISING_CONNECTABLE,
230 HCI_ADVERTISING_INSTANCE,
220 HCI_CONNECTABLE, 231 HCI_CONNECTABLE,
221 HCI_DISCOVERABLE, 232 HCI_DISCOVERABLE,
222 HCI_LIMITED_DISCOVERABLE, 233 HCI_LIMITED_DISCOVERABLE,
@@ -225,13 +236,13 @@ enum {
225 HCI_FAST_CONNECTABLE, 236 HCI_FAST_CONNECTABLE,
226 HCI_BREDR_ENABLED, 237 HCI_BREDR_ENABLED,
227 HCI_LE_SCAN_INTERRUPTED, 238 HCI_LE_SCAN_INTERRUPTED,
228};
229 239
230/* A mask for the flags that are supposed to remain when a reset happens 240 HCI_DUT_MODE,
231 * or the HCI device is closed. 241 HCI_FORCE_BREDR_SMP,
232 */ 242 HCI_FORCE_STATIC_ADDR,
233#define HCI_PERSISTENT_MASK (BIT(HCI_LE_SCAN) | BIT(HCI_PERIODIC_INQ) | \ 243
234 BIT(HCI_FAST_CONNECTABLE) | BIT(HCI_LE_ADV)) 244 __HCI_NUM_FLAGS,
245};
235 246
236/* HCI timeouts */ 247/* HCI timeouts */
237#define HCI_DISCONN_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */ 248#define HCI_DISCONN_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */
@@ -363,6 +374,7 @@ enum {
363/* LE features */ 374/* LE features */
364#define HCI_LE_ENCRYPTION 0x01 375#define HCI_LE_ENCRYPTION 0x01
365#define HCI_LE_CONN_PARAM_REQ_PROC 0x02 376#define HCI_LE_CONN_PARAM_REQ_PROC 0x02
377#define HCI_LE_SLAVE_FEATURES 0x08
366#define HCI_LE_PING 0x10 378#define HCI_LE_PING 0x10
367#define HCI_LE_DATA_LEN_EXT 0x20 379#define HCI_LE_DATA_LEN_EXT 0x20
368#define HCI_LE_EXT_SCAN_POLICY 0x80 380#define HCI_LE_EXT_SCAN_POLICY 0x80
@@ -452,9 +464,16 @@ enum {
452#define EIR_NAME_COMPLETE 0x09 /* complete local name */ 464#define EIR_NAME_COMPLETE 0x09 /* complete local name */
453#define EIR_TX_POWER 0x0A /* transmit power level */ 465#define EIR_TX_POWER 0x0A /* transmit power level */
454#define EIR_CLASS_OF_DEV 0x0D /* Class of Device */ 466#define EIR_CLASS_OF_DEV 0x0D /* Class of Device */
455#define EIR_SSP_HASH_C 0x0E /* Simple Pairing Hash C */ 467#define EIR_SSP_HASH_C192 0x0E /* Simple Pairing Hash C-192 */
456#define EIR_SSP_RAND_R 0x0F /* Simple Pairing Randomizer R */ 468#define EIR_SSP_RAND_R192 0x0F /* Simple Pairing Randomizer R-192 */
457#define EIR_DEVICE_ID 0x10 /* device ID */ 469#define EIR_DEVICE_ID 0x10 /* device ID */
470#define EIR_APPEARANCE 0x19 /* Device appearance */
471#define EIR_LE_BDADDR 0x1B /* LE Bluetooth device address */
472#define EIR_LE_ROLE 0x1C /* LE role */
473#define EIR_SSP_HASH_C256 0x1D /* Simple Pairing Hash C-256 */
474#define EIR_SSP_RAND_R256 0x1E /* Simple Pairing Rand R-256 */
475#define EIR_LE_SC_CONFIRM 0x22 /* LE SC Confirmation Value */
476#define EIR_LE_SC_RANDOM 0x23 /* LE SC Random Value */
458 477
459/* Low Energy Advertising Flags */ 478/* Low Energy Advertising Flags */
460#define LE_AD_LIMITED 0x01 /* Limited Discoverable */ 479#define LE_AD_LIMITED 0x01 /* Limited Discoverable */
@@ -1358,6 +1377,11 @@ struct hci_cp_le_conn_update {
1358 __le16 max_ce_len; 1377 __le16 max_ce_len;
1359} __packed; 1378} __packed;
1360 1379
1380#define HCI_OP_LE_READ_REMOTE_FEATURES 0x2016
1381struct hci_cp_le_read_remote_features {
1382 __le16 handle;
1383} __packed;
1384
1361#define HCI_OP_LE_START_ENC 0x2019 1385#define HCI_OP_LE_START_ENC 0x2019
1362struct hci_cp_le_start_enc { 1386struct hci_cp_le_start_enc {
1363 __le16 handle; 1387 __le16 handle;
@@ -1850,6 +1874,13 @@ struct hci_ev_le_conn_update_complete {
1850 __le16 supervision_timeout; 1874 __le16 supervision_timeout;
1851} __packed; 1875} __packed;
1852 1876
1877#define HCI_EV_LE_REMOTE_FEAT_COMPLETE 0x04
1878struct hci_ev_le_remote_feat_complete {
1879 __u8 status;
1880 __le16 handle;
1881 __u8 features[8];
1882} __packed;
1883
1853#define HCI_EV_LE_LTK_REQ 0x05 1884#define HCI_EV_LE_LTK_REQ 0x05
1854struct hci_ev_le_ltk_req { 1885struct hci_ev_le_ltk_req {
1855 __le16 handle; 1886 __le16 handle;