Thread (2 messages) flat view 2 messages, 2 authors, 2020-06-24

Re: [PATCH] Bluetooth: Don't restart scanning if paused

From: Marcel Holtmann <marcel@holtmann.org>
Date: 2020-06-24 19:40:08
Also in: linux-bluetooth, lkml

Hi Abhishek,
When restarting LE scanning, check if it's currently paused before
enabling passive scanning.

Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
---
When running suspend stress tests on Chromebooks, we discovered
instances where the Chromebook didn't enter the deepest idle states
(i.e. S0ix). After some debugging, we found that passive scanning was
being enabled AFTER the suspend notifier had run (and disabled all
scanning).

For this fix, I simply looked at all the places where we call
HCI_OP_LE_SET_SCAN_ENABLE and added a guard clause for suspend. With
this fix, we were able to get through 100+ iterations of the suspend
stress test without any problems entering S0ix.


net/bluetooth/hci_request.c | 10 ++++++++++
1 file changed, 10 insertions(+)
patch has been applied to bluetooth-next tree.

Regards

Marcel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help