Commit 6dc1cb03 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

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: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ac00326e
...@@ -1178,16 +1178,16 @@ static int ieee80211_auth(struct wiphy *wiphy, struct net_device *dev, ...@@ -1178,16 +1178,16 @@ static int ieee80211_auth(struct wiphy *wiphy, struct net_device *dev,
switch (req->auth_type) { switch (req->auth_type) {
case NL80211_AUTHTYPE_OPEN_SYSTEM: case NL80211_AUTHTYPE_OPEN_SYSTEM:
sdata->u.mgd.auth_algs = IEEE80211_AUTH_ALG_OPEN; sdata->u.mgd.auth_alg = WLAN_AUTH_OPEN;
break; break;
case NL80211_AUTHTYPE_SHARED_KEY: 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; break;
case NL80211_AUTHTYPE_FT: case NL80211_AUTHTYPE_FT:
sdata->u.mgd.auth_algs = IEEE80211_AUTH_ALG_FT; sdata->u.mgd.auth_alg = WLAN_AUTH_FT;
break; break;
case NL80211_AUTHTYPE_NETWORK_EAP: case NL80211_AUTHTYPE_NETWORK_EAP:
sdata->u.mgd.auth_algs = IEEE80211_AUTH_ALG_LEAP; sdata->u.mgd.auth_alg = WLAN_AUTH_LEAP;
break; break;
default: default:
return -EOPNOTSUPP; return -EOPNOTSUPP;
......
...@@ -105,7 +105,6 @@ IEEE80211_IF_FILE(capab, u.mgd.capab, HEX); ...@@ -105,7 +105,6 @@ IEEE80211_IF_FILE(capab, u.mgd.capab, HEX);
IEEE80211_IF_FILE(extra_ie_len, u.mgd.extra_ie_len, SIZE); 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(auth_tries, u.mgd.auth_tries, DEC);
IEEE80211_IF_FILE(assoc_tries, u.mgd.assoc_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_alg, u.mgd.auth_alg, DEC);
IEEE80211_IF_FILE(auth_transaction, u.mgd.auth_transaction, DEC); IEEE80211_IF_FILE(auth_transaction, u.mgd.auth_transaction, DEC);
...@@ -194,7 +193,6 @@ static void add_sta_files(struct ieee80211_sub_if_data *sdata) ...@@ -194,7 +193,6 @@ static void add_sta_files(struct ieee80211_sub_if_data *sdata)
DEBUGFS_ADD(extra_ie_len, sta); DEBUGFS_ADD(extra_ie_len, sta);
DEBUGFS_ADD(auth_tries, sta); DEBUGFS_ADD(auth_tries, sta);
DEBUGFS_ADD(assoc_tries, sta); DEBUGFS_ADD(assoc_tries, sta);
DEBUGFS_ADD(auth_algs, sta);
DEBUGFS_ADD(auth_alg, sta); DEBUGFS_ADD(auth_alg, sta);
DEBUGFS_ADD(auth_transaction, sta); DEBUGFS_ADD(auth_transaction, sta);
DEBUGFS_ADD(flags, sta); DEBUGFS_ADD(flags, sta);
...@@ -327,7 +325,6 @@ static void del_sta_files(struct ieee80211_sub_if_data *sdata) ...@@ -327,7 +325,6 @@ static void del_sta_files(struct ieee80211_sub_if_data *sdata)
DEBUGFS_DEL(extra_ie_len, sta); DEBUGFS_DEL(extra_ie_len, sta);
DEBUGFS_DEL(auth_tries, sta); DEBUGFS_DEL(auth_tries, sta);
DEBUGFS_DEL(assoc_tries, sta); DEBUGFS_DEL(assoc_tries, sta);
DEBUGFS_DEL(auth_algs, sta);
DEBUGFS_DEL(auth_alg, sta); DEBUGFS_DEL(auth_alg, sta);
DEBUGFS_DEL(auth_transaction, sta); DEBUGFS_DEL(auth_transaction, sta);
DEBUGFS_DEL(flags, sta); DEBUGFS_DEL(flags, sta);
......
...@@ -251,12 +251,6 @@ struct mesh_preq_queue { ...@@ -251,12 +251,6 @@ struct mesh_preq_queue {
#define IEEE80211_STA_REQ_AUTH 1 #define IEEE80211_STA_REQ_AUTH 1
#define IEEE80211_STA_REQ_RUN 2 #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 ieee80211_if_managed {
struct timer_list timer; struct timer_list timer;
struct timer_list chswitch_timer; struct timer_list chswitch_timer;
...@@ -303,7 +297,6 @@ struct ieee80211_if_managed { ...@@ -303,7 +297,6 @@ struct ieee80211_if_managed {
unsigned int flags; unsigned int flags;
unsigned int auth_algs; /* bitfield of allowed auth algs */
int auth_alg; /* currently used IEEE 802.11 authentication algorithm */ int auth_alg; /* currently used IEEE 802.11 authentication algorithm */
int auth_transaction; int auth_transaction;
...@@ -488,7 +481,6 @@ struct ieee80211_sub_if_data { ...@@ -488,7 +481,6 @@ struct ieee80211_sub_if_data {
struct dentry *extra_ie_len; struct dentry *extra_ie_len;
struct dentry *auth_tries; struct dentry *auth_tries;
struct dentry *assoc_tries; struct dentry *assoc_tries;
struct dentry *auth_algs;
struct dentry *auth_alg; struct dentry *auth_alg;
struct dentry *auth_transaction; struct dentry *auth_transaction;
struct dentry *flags; struct dentry *flags;
......
...@@ -1414,39 +1414,6 @@ static void ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata, ...@@ -1414,39 +1414,6 @@ static void ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
return; return;
if (status_code != WLAN_STATUS_SUCCESS) { 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, cfg80211_send_rx_auth(sdata->dev, (u8 *) mgmt, len,
GFP_KERNEL); GFP_KERNEL);
ifmgd->state = IEEE80211_STA_MLME_DISABLED; ifmgd->state = IEEE80211_STA_MLME_DISABLED;
...@@ -2102,18 +2069,6 @@ static void ieee80211_sta_reset_auth(struct ieee80211_sub_if_data *sdata) ...@@ -2102,18 +2069,6 @@ static void ieee80211_sta_reset_auth(struct ieee80211_sub_if_data *sdata)
drv_reset_tsf(local); drv_reset_tsf(local);
ifmgd->wmm_last_param_set = -1; /* allow any WMM update */ 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->auth_transaction = -1;
ifmgd->flags &= ~IEEE80211_STA_ASSOCIATED; ifmgd->flags &= ~IEEE80211_STA_ASSOCIATED;
ifmgd->assoc_scan_tries = 0; ifmgd->assoc_scan_tries = 0;
...@@ -2351,8 +2306,6 @@ void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata) ...@@ -2351,8 +2306,6 @@ void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata)
skb_queue_head_init(&ifmgd->skb_queue); skb_queue_head_init(&ifmgd->skb_queue);
ifmgd->capab = WLAN_CAPABILITY_ESS; ifmgd->capab = WLAN_CAPABILITY_ESS;
ifmgd->auth_algs = IEEE80211_AUTH_ALG_OPEN |
IEEE80211_AUTH_ALG_SHARED_KEY;
ifmgd->flags |= IEEE80211_STA_CREATE_IBSS | ifmgd->flags |= IEEE80211_STA_CREATE_IBSS |
IEEE80211_STA_AUTO_BSSID_SEL | IEEE80211_STA_AUTO_BSSID_SEL |
IEEE80211_STA_AUTO_CHANNEL_SEL; IEEE80211_STA_AUTO_CHANNEL_SEL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment