aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/key.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-03-31 13:23:03 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-01 17:14:10 -0400
commitdc6676b7f2c2072ec05254aaca32e99f87a8a417 (patch)
tree6caf7e007063f9ae6a16fdcb1912bf72d31237c2 /net/mac80211/key.c
parent4f6fab472c4c7c21d577f85fabec7628d4a05637 (diff)
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)
73 if (!key->local->ops->set_key) 73 if (!key->local->ops->set_key)
74 return; 74 return;
75 75
76 /*
77 * This makes sure that all pending flushes have
78 * actually completed prior to uploading new key
79 * material to the hardware. That is necessary to
80 * avoid races between flushing STAs and adding
81 * new keys for them.
82 */
83 __ieee80211_run_pending_flush(key->local);
84
76 addr = get_mac_for_key(key); 85 addr = get_mac_for_key(key);
77 86
78 ret = key->local->ops->set_key(local_to_hw(key->local), SET_KEY, 87 ret = key->local->ops->set_key(local_to_hw(key->local), SET_KEY,