Skip to content

Commit 95b7015

Browse files
tmon-nordicVudentz
authored andcommitted
Bluetooth: btusb: Fix bluetooth on Intel Macbook 2014
Commit c13380a ("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: c13380a ("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>
1 parent 3dcaa19 commit 95b7015

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/bluetooth/btusb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4104,6 +4104,7 @@ static int btusb_probe(struct usb_interface *intf,
41044104
BT_DBG("intf %p id %p", intf, id);
41054105

41064106
if ((id->driver_info & BTUSB_IFNUM_2) &&
4107+
(intf->cur_altsetting->desc.bInterfaceNumber != 0) &&
41074108
(intf->cur_altsetting->desc.bInterfaceNumber != 2))
41084109
return -ENODEV;
41094110

0 commit comments

Comments
 (0)