diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/key.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 166d0f00d135..f91fb4092652 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c | |||
@@ -174,6 +174,9 @@ static void __ieee80211_key_replace(struct ieee80211_sub_if_data *sdata, | |||
174 | { | 174 | { |
175 | int idx, defkey; | 175 | int idx, defkey; |
176 | 176 | ||
177 | if (new) | ||
178 | list_add(&new->list, &sdata->key_list); | ||
179 | |||
177 | if (sta) { | 180 | if (sta) { |
178 | rcu_assign_pointer(sta->key, new); | 181 | rcu_assign_pointer(sta->key, new); |
179 | } else { | 182 | } else { |
@@ -190,9 +193,6 @@ static void __ieee80211_key_replace(struct ieee80211_sub_if_data *sdata, | |||
190 | ieee80211_set_default_key(sdata, -1); | 193 | ieee80211_set_default_key(sdata, -1); |
191 | 194 | ||
192 | rcu_assign_pointer(sdata->keys[idx], new); | 195 | rcu_assign_pointer(sdata->keys[idx], new); |
193 | if (new) | ||
194 | list_add(&new->list, &sdata->key_list); | ||
195 | |||
196 | if (defkey && new) | 196 | if (defkey && new) |
197 | ieee80211_set_default_key(sdata, new->conf.keyidx); | 197 | ieee80211_set_default_key(sdata, new->conf.keyidx); |
198 | } | 198 | } |