From f63238165abfda18b46bbc8c2a0e91aca853da64 Mon Sep 17 00:00:00 2001 From: Victor Goldenshtein Date: Tue, 13 Nov 2012 10:06:24 +0200 Subject: wpa_s: don't accumulate delayed sched scan requests (UPSTREAM) Clear any previous pending timeouts before scheduling a new delayed sched scan. Signed-off-by: Victor Goldenshtein --- wpa_supplicant/scan.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index e50dcfc..887c747 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -799,6 +799,9 @@ int wpa_supplicant_delayed_sched_scan(struct wpa_supplicant *wpa_s, if (!wpa_s->sched_scan_supported) return -1; + eloop_cancel_timeout(wpa_supplicant_delayed_sched_scan_timeout, + wpa_s, NULL); + eloop_register_timeout(sec, usec, wpa_supplicant_delayed_sched_scan_timeout, wpa_s, NULL); -- cgit v1.1