public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat.com>
To: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: attempt to scan fails (device busy) if essid/ssid was changed recently
Date: Wed, 08 Apr 2009 10:26:19 -0400	[thread overview]
Message-ID: <1239200779.14879.9.camel@localhost.localdomain> (raw)
In-Reply-To: <1239108689.15015.3.camel@maxim-laptop>

On Tue, 2009-04-07 at 15:51 +0300, Maxim Levitsky wrote:
> On Tue, 2009-04-07 at 10:18 +0200, Johannes Berg wrote:
> > On Tue, 2009-04-07 at 03:00 +0300, Maxim Levitsky wrote:
> > 
> > > I noticed that always first attempt at scan fails when NM asks for scan.
> > > I also noticed that this happens with quite recent kernels (I think
> > > 2,6.28) didn't have this behavior.
> > 
> > I'm pretty sure it did.
> I am sure that on older kernel there was no -EBUSY error returned to
> userspace. It probably just stalled the client.
> 
> 
> > 
> > > 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)?

Honestly I think this should be handled by the driver or wpa_supplicant.
Recent supplicant versions will already send a bogus SSID and BSSID to
the driver when a forced disconnection happens, but that's not enough to
stop some drivers like 2.6.27's iwl3945 from continually attempting
reconnection to an SSID in other cases.

The problem is that wext has no mechanism for saying "stop doing
whatever you're doing dammit and wait for me to tell you what to do
next".  I guess that would really be !IFF_UP, but of course you can't
scan then on most parts.

In the end, I'm probably going to patch the supplicant to handle this
and remove that code from NM.  It's really old code and things have
moved on since then.

Dan



      parent reply	other threads:[~2009-04-08 14:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-07  0:00 attempt to scan fails (device busy) if essid/ssid was changed recently Maxim Levitsky
2009-04-07  8:18 ` Johannes Berg
2009-04-07 12:51   ` Maxim Levitsky
2009-04-07 12:56     ` Johannes Berg
2009-04-07 13:04       ` Maxim Levitsky
2009-04-07 13:13         ` Johannes Berg
2009-04-07 13:20           ` Maxim Levitsky
2009-04-07 13:27             ` Johannes Berg
2009-04-07 13:51               ` Maxim Levitsky
2009-04-07 20:24                 ` Maxim Levitsky
2009-04-07 20:37                   ` Johannes Berg
2009-04-10 20:30                     ` Maxim Levitsky
2009-04-10 20:47                       ` Maxim Levitsky
2009-04-11 11:35                         ` Johannes Berg
2009-04-11 11:34                       ` Johannes Berg
2009-04-11 23:55                         ` Maxim Levitsky
2009-04-12  7:06                           ` Johannes Berg
2009-04-12 12:49                             ` Maxim Levitsky
2009-04-08 14:26     ` Dan Williams [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1239200779.14879.9.camel@localhost.localdomain \
    --to=dcbw@redhat.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=maximlevitsky@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox