diff options
author | Tomasz Moń <tomasz.mon@nordicsemi.no> | 2023-07-13 12:25:14 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2023-07-20 20:26:56 +0200 |
commit | 95b7015433053cd5f648ad2a7b8f43b2c99c949a (patch) | |
tree | 8059feef51881e9554f0312dcc87f3e2a1e85aa7 /drivers/bluetooth/btusb.c | |
parent | Bluetooth: SCO: fix sco_conn related locking and validity issues (diff) | |
download | linux-95b7015433053cd5f648ad2a7b8f43b2c99c949a.tar.xz linux-95b7015433053cd5f648ad2a7b8f43b2c99c949a.zip |
Bluetooth: btusb: Fix bluetooth on Intel Macbook 2014
Commit c13380a55522 ("Bluetooth: btusb: Do not require hardcoded
interface numbers") inadvertedly broke bluetooth on Intel Macbook 2014.
The intention was to keep behavior intact when BTUSB_IFNUM_2 is set and
otherwise allow any interface numbers. The problem is that the new logic
condition omits the case where bInterfaceNumber is 0.
Fix BTUSB_IFNUM_2 handling by allowing both interface number 0 and 2
when the flag is set.
Fixes: c13380a55522 ("Bluetooth: btusb: Do not require hardcoded interface numbers")
Reported-by: John Holland <johnbholland@icloud.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217651
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Tested-by: John Holland<johnbholland@icloud.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/bluetooth/btusb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 5ec4ad0a5c86..764d176e9735 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -4104,6 +4104,7 @@ static int btusb_probe(struct usb_interface *intf, BT_DBG("intf %p id %p", intf, id); if ((id->driver_info & BTUSB_IFNUM_2) && + (intf->cur_altsetting->desc.bInterfaceNumber != 0) && (intf->cur_altsetting->desc.bInterfaceNumber != 2)) return -ENODEV; |