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

Bluetooth: Adding driver and quirk defs for multi-role LE

This change adds the relevant driver and quirk to allow drivers to
report the le_states as being trustworthy.

This has historically been disabled as controllers did not reliably
support this. In particular, this will be used to relax this condition
for controllers that have been well tested and reliable.

/* Most controller will fail if we try to create new connections
* while we have an existing one in slave role.
*/
if (hdev->conn_hash.le_num_slave > 0)
return NULL;

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
22091585 c03ee9af

+10
+1
drivers/bluetooth/btusb.c
··· 58 58 #define BTUSB_CW6622 0x100000 59 59 #define BTUSB_MEDIATEK 0x200000 60 60 #define BTUSB_WIDEBAND_SPEECH 0x400000 61 + #define BTUSB_VALID_LE_STATES 0x800000 61 62 62 63 static const struct usb_device_id btusb_table[] = { 63 64 /* Generic Bluetooth USB device */
+9
include/net/bluetooth/hci.h
··· 218 218 * This quirk must be set before hci_register_dev is called. 219 219 */ 220 220 HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, 221 + 222 + /* When this quirk is set, the controller has validated that 223 + * LE states reported through the HCI_LE_READ_SUPPORTED_STATES are 224 + * valid. This mechanism is necessary as many controllers have 225 + * been seen has having trouble initiating a connectable 226 + * advertisement despite the state combination being reported as 227 + * supported. 228 + */ 229 + HCI_QUIRK_VALID_LE_STATES, 221 230 }; 222 231 223 232 /* HCI device flags */