Patch "Bluetooth: add quirk disabling LE Read Transmit Power" has been added to the 5.16-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    Bluetooth: add quirk disabling LE Read Transmit Power

to the 5.16-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     bluetooth-add-quirk-disabling-le-read-transmit-power.patch
and it can be found in the queue-5.16 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From d2f8114f9574509580a8506d2ef72e7e43d1a5bd Mon Sep 17 00:00:00 2001
From: Aditya Garg <gargaditya08@xxxxxxxx>
Date: Thu, 2 Dec 2021 12:41:59 +0000
Subject: Bluetooth: add quirk disabling LE Read Transmit Power

From: Aditya Garg <gargaditya08@xxxxxxxx>

commit d2f8114f9574509580a8506d2ef72e7e43d1a5bd upstream.

Some devices have a bug causing them to not work if they query
LE tx power on startup. Thus we add a quirk in order to not query it
and default min/max tx power values to HCI_TX_POWER_INVALID.

Signed-off-by: Aditya Garg <gargaditya08@xxxxxxxx>
Reported-by: Orlando Chamberlain <redecorating@xxxxxxxxxxxxxx>
Tested-by: Orlando Chamberlain <redecorating@xxxxxxxxxxxxxx>
Link:
https://lore.kernel.org/r/4970a940-211b-25d6-edab-21a815313954@xxxxxxxxxxxxxx
Fixes: 7c395ea521e6 ("Bluetooth: Query LE tx power on startup")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Marcel Holtmann <marcel@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 include/net/bluetooth/hci.h |    9 +++++++++
 net/bluetooth/hci_core.c    |    3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)

--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -246,6 +246,15 @@ enum {
 	 * HCI after resume.
 	 */
 	HCI_QUIRK_NO_SUSPEND_NOTIFIER,
+
+	/*
+	 * When this quirk is set, LE tx power is not queried on startup
+	 * and the min/max tx power values default to HCI_TX_POWER_INVALID.
+	 *
+	 * This quirk can be set before hci_register_dev is called or
+	 * during the hdev->setup vendor callback.
+	 */
+	HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER,
 };
 
 /* HCI device flags */
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -619,7 +619,8 @@ static int hci_init3_req(struct hci_requ
 			hci_req_add(req, HCI_OP_LE_READ_ADV_TX_POWER, 0, NULL);
 		}
 
-		if (hdev->commands[38] & 0x80) {
+		if ((hdev->commands[38] & 0x80) &&
+		    !test_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks)) {
 			/* Read LE Min/Max Tx Power*/
 			hci_req_add(req, HCI_OP_LE_READ_TRANSMIT_POWER,
 				    0, NULL);


Patches currently in stable-queue which might be from gargaditya08@xxxxxxxx are

queue-5.16/bluetooth-add-quirk-disabling-le-read-transmit-power.patch
queue-5.16/bluetooth-btbcm-disable-read-tx-power-for-macbook-air-8-1-and-8-2.patch
queue-5.16/mfd-intel-lpss-fix-too-early-pm-enablement-in-the-acpi-probe.patch
queue-5.16/bluetooth-btbcm-disable-read-tx-power-for-some-macs-with-the-t2-security-chip.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux