From ab005dcc927465af4d51673f400b75d40f035edc Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Wed, 13 Jul 2011 19:50:53 +0200 Subject: [PATCH] --- yaml --- r: 258451 b: refs/heads/master c: f850e00fcd7767d01101e2f0a6d464bee8e48b47 h: refs/heads/master i: 258449: 331e16fc3f77f0410eb2889cac996de14f011f03 258447: 5554ed31b1ed8013f021233622ad1f8882346ebf v: v3 --- [refs] | 2 +- trunk/include/net/mac80211.h | 4 ++++ trunk/net/mac80211/key.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index d2b8800e235c..35fe9baa1681 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8bca5d815311f53ada13b62f5e590df40fef317e +refs/heads/master: f850e00fcd7767d01101e2f0a6d464bee8e48b47 diff --git a/trunk/include/net/mac80211.h b/trunk/include/net/mac80211.h index 9e91b4f47843..972109f06a70 100644 --- a/trunk/include/net/mac80211.h +++ b/trunk/include/net/mac80211.h @@ -2987,6 +2987,10 @@ void ieee80211_sta_block_awake(struct ieee80211_hw *hw, * needs reprogramming of the keys during suspend. Note that due * to locking reasons, it is also only safe to call this at few * spots since it must hold the RTNL and be able to sleep. + * + * The order in which the keys are iterated matches the order + * in which they were originally installed and handed to the + * set_key callback. */ void ieee80211_iter_keys(struct ieee80211_hw *hw, struct ieee80211_vif *vif, diff --git a/trunk/net/mac80211/key.c b/trunk/net/mac80211/key.c index 739bee13e813..5150c6d11b57 100644 --- a/trunk/net/mac80211/key.c +++ b/trunk/net/mac80211/key.c @@ -278,7 +278,7 @@ static void __ieee80211_key_replace(struct ieee80211_sub_if_data *sdata, bool defunikey, defmultikey, defmgmtkey; if (new) - list_add(&new->list, &sdata->key_list); + list_add_tail(&new->list, &sdata->key_list); if (sta && pairwise) { rcu_assign_pointer(sta->ptk, new);