diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-12-04 17:47:09 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-12-16 05:29:48 -0500 |
commit | 7907c7d33c3733b2265dadc6385fe028af72b4c7 (patch) | |
tree | 820eefc2cecdc675d9346f46e438a19318814ea0 /net/mac80211/cfg.c | |
parent | e716251d776ce92eb5169522f565ada3deed2a2a (diff) |
mac80211: free all AP/VLAN keys at once
When the AP interface is stopped, free all AP and VLAN keys at
once to only require synchronize_net() once. Since that does
synchronize_net(), also move two such calls into the function
(using the new force_synchronize parameter) to avoid doing it
twice.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 18b56fb7911e..8718401cbd89 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1098,10 +1098,7 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev) | |||
1098 | kfree_rcu(old_probe_resp, rcu_head); | 1098 | kfree_rcu(old_probe_resp, rcu_head); |
1099 | 1099 | ||
1100 | __sta_info_flush(sdata, true); | 1100 | __sta_info_flush(sdata, true); |
1101 | synchronize_net(); | 1101 | ieee80211_free_keys(sdata, true); |
1102 | list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) | ||
1103 | ieee80211_free_keys(vlan); | ||
1104 | ieee80211_free_keys(sdata); | ||
1105 | 1102 | ||
1106 | sdata->vif.bss_conf.enable_beacon = false; | 1103 | sdata->vif.bss_conf.enable_beacon = false; |
1107 | sdata->vif.bss_conf.ssid_len = 0; | 1104 | sdata->vif.bss_conf.ssid_len = 0; |