[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201030163529.v6.2.I3774a8f0d748c7c6ec3402c4adcead32810c9164@changeid>
Date: Fri, 30 Oct 2020 17:08:24 +0800
From: Howard Chung <howardchung@...gle.com>
To: linux-bluetooth@...r.kernel.org, marcel@...tmann.org,
luiz.dentz@...il.com
Cc: alainm@...omium.org, mmandlik@...omium.orgi, mcchou@...omium.org,
Howard Chung <howardchung@...gle.com>,
Manish Mandlik <mmandlik@...omium.org>,
Abhishek Pandit-Subedi <abhishekpandit@...omium.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Johan Hedberg <johan.hedberg@...il.com>,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: [PATCH v6 2/5] 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.
Commit-changes 5:
- Remove the change in hci_req_config_le_suspend_scan
Signed-off-by: Howard Chung <howardchung@...gle.com>
Reviewed-by: Alain Michaud <alainm@...omium.org>
Reviewed-by: Manish Mandlik <mmandlik@...omium.org>
Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@...omium.org>
Reviewed-by: Miao-chen Chou <mcchou@...omium.org>
---
(no changes since v1)
net/bluetooth/hci_request.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c
index 70ea126f56282..b615b981be9d6 100644
--- a/net/bluetooth/hci_request.c
+++ b/net/bluetooth/hci_request.c
@@ -1284,8 +1284,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);
--
2.29.1.341.ge80a0c044ae-goog
Powered by blists - more mailing lists