aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r--net/mac80211/sta_info.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 34245b882c2b..7e10c692c4ad 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -228,23 +228,20 @@ void sta_info_free(struct sta_info *sta)
228 228
229 if (sta->key) { 229 if (sta->key) {
230 if (local->ops->set_key) { 230 if (local->ops->set_key) {
231 struct ieee80211_key_conf *key; 231 local->ops->set_key(local_to_hw(local),
232 key = ieee80211_key_data2conf(local, sta->key); 232 DISABLE_KEY, sta->addr,
233 if (key) { 233 &sta->key->conf,
234 local->ops->set_key(local_to_hw(local), 234 local->default_wep_only);
235 DISABLE_KEY,
236 sta->addr, key, sta->aid);
237 kfree(key);
238 }
239 } 235 }
240 } else if (sta->key_idx_compression != HW_KEY_IDX_INVALID) { 236 } else if (sta->key_idx_compression != HW_KEY_IDX_INVALID) {
241 struct ieee80211_key_conf conf; 237 struct ieee80211_key_conf conf;
242 memset(&conf, 0, sizeof(conf)); 238 memset(&conf, 0, sizeof(conf));
243 conf.hw_key_idx = sta->key_idx_compression; 239 conf.hw_key_idx = sta->key_idx_compression;
244 conf.alg = ALG_NULL; 240 conf.alg = ALG_NONE;
245 conf.flags |= IEEE80211_KEY_FORCE_SW_ENCRYPT; 241 conf.flags |= IEEE80211_KEY_FORCE_SW_ENCRYPT;
246 local->ops->set_key(local_to_hw(local), DISABLE_KEY, 242 local->ops->set_key(local_to_hw(local), DISABLE_KEY,
247 sta->addr, &conf, sta->aid); 243 sta->addr, &conf,
244 local->default_wep_only);
248 sta->key_idx_compression = HW_KEY_IDX_INVALID; 245 sta->key_idx_compression = HW_KEY_IDX_INVALID;
249 } 246 }
250 247