Dear Luiz,
Thank you for the patch.
Am 15.07.24 um 16:47 schrieb Luiz Augusto von Dentz:
From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
When suspending the scan filter policy cannot be 0x00 (no acceptlist)
since that means the host has to process every advertisement report
waking up the system, so this attempt to check if hdev is marked as
attempt*s*
suspended and the resulting filter policy would be 0x00 (no acceptlist)
… *if* the …?
then skip passive scanning.
Note: This disables remote wakeup for devices using privacy when LL
privacy is not enabled since that would require the controller to
resolve the addresses.
Would that regress certain use-cases?
Fixes: 182ee45da083 ("Bluetooth: hci_sync: Rework hci_suspend_notifier")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
---
net/bluetooth/hci_sync.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index cd2ed16da8a4..0996f159c675 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -2976,6 +2976,13 @@ static int hci_passive_scan_sync(struct hci_dev *hdev)
*/
filter_policy = hci_update_accept_list_sync(hdev);
+ /* If suspended and filter_policy set to 0x00 (no acceptlist) then
+ * passive scanning cannot be started since that would require the host
+ * to be wakeup.
to be woken up
+ */
+ if (hdev->suspended && !filter_policy)
+ return 0;
+
/* When the controller is using random resolvable addresses and
* with that having LE privacy enabled, then controllers with
* Extended Scanner Filter Policies support can now enable support
Kind regards,
Paul