History

Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next

Johan Hedberg says: ==================== pull request: bluetooth-next 2020-07-31 Here's the main bluetooth-next pull request for 5.9: - Fix firmware filenames for Marvell chipsets - Several suspend-related fixes - Addedd mgmt commands for runtime configuration - Multiple fixes for Qualcomm-based controllers - Add new monitoring feature for mgmt - Fix handling of legacy cipher (E4) together with security level 4 - Add support for Realtek 8822CE controller - Fix issues with Chinese controllers using fake VID/PID values - Multiple other smaller fixes & improvements ====================

David S. Miller committed 6 years ago

Commit 4bb540d2 parents bd69058 075f77344 files · +2149 −324Browse files

Showing the changes to include (6 of 44 files). Show all

Unified · Split

6 files
  1. include/net/bluetooth/bluetooth.h +12 −0
  2. include/net/bluetooth/hci.h +26 −2
  3. include/net/bluetooth/hci_core.h +96 −11
  4. include/net/bluetooth/hci_sock.h +2 −2
  5. include/net/bluetooth/mgmt.h +95 −0
  6. include/net/bluetooth/sco.h +2 −0
include/net/bluetooth/bluetooth.h+12−0
@@ -41,6 +41,8 @@ · 40 unmodified lines
41#define BLUETOOTH_VER_1_1 141#define BLUETOOTH_VER_1_1 1
42#define BLUETOOTH_VER_1_2 242#define BLUETOOTH_VER_1_2 2
43#define BLUETOOTH_VER_2_0 343#define BLUETOOTH_VER_2_0 3
44#define BLUETOOTH_VER_2_1 4
45#define BLUETOOTH_VER_4_0 6
44 46
45/* Reserv for core and drivers use */47/* Reserv for core and drivers use */
46#define BT_SKB_RESERVE 848#define BT_SKB_RESERVE 8
@@ -147,6 +149,10 @@ struct bt_voice { · 100 unmodified lines
147#define BT_MODE_LE_FLOWCTL 0x03149#define BT_MODE_LE_FLOWCTL 0x03
148#define BT_MODE_EXT_FLOWCTL 0x04150#define BT_MODE_EXT_FLOWCTL 0x04
149 151
152#define BT_PKT_STATUS 16
153
154#define BT_SCM_PKT_STATUS 0x03
155
150__printf(1, 2)156__printf(1, 2)
151void bt_info(const char *fmt, ...);157void bt_info(const char *fmt, ...);
152__printf(1, 2)158__printf(1, 2)
@@ -286,6 +292,7 @@ struct bt_sock { · 133 unmodified lines
286 struct sock *parent;292 struct sock *parent;
287 unsigned long flags;293 unsigned long flags;
288 void (*skb_msg_name)(struct sk_buff *, void *, int *);294 void (*skb_msg_name)(struct sk_buff *, void *, int *);
295 void (*skb_put_cmsg)(struct sk_buff *, struct msghdr *, struct sock *);
289};296};
290 297
291enum {298enum {
@@ -335,6 +342,10 @@ struct l2cap_ctrl { · 43 unmodified lines
335 struct l2cap_chan *chan;342 struct l2cap_chan *chan;
336};343};
337 344
345struct sco_ctrl {
346 u8 pkt_status;
347};
348
338struct hci_dev;349struct hci_dev;
339 350
340typedef void (*hci_req_complete_t)(struct hci_dev *hdev, u8 status, u16 opcode);351typedef void (*hci_req_complete_t)(struct hci_dev *hdev, u8 status, u16 opcode);
@@ -361,6 +372,7 @@ struct bt_skb_cb { · 20 unmodified lines
361 u8 incoming:1;372 u8 incoming:1;
362 union {373 union {
363 struct l2cap_ctrl l2cap;374 struct l2cap_ctrl l2cap;
375 struct sco_ctrl sco;
364 struct hci_ctrl hci;376 struct hci_ctrl hci;
365 };377 };
366};378};
include/net/bluetooth/hci.h+26−2
@@ -227,6 +227,17 @@ enum { · 226 unmodified lines
227 * supported.227 * supported.
228 */228 */
229 HCI_QUIRK_VALID_LE_STATES,229 HCI_QUIRK_VALID_LE_STATES,
230
231 /* When this quirk is set, then erroneous data reporting
232 * is ignored. This is mainly due to the fact that the HCI
233 * Read Default Erroneous Data Reporting command is advertised,
234 * but not supported; these controllers often reply with unknown
235 * command and tend to lock up randomly. Needing a hard reset.
236 *
237 * This quirk can be set before hci_register_dev is called or
238 * during the hdev->setup vendor callback.
239 */
240 HCI_QUIRK_BROKEN_ERR_DATA_REPORTING,
230};241};
231 242
232/* HCI device flags */243/* HCI device flags */
@@ -307,6 +318,7 @@ enum { · 74 unmodified lines
307 HCI_FORCE_BREDR_SMP,318 HCI_FORCE_BREDR_SMP,
308 HCI_FORCE_STATIC_ADDR,319 HCI_FORCE_STATIC_ADDR,
309 HCI_LL_RPA_RESOLUTION,320 HCI_LL_RPA_RESOLUTION,
321 HCI_ENABLE_LL_PRIVACY,
310 HCI_CMD_PENDING,322 HCI_CMD_PENDING,
311 HCI_FORCE_NO_MITM,323 HCI_FORCE_NO_MITM,
312 324
@@ -1637,6 +1649,8 @@ struct hci_rp_le_read_resolv_list_size { · 1324 unmodified lines
1637 1649
1638#define HCI_OP_LE_SET_ADDR_RESOLV_ENABLE 0x202d1650#define HCI_OP_LE_SET_ADDR_RESOLV_ENABLE 0x202d
1639 1651
1652#define HCI_OP_LE_SET_RPA_TIMEOUT 0x202e
1653
1640#define HCI_OP_LE_READ_MAX_DATA_LEN 0x202f1654#define HCI_OP_LE_READ_MAX_DATA_LEN 0x202f
1641struct hci_rp_le_read_max_data_len {1655struct hci_rp_le_read_max_data_len {
1642 __u8 status;1656 __u8 status;
@@ -2268,8 +2282,10 @@ struct hci_ev_le_conn_complete { · 625 unmodified lines
2268#define LE_EXT_ADV_SCAN_RSP 0x00082282#define LE_EXT_ADV_SCAN_RSP 0x0008
2269#define LE_EXT_ADV_LEGACY_PDU 0x00102283#define LE_EXT_ADV_LEGACY_PDU 0x0010
2270 2284
2271#define ADDR_LE_DEV_PUBLIC 0x002285#define ADDR_LE_DEV_PUBLIC 0x00
2272#define ADDR_LE_DEV_RANDOM 0x012286#define ADDR_LE_DEV_RANDOM 0x01
2287#define ADDR_LE_DEV_PUBLIC_RESOLVED 0x02
2288#define ADDR_LE_DEV_RANDOM_RESOLVED 0x03
2273 2289
2274#define HCI_EV_LE_ADVERTISING_REPORT 0x022290#define HCI_EV_LE_ADVERTISING_REPORT 0x02
2275struct hci_ev_le_advertising_info {2291struct hci_ev_le_advertising_info {
@@ -2516,4 +2532,12 @@ static inline struct hci_sco_hdr *hci_sco_hdr(const struct sk_buff *skb) · 240 unmodified lines
2516#define hci_iso_data_len(h) ((h) & 0x3fff)2532#define hci_iso_data_len(h) ((h) & 0x3fff)
2517#define hci_iso_data_flags(h) ((h) >> 14)2533#define hci_iso_data_flags(h) ((h) >> 14)
2518 2534
2535/* le24 support */
2536static inline void hci_cpu_to_le24(__u32 val, __u8 dst[3])
2537{
2538 dst[0] = val & 0xff;
2539 dst[1] = (val & 0xff00) >> 8;
2540 dst[2] = (val & 0xff0000) >> 16;
2541}
2542
2519#endif /* __HCI_H */2543#endif /* __HCI_H */
include/net/bluetooth/hci_core.h+96−11
@@ -25,6 +25,7 @@ · 24 unmodified lines
25#ifndef __HCI_CORE_H25#ifndef __HCI_CORE_H
26#define __HCI_CORE_H26#define __HCI_CORE_H
27 27
28#include <linux/idr.h>
28#include <linux/leds.h>29#include <linux/leds.h>
29#include <linux/rculist.h>30#include <linux/rculist.h>
30 31
@@ -136,6 +137,23 @@ struct bdaddr_list_with_irk { · 105 unmodified lines
136 u8 local_irk[16];137 u8 local_irk[16];
137};138};
138 139
140struct bdaddr_list_with_flags {
141 struct list_head list;
142 bdaddr_t bdaddr;
143 u8 bdaddr_type;
144 u32 current_flags;
145};
146
147enum hci_conn_flags {
148 HCI_CONN_FLAG_REMOTE_WAKEUP,
149 HCI_CONN_FLAG_MAX
150};
151
152#define hci_conn_test_flag(nr, flags) ((flags) & (1U << nr))
153
154/* Make sure number of flags doesn't exceed sizeof(current_flags) */
155static_assert(HCI_CONN_FLAG_MAX < 32);
156
139struct bt_uuid {157struct bt_uuid {
140 struct list_head list;158 struct list_head list;
141 u8 uuid[16];159 u8 uuid[16];
@@ -220,6 +238,24 @@ struct adv_info { · 78 unmodified lines
220#define HCI_MAX_ADV_INSTANCES 5238#define HCI_MAX_ADV_INSTANCES 5
221#define HCI_DEFAULT_ADV_DURATION 2239#define HCI_DEFAULT_ADV_DURATION 2
222 240
241struct adv_pattern {
242 struct list_head list;
243 __u8 ad_type;
244 __u8 offset;
245 __u8 length;
246 __u8 value[HCI_MAX_AD_LENGTH];
247};
248
249struct adv_monitor {
250 struct list_head patterns;
251 bool active;
252 __u16 handle;
253};
254
255#define HCI_MIN_ADV_MONITOR_HANDLE 1
256#define HCI_MAX_ADV_MONITOR_NUM_HANDLES 32
257#define HCI_MAX_ADV_MONITOR_NUM_PATTERNS 16
258
223#define HCI_MAX_SHORT_NAME_LENGTH 10259#define HCI_MAX_SHORT_NAME_LENGTH 10
224 260
225/* Min encryption key size to match with SMP */261/* Min encryption key size to match with SMP */
@@ -295,6 +331,14 @@ struct hci_dev { · 69 unmodified lines
295 __u8 le_scan_type;331 __u8 le_scan_type;
296 __u16 le_scan_interval;332 __u16 le_scan_interval;
297 __u16 le_scan_window;333 __u16 le_scan_window;
334 __u16 le_scan_int_suspend;
335 __u16 le_scan_window_suspend;
336 __u16 le_scan_int_discovery;
337 __u16 le_scan_window_discovery;
338 __u16 le_scan_int_adv_monitor;
339 __u16 le_scan_window_adv_monitor;
340 __u16 le_scan_int_connect;
341 __u16 le_scan_window_connect;
298 __u16 le_conn_min_interval;342 __u16 le_conn_min_interval;
299 __u16 le_conn_max_interval;343 __u16 le_conn_max_interval;
300 __u16 le_conn_latency;344 __u16 le_conn_latency;
@@ -323,6 +367,17 @@ struct hci_dev { · 22 unmodified lines
323 __u16 devid_product;367 __u16 devid_product;
324 __u16 devid_version;368 __u16 devid_version;
325 369
370 __u8 def_page_scan_type;
371 __u16 def_page_scan_int;
372 __u16 def_page_scan_window;
373 __u8 def_inq_scan_type;
374 __u16 def_inq_scan_int;
375 __u16 def_inq_scan_window;
376 __u16 def_br_lsto;
377 __u16 def_page_timeout;
378 __u16 def_multi_adv_rotation_duration;
379 __u16 def_le_autoconnect_timeout;
380
326 __u16 pkt_type;381 __u16 pkt_type;
327 __u16 esco_type;382 __u16 esco_type;
328 __u16 link_policy;383 __u16 link_policy;
@@ -438,7 +493,6 @@ struct hci_dev { · 109 unmodified lines
438 struct list_head mgmt_pending;493 struct list_head mgmt_pending;
439 struct list_head blacklist;494 struct list_head blacklist;
440 struct list_head whitelist;495 struct list_head whitelist;
441 struct list_head wakeable;
442 struct list_head uuids;496 struct list_head uuids;
443 struct list_head link_keys;497 struct list_head link_keys;
444 struct list_head long_term_keys;498 struct list_head long_term_keys;
@@ -477,6 +531,9 @@ struct hci_dev { · 32 unmodified lines
477 __u16 adv_instance_timeout;531 __u16 adv_instance_timeout;
478 struct delayed_work adv_instance_expire;532 struct delayed_work adv_instance_expire;
479 533
534 struct idr adv_monitors_idr;
535 unsigned int adv_monitors_cnt;
536
480 __u8 irk[16];537 __u8 irk[16];
481 __u32 rpa_timeout;538 __u32 rpa_timeout;
482 struct delayed_work rpa_expired;539 struct delayed_work rpa_expired;
@@ -508,6 +565,12 @@ struct hci_dev { · 25 unmodified lines
508 565
509#define HCI_PHY_HANDLE(handle) (handle & 0xff)566#define HCI_PHY_HANDLE(handle) (handle & 0xff)
510 567
568enum conn_reasons {
569 CONN_REASON_PAIR_DEVICE,
570 CONN_REASON_L2CAP_CHAN,
571 CONN_REASON_SCO_CONNECT,
572};
573
511struct hci_conn {574struct hci_conn {
512 struct list_head list;575 struct list_head list;
513 576
@@ -559,6 +622,8 @@ struct hci_conn { · 45 unmodified lines
559 __s8 max_tx_power;622 __s8 max_tx_power;
560 unsigned long flags;623 unsigned long flags;
561 624
625 enum conn_reasons conn_reason;
626
562 __u32 clock;627 __u32 clock;
563 __u16 clock_accuracy;628 __u16 clock_accuracy;
564 629
@@ -626,7 +691,7 @@ struct hci_conn_params { · 61 unmodified lines
626 691
627 struct hci_conn *conn;692 struct hci_conn *conn;
628 bool explicit_connect;693 bool explicit_connect;
629 bool wakeable;694 u32 current_flags;
630};695};
631 696
632extern struct list_head hci_dev_list;697extern struct list_head hci_dev_list;
@@ -984,12 +1049,14 @@ struct hci_chan *hci_chan_lookup_handle(struct hci_dev *hdev, __u16 handle); · 351 unmodified lines
984 1049
985struct hci_conn *hci_connect_le_scan(struct hci_dev *hdev, bdaddr_t *dst,1050struct hci_conn *hci_connect_le_scan(struct hci_dev *hdev, bdaddr_t *dst,
986 u8 dst_type, u8 sec_level,1051 u8 dst_type, u8 sec_level,
987 u16 conn_timeout);1052 u16 conn_timeout,
1053 enum conn_reasons conn_reason);
988struct hci_conn *hci_connect_le(struct hci_dev *hdev, bdaddr_t *dst,1054struct hci_conn *hci_connect_le(struct hci_dev *hdev, bdaddr_t *dst,
989 u8 dst_type, u8 sec_level, u16 conn_timeout,1055 u8 dst_type, u8 sec_level, u16 conn_timeout,
990 u8 role, bdaddr_t *direct_rpa);1056 u8 role, bdaddr_t *direct_rpa);
991struct hci_conn *hci_connect_acl(struct hci_dev *hdev, bdaddr_t *dst,1057struct hci_conn *hci_connect_acl(struct hci_dev *hdev, bdaddr_t *dst,
992 u8 sec_level, u8 auth_type);1058 u8 sec_level, u8 auth_type,
1059 enum conn_reasons conn_reason);
993struct hci_conn *hci_connect_sco(struct hci_dev *hdev, int type, bdaddr_t *dst,1060struct hci_conn *hci_connect_sco(struct hci_dev *hdev, int type, bdaddr_t *dst,
994 __u16 setting);1061 __u16 setting);
995int hci_conn_check_link_mode(struct hci_conn *conn);1062int hci_conn_check_link_mode(struct hci_conn *conn);
@@ -1151,12 +1218,19 @@ struct bdaddr_list *hci_bdaddr_list_lookup(struct list_head *list, · 155 unmodified lines
1151struct bdaddr_list_with_irk *hci_bdaddr_list_lookup_with_irk(1218struct bdaddr_list_with_irk *hci_bdaddr_list_lookup_with_irk(
1152 struct list_head *list, bdaddr_t *bdaddr,1219 struct list_head *list, bdaddr_t *bdaddr,
1153 u8 type);1220 u8 type);
1221struct bdaddr_list_with_flags *
1222hci_bdaddr_list_lookup_with_flags(struct list_head *list, bdaddr_t *bdaddr,
1223 u8 type);
1154int hci_bdaddr_list_add(struct list_head *list, bdaddr_t *bdaddr, u8 type);1224int hci_bdaddr_list_add(struct list_head *list, bdaddr_t *bdaddr, u8 type);
1155int hci_bdaddr_list_add_with_irk(struct list_head *list, bdaddr_t *bdaddr,1225int hci_bdaddr_list_add_with_irk(struct list_head *list, bdaddr_t *bdaddr,
1156 u8 type, u8 *peer_irk, u8 *local_irk);1226 u8 type, u8 *peer_irk, u8 *local_irk);
1227int hci_bdaddr_list_add_with_flags(struct list_head *list, bdaddr_t *bdaddr,
1228 u8 type, u32 flags);
1157int hci_bdaddr_list_del(struct list_head *list, bdaddr_t *bdaddr, u8 type);1229int hci_bdaddr_list_del(struct list_head *list, bdaddr_t *bdaddr, u8 type);
1158int hci_bdaddr_list_del_with_irk(struct list_head *list, bdaddr_t *bdaddr,1230int hci_bdaddr_list_del_with_irk(struct list_head *list, bdaddr_t *bdaddr,
1159 u8 type);1231 u8 type);
1232int hci_bdaddr_list_del_with_flags(struct list_head *list, bdaddr_t *bdaddr,
1233 u8 type);
1160void hci_bdaddr_list_clear(struct list_head *list);1234void hci_bdaddr_list_clear(struct list_head *list);
1161 1235
1162struct hci_conn_params *hci_conn_params_lookup(struct hci_dev *hdev,1236struct hci_conn_params *hci_conn_params_lookup(struct hci_dev *hdev,
@@ -1217,6 +1291,12 @@ int hci_add_adv_instance(struct hci_dev *hdev, u8 instance, u32 flags, · 54 unmodified lines
1217int hci_remove_adv_instance(struct hci_dev *hdev, u8 instance);1291int hci_remove_adv_instance(struct hci_dev *hdev, u8 instance);
1218void hci_adv_instances_set_rpa_expired(struct hci_dev *hdev, bool rpa_expired);1292void hci_adv_instances_set_rpa_expired(struct hci_dev *hdev, bool rpa_expired);
1219 1293
1294void hci_adv_monitors_clear(struct hci_dev *hdev);
1295void hci_free_adv_monitor(struct adv_monitor *monitor);
1296int hci_add_adv_monitor(struct hci_dev *hdev, struct adv_monitor *monitor);
1297int hci_remove_adv_monitor(struct hci_dev *hdev, u16 handle);
1298bool hci_is_adv_monitoring(struct hci_dev *hdev);
1299
1220void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb);1300void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb);
1221 1301
1222void hci_init_sysfs(struct hci_dev *hdev);1302void hci_init_sysfs(struct hci_dev *hdev);
@@ -1279,6 +1359,9 @@ void hci_conn_del_sysfs(struct hci_conn *conn); · 56 unmodified lines
1279#define scan_coded(dev) (((dev)->le_tx_def_phys & HCI_LE_SET_PHY_CODED) || \1359#define scan_coded(dev) (((dev)->le_tx_def_phys & HCI_LE_SET_PHY_CODED) || \
1280 ((dev)->le_rx_def_phys & HCI_LE_SET_PHY_CODED))1360 ((dev)->le_rx_def_phys & HCI_LE_SET_PHY_CODED))
1281 1361
1362/* Use LL Privacy based address resolution if supported */
1363#define use_ll_privacy(dev) ((dev)->le_features[0] & HCI_LE_LL_PRIVACY)
1364
1282/* Use ext scanning if set ext scan param and ext scan enable is supported */1365/* Use ext scanning if set ext scan param and ext scan enable is supported */
1283#define use_ext_scan(dev) (((dev)->commands[37] & 0x20) && \1366#define use_ext_scan(dev) (((dev)->commands[37] & 0x20) && \
1284 ((dev)->commands[37] & 0x40))1367 ((dev)->commands[37] & 0x40))
@@ -1387,7 +1470,7 @@ static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status) · 102 unmodified lines
1387 __u8 encrypt;1470 __u8 encrypt;
1388 1471
1389 if (conn->state == BT_CONFIG) {1472 if (conn->state == BT_CONFIG) {
1390 if (status)1473 if (!status)
1391 conn->state = BT_CONNECTED;1474 conn->state = BT_CONNECTED;
1392 1475
1393 hci_connect_cfm(conn, status);1476 hci_connect_cfm(conn, status);
@@ -1402,11 +1485,13 @@ static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status) · 8 unmodified lines
1402 else1485 else
1403 encrypt = 0x01;1486 encrypt = 0x01;
1404 1487
1405 if (conn->sec_level == BT_SECURITY_SDP)1488 if (!status) {
1406 conn->sec_level = BT_SECURITY_LOW;1489 if (conn->sec_level == BT_SECURITY_SDP)
1490 conn->sec_level = BT_SECURITY_LOW;
1407 1491
1408 if (conn->pending_sec_level > conn->sec_level)1492 if (conn->pending_sec_level > conn->sec_level)
1409 conn->sec_level = conn->pending_sec_level;1493 conn->sec_level = conn->pending_sec_level;
1494 }
1410 1495
1411 mutex_lock(&hci_cb_list_lock);1496 mutex_lock(&hci_cb_list_lock);
1412 list_for_each_entry(cb, &hci_cb_list, list) {1497 list_for_each_entry(cb, &hci_cb_list, list) {
include/net/bluetooth/hci_sock.h+2−2
@@ -31,8 +31,8 @@ · 30 unmodified lines
31#define HCI_TIME_STAMP 331#define HCI_TIME_STAMP 3
32 32
33/* CMSG flags */33/* CMSG flags */
34#define HCI_CMSG_DIR 0x000134#define HCI_CMSG_DIR 0x01
35#define HCI_CMSG_TSTAMP 0x000235#define HCI_CMSG_TSTAMP 0x02
36 36
37struct sockaddr_hci {37struct sockaddr_hci {
38 sa_family_t hci_family;38 sa_family_t hci_family;
include/net/bluetooth/mgmt.h+95−0
@@ -52,6 +52,12 @@ struct mgmt_hdr { · 51 unmodified lines
52 __le16 len;52 __le16 len;
53} __packed;53} __packed;
54 54
55struct mgmt_tlv {
56 __le16 type;
57 __u8 length;
58 __u8 value[];
59} __packed;
60
55struct mgmt_addr_info {61struct mgmt_addr_info {
56 bdaddr_t bdaddr;62 bdaddr_t bdaddr;
57 __u8 type;63 __u8 type;
@@ -702,6 +708,78 @@ struct mgmt_rp_set_exp_feature { · 644 unmodified lines
702 __le32 flags;708 __le32 flags;
703} __packed;709} __packed;
704 710
711#define MGMT_OP_READ_DEF_SYSTEM_CONFIG 0x004b
712#define MGMT_READ_DEF_SYSTEM_CONFIG_SIZE 0
713
714#define MGMT_OP_SET_DEF_SYSTEM_CONFIG 0x004c
715#define MGMT_SET_DEF_SYSTEM_CONFIG_SIZE 0
716
717#define MGMT_OP_READ_DEF_RUNTIME_CONFIG 0x004d
718#define MGMT_READ_DEF_RUNTIME_CONFIG_SIZE 0
719
720#define MGMT_OP_SET_DEF_RUNTIME_CONFIG 0x004e
721#define MGMT_SET_DEF_RUNTIME_CONFIG_SIZE 0
722
723#define MGMT_OP_GET_DEVICE_FLAGS 0x004F
724#define MGMT_GET_DEVICE_FLAGS_SIZE 7
725struct mgmt_cp_get_device_flags {
726 struct mgmt_addr_info addr;
727} __packed;
728struct mgmt_rp_get_device_flags {
729 struct mgmt_addr_info addr;
730 __le32 supported_flags;
731 __le32 current_flags;
732} __packed;
733
734#define MGMT_OP_SET_DEVICE_FLAGS 0x0050
735#define MGMT_SET_DEVICE_FLAGS_SIZE 11
736struct mgmt_cp_set_device_flags {
737 struct mgmt_addr_info addr;
738 __le32 current_flags;
739} __packed;
740struct mgmt_rp_set_device_flags {
741 struct mgmt_addr_info addr;
742} __packed;
743
744#define MGMT_ADV_MONITOR_FEATURE_MASK_OR_PATTERNS BIT(0)
745
746#define MGMT_OP_READ_ADV_MONITOR_FEATURES 0x0051
747#define MGMT_READ_ADV_MONITOR_FEATURES_SIZE 0
748struct mgmt_rp_read_adv_monitor_features {
749 __le32 supported_features;
750 __le32 enabled_features;
751 __le16 max_num_handles;
752 __u8 max_num_patterns;
753 __le16 num_handles;
754 __le16 handles[];
755} __packed;
756
757struct mgmt_adv_pattern {
758 __u8 ad_type;
759 __u8 offset;
760 __u8 length;
761 __u8 value[31];
762} __packed;
763
764#define MGMT_OP_ADD_ADV_PATTERNS_MONITOR 0x0052
765struct mgmt_cp_add_adv_patterns_monitor {
766 __u8 pattern_count;
767 struct mgmt_adv_pattern patterns[];
768} __packed;
769#define MGMT_ADD_ADV_PATTERNS_MONITOR_SIZE 1
770struct mgmt_rp_add_adv_patterns_monitor {
771 __le16 monitor_handle;
772} __packed;
773
774#define MGMT_OP_REMOVE_ADV_MONITOR 0x0053
775struct mgmt_cp_remove_adv_monitor {
776 __le16 monitor_handle;
777} __packed;
778#define MGMT_REMOVE_ADV_MONITOR_SIZE 2
779struct mgmt_rp_remove_adv_monitor {
780 __le16 monitor_handle;
781} __packed;
782
705#define MGMT_EV_CMD_COMPLETE 0x0001783#define MGMT_EV_CMD_COMPLETE 0x0001
706struct mgmt_ev_cmd_complete {784struct mgmt_ev_cmd_complete {
707 __le16 opcode;785 __le16 opcode;
@@ -933,3 +1011,20 @@ struct mgmt_ev_exp_feature_changed { · 225 unmodified lines
933 __u8 uuid[16];1011 __u8 uuid[16];
934 __le32 flags;1012 __le32 flags;
935} __packed;1013} __packed;
1014
1015#define MGMT_EV_DEVICE_FLAGS_CHANGED 0x002a
1016struct mgmt_ev_device_flags_changed {
1017 struct mgmt_addr_info addr;
1018 __le32 supported_flags;
1019 __le32 current_flags;
1020} __packed;
1021
1022#define MGMT_EV_ADV_MONITOR_ADDED 0x002b
1023struct mgmt_ev_adv_monitor_added {
1024 __le16 monitor_handle;
1025} __packed;
1026
1027#define MGMT_EV_ADV_MONITOR_REMOVED 0x002c
1028struct mgmt_ev_adv_monitor_removed {
1029 __le16 monitor_handle;
1030} __packed;
include/net/bluetooth/sco.h+2−0
@@ -46,4 +46,6 @@ struct sco_conninfo { · 45 unmodified lines
46 __u8 dev_class[3];46 __u8 dev_class[3];
47};47};
48 48
49#define SCO_CMSG_PKT_STATUS 0x01
50
49#endif /* __SCO_H */51#endif /* __SCO_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t