summaryrefslogtreecommitdiff
path: root/net/mac80211/key.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-03-31 21:23:03 +0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-02 01:14:10 +0400
commitdc6676b7f2c2072ec05254aaca32e99f87a8a417 (patch)
tree6caf7e007063f9ae6a16fdcb1912bf72d31237c2 /net/mac80211/key.c
parent4f6fab472c4c7c21d577f85fabec7628d4a05637 (diff)
downloadlinux-dc6676b7f2c2072ec05254aaca32e99f87a8a417.tar.xz
mac80211: sta_info_flush() fixes
When the IBSS code tries to flush the STA list, it does so in an atomic context. Flushing isn't safe there, however, and requires the RTNL, so we need to defer it to a workqueue. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/key.c')
-rw-r--r--net/mac80211/key.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index f91fb4092652..5df9e0cc009f 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -73,6 +73,15 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
if (!key->local->ops->set_key)
return;
+ /*
+ * This makes sure that all pending flushes have
+ * actually completed prior to uploading new key
+ * material to the hardware. That is necessary to
+ * avoid races between flushing STAs and adding
+ * new keys for them.
+ */
+ __ieee80211_run_pending_flush(key->local);
+
addr = get_mac_for_key(key);
ret = key->local->ops->set_key(local_to_hw(key->local), SET_KEY,