[PATCH] Avoid unnecessary triggering of rescans

Helmut Schaa hschaa
Mon Feb 25 02:21:25 PST 2008


the attached patch fixes an issue I noticed when playing around with hidden 
APs and the iwlwifi-driver.

Initiating a scan (with iwlist for example) while connected to an hidden AP 
results (dependend on the driver) in wpa_supplicant repeatedly triggering 
rescans every few seconds.

This happens because of wpa_supplicant getting the SIOCGIWSCAN from iwlwifi 
when the scan is finished. wpa_supplicant handles the scan results and 
triggers a new scan due to the currently connected Essid not showing up in 
the list (as it is not broadcasted).

Since iwlwifi mostly needs more then three seconds for scanning wpa_supplicant 
will then hit the scan timeout (which is three seconds) and will again 
initiate a new scan.

The patch changes the behavior to only initiate a rescan if wpa_supplicant is 
in state WPA_SCANNING.

The patch is against 0.5.8 but should work with current development branch as 

I'll appreciate any comments :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: scanning.patch
Type: text/x-diff
Size: 458 bytes
Desc: not available
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20080225/474e7bc5/attachment.patch 

More information about the Hostap mailing list