Re: [PATCH] Bluetooth: btusb: Do not require hardcoded interface numbers

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

 



On Thu, 2023-02-09 at 13:32 -0800, Luiz Augusto von Dentz wrote:
> On Tue, Feb 7, 2023 at 3:58 AM Tomasz Moń <tomasz.mon@xxxxxxxxxxxxx> wrote:
> > Remove hardcoded interface number check because Bluetooth specification
> > since version 4.0 only recommends and no longer requires specific
> > interface numbers.
> > 
> > While earlier Bluetooth versions, i.e. 2.1 + EDR and 3.0 + HS, contain
> > required configuration table in Volume 4 - Host Controller Interface
> > Part B - USB Transport Layer, Bluetooth Core Specification Addendum 2
> > changes the table from required to recommended configuration.
> 
> Can you give it a little more context, is this supposed to be the case
> for LE only controllers? I assume this shouldn't cause any regressions
> for other controllers right?

Why do you think it is the case for LE only controllers? The Bluetooth
Host Controller interface is not limited to LE.

I believe this doesn't cause any regressions for other controllers.
Because I don't know anything nor have access to the Apple-specific
(Broadcom) devices that have BTUSB_IFNUM_2 flag set, I left the
BTUSB_IFNUM_2 check intact. It might be that the BTUSB_IFNUM_2 is not
necessary after all (and was only added because of this no longer
necessary hardcoded interface check), but you really need the actual
hardware to tell.

Note that this patch is merely removing the no longer necessary check
and otherwise leaving the communication intact. The hardcoded interface
check is preventing btusb from attaching to Bluetooth HCI controller in
a composite device that have some other interface under the number 0.

The composite devices that previously failed due to check do work with
this patch, because the specification (Bluetooth Core Specification
Version 5.3 Vol 4, Part B 2.2.2 Controller function in a composite
device) says host **should** address control packets to Interface (and
not Device) while at the same time the specification explicitly says
that the device **shall** recognize the HCI command packets directed to
Device.

Because **should** equals to recommended and **shall** is mandatory
requirement, the btusb driver is actually compliant even if it always
directs the control transfers to Device.

-- 
Tomasz Moń        | Senior Firmware Engineer
P +48 882 826 111 | Wrocław, Poland
nordicsemi.com    | devzone.nordicsemi.com




[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