aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/mac80211.h4
-rw-r--r--net/mac80211/key.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 9e91b4f47843..972109f06a70 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2987,6 +2987,10 @@ void ieee80211_sta_block_awake(struct ieee80211_hw *hw,
2987 * needs reprogramming of the keys during suspend. Note that due 2987 * needs reprogramming of the keys during suspend. Note that due
2988 * to locking reasons, it is also only safe to call this at few 2988 * to locking reasons, it is also only safe to call this at few
2989 * spots since it must hold the RTNL and be able to sleep. 2989 * spots since it must hold the RTNL and be able to sleep.
2990 *
2991 * The order in which the keys are iterated matches the order
2992 * in which they were originally installed and handed to the
2993 * set_key callback.
2990 */ 2994 */
2991void ieee80211_iter_keys(struct ieee80211_hw *hw, 2995void ieee80211_iter_keys(struct ieee80211_hw *hw,
2992 struct ieee80211_vif *vif, 2996 struct ieee80211_vif *vif,
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 739bee13e813..5150c6d11b57 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -278,7 +278,7 @@ static void __ieee80211_key_replace(struct ieee80211_sub_if_data *sdata,
278 bool defunikey, defmultikey, defmgmtkey; 278 bool defunikey, defmultikey, defmgmtkey;
279 279
280 if (new) 280 if (new)
281 list_add(&new->list, &sdata->key_list); 281 list_add_tail(&new->list, &sdata->key_list);
282 282
283 if (sta && pairwise) { 283 if (sta && pairwise) {
284 rcu_assign_pointer(sta->ptk, new); 284 rcu_assign_pointer(sta->ptk, new);