diff options
| author | Johannes Berg <johannes@sipsolutions.net> | 2007-08-28 17:01:53 -0400 |
|---|---|---|
| committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:48:46 -0400 |
| commit | 808718c1477b8350e9e329bf4a35391ac7c7f982 (patch) | |
| tree | 93135c52721f77eafdeeeed234b5351f9be6d2d5 | |
| parent | 7b33a57f0f5ed9fcc87f98ff5f6aa54291bd0558 (diff) | |
[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: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | net/mac80211/hostapd_ioctl.h | 8 | ||||
| -rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
| -rw-r--r-- | net/mac80211/ieee80211_ioctl.c | 20 | ||||
| -rw-r--r-- | net/mac80211/ieee80211_sta.c | 3 |
4 files changed, 7 insertions, 26 deletions
diff --git a/net/mac80211/hostapd_ioctl.h b/net/mac80211/hostapd_ioctl.h index fd072cb24e50..d43711aff4c5 100644 --- a/net/mac80211/hostapd_ioctl.h +++ b/net/mac80211/hostapd_ioctl.h | |||
| @@ -41,14 +41,6 @@ enum { | |||
| 41 | PRISM2_PARAM_MIXED_CELL = 1039, | 41 | PRISM2_PARAM_MIXED_CELL = 1039, |
| 42 | }; | 42 | }; |
| 43 | 43 | ||
| 44 | enum { | ||
| 45 | IEEE80211_KEY_MGMT_NONE = 0, | ||
| 46 | IEEE80211_KEY_MGMT_IEEE8021X = 1, | ||
| 47 | IEEE80211_KEY_MGMT_WPA_PSK = 2, | ||
| 48 | IEEE80211_KEY_MGMT_WPA_EAP = 3, | ||
| 49 | }; | ||
| 50 | |||
| 51 | |||
| 52 | /* Data structures used for get_hw_features ioctl */ | 44 | /* Data structures used for get_hw_features ioctl */ |
| 53 | struct hostapd_ioctl_hw_modes_hdr { | 45 | struct hostapd_ioctl_hw_modes_hdr { |
| 54 | int mode; | 46 | int mode; |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index c557d578aa30..c771b7a76959 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
| @@ -253,7 +253,7 @@ struct ieee80211_if_sta { | |||
| 253 | unsigned long request; | 253 | unsigned long request; |
| 254 | struct sk_buff_head skb_queue; | 254 | struct sk_buff_head skb_queue; |
| 255 | 255 | ||
| 256 | int key_mgmt; | 256 | int key_management_enabled; |
| 257 | unsigned long last_probe; | 257 | unsigned long last_probe; |
| 258 | 258 | ||
| 259 | #define IEEE80211_AUTH_ALG_OPEN BIT(0) | 259 | #define IEEE80211_AUTH_ALG_OPEN BIT(0) |
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c index 785f437b306a..643c8855801c 100644 --- a/net/mac80211/ieee80211_ioctl.c +++ b/net/mac80211/ieee80211_ioctl.c | |||
| @@ -1342,22 +1342,12 @@ static int ieee80211_ioctl_siwauth(struct net_device *dev, | |||
| 1342 | ret = -EINVAL; | 1342 | ret = -EINVAL; |
| 1343 | else { | 1343 | else { |
| 1344 | /* | 1344 | /* |
| 1345 | * TODO: sdata->u.sta.key_mgmt does not match with WE18 | 1345 | * Key management was set by wpa_supplicant, |
| 1346 | * value completely; could consider modifying this to | 1346 | * we only need this to associate to a network |
| 1347 | * be closer to WE18. For now, this value is not really | 1347 | * that has privacy enabled regardless of not |
| 1348 | * used for anything else than Privacy matching, so the | 1348 | * having a key. |
| 1349 | * current code here should be more or less OK. | ||
| 1350 | */ | 1349 | */ |
| 1351 | if (data->value & IW_AUTH_KEY_MGMT_802_1X) { | 1350 | sdata->u.sta.key_management_enabled = !!data->value; |
| 1352 | sdata->u.sta.key_mgmt = | ||
| 1353 | IEEE80211_KEY_MGMT_WPA_EAP; | ||
| 1354 | } else if (data->value & IW_AUTH_KEY_MGMT_PSK) { | ||
| 1355 | sdata->u.sta.key_mgmt = | ||
| 1356 | IEEE80211_KEY_MGMT_WPA_PSK; | ||
| 1357 | } else { | ||
| 1358 | sdata->u.sta.key_mgmt = | ||
| 1359 | IEEE80211_KEY_MGMT_NONE; | ||
| 1360 | } | ||
| 1361 | } | 1351 | } |
| 1362 | break; | 1352 | break; |
| 1363 | case IW_AUTH_80211_AUTH_ALG: | 1353 | case IW_AUTH_80211_AUTH_ALG: |
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index f43c39f11223..1b3304454356 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
| @@ -716,8 +716,7 @@ static int ieee80211_privacy_mismatch(struct net_device *dev, | |||
| 716 | struct ieee80211_sta_bss *bss; | 716 | struct ieee80211_sta_bss *bss; |
| 717 | int res = 0; | 717 | int res = 0; |
| 718 | 718 | ||
| 719 | if (!ifsta || ifsta->mixed_cell || | 719 | if (!ifsta || ifsta->mixed_cell || ifsta->key_management_enabled) |
| 720 | ifsta->key_mgmt != IEEE80211_KEY_MGMT_NONE) | ||
| 721 | return 0; | 720 | return 0; |
| 722 | 721 | ||
| 723 | bss = ieee80211_rx_bss_get(dev, ifsta->bssid); | 722 | bss = ieee80211_rx_bss_get(dev, ifsta->bssid); |
