Skip to content

Commit 801b4c0

Browse files
AdityaGarg8holtmann
authored andcommitted
Bluetooth: btbcm: disable read tx power for some Macs with the T2 Security chip
Some Macs with the T2 security chip had Bluetooth not working. To fix it we add DMI based quirks to disable querying of LE Tx power. Signed-off-by: Aditya Garg <[email protected]> Reported-by: Orlando Chamberlain <[email protected]> Tested-by: Orlando Chamberlain <[email protected]> Link: https://lore.kernel.org/r/[email protected] Fixes: 7c395ea ("Bluetooth: Query LE tx power on startup") Cc: [email protected] Signed-off-by: Marcel Holtmann <[email protected]>
1 parent d2f8114 commit 801b4c0

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

drivers/bluetooth/btbcm.c

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <linux/module.h>
1010
#include <linux/firmware.h>
11+
#include <linux/dmi.h>
1112
#include <asm/unaligned.h>
1213

1314
#include <net/bluetooth/bluetooth.h>
@@ -343,6 +344,40 @@ static struct sk_buff *btbcm_read_usb_product(struct hci_dev *hdev)
343344
return skb;
344345
}
345346

347+
static const struct dmi_system_id disable_broken_read_transmit_power[] = {
348+
{
349+
.matches = {
350+
DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
351+
DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,1"),
352+
},
353+
},
354+
{
355+
.matches = {
356+
DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
357+
DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,2"),
358+
},
359+
},
360+
{
361+
.matches = {
362+
DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
363+
DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,4"),
364+
},
365+
},
366+
{
367+
.matches = {
368+
DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
369+
DMI_MATCH(DMI_PRODUCT_NAME, "iMac20,1"),
370+
},
371+
},
372+
{
373+
.matches = {
374+
DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
375+
DMI_MATCH(DMI_PRODUCT_NAME, "iMac20,2"),
376+
},
377+
},
378+
{ }
379+
};
380+
346381
static int btbcm_read_info(struct hci_dev *hdev)
347382
{
348383
struct sk_buff *skb;
@@ -363,6 +398,10 @@ static int btbcm_read_info(struct hci_dev *hdev)
363398
bt_dev_info(hdev, "BCM: features 0x%2.2x", skb->data[1]);
364399
kfree_skb(skb);
365400

401+
/* Read DMI and disable broken Read LE Min/Max Tx Power */
402+
if (dmi_first_match(disable_broken_read_transmit_power))
403+
set_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks);
404+
366405
return 0;
367406
}
368407

0 commit comments

Comments
 (0)