wpasupplicant : race in scan timeout

Dan Williams dcbw
Sun Oct 22 09:36:10 PDT 2006

On Sun, 2006-10-22 at 11:00 +0200, matthieu castet wrote:
> Hi,
> With wpasupplicant 0.5.5-2 from debian and airo driver (wireless 
> extension) there is a race in the scan :
> - the airo driver provides scan result only after 3 seconds
> - the wpasupplicant expects scan result after 3 seconds and don't retry 
> in case of -EAGAIN.
> In some condition wpasupplicant fails to scan.
> The solution to resolve this is :
> - increase wpasupplicant scan timeout to 4 (or more) seconds

Sounds like a hack.

> - if the result is -EAGAIN after the timeout retry one (or more) times.

This is the correct fix; it should at least respect a few EAGAINs before
giving up, bounded by a maximum scan result timeout of, say, 10 seconds.

So, wpa_supplicant could keep the current structure of scan result
retrieval.  Then, if < 10 seconds have gone by since the scan request,
and the GIWSCAN returns -EAGAIN, just schedule the get_scan function
again.  If the scan result was unsolicited because some other process
requested the scan (ie, if a get_scan is not currently scheduled) you
just ignore the < 10s check.


> Matthieu
> _______________________________________________
> HostAP mailing list
> HostAP at shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap

More information about the Hostap mailing list