diff options
author | Abhishek Pandit-Subedi <abhishekpandit@chromium.org> | 2020-12-04 11:14:31 +0800 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2020-12-07 17:01:46 +0200 |
commit | dce0a4be8054f38358d91f8c8ed8e2b0688abec8 (patch) | |
tree | f3a5cd2df24d907ec02ade9b263453cfdd0e355c /net/bluetooth | |
parent | 4d9b952857533b61c662d59dc413094b0c4c8231 (diff) | |
download | linux-stable-dce0a4be8054f38358d91f8c8ed8e2b0688abec8.tar.gz linux-stable-dce0a4be8054f38358d91f8c8ed8e2b0688abec8.tar.bz2 linux-stable-dce0a4be8054f38358d91f8c8ed8e2b0688abec8.zip |
Bluetooth: Set missing suspend task bits
When suspending, mark SUSPEND_SCAN_ENABLE and SUSPEND_SCAN_DISABLE tasks
correctly when either classic or le scanning is modified.
Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Signed-off-by: Howard Chung <howardchung@google.com>
Reviewed-by: Alain Michaud <alainm@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_request.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index 80dc451d6e12..71bffd745472 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -707,6 +707,9 @@ void hci_req_add_le_scan_disable(struct hci_request *req, bool rpa_le_conn) return; } + if (hdev->suspended) + set_bit(SUSPEND_SCAN_DISABLE, hdev->suspend_tasks); + if (use_ext_scan(hdev)) { struct hci_cp_le_set_ext_scan_enable cp; @@ -1159,6 +1162,11 @@ static void hci_req_set_event_filter(struct hci_request *req) scan = SCAN_PAGE; } + if (scan) + set_bit(SUSPEND_SCAN_ENABLE, hdev->suspend_tasks); + else + set_bit(SUSPEND_SCAN_DISABLE, hdev->suspend_tasks); + hci_req_add(req, HCI_OP_WRITE_SCAN_ENABLE, 1, &scan); } |