From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: tell SME about real auth state
Date: Wed, 24 Jun 2009 22:06:43 +0200 [thread overview]
Message-ID: <1245874003.21314.57.camel@johannes.local> (raw)
When the auth algorithm is rejected, but we don't have
another one to try, we will eventually retry but that
isn't useful -- we'll then do it again and again until
we eventually give up. Instead, we should let the SME
know and go into disabled state. The same applies for
situations where the AP rejects with any other status
code.
Additionally, when trying the next auth algorithm, we
should reset the auth_tries so that just a single lost
frame doesn't lead to us giving up on the third auth
algorithm.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/mlme.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- wireless-testing.orig/net/mac80211/mlme.c 2009-06-24 22:03:04.000000000 +0200
+++ wireless-testing/net/mac80211/mlme.c 2009-06-24 22:03:38.000000000 +0200
@@ -1511,9 +1511,15 @@ static void ieee80211_rx_mgmt_auth(struc
!ieee80211_sta_wep_configured(sdata))
continue;
ifmgd->auth_alg = algs[pos];
- break;
+ ifmgd->auth_tries = 0;
+ return;
}
}
+ /* nothing else to try -- give up */
+ cfg80211_send_rx_auth(sdata->dev, (u8 *) mgmt, len,
+ GFP_KERNEL);
+ ifmgd->state = IEEE80211_STA_MLME_DISABLED;
+ ieee80211_recalc_idle(sdata->local);
return;
}
reply other threads:[~2009-06-24 20:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1245874003.21314.57.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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