diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-07-10 13:32:09 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-07-12 16:07:25 -0400 |
commit | 191b92666e3a8aa52af84e2d03350c25145be695 (patch) | |
tree | 4f0db30cb2d2e4cc4aa8ef2fb9124a39e95bffa4 /net | |
parent | fda6cc7ac45f97d4d40cc42781041dec488fa78c (diff) |
[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 <johannes@sipsolutions.net>
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/hostapd_ioctl.h | 1 | ||||
-rw-r--r-- | 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 95ca1f983a72..52da513f060a 100644 --- a/net/mac80211/hostapd_ioctl.h +++ b/net/mac80211/hostapd_ioctl.h | |||
@@ -32,7 +32,6 @@ enum { | |||
32 | PRISM2_PARAM_PREAMBLE = 1003, | 32 | PRISM2_PARAM_PREAMBLE = 1003, |
33 | PRISM2_PARAM_SHORT_SLOT_TIME = 1006, | 33 | PRISM2_PARAM_SHORT_SLOT_TIME = 1006, |
34 | PRISM2_PARAM_NEXT_MODE = 1008, | 34 | PRISM2_PARAM_NEXT_MODE = 1008, |
35 | PRISM2_PARAM_CLEAR_KEYS = 1009, | ||
36 | PRISM2_PARAM_RADIO_ENABLED = 1010, | 35 | PRISM2_PARAM_RADIO_ENABLED = 1010, |
37 | PRISM2_PARAM_ANTENNA_MODE = 1013, | 36 | PRISM2_PARAM_ANTENNA_MODE = 1013, |
38 | PRISM2_PARAM_STAT_TIME = 1016, | 37 | PRISM2_PARAM_STAT_TIME = 1016, |
diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c index f465d0a1c153..9c1d076b1944 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, | |||
1018 | return 0; | 1018 | return 0; |
1019 | } | 1019 | } |
1020 | 1020 | ||
1021 | static int ieee80211_ioctl_clear_keys(struct net_device *dev) | ||
1022 | { | ||
1023 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | ||
1024 | struct ieee80211_key_conf key; | ||
1025 | int i; | ||
1026 | u8 addr[ETH_ALEN]; | ||
1027 | struct ieee80211_key_conf *keyconf; | ||
1028 | struct ieee80211_sub_if_data *sdata; | ||
1029 | struct sta_info *sta; | ||
1030 | |||
1031 | memset(addr, 0xff, ETH_ALEN); | ||
1032 | read_lock(&local->sub_if_lock); | ||
1033 | list_for_each_entry(sdata, &local->sub_if_list, list) { | ||
1034 | for (i = 0; i < NUM_DEFAULT_KEYS; i++) { | ||
1035 | keyconf = NULL; | ||
1036 | if (sdata->keys[i] && | ||
1037 | !sdata->keys[i]->force_sw_encrypt && | ||
1038 | local->ops->set_key && | ||
1039 | (keyconf = ieee80211_key_data2conf(local, | ||
1040 | sdata->keys[i]))) | ||
1041 | local->ops->set_key(local_to_hw(local), | ||
1042 | DISABLE_KEY, addr, | ||
1043 | keyconf, 0); | ||
1044 | kfree(keyconf); | ||
1045 | ieee80211_key_free(sdata->keys[i]); | ||
1046 | sdata->keys[i] = NULL; | ||
1047 | } | ||
1048 | sdata->default_key = NULL; | ||
1049 | } | ||
1050 | read_unlock(&local->sub_if_lock); | ||
1051 | |||
1052 | spin_lock_bh(&local->sta_lock); | ||
1053 | list_for_each_entry(sta, &local->sta_list, list) { | ||
1054 | keyconf = NULL; | ||
1055 | if (sta->key && !sta->key->force_sw_encrypt && | ||
1056 | local->ops->set_key && | ||
1057 | (keyconf = ieee80211_key_data2conf(local, sta->key))) | ||
1058 | local->ops->set_key(local_to_hw(local), DISABLE_KEY, | ||
1059 | sta->addr, keyconf, sta->aid); | ||
1060 | kfree(keyconf); | ||
1061 | ieee80211_key_free(sta->key); | ||
1062 | sta->key = NULL; | ||
1063 | } | ||
1064 | spin_unlock_bh(&local->sta_lock); | ||
1065 | |||
1066 | memset(&key, 0, sizeof(key)); | ||
1067 | if (local->ops->set_key && | ||
1068 | local->ops->set_key(local_to_hw(local), REMOVE_ALL_KEYS, | ||
1069 | NULL, &key, 0)) | ||
1070 | printk(KERN_DEBUG "%s: failed to remove hwaccel keys\n", | ||
1071 | dev->name); | ||
1072 | |||
1073 | return 0; | ||
1074 | } | ||
1075 | |||
1076 | |||
1077 | static void ieee80211_key_enable_hwaccel(struct ieee80211_local *local, | 1021 | static void ieee80211_key_enable_hwaccel(struct ieee80211_local *local, |
1078 | struct ieee80211_key *key) | 1022 | struct ieee80211_key *key) |
1079 | { | 1023 | { |
@@ -1227,10 +1171,6 @@ static int ieee80211_ioctl_prism2_param(struct net_device *dev, | |||
1227 | local->next_mode = value; | 1171 | local->next_mode = value; |
1228 | break; | 1172 | break; |
1229 | 1173 | ||
1230 | case PRISM2_PARAM_CLEAR_KEYS: | ||
1231 | ret = ieee80211_ioctl_clear_keys(dev); | ||
1232 | break; | ||
1233 | |||
1234 | case PRISM2_PARAM_RADIO_ENABLED: | 1174 | case PRISM2_PARAM_RADIO_ENABLED: |
1235 | ret = ieee80211_ioctl_set_radio_enabled(dev, value); | 1175 | ret = ieee80211_ioctl_set_radio_enabled(dev, value); |
1236 | break; | 1176 | break; |