aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/chan.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-12-13 11:42:30 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-01-03 07:01:35 -0500
commit8a61af65c6d03781015315dbc43d0942a5b31db9 (patch)
tree624695ba646281508490cb1737fb69d8174fa87a /net/mac80211/chan.c
parent529ba6e9313dbe60dab7e72c6fdf647a012e9f5b (diff)
mac80211: fix channel context iteration
During suspend/resume channel contexts might be iterated even if they haven't been re-added to the driver, keep track of this and skip them in iteration. Also use the new status for sanity checks. Also clarify the fact that during HW restart all contexts are iterated over (thanks Eliad.) Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/chan.c')
-rw-r--r--net/mac80211/chan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index 80e55527504b..1bfe0a8b19d2 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -381,7 +381,8 @@ void ieee80211_iter_chan_contexts_atomic(
381 381
382 rcu_read_lock(); 382 rcu_read_lock();
383 list_for_each_entry_rcu(ctx, &local->chanctx_list, list) 383 list_for_each_entry_rcu(ctx, &local->chanctx_list, list)
384 iter(hw, &ctx->conf, iter_data); 384 if (ctx->driver_present)
385 iter(hw, &ctx->conf, iter_data);
385 rcu_read_unlock(); 386 rcu_read_unlock();
386} 387}
387EXPORT_SYMBOL_GPL(ieee80211_iter_chan_contexts_atomic); 388EXPORT_SYMBOL_GPL(ieee80211_iter_chan_contexts_atomic);