diff options
| author | Howard Chung <[email protected]> | 2020-11-26 04:22:22 +0000 |
|---|---|---|
| committer | Johan Hedberg <[email protected]> | 2020-12-07 15:00:47 +0000 |
| commit | 36afe87ac10fd71f98c40ccf9923b83e0d3fab68 (patch) | |
| tree | 05ab19c038c7a3b3e7184c534b6a3d596442a775 /net/bluetooth/hci_request.c | |
| parent | Bluetooth: Interleave with allowlist scan (diff) | |
| download | kernel-36afe87ac10fd71f98c40ccf9923b83e0d3fab68.tar.gz kernel-36afe87ac10fd71f98c40ccf9923b83e0d3fab68.zip | |
Bluetooth: Handle system suspend resume case
This patch adds code to handle the system suspension during interleave
scan. The interleave scan will be canceled when the system is going to
sleep, and will be restarted after waking up.
Signed-off-by: Howard Chung <[email protected]>
Reviewed-by: Alain Michaud <[email protected]>
Reviewed-by: Manish Mandlik <[email protected]>
Reviewed-by: Abhishek Pandit-Subedi <[email protected]>
Reviewed-by: Miao-chen Chou <[email protected]>
Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Johan Hedberg <[email protected]>
Diffstat (limited to 'net/bluetooth/hci_request.c')
| -rw-r--r-- | net/bluetooth/hci_request.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index d6bf1517ddae..8addb9456001 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -1294,8 +1294,10 @@ void hci_req_prepare_suspend(struct hci_dev *hdev, enum suspended_state next) hci_req_add(&req, HCI_OP_WRITE_SCAN_ENABLE, 1, &page_scan); /* Disable LE passive scan if enabled */ - if (hci_dev_test_flag(hdev, HCI_LE_SCAN)) + if (hci_dev_test_flag(hdev, HCI_LE_SCAN)) { + cancel_interleave_scan(hdev); hci_req_add_le_scan_disable(&req, false); + } /* Mark task needing completion */ set_bit(SUSPEND_SCAN_DISABLE, hdev->suspend_tasks); |
