lkml.org 
[lkml]   [2009]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: attempt to scan fails (device busy) if essid/ssid was changed recently
From
Date
On Tue, 2009-04-07 at 15:13 +0200, Johannes Berg wrote:
> On Tue, 2009-04-07 at 16:04 +0300, Maxim Levitsky wrote:
>
> > > > > > Looking a bit deeper I discovered that each time NM disconnects from a
> > > > > > networks it sets random ssid/essid to the card (using wireless
> > > > > > extensions)
> > > > >
> > > > > This forces a scan
> > > > >
> > > > > > After that scan fails for some time.
> > > > > >
> > > > > > as a NM free example you can run
> > > > > >
> > > > > > iwconfig wlan0 essid dummy
> > > > > > iwlist scan
> > > > >
> > > > > and then this fails with EBUSY.
> > > > Thanks for explanation.
> > > > Since NM has its reasons to clear essid (to prevent unwanted
> > > > association), then what can be done to prevent this (and still use
> > > > wireless extensions, since nl80211 support isn't yet mature)?
> > >
> > > Nothing. Wext sucks, news at 11, yadda.
> > Thanks.
> > Everything understood.
>
> Of course, we can go back to dropping the scan request, but that
> wouldn't be very nice.
>
> Is this creating any problems?
Yep, but dropping the request won't help ether.
Problem is that wpa_supplicant will attempt to scan before association,
scan fails (it doesn't know it is already running) thus it waits 10
seconds. (I patched it to wait 2 seconds).

It happens if user first disconnects, and then reconnects to a network
(typical test I do for time it takes to connect)

Now I patched it not to clear essid on disconnect, and this helped
reduce connect times by about 2 seconds.

now it takes just 3~4 seconds to connect to open network, and ~6 seconds
to WPA2 network.

(This is with patched dhclient, I reduced its timeouts, but this is
another story.... it seems that first DHCPREQUEST never succeeds, and I
tested this with 2 cards, and few wireless networks)


Best regards,
Maxim Levitsky

>
> johannes



\
 
 \ /
  Last update: 2009-04-07 15:23    [W:0.038 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site