summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2024-08-12 10:43:48 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-08-29 17:35:55 +0200
commit2179b1c66c08e3481382fee4154857cefcb30a35 (patch)
tree474beddfcbda0ec85e1d6e56177aa148ca2a1971 /net
parent7adc1123d285f83c97a7a568b28829e1b5873954 (diff)
downloadlinux-stable-2179b1c66c08e3481382fee4154857cefcb30a35.tar.gz
linux-stable-2179b1c66c08e3481382fee4154857cefcb30a35.tar.bz2
linux-stable-2179b1c66c08e3481382fee4154857cefcb30a35.zip
Bluetooth: HCI: Invert LE State quirk to be opt-out rather then opt-in
[ Upstream commit aae6b81260fd9a7224f7eb4fc440d625852245bb ] This inverts the LE State quirk so by default we assume the controllers would report valid states rather than invalid which is how quirks normally behave, also this would result in HCI command failing it the LE States are really broken thus exposing the controllers that are really broken in this respect. Link: https://github.com/bluez/bluez/issues/584 Fixes: 220915857e29 ("Bluetooth: Adding driver and quirk defs for multi-role LE") Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index a78f6d706cd4..59d9086db75f 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -5921,7 +5921,7 @@ static struct hci_conn *check_pending_le_conn(struct hci_dev *hdev,
* while we have an existing one in peripheral role.
*/
if (hdev->conn_hash.le_num_peripheral > 0 &&
- (!test_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks) ||
+ (test_bit(HCI_QUIRK_BROKEN_LE_STATES, &hdev->quirks) ||
!(hdev->le_states[3] & 0x10)))
return NULL;