Skip to content

Commit e5469ad

Browse files
committed
Bluetooth: hci_sync: Fix accept_list when attempting to suspend
During suspend, only wakeable devices can be in acceptlist, so if the device was previously added it needs to be removed otherwise the device can end up waking up the system prematurely. Fixes: 3b42055 ("Bluetooth: hci_sync: Fix attempting to suspend with unfiltered passive scan") Signed-off-by: Clancy Shang <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]> Reviewed-by: Paul Menzel <[email protected]>
1 parent 2449007 commit e5469ad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

net/bluetooth/hci_sync.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2206,8 +2206,11 @@ static int hci_le_add_accept_list_sync(struct hci_dev *hdev,
22062206

22072207
/* During suspend, only wakeable devices can be in acceptlist */
22082208
if (hdev->suspended &&
2209-
!(params->flags & HCI_CONN_FLAG_REMOTE_WAKEUP))
2209+
!(params->flags & HCI_CONN_FLAG_REMOTE_WAKEUP)) {
2210+
hci_le_del_accept_list_sync(hdev, &params->addr,
2211+
params->addr_type);
22102212
return 0;
2213+
}
22112214

22122215
/* Select filter policy to accept all advertising */
22132216
if (*num_entries >= hdev->le_accept_list_size)

0 commit comments

Comments
 (0)