diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-12-14 08:56:03 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-01-03 07:01:31 -0500 |
commit | 75de9113bb9dc4939a7cd54e4bdfad555b35f5b1 (patch) | |
tree | fdc5609f042781ce035e5e88272809db81f5493c /net/mac80211/cfg.c | |
parent | 361c9c8b0eeeec7d881e018d5143bf883558c566 (diff) |
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.c | 9 |
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) | |||
1010 | kfree_rcu(old_probe_resp, rcu_head); | 1010 | kfree_rcu(old_probe_resp, rcu_head); |
1011 | 1011 | ||
1012 | list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) | 1012 | list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) |
1013 | sta_info_flush(vlan); | 1013 | sta_info_flush_defer(vlan); |
1014 | sta_info_flush(sdata); | 1014 | sta_info_flush_defer(sdata); |
1015 | rcu_barrier(); | ||
1016 | list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) | ||
1017 | sta_info_flush_cleanup(vlan); | ||
1018 | sta_info_flush_cleanup(sdata); | ||
1019 | |||
1015 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED); | 1020 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED); |
1016 | 1021 | ||
1017 | drv_stop_ap(sdata->local, sdata); | 1022 | drv_stop_ap(sdata->local, sdata); |