summaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-12-14 14:56:03 +0100
committerJohannes Berg <johannes.berg@intel.com>2013-01-03 13:01:31 +0100
commit75de9113bb9dc4939a7cd54e4bdfad555b35f5b1 (patch)
treefdc5609f042781ce035e5e88272809db81f5493c /net/mac80211/iface.c
parent361c9c8b0eeeec7d881e018d5143bf883558c566 (diff)
downloadop-kernel-dev-75de9113bb9dc4939a7cd54e4bdfad555b35f5b1.zip
op-kernel-dev-75de9113bb9dc4939a7cd54e4bdfad555b35f5b1.tar.gz
mac80211: optimise AP stop RCU handling
If there are VLANs, stopping an AP is inefficient as it calls rcu_barrier() once for each interface (the VLANs and the AP itself). Optimise this by moving rcu_barrier() out of the station cleanups and calling it only once for all interfaces combined. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 12341ef..1ab7d8e 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -863,12 +863,15 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
cancel_work_sync(&sdata->work);
/*
* When we get here, the interface is marked down.
- * sta_info_flush_cleanup() calls rcu_barrier to
- * wait for the station call_rcu() calls to complete,
- * here we require it to wait for the RX path in case
- * it is using the interface and enqueuing frames at
- * this very time on another CPU.
+ *
+ * sta_info_flush_cleanup() requires rcu_barrier()
+ * first to wait for the station call_rcu() calls
+ * to complete, here we need at least sychronize_rcu()
+ * it to wait for the RX path in case it is using the
+ * interface and enqueuing frames at this very time on
+ * another CPU.
*/
+ rcu_barrier();
sta_info_flush_cleanup(sdata);
skb_queue_purge(&sdata->skb_queue);
OpenPOWER on IntegriCloud