diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-12-04 23:47:09 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-12-16 11:29:48 +0100 |
commit | 7907c7d33c3733b2265dadc6385fe028af72b4c7 (patch) | |
tree | 820eefc2cecdc675d9346f46e438a19318814ea0 /net/mac80211/cfg.c | |
parent | e716251d776ce92eb5169522f565ada3deed2a2a (diff) | |
download | linux-7907c7d33c3733b2265dadc6385fe028af72b4c7.tar.bz2 |
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) kfree_rcu(old_probe_resp, rcu_head); __sta_info_flush(sdata, true); - synchronize_net(); - list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) - ieee80211_free_keys(vlan); - ieee80211_free_keys(sdata); + ieee80211_free_keys(sdata, true); sdata->vif.bss_conf.enable_beacon = false; sdata->vif.bss_conf.ssid_len = 0; |