From: David Spinadel Date: Sun, 10 Mar 2013 15:32:03 +0000 (+0200) Subject: wpa_supplicant: Save prev_sched_ssid only if needed X-Git-Tag: aosp-kk-from-upstream~481 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ed52f678bffecd0891562035a50a69a1251b788;p=thirdparty%2Fhostap.git wpa_supplicant: Save prev_sched_ssid only if needed If the whole ssid list was scanned, don't save the prev scheduled ssid since we are going to start from beginning. Thos avoids starting sched scan from prev_sched_ssid after scanning the full list, in case of adding a network to ssid during scheduled scan. Signed-hostap: David Spinadel --- diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index fdf06c0c8..ce33d0c0b 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -1124,6 +1124,10 @@ scan: } } + /* If there is no more ssids, start next time from the beginning */ + if (!ssid) + wpa_s->prev_sched_ssid = NULL; + return 0; }