From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 21/20 v4] mac80211: remove auth algorithm retry
Date: Wed, 01 Jul 2009 21:40:45 +0200 [thread overview]
Message-ID: <1246477245.8154.7.camel@johannes.local> (raw)
In-Reply-To: <20090701192641.072258140@sipsolutions.net>
The automatic auth algorithm issue is now solved in
cfg80211, so mac80211 no longer needs code to try
different algorithms -- just using whatever cfg80211
asked for is good.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/cfg.c | 8 +++----
net/mac80211/debugfs_netdev.c | 3 --
net/mac80211/ieee80211_i.h | 8 -------
net/mac80211/mlme.c | 47 ------------------------------------------
4 files changed, 4 insertions(+), 62 deletions(-)
--- wireless-testing.orig/net/mac80211/ieee80211_i.h 2009-07-01 13:27:46.000000000 +0200
+++ wireless-testing/net/mac80211/ieee80211_i.h 2009-07-01 20:29:51.000000000 +0200
@@ -251,12 +251,6 @@ struct mesh_preq_queue {
#define IEEE80211_STA_REQ_AUTH 1
#define IEEE80211_STA_REQ_RUN 2
-/* bitfield of allowed auth algs */
-#define IEEE80211_AUTH_ALG_OPEN BIT(0)
-#define IEEE80211_AUTH_ALG_SHARED_KEY BIT(1)
-#define IEEE80211_AUTH_ALG_LEAP BIT(2)
-#define IEEE80211_AUTH_ALG_FT BIT(3)
-
struct ieee80211_if_managed {
struct timer_list timer;
struct timer_list chswitch_timer;
@@ -303,7 +297,6 @@ struct ieee80211_if_managed {
unsigned int flags;
- unsigned int auth_algs; /* bitfield of allowed auth algs */
int auth_alg; /* currently used IEEE 802.11 authentication algorithm */
int auth_transaction;
@@ -488,7 +481,6 @@ struct ieee80211_sub_if_data {
struct dentry *extra_ie_len;
struct dentry *auth_tries;
struct dentry *assoc_tries;
- struct dentry *auth_algs;
struct dentry *auth_alg;
struct dentry *auth_transaction;
struct dentry *flags;
--- wireless-testing.orig/net/mac80211/mlme.c 2009-07-01 20:29:35.000000000 +0200
+++ wireless-testing/net/mac80211/mlme.c 2009-07-01 20:29:51.000000000 +0200
@@ -1414,39 +1414,6 @@ static void ieee80211_rx_mgmt_auth(struc
return;
if (status_code != WLAN_STATUS_SUCCESS) {
- if (status_code == WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG) {
- u8 algs[3];
- const int num_algs = ARRAY_SIZE(algs);
- int i, pos;
- algs[0] = algs[1] = algs[2] = 0xff;
- if (ifmgd->auth_algs & IEEE80211_AUTH_ALG_OPEN)
- algs[0] = WLAN_AUTH_OPEN;
- if (ifmgd->auth_algs & IEEE80211_AUTH_ALG_SHARED_KEY)
- algs[1] = WLAN_AUTH_SHARED_KEY;
- if (ifmgd->auth_algs & IEEE80211_AUTH_ALG_LEAP)
- algs[2] = WLAN_AUTH_LEAP;
- if (ifmgd->auth_alg == WLAN_AUTH_OPEN)
- pos = 0;
- else if (ifmgd->auth_alg == WLAN_AUTH_SHARED_KEY)
- pos = 1;
- else
- pos = 2;
- for (i = 0; i < num_algs; i++) {
- pos++;
- if (pos >= num_algs)
- pos = 0;
- if (algs[pos] == ifmgd->auth_alg ||
- algs[pos] == 0xff)
- continue;
- if (algs[pos] == WLAN_AUTH_SHARED_KEY &&
- !ieee80211_sta_wep_configured(sdata))
- continue;
- ifmgd->auth_alg = algs[pos];
- 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;
@@ -2102,18 +2069,6 @@ static void ieee80211_sta_reset_auth(str
drv_reset_tsf(local);
ifmgd->wmm_last_param_set = -1; /* allow any WMM update */
-
-
- if (ifmgd->auth_algs & IEEE80211_AUTH_ALG_OPEN)
- ifmgd->auth_alg = WLAN_AUTH_OPEN;
- else if (ifmgd->auth_algs & IEEE80211_AUTH_ALG_SHARED_KEY)
- ifmgd->auth_alg = WLAN_AUTH_SHARED_KEY;
- else if (ifmgd->auth_algs & IEEE80211_AUTH_ALG_LEAP)
- ifmgd->auth_alg = WLAN_AUTH_LEAP;
- else if (ifmgd->auth_algs & IEEE80211_AUTH_ALG_FT)
- ifmgd->auth_alg = WLAN_AUTH_FT;
- else
- ifmgd->auth_alg = WLAN_AUTH_OPEN;
ifmgd->auth_transaction = -1;
ifmgd->flags &= ~IEEE80211_STA_ASSOCIATED;
ifmgd->assoc_scan_tries = 0;
@@ -2351,8 +2306,6 @@ void ieee80211_sta_setup_sdata(struct ie
skb_queue_head_init(&ifmgd->skb_queue);
ifmgd->capab = WLAN_CAPABILITY_ESS;
- ifmgd->auth_algs = IEEE80211_AUTH_ALG_OPEN |
- IEEE80211_AUTH_ALG_SHARED_KEY;
ifmgd->flags |= IEEE80211_STA_CREATE_IBSS |
IEEE80211_STA_AUTO_BSSID_SEL |
IEEE80211_STA_AUTO_CHANNEL_SEL;
--- wireless-testing.orig/net/mac80211/cfg.c 2009-07-01 20:29:47.000000000 +0200
+++ wireless-testing/net/mac80211/cfg.c 2009-07-01 20:29:51.000000000 +0200
@@ -1178,16 +1178,16 @@ static int ieee80211_auth(struct wiphy *
switch (req->auth_type) {
case NL80211_AUTHTYPE_OPEN_SYSTEM:
- sdata->u.mgd.auth_algs = IEEE80211_AUTH_ALG_OPEN;
+ sdata->u.mgd.auth_alg = WLAN_AUTH_OPEN;
break;
case NL80211_AUTHTYPE_SHARED_KEY:
- sdata->u.mgd.auth_algs = IEEE80211_AUTH_ALG_SHARED_KEY;
+ sdata->u.mgd.auth_alg = WLAN_AUTH_SHARED_KEY;
break;
case NL80211_AUTHTYPE_FT:
- sdata->u.mgd.auth_algs = IEEE80211_AUTH_ALG_FT;
+ sdata->u.mgd.auth_alg = WLAN_AUTH_FT;
break;
case NL80211_AUTHTYPE_NETWORK_EAP:
- sdata->u.mgd.auth_algs = IEEE80211_AUTH_ALG_LEAP;
+ sdata->u.mgd.auth_alg = WLAN_AUTH_LEAP;
break;
default:
return -EOPNOTSUPP;
--- wireless-testing.orig/net/mac80211/debugfs_netdev.c 2009-07-01 13:27:46.000000000 +0200
+++ wireless-testing/net/mac80211/debugfs_netdev.c 2009-07-01 20:29:52.000000000 +0200
@@ -105,7 +105,6 @@ IEEE80211_IF_FILE(capab, u.mgd.capab, HE
IEEE80211_IF_FILE(extra_ie_len, u.mgd.extra_ie_len, SIZE);
IEEE80211_IF_FILE(auth_tries, u.mgd.auth_tries, DEC);
IEEE80211_IF_FILE(assoc_tries, u.mgd.assoc_tries, DEC);
-IEEE80211_IF_FILE(auth_algs, u.mgd.auth_algs, HEX);
IEEE80211_IF_FILE(auth_alg, u.mgd.auth_alg, DEC);
IEEE80211_IF_FILE(auth_transaction, u.mgd.auth_transaction, DEC);
@@ -194,7 +193,6 @@ static void add_sta_files(struct ieee802
DEBUGFS_ADD(extra_ie_len, sta);
DEBUGFS_ADD(auth_tries, sta);
DEBUGFS_ADD(assoc_tries, sta);
- DEBUGFS_ADD(auth_algs, sta);
DEBUGFS_ADD(auth_alg, sta);
DEBUGFS_ADD(auth_transaction, sta);
DEBUGFS_ADD(flags, sta);
@@ -327,7 +325,6 @@ static void del_sta_files(struct ieee802
DEBUGFS_DEL(extra_ie_len, sta);
DEBUGFS_DEL(auth_tries, sta);
DEBUGFS_DEL(assoc_tries, sta);
- DEBUGFS_DEL(auth_algs, sta);
DEBUGFS_DEL(auth_alg, sta);
DEBUGFS_DEL(auth_transaction, sta);
DEBUGFS_DEL(flags, sta);
next prev parent reply other threads:[~2009-07-01 19:40 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-01 19:26 [PATCH 00/20 v4] wireless patch dump Johannes Berg
2009-07-01 19:26 ` [PATCH 01/20 v4] wext: allow returning NULL stats Johannes Berg
2009-07-01 19:26 ` [PATCH 02/20 v4] mac80211: fix todo lock Johannes Berg
2009-07-01 19:26 ` [PATCH 03/20 v4] wext: default to y Johannes Berg
2009-07-01 19:26 ` [PATCH 04/20 v4] cfg80211: move break statement to correct place Johannes Berg
2009-07-01 19:26 ` [PATCH 05/20 v4] nl80211: clean up function definitions Johannes Berg
2009-07-01 19:26 ` [PATCH 06/20 v4] cfg80211: use proper allocation flags Johannes Berg
2009-07-01 19:26 ` [PATCH 07/20 v4] cfg80211: remove wireless_dev->bssid Johannes Berg
2009-07-01 19:26 ` [PATCH 08/20 v4] mac80211: tell SME about real auth state Johannes Berg
2009-07-01 19:26 ` [PATCH 09/20 v4] wext: constify extra argument to wireless_send_event Johannes Berg
2009-07-01 19:26 ` [PATCH 10/20 v4] cfg80211: introduce nl80211 testmode command Johannes Berg
2009-07-01 19:26 ` [PATCH 11/20 v4] mac80211: remove an unused function declaration Johannes Berg
2009-07-01 19:26 ` [PATCH 12/20 v4] wireless: define AKM suites Johannes Berg
2009-07-01 19:26 ` [PATCH 13/20 v4] cfg80211: connect/disconnect API Johannes Berg
2009-07-01 19:26 ` [PATCH 14/20 v4] cfg80211: emulate connect with auth/assoc Johannes Berg
2009-07-02 7:13 ` [PATCH 14/20 v4.1] " Johannes Berg
2009-07-01 19:26 ` [PATCH 15/20 v4] cfg80211: managed mode wext compatibility Johannes Berg
2009-07-02 23:55 ` [PATCH] iwmc3200wifi: cfg80211 managed mode port Samuel Ortiz
2009-07-03 8:02 ` Johannes Berg
2009-07-03 13:10 ` Samuel Ortiz
2009-07-05 1:37 ` Johannes Berg
2009-07-03 0:00 ` [PATCH] cfg80211: check for current_bss from giwrate Samuel Ortiz
2009-07-03 8:01 ` Johannes Berg
2009-07-01 19:26 ` [PATCH 16/20 v4] cfg80211: implement iwpower Johannes Berg
2009-07-01 19:26 ` [PATCH 17/20 v4] cfg80211: implement IWAP for WDS Johannes Berg
2009-07-01 19:26 ` [PATCH 18/20 v4] cfg80211: implement IWRATE Johannes Berg
2009-07-01 19:27 ` [PATCH 19/20 v4] cfg80211: implement get_wireless_stats Johannes Berg
2009-07-01 19:27 ` [PATCH 20/20 v4] mac80211: re-add HT disabling Johannes Berg
2009-07-01 19:40 ` Johannes Berg [this message]
2009-07-01 19:41 ` [PATCH 22/20 v4] mac80211: remove dead code, clean up Johannes Berg
2009-07-02 7:58 ` [PATCH] cfg80211: send events for userspace SME 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=1246477245.8154.7.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;
as well as URLs for NNTP newsgroup(s).