diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-07-01 15:40:45 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 15:01:52 -0400 |
commit | 6dc1cb0319997648f59b0f46b9e093e779f0353d (patch) | |
tree | 79bb836ba724a77ac200e5b11d3930adb92bb25d | |
parent | ac00326e9d1d46bf48e9cf60cf892a96b885601a (diff) |
mac80211: remove auth algorithm retry
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | net/mac80211/cfg.c | 8 | ||||
-rw-r--r-- | net/mac80211/debugfs_netdev.c | 3 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 8 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 47 |
4 files changed, 4 insertions, 62 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index af4733ba5be2..3c9774e36a80 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1178,16 +1178,16 @@ static int ieee80211_auth(struct wiphy *wiphy, struct net_device *dev, | |||
1178 | 1178 | ||
1179 | switch (req->auth_type) { | 1179 | switch (req->auth_type) { |
1180 | case NL80211_AUTHTYPE_OPEN_SYSTEM: | 1180 | case NL80211_AUTHTYPE_OPEN_SYSTEM: |
1181 | sdata->u.mgd.auth_algs = IEEE80211_AUTH_ALG_OPEN; | 1181 | sdata->u.mgd.auth_alg = WLAN_AUTH_OPEN; |
1182 | break; | 1182 | break; |
1183 | case NL80211_AUTHTYPE_SHARED_KEY: | 1183 | case NL80211_AUTHTYPE_SHARED_KEY: |
1184 | sdata->u.mgd.auth_algs = IEEE80211_AUTH_ALG_SHARED_KEY; | 1184 | sdata->u.mgd.auth_alg = WLAN_AUTH_SHARED_KEY; |
1185 | break; | 1185 | break; |
1186 | case NL80211_AUTHTYPE_FT: | 1186 | case NL80211_AUTHTYPE_FT: |
1187 | sdata->u.mgd.auth_algs = IEEE80211_AUTH_ALG_FT; | 1187 | sdata->u.mgd.auth_alg = WLAN_AUTH_FT; |
1188 | break; | 1188 | break; |
1189 | case NL80211_AUTHTYPE_NETWORK_EAP: | 1189 | case NL80211_AUTHTYPE_NETWORK_EAP: |
1190 | sdata->u.mgd.auth_algs = IEEE80211_AUTH_ALG_LEAP; | 1190 | sdata->u.mgd.auth_alg = WLAN_AUTH_LEAP; |
1191 | break; | 1191 | break; |
1192 | default: | 1192 | default: |
1193 | return -EOPNOTSUPP; | 1193 | return -EOPNOTSUPP; |
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index e3420329f4e6..df8c804e2d9a 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c | |||
@@ -105,7 +105,6 @@ IEEE80211_IF_FILE(capab, u.mgd.capab, HEX); | |||
105 | IEEE80211_IF_FILE(extra_ie_len, u.mgd.extra_ie_len, SIZE); | 105 | IEEE80211_IF_FILE(extra_ie_len, u.mgd.extra_ie_len, SIZE); |
106 | IEEE80211_IF_FILE(auth_tries, u.mgd.auth_tries, DEC); | 106 | IEEE80211_IF_FILE(auth_tries, u.mgd.auth_tries, DEC); |
107 | IEEE80211_IF_FILE(assoc_tries, u.mgd.assoc_tries, DEC); | 107 | IEEE80211_IF_FILE(assoc_tries, u.mgd.assoc_tries, DEC); |
108 | IEEE80211_IF_FILE(auth_algs, u.mgd.auth_algs, HEX); | ||
109 | IEEE80211_IF_FILE(auth_alg, u.mgd.auth_alg, DEC); | 108 | IEEE80211_IF_FILE(auth_alg, u.mgd.auth_alg, DEC); |
110 | IEEE80211_IF_FILE(auth_transaction, u.mgd.auth_transaction, DEC); | 109 | IEEE80211_IF_FILE(auth_transaction, u.mgd.auth_transaction, DEC); |
111 | 110 | ||
@@ -194,7 +193,6 @@ static void add_sta_files(struct ieee80211_sub_if_data *sdata) | |||
194 | DEBUGFS_ADD(extra_ie_len, sta); | 193 | DEBUGFS_ADD(extra_ie_len, sta); |
195 | DEBUGFS_ADD(auth_tries, sta); | 194 | DEBUGFS_ADD(auth_tries, sta); |
196 | DEBUGFS_ADD(assoc_tries, sta); | 195 | DEBUGFS_ADD(assoc_tries, sta); |
197 | DEBUGFS_ADD(auth_algs, sta); | ||
198 | DEBUGFS_ADD(auth_alg, sta); | 196 | DEBUGFS_ADD(auth_alg, sta); |
199 | DEBUGFS_ADD(auth_transaction, sta); | 197 | DEBUGFS_ADD(auth_transaction, sta); |
200 | DEBUGFS_ADD(flags, sta); | 198 | DEBUGFS_ADD(flags, sta); |
@@ -327,7 +325,6 @@ static void del_sta_files(struct ieee80211_sub_if_data *sdata) | |||
327 | DEBUGFS_DEL(extra_ie_len, sta); | 325 | DEBUGFS_DEL(extra_ie_len, sta); |
328 | DEBUGFS_DEL(auth_tries, sta); | 326 | DEBUGFS_DEL(auth_tries, sta); |
329 | DEBUGFS_DEL(assoc_tries, sta); | 327 | DEBUGFS_DEL(assoc_tries, sta); |
330 | DEBUGFS_DEL(auth_algs, sta); | ||
331 | DEBUGFS_DEL(auth_alg, sta); | 328 | DEBUGFS_DEL(auth_alg, sta); |
332 | DEBUGFS_DEL(auth_transaction, sta); | 329 | DEBUGFS_DEL(auth_transaction, sta); |
333 | DEBUGFS_DEL(flags, sta); | 330 | DEBUGFS_DEL(flags, sta); |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 1950e2eb4150..f7024eeba8f5 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -251,12 +251,6 @@ struct mesh_preq_queue { | |||
251 | #define IEEE80211_STA_REQ_AUTH 1 | 251 | #define IEEE80211_STA_REQ_AUTH 1 |
252 | #define IEEE80211_STA_REQ_RUN 2 | 252 | #define IEEE80211_STA_REQ_RUN 2 |
253 | 253 | ||
254 | /* bitfield of allowed auth algs */ | ||
255 | #define IEEE80211_AUTH_ALG_OPEN BIT(0) | ||
256 | #define IEEE80211_AUTH_ALG_SHARED_KEY BIT(1) | ||
257 | #define IEEE80211_AUTH_ALG_LEAP BIT(2) | ||
258 | #define IEEE80211_AUTH_ALG_FT BIT(3) | ||
259 | |||
260 | struct ieee80211_if_managed { | 254 | struct ieee80211_if_managed { |
261 | struct timer_list timer; | 255 | struct timer_list timer; |
262 | struct timer_list chswitch_timer; | 256 | struct timer_list chswitch_timer; |
@@ -303,7 +297,6 @@ struct ieee80211_if_managed { | |||
303 | 297 | ||
304 | unsigned int flags; | 298 | unsigned int flags; |
305 | 299 | ||
306 | unsigned int auth_algs; /* bitfield of allowed auth algs */ | ||
307 | int auth_alg; /* currently used IEEE 802.11 authentication algorithm */ | 300 | int auth_alg; /* currently used IEEE 802.11 authentication algorithm */ |
308 | int auth_transaction; | 301 | int auth_transaction; |
309 | 302 | ||
@@ -488,7 +481,6 @@ struct ieee80211_sub_if_data { | |||
488 | struct dentry *extra_ie_len; | 481 | struct dentry *extra_ie_len; |
489 | struct dentry *auth_tries; | 482 | struct dentry *auth_tries; |
490 | struct dentry *assoc_tries; | 483 | struct dentry *assoc_tries; |
491 | struct dentry *auth_algs; | ||
492 | struct dentry *auth_alg; | 484 | struct dentry *auth_alg; |
493 | struct dentry *auth_transaction; | 485 | struct dentry *auth_transaction; |
494 | struct dentry *flags; | 486 | struct dentry *flags; |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 2a7860009f9c..2b357c7adb8d 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1414,39 +1414,6 @@ static void ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata, | |||
1414 | return; | 1414 | return; |
1415 | 1415 | ||
1416 | if (status_code != WLAN_STATUS_SUCCESS) { | 1416 | if (status_code != WLAN_STATUS_SUCCESS) { |
1417 | if (status_code == WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG) { | ||
1418 | u8 algs[3]; | ||
1419 | const int num_algs = ARRAY_SIZE(algs); | ||
1420 | int i, pos; | ||
1421 | algs[0] = algs[1] = algs[2] = 0xff; | ||
1422 | if (ifmgd->auth_algs & IEEE80211_AUTH_ALG_OPEN) | ||
1423 | algs[0] = WLAN_AUTH_OPEN; | ||
1424 | if (ifmgd->auth_algs & IEEE80211_AUTH_ALG_SHARED_KEY) | ||
1425 | algs[1] = WLAN_AUTH_SHARED_KEY; | ||
1426 | if (ifmgd->auth_algs & IEEE80211_AUTH_ALG_LEAP) | ||
1427 | algs[2] = WLAN_AUTH_LEAP; | ||
1428 | if (ifmgd->auth_alg == WLAN_AUTH_OPEN) | ||
1429 | pos = 0; | ||
1430 | else if (ifmgd->auth_alg == WLAN_AUTH_SHARED_KEY) | ||
1431 | pos = 1; | ||
1432 | else | ||
1433 | pos = 2; | ||
1434 | for (i = 0; i < num_algs; i++) { | ||
1435 | pos++; | ||
1436 | if (pos >= num_algs) | ||
1437 | pos = 0; | ||
1438 | if (algs[pos] == ifmgd->auth_alg || | ||
1439 | algs[pos] == 0xff) | ||
1440 | continue; | ||
1441 | if (algs[pos] == WLAN_AUTH_SHARED_KEY && | ||
1442 | !ieee80211_sta_wep_configured(sdata)) | ||
1443 | continue; | ||
1444 | ifmgd->auth_alg = algs[pos]; | ||
1445 | ifmgd->auth_tries = 0; | ||
1446 | return; | ||
1447 | } | ||
1448 | } | ||
1449 | /* nothing else to try -- give up */ | ||
1450 | cfg80211_send_rx_auth(sdata->dev, (u8 *) mgmt, len, | 1417 | cfg80211_send_rx_auth(sdata->dev, (u8 *) mgmt, len, |
1451 | GFP_KERNEL); | 1418 | GFP_KERNEL); |
1452 | ifmgd->state = IEEE80211_STA_MLME_DISABLED; | 1419 | ifmgd->state = IEEE80211_STA_MLME_DISABLED; |
@@ -2102,18 +2069,6 @@ static void ieee80211_sta_reset_auth(struct ieee80211_sub_if_data *sdata) | |||
2102 | drv_reset_tsf(local); | 2069 | drv_reset_tsf(local); |
2103 | 2070 | ||
2104 | ifmgd->wmm_last_param_set = -1; /* allow any WMM update */ | 2071 | ifmgd->wmm_last_param_set = -1; /* allow any WMM update */ |
2105 | |||
2106 | |||
2107 | if (ifmgd->auth_algs & IEEE80211_AUTH_ALG_OPEN) | ||
2108 | ifmgd->auth_alg = WLAN_AUTH_OPEN; | ||
2109 | else if (ifmgd->auth_algs & IEEE80211_AUTH_ALG_SHARED_KEY) | ||
2110 | ifmgd->auth_alg = WLAN_AUTH_SHARED_KEY; | ||
2111 | else if (ifmgd->auth_algs & IEEE80211_AUTH_ALG_LEAP) | ||
2112 | ifmgd->auth_alg = WLAN_AUTH_LEAP; | ||
2113 | else if (ifmgd->auth_algs & IEEE80211_AUTH_ALG_FT) | ||
2114 | ifmgd->auth_alg = WLAN_AUTH_FT; | ||
2115 | else | ||
2116 | ifmgd->auth_alg = WLAN_AUTH_OPEN; | ||
2117 | ifmgd->auth_transaction = -1; | 2072 | ifmgd->auth_transaction = -1; |
2118 | ifmgd->flags &= ~IEEE80211_STA_ASSOCIATED; | 2073 | ifmgd->flags &= ~IEEE80211_STA_ASSOCIATED; |
2119 | ifmgd->assoc_scan_tries = 0; | 2074 | ifmgd->assoc_scan_tries = 0; |
@@ -2351,8 +2306,6 @@ void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata) | |||
2351 | skb_queue_head_init(&ifmgd->skb_queue); | 2306 | skb_queue_head_init(&ifmgd->skb_queue); |
2352 | 2307 | ||
2353 | ifmgd->capab = WLAN_CAPABILITY_ESS; | 2308 | ifmgd->capab = WLAN_CAPABILITY_ESS; |
2354 | ifmgd->auth_algs = IEEE80211_AUTH_ALG_OPEN | | ||
2355 | IEEE80211_AUTH_ALG_SHARED_KEY; | ||
2356 | ifmgd->flags |= IEEE80211_STA_CREATE_IBSS | | 2309 | ifmgd->flags |= IEEE80211_STA_CREATE_IBSS | |
2357 | IEEE80211_STA_AUTO_BSSID_SEL | | 2310 | IEEE80211_STA_AUTO_BSSID_SEL | |
2358 | IEEE80211_STA_AUTO_CHANNEL_SEL; | 2311 | IEEE80211_STA_AUTO_CHANNEL_SEL; |