summaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg2012-12-14 14:56:03 +0100
committerJohannes Berg2013-01-03 13:01:31 +0100
commit75de9113bb9dc4939a7cd54e4bdfad555b35f5b1 (patch)
treefdc5609f042781ce035e5e88272809db81f5493c /net/mac80211/cfg.c
parentregulatory: use IS_ERR macro family for freq_reg_info (diff)
downloadkernel-qcow2-linux-75de9113bb9dc4939a7cd54e4bdfad555b35f5b1.tar.gz
kernel-qcow2-linux-75de9113bb9dc4939a7cd54e4bdfad555b35f5b1.tar.xz
kernel-qcow2-linux-75de9113bb9dc4939a7cd54e4bdfad555b35f5b1.zip
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/cfg.c')
-rw-r--r--net/mac80211/cfg.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index be019533b233..908f1153942d 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1010,8 +1010,13 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
kfree_rcu(old_probe_resp, rcu_head);
list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list)
- sta_info_flush(vlan);
- sta_info_flush(sdata);
+ sta_info_flush_defer(vlan);
+ sta_info_flush_defer(sdata);
+ rcu_barrier();
+ list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list)
+ sta_info_flush_cleanup(vlan);
+ sta_info_flush_cleanup(sdata);
+
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED);
drv_stop_ap(sdata->local, sdata);