diff options
author | Miao-chen Chou <mcchou@chromium.org> | 2020-07-07 15:52:28 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2020-07-08 13:59:06 +0200 |
commit | 51b64c476a5ddc66d3459f14e98e5de9211e9e24 (patch) | |
tree | fdf28ef3322fac714447bd12d1c746d23b513b38 /net/bluetooth | |
parent | 15d8ce05ebec37a0d701cde768bbf21349f2329d (diff) |
Bluetooth: Use whitelist for scan policy when suspending
Even with one advertisement monitor in place, the scan policy should use
the whitelist while the system is going to suspend to prevent waking by
random advertisement.
The following test was performed.
- With a paired device, register one advertisement monitor, suspend
the system and verify that the host was not awaken by random
advertisements.
Signed-off-by: Miao-chen Chou <mcchou@chromium.org>
Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_request.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index 68a2ec36e1c1..770b93758112 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -800,9 +800,10 @@ static u8 update_white_list(struct hci_request *req) /* Once the controller offloading of advertisement monitor is in place, * the if condition should include the support of MSFT extension - * support. + * support. If suspend is ongoing, whitelist should be the default to + * prevent waking by random advertisements. */ - if (!idr_is_empty(&hdev->adv_monitors_idr)) + if (!idr_is_empty(&hdev->adv_monitors_idr) && !hdev->suspended) return 0x00; /* Select filter policy to use white list */ |