FAILED: patch "[PATCH] Bluetooth: add quirk disabling LE Read Transmit Power" failed to apply to 5.15-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From d2f8114f9574509580a8506d2ef72e7e43d1a5bd Mon Sep 17 00:00:00 2001
From: Aditya Garg <[email protected]>
Date: Thu, 2 Dec 2021 12:41:59 +0000
Subject: [PATCH] Bluetooth: add quirk disabling LE Read Transmit Power
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.
Link:
https://lore.kernel.org/r/[email protected]
include/net/bluetooth/hci.h +9 -0
@@ -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 */
net/bluetooth/hci_sync.c +2 -1
@@ -3300,7 +3300,8 @@ static int hci_le_read_adv_tx_power_sync(struct hci_dev *hdev)/* Read LE Min/Max Tx Power*/ static int hci_le_read_tx_power_sync (struct hci_dev *hdev) { -if (!(hdev->commands[38 ] &0x80 )) +if (!(hdev->commands[38 ] &0x80 ) || +test_bit (HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER , &hdev->quirks))return 0 ; return __hci_cmd_sync_status(hdev, HCI_OP_LE_READ_TRANSMIT_POWER,
Aditya Garg
Tested-by Orlando ChamberlainQuoted 12 lines · On 13-Jan-2022, at 4:17 PM, [email protected] wrote:
The patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.thanks,
Quoted 8 lines
greg k-h
------------------ original commit in Linus's tree ------------------
From
d2f8114f9574509580a8506d2ef72e7e43d1a5bdMon Sep 17 00:00:00 2001
From: Aditya Garg <[email protected]>
Date: Thu, 2 Dec 2021 12:41:59 +0000
Subject: [PATCH] Bluetooth: add quirk disabling LE Read Transmit Power
From: Aditya Garg <[email protected]>
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.
Link:
https://lore.kernel.org/r/[email protected]
--- include/net/bluetooth/hci.h | 9 +++++++++ net/bluetooth/hci_core.c | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-)
include/net/bluetooth/hci.h +9 -0
@@ -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 */
net/bluetooth/hci_core.c +2 -1
@@ -742,7 +742,8 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt)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 );
Signature · 1 line
2.25.1