Commit 0d466b9c authored by Thomas Pedersen's avatar Thomas Pedersen Committed by Johannes Berg

mac80211: improve cleanup when leaving mesh

It is not necessary to stop the mesh beacon in the mac80211 ndo_stop
handler, since cfg80211 has already left the mesh on NETDEV_GOING_DOWN
notification.

Also some improvements to ieee80211_stop_mesh():

 - flush mpath entries.
 - flush sta entries per-sdata so we don't remove entries belonging to
   other vifs on the same hw.
Signed-off-by: default avatarThomas Pedersen <thomas@cozybit.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 19c3b830
...@@ -777,14 +777,6 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, ...@@ -777,14 +777,6 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
synchronize_rcu(); synchronize_rcu();
skb_queue_purge(&sdata->skb_queue); skb_queue_purge(&sdata->skb_queue);
/*
* Disable beaconing here for mesh only, AP and IBSS
* are already taken care of.
*/
if (sdata->vif.type == NL80211_IFTYPE_MESH_POINT)
ieee80211_bss_info_change_notify(sdata,
BSS_CHANGED_BEACON_ENABLED);
/* /*
* Free all remaining keys, there shouldn't be any, * Free all remaining keys, there shouldn't be any,
* except maybe group keys in AP more or WDS? * except maybe group keys in AP more or WDS?
......
...@@ -621,9 +621,13 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata) ...@@ -621,9 +621,13 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
netif_carrier_off(sdata->dev); netif_carrier_off(sdata->dev);
/* stop the beacon */
ifmsh->mesh_id_len = 0; ifmsh->mesh_id_len = 0;
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED); ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED);
sta_info_flush(local, NULL);
/* flush STAs and mpaths on this iface */
sta_info_flush(sdata->local, sdata);
mesh_path_flush_by_iface(sdata);
del_timer_sync(&sdata->u.mesh.housekeeping_timer); del_timer_sync(&sdata->u.mesh.housekeeping_timer);
del_timer_sync(&sdata->u.mesh.mesh_path_root_timer); del_timer_sync(&sdata->u.mesh.mesh_path_root_timer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment