Scanning when configured for managed network which is not present

Timo Teräs <[email protected]> Wed, 27 Oct 2004 11:25:59 +0300
Newsgroups gmane.linux.drivers.at76c503a.user
Message-ID <[email protected]>
Hi,

I just recently upgraded from a relativelty old version of the driver to the 
latest CVS version.

It resulted to give -EAGAIN errors every time I did a 'iwlist scan'.

I started digging and noticed that the only place for -EAGAIN is in the 
beginning of at76c503_iw_handler_get_scan(). It uses the dev->istate != 
SCANNING to determine if the previously requested scanning has been completed.

But the thing is that my WLAN was configured for managed mode and the network 
wasn't present. So after the scan was done it goes to JOINING state and 
notices that my SSID is not present and goes back to SCANNING state. And this 
all happens before iwlist has time to do SIOCGIWSCAN thus it will always fail 
with -EAGAIN.

When I configured my WLAN for ad-hoc the scanning works as it should.

I tried to do add a simple flag to remember if scanning was completed. Set it 
in SIOCSIWSCAN and reset it in iwevent_scan_complete(). But apparently the 
bss_list is emptied whan the scanning round starts.

So I'm not sure how this should be fixed.

Cheers,
   Timo
signature.asc (application/pgp-signature, 256 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBf1uaFlRU9HaAsIcRAujmAJ9E8K1Z1Nd+RqNSC7BTX9Rchl0mLgCfdPco
Lnq2UkL5cqmovTpT9CwWwOs=
=ziqI
-----END PGP SIGNATURE-----