]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Save prev_sched_ssid only if needed
authorDavid Spinadel <david.spinadel@intel.com>
Sun, 10 Mar 2013 15:32:03 +0000 (17:32 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 10 Mar 2013 15:32:03 +0000 (17:32 +0200)
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 <david.spinadel@intel.com>

wpa_supplicant/scan.c

index fdf06c0c80c12d2b38133d11af83fef150c2dd5b..ce33d0c0b2941c73845e4d5b9c16072016d6a9cb 100644 (file)
@@ -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;
 }