diff options
Diffstat (limited to 'net/mac80211/ieee80211_ioctl.c')
-rw-r--r-- | net/mac80211/ieee80211_ioctl.c | 60 |
1 files changed, 0 insertions, 60 deletions
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; |