Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=808718c1477b8350e9e329bf4a35391ac7c7f982
Commit:     808718c1477b8350e9e329bf4a35391ac7c7f982
Parent:     7b33a57f0f5ed9fcc87f98ff5f6aa54291bd0558
Author:     Johannes Berg <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 28 17:01:53 2007 -0400
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:48:46 2007 -0700

    [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 <[EMAIL PROTECTED]>
    Acked-by: Michael Wu <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/mac80211/hostapd_ioctl.h   |    8 --------
 net/mac80211/ieee80211_i.h     |    2 +-
 net/mac80211/ieee80211_ioctl.c |   20 +++++---------------
 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 fd072cb..d43711a 100644
--- a/net/mac80211/hostapd_ioctl.h
+++ b/net/mac80211/hostapd_ioctl.h
@@ -41,14 +41,6 @@ enum {
        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 */
 struct hostapd_ioctl_hw_modes_hdr {
        int mode;
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index c557d57..c771b7a 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -253,7 +253,7 @@ struct ieee80211_if_sta {
        unsigned long request;
        struct sk_buff_head skb_queue;
 
-       int key_mgmt;
+       int key_management_enabled;
        unsigned long last_probe;
 
 #define IEEE80211_AUTH_ALG_OPEN BIT(0)
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c
index 785f437..643c885 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,
                        ret = -EINVAL;
                else {
                        /*
-                        * TODO: sdata->u.sta.key_mgmt does not match with WE18
-                        * value completely; could consider modifying this to
-                        * be closer to WE18. For now, this value is not really
-                        * used for anything else than Privacy matching, so the
-                        * current code here should be more or less OK.
+                        * Key management was set by wpa_supplicant,
+                        * we only need this to associate to a network
+                        * that has privacy enabled regardless of not
+                        * having a key.
                         */
-                       if (data->value & IW_AUTH_KEY_MGMT_802_1X) {
-                               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;
-                       }
+                       sdata->u.sta.key_management_enabled = !!data->value;
                }
                break;
        case IW_AUTH_80211_AUTH_ALG:
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index f43c39f..1b33044 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,
        struct ieee80211_sta_bss *bss;
        int res = 0;
 
-       if (!ifsta || ifsta->mixed_cell ||
-           ifsta->key_mgmt != IEEE80211_KEY_MGMT_NONE)
+       if (!ifsta || ifsta->mixed_cell || ifsta->key_management_enabled)
                return 0;
 
        bss = ieee80211_rx_bss_get(dev, ifsta->bssid);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to