Query about code in scan.c, wpa_supplicant_req_sched_scan()

Matthew Dalton msdalton
Thu Nov 14 19:09:47 PST 2013


Hi all,

I've been looking through the wpa_supplicant source code trying to work out
how wpa_supplicant manages switch-over between BSSIDs in a mesh network,
and I found the following code in wpa_supplicant_req_sched_scan():


/* If we have more SSIDs to scan, add a timeout so we scan them too */
 if (ssid || !wpa_s->first_sched_scan) {
wpa_s->sched_scan_timed_out = 0;
eloop_register_timeout(wpa_s->sched_scan_timeout, 0,
       wpa_supplicant_sched_scan_timeout,
       wpa_s, NULL);
wpa_s->first_sched_scan = 0;
 wpa_s->sched_scan_timeout /= 2;
wpa_s->sched_scan_interval *= 2;
if (wpa_s->sched_scan_timeout < wpa_s->sched_scan_interval) {
 wpa_s->sched_scan_interval = 10;
wpa_s->sched_scan_timeout = max_sched_scan_ssids * 2;
}
 }


What's the reasoning behind halving the timeout? If you were trying to scan
more SSIDs, wouldn't it make more sense to double it?

Cheers,
Matthew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.shmoo.com/pipermail/hostap/attachments/20131115/9af8de7a/attachment.htm>



More information about the Hostap mailing list