提交 808718c1 编写于 作者: J Johannes Berg 提交者: David S. Miller

[MAC80211]: kill key_mgmt, use key_management_enabled

The key_mgmt variable for STA interfaces doesn't seem well-defined
nor do we actually use the values other than "NONE", so change it to
be named better.
Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
Acked-by: NMichael Wu <flamingice@sourmilk.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7b33a57f
...@@ -41,14 +41,6 @@ enum { ...@@ -41,14 +41,6 @@ enum {
PRISM2_PARAM_MIXED_CELL = 1039, PRISM2_PARAM_MIXED_CELL = 1039,
}; };
enum {
IEEE80211_KEY_MGMT_NONE = 0,
IEEE80211_KEY_MGMT_IEEE8021X = 1,
IEEE80211_KEY_MGMT_WPA_PSK = 2,
IEEE80211_KEY_MGMT_WPA_EAP = 3,
};
/* Data structures used for get_hw_features ioctl */ /* Data structures used for get_hw_features ioctl */
struct hostapd_ioctl_hw_modes_hdr { struct hostapd_ioctl_hw_modes_hdr {
int mode; int mode;
......
...@@ -253,7 +253,7 @@ struct ieee80211_if_sta { ...@@ -253,7 +253,7 @@ struct ieee80211_if_sta {
unsigned long request; unsigned long request;
struct sk_buff_head skb_queue; struct sk_buff_head skb_queue;
int key_mgmt; int key_management_enabled;
unsigned long last_probe; unsigned long last_probe;
#define IEEE80211_AUTH_ALG_OPEN BIT(0) #define IEEE80211_AUTH_ALG_OPEN BIT(0)
......
...@@ -1342,22 +1342,12 @@ static int ieee80211_ioctl_siwauth(struct net_device *dev, ...@@ -1342,22 +1342,12 @@ static int ieee80211_ioctl_siwauth(struct net_device *dev,
ret = -EINVAL; ret = -EINVAL;
else { else {
/* /*
* TODO: sdata->u.sta.key_mgmt does not match with WE18 * Key management was set by wpa_supplicant,
* value completely; could consider modifying this to * we only need this to associate to a network
* be closer to WE18. For now, this value is not really * that has privacy enabled regardless of not
* used for anything else than Privacy matching, so the * having a key.
* current code here should be more or less OK.
*/ */
if (data->value & IW_AUTH_KEY_MGMT_802_1X) { sdata->u.sta.key_management_enabled = !!data->value;
sdata->u.sta.key_mgmt =
IEEE80211_KEY_MGMT_WPA_EAP;
} else if (data->value & IW_AUTH_KEY_MGMT_PSK) {
sdata->u.sta.key_mgmt =
IEEE80211_KEY_MGMT_WPA_PSK;
} else {
sdata->u.sta.key_mgmt =
IEEE80211_KEY_MGMT_NONE;
}
} }
break; break;
case IW_AUTH_80211_AUTH_ALG: case IW_AUTH_80211_AUTH_ALG:
......
...@@ -716,8 +716,7 @@ static int ieee80211_privacy_mismatch(struct net_device *dev, ...@@ -716,8 +716,7 @@ static int ieee80211_privacy_mismatch(struct net_device *dev,
struct ieee80211_sta_bss *bss; struct ieee80211_sta_bss *bss;
int res = 0; int res = 0;
if (!ifsta || ifsta->mixed_cell || if (!ifsta || ifsta->mixed_cell || ifsta->key_management_enabled)
ifsta->key_mgmt != IEEE80211_KEY_MGMT_NONE)
return 0; return 0;
bss = ieee80211_rx_bss_get(dev, ifsta->bssid); bss = ieee80211_rx_bss_get(dev, ifsta->bssid);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册