diff options
author | Luiz Augusto von Dentz | 2022-07-13 17:17:55 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz | 2022-07-21 17:09:34 -0700 |
commit | 6828b58307a92d6b626d4d1421ab7db6db125ba5 (patch) | |
tree | f7cda18fc8c48a5a2c57f90124cdc1de2349ffb1 | |
parent | 0900b1c62f43e495d04ca4bebdf80b34f3c12432 (diff) |
Bluetooth: hci_sync: Don't remove connected devices from accept list
These devices are likely going to be reprogrammed when disconnected so
this avoid a whole bunch of commands attempt to remove and the add back
to the list.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tested-by: Zhengping Jiang <jiangzp@google.com>
-rw-r--r-- | net/bluetooth/hci_sync.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index b1eee2a146fe..bc6e83e1b517 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -1892,12 +1892,15 @@ static u8 hci_update_accept_list_sync(struct hci_dev *hdev) } /* Go through the current accept list programmed into the - * controller one by one and check if that address is still - * in the list of pending connections or list of devices to + * controller one by one and check if that address is connected or is + * still in the list of pending connections or list of devices to * report. If not present in either list, then remove it from * the controller. */ list_for_each_entry_safe(b, t, &hdev->le_accept_list, list) { + if (hci_conn_hash_lookup_le(hdev, &b->bdaddr, b->bdaddr_type)) + continue; + pend_conn = hci_pend_le_action_lookup(&hdev->pend_le_conns, &b->bdaddr, b->bdaddr_type); |