summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh.c
diff options
context:
space:
mode:
authorThomas Pedersen <thomas@cozybit.com>2012-08-03 21:21:32 +0200
committerJohannes Berg <johannes.berg@intel.com>2012-08-03 21:34:17 +0200
commit0d466b9c6798d431141ab15ae6d5ea413b4d09b2 (patch)
tree3c0cc8f43ac8a307bb08d746de8c26bdbda5610a /net/mac80211/mesh.c
parentmac80211: reset station MLME flags upon new association (diff)
downloadlinux-0d466b9c6798d431141ab15ae6d5ea413b4d09b2.tar.xz
linux-0d466b9c6798d431141ab15ae6d5ea413b4d09b2.zip
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: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh.c')
-rw-r--r--net/mac80211/mesh.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 571d5183060e..035cd0c8ce33 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -621,9 +621,13 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
netif_carrier_off(sdata->dev);
+ /* stop the beacon */
ifmsh->mesh_id_len = 0;
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.mesh_path_root_timer);