aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/scan.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-09-26 21:09:33 (GMT)
committerJouni Malinen <j@w1.fi>2016-09-26 21:09:33 (GMT)
commit5bb7327a697108c880dd31c9e421df386c904b1a (patch)
tree0bed828263eccf7459d45008e4d4c40110fa3650 /wpa_supplicant/scan.c
parentbe7ebd892ee7c47ff291de4e7802c14758f02a3d (diff)
downloadhostap-5bb7327a697108c880dd31c9e421df386c904b1a.zip
hostap-5bb7327a697108c880dd31c9e421df386c904b1a.tar.gz
hostap-5bb7327a697108c880dd31c9e421df386c904b1a.tar.bz2
Share a common helper function for restarting sched_scan
This code sequence was already used at two different places (and an additional one has been proposed), so add a common helper function to avoid having to copy-paste this functionality in multiple locations. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/scan.c')
-rw-r--r--wpa_supplicant/scan.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 24d6080..60e7b68 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -2745,3 +2745,12 @@ void wpas_scan_reset_sched_scan(struct wpa_supplicant *wpa_s)
wpa_supplicant_cancel_sched_scan(wpa_s);
}
}
+
+
+void wpas_scan_restart_sched_scan(struct wpa_supplicant *wpa_s)
+{
+ /* simulate timeout to restart the sched scan */
+ wpa_s->sched_scan_timed_out = 1;
+ wpa_s->prev_sched_ssid = NULL;
+ wpa_supplicant_cancel_sched_scan(wpa_s);
+}