Skip to content

Commit d74e0ae

Browse files
jwrdegoedeJohan Hedberg
authored andcommitted
Bluetooth: btusb: Fix detection of some fake CSR controllers with a bcdDevice val of 0x0134
Commit cde1a8a ("Bluetooth: btusb: Fix and detect most of the Chinese Bluetooth controllers") made the detection of fake controllers more generic fixing it for much of the newer fakes / clones. But this does not work for a fake CSR controller with a bcdDevice value of 0x0134, which was correctly identified as fake before this change. Add an extra check for this special case, checking for a combination of a bcdDevice value of 0x0134, together with a lmp_subver of 0x0c5c and a hci_ver of BLUETOOTH_VER_2_0. The chip inside this fake dongle is marked as with "clockwise cw6629d". Fixes: cde1a8a ("Bluetooth: btusb: Fix and detect most of the Chinese Bluetooth controllers") Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]> Signed-off-by: Johan Hedberg <[email protected]>
1 parent dce0a4b commit d74e0ae

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/bluetooth/btusb.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,6 +1789,8 @@ static int btusb_setup_bcm92035(struct hci_dev *hdev)
17891789

17901790
static int btusb_setup_csr(struct hci_dev *hdev)
17911791
{
1792+
struct btusb_data *data = hci_get_drvdata(hdev);
1793+
u16 bcdDevice = le16_to_cpu(data->udev->descriptor.bcdDevice);
17921794
struct hci_rp_read_local_version *rp;
17931795
struct sk_buff *skb;
17941796
bool is_fake = false;
@@ -1858,6 +1860,12 @@ static int btusb_setup_csr(struct hci_dev *hdev)
18581860
le16_to_cpu(rp->hci_ver) > BLUETOOTH_VER_4_0)
18591861
is_fake = true;
18601862

1863+
/* Other clones which beat all the above checks */
1864+
else if (bcdDevice == 0x0134 &&
1865+
le16_to_cpu(rp->lmp_subver) == 0x0c5c &&
1866+
le16_to_cpu(rp->hci_ver) == BLUETOOTH_VER_2_0)
1867+
is_fake = true;
1868+
18611869
if (is_fake) {
18621870
bt_dev_warn(hdev, "CSR: Unbranded CSR clone detected; adding workarounds...");
18631871

0 commit comments

Comments
 (0)