Re: [PATCH v1] bluetooth:Adding driver and quirk defs for multi-role LE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alain,

> This change adds the relevant driver and quirk to allow drivers to
> report that concurrent roles are well supported by the controller.
> 
> 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@xxxxxxxxxxxx>
> ---
> 
> drivers/bluetooth/btusb.c   | 2 ++
> include/net/bluetooth/hci.h | 8 ++++++++
> 2 files changed, 10 insertions(+)
> 
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index 3bdec42c9612..22e61a502d40 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -58,6 +58,8 @@ static struct usb_driver btusb_driver;
> #define BTUSB_CW6622		0x100000
> #define BTUSB_MEDIATEK		0x200000
> #define BTUSB_WIDEBAND_SPEECH	0x400000
> +#define BTUSB_LE_CONCURRENT_ROLES_SUPPORTED \
> +				0x800000
> 
> static const struct usb_device_id btusb_table[] = {
> 	/* Generic Bluetooth USB device */
> diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
> index 5f60e135aeb6..b2c76cde7cd4 100644
> --- a/include/net/bluetooth/hci.h
> +++ b/include/net/bluetooth/hci.h
> @@ -214,6 +214,14 @@ enum {
> 	 * This quirk must be set before hci_register_dev is called.
> 	 */
> 	HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED,
> +
> +	/* When this quirk is set, the controller has validated that
> +	 * concurrent LE roles are supported.  This mechanism is necessary
> +	 * as many controllers have been seen has having trouble initiating
> +	 * a connectable advertisement after at least one connection in
> +	 * central had already been established.
> +	 */
> +	HCI_QUIRK_LE_CONCURRENT_ROLES_SUPPORTED,
> };

lets do this the other way around. Lets remove the limitation we have in our HCI core code. And then we see which controllers report errors. Trying to enable each controller individually is cumbersome. I rather later on blacklist the one or two historic controllers that don’t support it.

Regards

Marcel




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux