Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: btintel: Fix WBS setting for Intel legacy ROM products

This patch adds the flag to identify the Intel legacy ROM products that
don't support WBS like WP and StP.

Fixes: 3df4dfbec0f29 ("Bluetooth: btintel: Move hci quirks to setup routine")
Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

authored by

Tedd Ho-Jeong An and committed by
Marcel Holtmann
55235304 8d7f1677

+15 -3
+8 -3
drivers/bluetooth/btintel.c
··· 2428 2428 2429 2429 /* Apply the device specific HCI quirks 2430 2430 * 2431 - * WBS for SdP - SdP and Stp have a same hw_varaint but 2432 - * different fw_variant 2431 + * WBS for SdP - For the Legacy ROM products, only SdP 2432 + * supports the WBS. But the version information is not 2433 + * enough to use here because the StP2 and SdP have same 2434 + * hw_variant and fw_variant. So, this flag is set by 2435 + * the transport driver (btusb) based on the HW info 2436 + * (idProduct) 2433 2437 */ 2434 - if (ver.hw_variant == 0x08 && ver.fw_variant == 0x22) 2438 + if (!btintel_test_flag(hdev, 2439 + INTEL_ROM_LEGACY_NO_WBS_SUPPORT)) 2435 2440 set_bit(HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, 2436 2441 &hdev->quirks); 2437 2442
+1
drivers/bluetooth/btintel.h
··· 152 152 INTEL_BROKEN_INITIAL_NCMD, 153 153 INTEL_BROKEN_SHUTDOWN_LED, 154 154 INTEL_ROM_LEGACY, 155 + INTEL_ROM_LEGACY_NO_WBS_SUPPORT, 155 156 156 157 __INTEL_NUM_FLAGS, 157 158 };
+6
drivers/bluetooth/btusb.c
··· 62 62 #define BTUSB_QCA_WCN6855 0x1000000 63 63 #define BTUSB_INTEL_BROKEN_SHUTDOWN_LED 0x2000000 64 64 #define BTUSB_INTEL_BROKEN_INITIAL_NCMD 0x4000000 65 + #define BTUSB_INTEL_NO_WBS_SUPPORT 0x8000000 65 66 66 67 static const struct usb_device_id btusb_table[] = { 67 68 /* Generic Bluetooth USB device */ ··· 386 385 { USB_DEVICE(0x8087, 0x0033), .driver_info = BTUSB_INTEL_COMBINED }, 387 386 { USB_DEVICE(0x8087, 0x07da), .driver_info = BTUSB_CSR }, 388 387 { USB_DEVICE(0x8087, 0x07dc), .driver_info = BTUSB_INTEL_COMBINED | 388 + BTUSB_INTEL_NO_WBS_SUPPORT | 389 389 BTUSB_INTEL_BROKEN_INITIAL_NCMD | 390 390 BTUSB_INTEL_BROKEN_SHUTDOWN_LED }, 391 391 { USB_DEVICE(0x8087, 0x0a2a), .driver_info = BTUSB_INTEL_COMBINED | 392 + BTUSB_INTEL_NO_WBS_SUPPORT | 392 393 BTUSB_INTEL_BROKEN_SHUTDOWN_LED }, 393 394 { USB_DEVICE(0x8087, 0x0a2b), .driver_info = BTUSB_INTEL_COMBINED }, 394 395 { USB_DEVICE(0x8087, 0x0aa7), .driver_info = BTUSB_INTEL_COMBINED | ··· 3739 3736 /* Transport specific configuration */ 3740 3737 hdev->send = btusb_send_frame_intel; 3741 3738 hdev->cmd_timeout = btusb_intel_cmd_timeout; 3739 + 3740 + if (id->driver_info & BTUSB_INTEL_NO_WBS_SUPPORT) 3741 + btintel_set_flag(hdev, INTEL_ROM_LEGACY_NO_WBS_SUPPORT); 3742 3742 3743 3743 if (id->driver_info & BTUSB_INTEL_BROKEN_INITIAL_NCMD) 3744 3744 btintel_set_flag(hdev, INTEL_BROKEN_INITIAL_NCMD);