summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_sync.c
diff options
context:
space:
mode:
authorZhengping Jiang <jiangzp@google.com>2022-07-11 17:05:30 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-07-21 17:08:52 -0700
commit68253f3cd715e819bc4bff2b0e6b21234e259d56 (patch)
tree5c92785efb795572875f21b50404bd81a60d509e /net/bluetooth/hci_sync.c
parentdf332800a914e9fd97b83aa63832979227fd8a8d (diff)
downloadlinux-68253f3cd715e819bc4bff2b0e6b21234e259d56.tar.bz2
Bluetooth: hci_sync: Fix resuming scan after suspend resume
After resuming, remove setting scanning_paused to false, because it is checked and set to false in hci_resume_scan_sync. Also move setting the value to false before updating passive scan, because the value is used when resuming passive scan. Fixes: 3b42055388c30 (Bluetooth: hci_sync: Fix attempting to suspend with unfiltered passive scan) Signed-off-by: Zhengping Jiang <jiangzp@google.com> Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net/bluetooth/hci_sync.c')
-rw-r--r--net/bluetooth/hci_sync.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index a727f16914e4..49b69fe47bec 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -5063,13 +5063,13 @@ static int hci_resume_scan_sync(struct hci_dev *hdev)
if (!hdev->scanning_paused)
return 0;
+ hdev->scanning_paused = false;
+
hci_update_scan_sync(hdev);
/* Reset passive scanning to normal */
hci_update_passive_scan_sync(hdev);
- hdev->scanning_paused = false;
-
return 0;
}
@@ -5088,7 +5088,6 @@ int hci_resume_sync(struct hci_dev *hdev)
return 0;
hdev->suspended = false;
- hdev->scanning_paused = false;
/* Restore event mask */
hci_set_event_mask_sync(hdev);