Hi Tomasz, 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? > Signed-off-by: Tomasz Moń <tomasz.mon@xxxxxxxxxxxxx> > --- > drivers/bluetooth/btusb.c | 10 +++------- > 1 file changed, 3 insertions(+), 7 deletions(-) > > diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c > index 2ad4efdd9e40..5110d26cff7a 100644 > --- a/drivers/bluetooth/btusb.c > +++ b/drivers/bluetooth/btusb.c > @@ -3830,13 +3830,9 @@ static int btusb_probe(struct usb_interface *intf, > > BT_DBG("intf %p id %p", intf, id); > > - /* interface numbers are hardcoded in the spec */ > - if (intf->cur_altsetting->desc.bInterfaceNumber != 0) { > - if (!(id->driver_info & BTUSB_IFNUM_2)) > - return -ENODEV; > - if (intf->cur_altsetting->desc.bInterfaceNumber != 2) > - return -ENODEV; > - } > + if ((id->driver_info & BTUSB_IFNUM_2) && > + (intf->cur_altsetting->desc.bInterfaceNumber != 2)) > + return -ENODEV; > > ifnum_base = intf->cur_altsetting->desc.bInterfaceNumber; > > -- > 2.39.1 > -- Luiz Augusto von Dentz