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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user