]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Bluetooth: hci_sync: Fix not setting mask for HCI_EVT_LE_ALL_REMOTE_FEATURES_COMPLETE
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 14 May 2026 13:42:24 +0000 (09:42 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jun 2026 15:54:51 +0000 (17:54 +0200)
[ Upstream commit 23d528d817a485fe9800a66c9411bd9e3d8a6f63 ]

This fixes not setting the bit for HCI_EVT_LE_ALL_REMOTE_FEATURES_COMPLETE
when extended features bit is set otherwise the controller may not
generate HCI_EVT_LE_ALL_REMOTE_FEATURES_COMPLETE causing
hci_le_read_all_remote_features_sync to timeout waiting for it.

Also remove dead code.

Fixes: a106e50be74b ("Bluetooth: HCI: Add support for LL Extended Feature Set")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_sync.c

index 919ec275dd237d301b13734d2c2b5d8486df933b..426f465be355339972fff9fdbfcdae3b5488f3c6 100644 (file)
@@ -4438,6 +4438,9 @@ static int hci_le_set_event_mask_sync(struct hci_dev *hdev)
                events[4] |= 0x02;      /* LE BIG Info Advertising Report */
        }
 
+       if (ll_ext_feature_capable(hdev))
+               events[5] |= BIT(2);
+
        if (le_cs_capable(hdev)) {
                /* Channel Sounding events */
                events[5] |= 0x08;      /* LE CS Read Remote Supported Cap Complete event */
@@ -7413,9 +7416,6 @@ static int hci_le_read_all_remote_features_sync(struct hci_dev *hdev,
                                        sizeof(cp), &cp,
                                        HCI_EVT_LE_ALL_REMOTE_FEATURES_COMPLETE,
                                        HCI_CMD_TIMEOUT, NULL);
-
-       return __hci_cmd_sync_status(hdev, HCI_OP_LE_READ_ALL_REMOTE_FEATURES,
-                                    sizeof(cp), &cp, HCI_CMD_TIMEOUT);
 }
 
 static int hci_le_read_remote_features_sync(struct hci_dev *hdev, void *data)