summaryrefslogtreecommitdiff
path: root/net/mac80211/sta_info.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-12-14 13:56:03 (GMT)
committerJohannes Berg <johannes.berg@intel.com>2013-01-03 12:01:31 (GMT)
commit75de9113bb9dc4939a7cd54e4bdfad555b35f5b1 (patch)
treefdc5609f042781ce035e5e88272809db81f5493c /net/mac80211/sta_info.h
parent361c9c8b0eeeec7d881e018d5143bf883558c566 (diff)
downloadlinux-75de9113bb9dc4939a7cd54e4bdfad555b35f5b1.tar.xz
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/sta_info.h')
-rw-r--r--net/mac80211/sta_info.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index c3266aed..031e4a5 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -549,6 +549,19 @@ void sta_info_recalc_tim(struct sta_info *sta);
void sta_info_init(struct ieee80211_local *local);
void sta_info_stop(struct ieee80211_local *local);
int sta_info_flush_defer(struct ieee80211_sub_if_data *sdata);
+
+/**
+ * sta_info_flush_cleanup - flush the sta_info cleanup queue
+ * @sdata: the interface
+ *
+ * Flushes the sta_info cleanup queue for a given interface;
+ * this is necessary before the interface is removed or, for
+ * AP/mesh interfaces, before it is deconfigured.
+ *
+ * Note an rcu_barrier() must precede the function, after all
+ * stations have been flushed/removed to ensure the call_rcu()
+ * calls that add stations to the cleanup queue have completed.
+ */
void sta_info_flush_cleanup(struct ieee80211_sub_if_data *sdata);
/**
@@ -562,6 +575,7 @@ static inline int sta_info_flush(struct ieee80211_sub_if_data *sdata)
{
int ret = sta_info_flush_defer(sdata);
+ rcu_barrier();
sta_info_flush_cleanup(sdata);
return ret;