[PATCH] Avoid unnecessary triggering of rescans

Jouni Malinen j at w1.fi
Mon Feb 25 21:57:35 EST 2008


On Mon, Feb 25, 2008 at 11:21:25AM +0100, Helmut Schaa wrote:

> 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).

Would it be possible to get a debug log showing this behavior? I would
be especially interested in this with the latest version (0.5.10 or
0.6.3) and timestamps in the log (-ddt on command line).

> 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.

This part should work much better with the current version
(0.5.10/0.6.3) of wpa_supplicant. I added some code to change the
timeout to 30 seconds if the driver is detected to support SIOCGIWSCAN
events. This resolved number of stability issues with madwifi and I
would expect that to help in this particular case, too.

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

I'm not sure I would like to do this or well, I'm too lazy to figure out
whether there could be any case where this would not be desirable.. ;-)

Does the driver include the BSS in scan results? I would hope that at
least the BSSID is included even if the network is hidden (if not, the
driver should be fixed..). A better fix would likely be to change the
network selection process to allow this kind of case to select the
network even if there is no SSID match as long as the BSSID in scan
results matches with the BSSID that the client is currently associated
with.

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list