Skip to content

Commit ae75336

Browse files
claudiadraghiVudentz
authored andcommitted
Bluetooth: Check for ISO support in controller
This patch checks for ISO_BROADCASTER and ISO_SYNC_RECEIVER in controller. Signed-off-by: Claudia Draghicescu <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 80f9ad0 commit ae75336

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

include/net/bluetooth/hci.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ enum {
577577
#define HCI_LE_CIS_CENTRAL 0x10
578578
#define HCI_LE_CIS_PERIPHERAL 0x20
579579
#define HCI_LE_ISO_BROADCASTER 0x40
580+
#define HCI_LE_ISO_SYNC_RECEIVER 0x80
580581

581582
/* Connection modes */
582583
#define HCI_CM_ACTIVE 0x0000

include/net/bluetooth/hci_core.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1765,6 +1765,7 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
17651765
#define cis_peripheral_capable(dev) \
17661766
((dev)->le_features[3] & HCI_LE_CIS_PERIPHERAL)
17671767
#define bis_capable(dev) ((dev)->le_features[3] & HCI_LE_ISO_BROADCASTER)
1768+
#define sync_recv_capable(dev) ((dev)->le_features[3] & HCI_LE_ISO_SYNC_RECEIVER)
17681769

17691770
#define mws_transport_config_capable(dev) (((dev)->commands[30] & 0x08) && \
17701771
(!test_bit(HCI_QUIRK_BROKEN_MWS_TRANSPORT_CONFIG, &(dev)->quirks)))

include/net/bluetooth/mgmt.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ struct mgmt_rp_read_index_list {
111111
#define MGMT_SETTING_WIDEBAND_SPEECH BIT(17)
112112
#define MGMT_SETTING_CIS_CENTRAL BIT(18)
113113
#define MGMT_SETTING_CIS_PERIPHERAL BIT(19)
114+
#define MGMT_SETTING_ISO_BROADCASTER BIT(20)
115+
#define MGMT_SETTING_ISO_SYNC_RECEIVER BIT(21)
114116

115117
#define MGMT_OP_READ_INFO 0x0004
116118
#define MGMT_READ_INFO_SIZE 0

net/bluetooth/mgmt.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,12 @@ static u32 get_current_settings(struct hci_dev *hdev)
944944
if (cis_peripheral_capable(hdev))
945945
settings |= MGMT_SETTING_CIS_PERIPHERAL;
946946

947+
if (bis_capable(hdev))
948+
settings |= MGMT_SETTING_ISO_BROADCASTER;
949+
950+
if (sync_recv_capable(hdev))
951+
settings |= MGMT_SETTING_ISO_SYNC_RECEIVER;
952+
947953
return settings;
948954
}
949955

0 commit comments

Comments
 (0)