Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=191b92666e3a8aa52af84e2d03350c25145be695
Commit:     191b92666e3a8aa52af84e2d03350c25145be695
Parent:     fda6cc7ac45f97d4d40cc42781041dec488fa78c
Author:     Johannes Berg <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 10 19:32:09 2007 +0200
Committer:  John W. Linville <[EMAIL PROTECTED]>
CommitDate: Thu Jul 12 16:07:25 2007 -0400

    [PATCH] mac80211: kill PRISM2_PARAM_CLEAR_KEYS
    
    Not used anywhere, hence dead code. wpa_supplicant has its
    own clear_keys routine.
    
    Signed-off-by: Johannes Berg <[EMAIL PROTECTED]>
    Signed-off-by: Jiri Benc <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 net/mac80211/hostapd_ioctl.h   |    1 -
 net/mac80211/ieee80211_ioctl.c |   60 ----------------------------------------
 2 files changed, 0 insertions(+), 61 deletions(-)

diff --git a/net/mac80211/hostapd_ioctl.h b/net/mac80211/hostapd_ioctl.h
index 95ca1f9..52da513 100644
--- a/net/mac80211/hostapd_ioctl.h
+++ b/net/mac80211/hostapd_ioctl.h
@@ -32,7 +32,6 @@ enum {
        PRISM2_PARAM_PREAMBLE = 1003,
        PRISM2_PARAM_SHORT_SLOT_TIME = 1006,
        PRISM2_PARAM_NEXT_MODE = 1008,
-       PRISM2_PARAM_CLEAR_KEYS = 1009,
        PRISM2_PARAM_RADIO_ENABLED = 1010,
        PRISM2_PARAM_ANTENNA_MODE = 1013,
        PRISM2_PARAM_STAT_TIME = 1016,
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c
index f465d0a..9c1d076 100644
--- a/net/mac80211/ieee80211_ioctl.c
+++ b/net/mac80211/ieee80211_ioctl.c
@@ -1018,62 +1018,6 @@ static int ieee80211_ioctl_giwretry(struct net_device 
*dev,
        return 0;
 }
 
-static int ieee80211_ioctl_clear_keys(struct net_device *dev)
-{
-       struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
-       struct ieee80211_key_conf key;
-       int i;
-       u8 addr[ETH_ALEN];
-       struct ieee80211_key_conf *keyconf;
-       struct ieee80211_sub_if_data *sdata;
-       struct sta_info *sta;
-
-       memset(addr, 0xff, ETH_ALEN);
-       read_lock(&local->sub_if_lock);
-       list_for_each_entry(sdata, &local->sub_if_list, list) {
-               for (i = 0; i < NUM_DEFAULT_KEYS; i++) {
-                       keyconf = NULL;
-                       if (sdata->keys[i] &&
-                           !sdata->keys[i]->force_sw_encrypt &&
-                           local->ops->set_key &&
-                           (keyconf = ieee80211_key_data2conf(local,
-                                                              sdata->keys[i])))
-                               local->ops->set_key(local_to_hw(local),
-                                                  DISABLE_KEY, addr,
-                                                  keyconf, 0);
-                       kfree(keyconf);
-                       ieee80211_key_free(sdata->keys[i]);
-                       sdata->keys[i] = NULL;
-               }
-               sdata->default_key = NULL;
-       }
-       read_unlock(&local->sub_if_lock);
-
-       spin_lock_bh(&local->sta_lock);
-       list_for_each_entry(sta, &local->sta_list, list) {
-               keyconf = NULL;
-               if (sta->key && !sta->key->force_sw_encrypt &&
-                   local->ops->set_key &&
-                   (keyconf = ieee80211_key_data2conf(local, sta->key)))
-                       local->ops->set_key(local_to_hw(local), DISABLE_KEY,
-                                          sta->addr, keyconf, sta->aid);
-               kfree(keyconf);
-               ieee80211_key_free(sta->key);
-               sta->key = NULL;
-       }
-       spin_unlock_bh(&local->sta_lock);
-
-       memset(&key, 0, sizeof(key));
-       if (local->ops->set_key &&
-                   local->ops->set_key(local_to_hw(local), REMOVE_ALL_KEYS,
-                                      NULL, &key, 0))
-               printk(KERN_DEBUG "%s: failed to remove hwaccel keys\n",
-                      dev->name);
-
-       return 0;
-}
-
-
 static void ieee80211_key_enable_hwaccel(struct ieee80211_local *local,
                                         struct ieee80211_key *key)
 {
@@ -1227,10 +1171,6 @@ static int ieee80211_ioctl_prism2_param(struct 
net_device *dev,
                local->next_mode = value;
                break;
 
-       case PRISM2_PARAM_CLEAR_KEYS:
-               ret = ieee80211_ioctl_clear_keys(dev);
-               break;
-
        case PRISM2_PARAM_RADIO_ENABLED:
                ret = ieee80211_ioctl_set_radio_enabled(dev, value);
                break;
-
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