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>
This commit is contained in:
Johannes Berg
2008-03-31 19:23:03 +02:00
committed by John W. Linville
parent 4f6fab472c
commit dc6676b7f2
5 changed files with 84 additions and 1 deletions

View File

@ -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,