Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: Support querying for WBS support through MGMT

This patch provides a mechanism for MGMT interface client to query the
capability of the controller to support WBS.

Signed-off-by: Alain Michaud <alainm@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

authored by

Alain Michaud and committed by
Marcel Holtmann
4b127bd5 3e4e3f73

+18 -1
+3
drivers/bluetooth/btusb.c
··· 3867 3867 if (id->driver_info & BTUSB_BROKEN_ISOC) 3868 3868 data->isoc = NULL; 3869 3869 3870 + if (id->driver_info & BTUSB_WIDEBAND_SPEECH) 3871 + set_bit(HCI_QUIRK_WIDE_BAND_SPEECH_SUPPORTED, &hdev->quirks); 3872 + 3870 3873 if (id->driver_info & BTUSB_DIGIANSWER) { 3871 3874 data->cmdreq_type = USB_TYPE_VENDOR; 3872 3875 set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
+9
include/net/bluetooth/hci.h
··· 205 205 * 206 206 */ 207 207 HCI_QUIRK_NON_PERSISTENT_SETUP, 208 + 209 + /* When this quirk is set, wide band speech is supported by 210 + * the driver since no reliable mechanism exist to report 211 + * this from the hardware, a driver flag is use to convey 212 + * this support 213 + * 214 + * This quirk must be set before hci_register_dev is called. 215 + */ 216 + HCI_QUIRK_WIDE_BAND_SPEECH_SUPPORTED, 208 217 }; 209 218 210 219 /* HCI device flags */
+2 -1
include/net/bluetooth/mgmt.h
··· 101 101 #define MGMT_SETTING_PRIVACY 0x00002000 102 102 #define MGMT_SETTING_CONFIGURATION 0x00004000 103 103 #define MGMT_SETTING_STATIC_ADDRESS 0x00008000 104 - #define MGMT_SETTING_PHY_CONFIGURATION 0x00010000 104 + #define MGMT_SETTING_PHY_CONFIGURATION 0x00010000 105 + #define MGMT_SETTING_WIDE_BAND_SPEECH 0x00020000 105 106 106 107 #define MGMT_OP_READ_INFO 0x0004 107 108 #define MGMT_READ_INFO_SIZE 0
+4
net/bluetooth/mgmt.c
··· 762 762 763 763 if (lmp_sc_capable(hdev)) 764 764 settings |= MGMT_SETTING_SECURE_CONN; 765 + 766 + if (test_bit(HCI_QUIRK_WIDE_BAND_SPEECH_SUPPORTED, 767 + &hdev->quirks)) 768 + settings |= MGMT_SETTING_WIDE_BAND_SPEECH; 765 769 } 766 770 767 771 if (lmp_le_capable(hdev)) {