[PATCH] wpa_supplicant: don't save prev_sched_ssid if not needed

David Spinadel dvdspndl at gmail.com
Thu Mar 7 04:26:33 EST 2013


From: David Spinadel <david.spinadel at intel.com>

If the whole ssid list was scanned, don't save the prev
sheduled ssid since we are going to start from beggining.
It avoids starting sched scan from prev_sched_ssid after
scanning the full list, in case of adding network to ssid
during scheduled scan.

Signed-hostap: David Spinadel <david.spinadel at intel.com>
---
 wpa_supplicant/scan.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index c3f9981..0e45079 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -1120,6 +1120,10 @@ scan:
 		wpa_s->sched_scan_interval *= 2;
 	}
 
+	/* If there is no more ssids, start next time from the beginning */
+	if (!ssid)
+		wpa_s->prev_sched_ssid = NULL;
+
 	return 0;
 }
 
-- 
1.7.10.msysgit.1



More information about the HostAP mailing list