linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Michael Buesch <mb@bu3sch.de>
Cc: John Linville <linville@tuxdriver.com>,
	Abhijeet Kolekar <abhijeet.kolekar@intel.com>,
	linux-wireless@vger.kernel.org
Subject: Re: Association broken with wpa_supplicant
Date: Fri, 16 May 2008 16:57:33 +0200	[thread overview]
Message-ID: <1210949853.6381.19.camel@johannes.berg> (raw)
In-Reply-To: <200805160030.11244.mb@bu3sch.de> (sfid-20080516_003051_817717_1A6121D9)

[-- Attachment #1: Type: text/plain, Size: 2245 bytes --]

On Fri, 2008-05-16 at 00:30 +0200, Michael Buesch wrote:
> Hi John,
> 
> Association is broken in latest wireless-testing when using
> wpa_supplicant. It tells me
> 
> Trying to associate with REAL_BSSID...
> Authentication with 00:00:00:00:00:00 timed out.
> 
> The commit responsible for the breakage is
> 
> Author: Abhijeet Kolekar <abhijeet.kolekar@intel.com>  2008-05-09 18:35:41
> Committer: John W. Linville <linville@tuxdriver.com>  2008-05-15 22:11:19
> Parent: 6d7ef8714c227884346aebd9f4e5eea302db6d22 (hostap: fix "registers" registration in procfs)
> Child:  d67ec7fb2b8ce69709def2421ab893517b101591 (libertas: fix command timeout after firmware failure)
> Branches: master, remotes/origin/master
> Follows: master-2008-05-14
> Precedes: master-2008-05-15
> 
>     mac80211 : Association with 11n hidden ssid ap.

Ok, so after knowing what breaks, I can tell you why :)

The original code looks like this:

-        if (!(ifsta->flags & (IEEE80211_STA_AUTO_SSID_SEL |
-            IEEE80211_STA_AUTO_BSSID_SEL | IEEE80211_STA_AUTO_CHANNEL_SEL))) {
-                ifsta->state = IEEE80211_AUTHENTICATE;
-                ieee80211_sta_reset_auth(dev, ifsta);
-                return 0;
-        }

        spin_lock_bh(&local->sta_bss_lock);
        freq = local->oper_channel->center_freq;
        list_for_each_entry(bss, &local->sta_bss_list, list) {
                if (!(bss->capability & WLAN_CAPABILITY_ESS)) 
                        continue;

                if (!!(bss->capability & WLAN_CAPABILITY_PRIVACY) ^
                    !!sdata->default_key)
                        continue;

[...]


Now, with the marked code removed, observe what will happen with the
last if statement here when wpa supplicant sets all parameters (i.e.
none of the auto flags are set): It will continue the loop because
wpa_supplicant hasn't yet set a key, which of course, it cannot.

We cannot remove that test either because that would break regular WEP
operation; we could "enhance" the test with a huge check for all the
flags but I think that's stretching it.

Let's work on making cfg80211 work for this instead where we can add any
number of flags for these things.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2008-05-16 14:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-15 22:30 Association broken with wpa_supplicant Michael Buesch
2008-05-16 14:57 ` Johannes Berg [this message]
2008-05-16 14:58 ` John W. Linville
2008-05-16 18:16   ` Michael Buesch
2008-05-16 18:19     ` Kolekar, Abhijeet
  -- strict thread matches above, loose matches on Subject: below --
2008-05-16  7:31 Ronald
2008-05-16  8:19 ` Johannes Berg

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=1210949853.6381.19.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=abhijeet.kolekar@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mb@bu3sch.de \
    /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;
as well as URLs for NNTP newsgroup(s).