8
8
9
9
#include <linux/module.h>
10
10
#include <linux/firmware.h>
11
+ #include <linux/dmi.h>
11
12
#include <asm/unaligned.h>
12
13
13
14
#include <net/bluetooth/bluetooth.h>
@@ -343,6 +344,40 @@ static struct sk_buff *btbcm_read_usb_product(struct hci_dev *hdev)
343
344
return skb ;
344
345
}
345
346
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
+
346
381
static int btbcm_read_info (struct hci_dev * hdev )
347
382
{
348
383
struct sk_buff * skb ;
@@ -363,6 +398,10 @@ static int btbcm_read_info(struct hci_dev *hdev)
363
398
bt_dev_info (hdev , "BCM: features 0x%2.2x" , skb -> data [1 ]);
364
399
kfree_skb (skb );
365
400
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
+
366
405
return 0 ;
367
406
}
368
407
0 commit comments