lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47A8DBEC-322F-4C42-AF69-5FDB828B8680@live.com>
Date:   Mon, 29 Nov 2021 08:11:12 +0000
From:   Aditya Garg <gargaditya08@...e.com>
To:     Marcel Holtmann <marcel@...tmann.org>
CC:     Thorsten Leemhuis <regressions@...mhuis.info>,
        Orlando Chamberlain <redecorating@...tonmail.com>,
        Daniel Winkler <danielwinkler@...gle.com>,
        Greg KH <gregkh@...uxfoundation.org>,
        Johan Hedberg <johan.hedberg@...el.com>,
        "linux-bluetooth@...r.kernel.org" <linux-bluetooth@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Luiz Augusto von Dentz <luiz.dentz@...il.com>,
        "regressions@...ts.linux.dev" <regressions@...ts.linux.dev>,
        "sonnysasaka@...omium.org" <sonnysasaka@...omium.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH 2/6] btbcm: disable read tx power for MacBook Pro 16,1 (16
 inch, 2019)



> On 29-Nov-2021, at 1:38 PM, Marcel Holtmann <marcel@...tmann.org> wrote:
> 
> Hi Aditya,
> 
>> Bluetooth on Apple MacBook Pro 16,1 is unable to start due to LE Min/Max Tx Power being queried on startup. Add a DMI based quirk so that it is disabled.
> 
> list all the MacBooks that you found problematic right now. We add the
> initial as a large batch instead of all individual.
> 
>> 
>> Signed-off-by: Aditya Garg <gargaditya08@...e.com>
>> Tested-by: Aditya Garg <gargaditya08@...e.com>
>> ---
>> drivers/bluetooth/btbcm.c | 20 ++++++++++++++++++++
>> 1 file changed, 20 insertions(+)
>> 
>> diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
>> index e4182acee488c5..c1b0ca63880a68 100644
>> --- a/drivers/bluetooth/btbcm.c
>> +++ b/drivers/bluetooth/btbcm.c
>> @@ -8,6 +8,7 @@
>> 
>> #include <linux/module.h>
>> #include <linux/firmware.h>
>> +#include <linux/dmi.h>
>> #include <asm/unaligned.h>
>> 
>> #include <net/bluetooth/bluetooth.h>
>> @@ -343,9 +344,23 @@ static struct sk_buff *btbcm_read_usb_product(struct hci_dev *hdev)
>> 	return skb;
>> }
>> 
>> +static const struct dmi_system_id disable_broken_read_transmit_power[] = {
>> +	{
>> +		/* Match for Apple MacBook Pro 16,1 which needs
>> +		 * Read LE Min/Max Tx Power to be disabled.
>> +		 */
> 
> Actually leave the comment out. You are not adding any value that isn’t
> already in the variable name or the DMI. It is just repeating the obvious.
Alright, I prepare the patches into a single one
> 
>> +		 .matches = {
>> +			DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."),
>> +			DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,1"),
>> +		},
>> +	},
>> +	{ }
>> +};
>> +
>> static int btbcm_read_info(struct hci_dev *hdev)
>> {
>> 	struct sk_buff *skb;
>> +	const struct dmi_system_id *dmi_id;
>> 
>> 	/* Read Verbose Config Version Info */
>> 	skb = btbcm_read_verbose_config(hdev);
>> @@ -362,6 +377,11 @@ static int btbcm_read_info(struct hci_dev *hdev)
>> 
>> 	bt_dev_info(hdev, "BCM: features 0x%2.2x", skb->data[1]);
>> 	kfree_skb(skb);
>> +
>> +	/* Read DMI and disable broken Read LE Min/Max Tx Power */
>> +	dmi_id = dmi_first_match(disable_broken_read_transmit_power);
>> +	if (dmi_id)
>> +		set_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks);
> 
> 	if (dmi_first_match(..))
> 		set_bit(.., &hdev->quirks);
> 
> There is really no need to have a variable for this.
Fine, Ill correct this
> 
> Regards
> 
> Marcel
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ