Skip to contentSkip to conversation

mac80211: improve cleanup when leaving mesh

PATCH Superseded Thomas Pedersen 2 participants 3 messages Aug 1, 2012 – Aug 2, 2012 mac80211

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: improve cleanup when leaving mesh

A couple improvements to cleanup when stopping a mesh:

- flush mpath entries.
- flush sta entries per-sdata so we don't remove entries belonging to other vifs on the same hw.

---
 net/mac80211/mesh.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
net/mac80211/mesh.c +2 -1
index 764593d..21c02c6 100644
@@ -618,7 +618,8 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
 
 	ifmsh->mesh_id_len = 0;
 	ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED);
-	sta_info_flush(local, NULL);
+	sta_info_flush(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);
Signature · 1 line
1.7.5.4
maintainer
#1 lore raw
Quoted 16 lines · Thomas Pedersen

A couple improvements to cleanup when stopping a mesh:

- flush mpath entries.
- flush sta entries per-sdata so we don't remove entries belonging to other vifs on the same hw.

---
 net/mac80211/mesh.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
net/mac80211/mesh.c +0 -0
index 764593d..21c02c6 100644

net/mac80211/mesh.c void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata) · line 622

Quoted 6 lines
net/mac80211/mesh.c +2 -1
@@ -618,7 +618,8 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
 
 	ifmsh->mesh_id_len = 0;
 	ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED);
-	sta_info_flush(local, NULL);
+	sta_info_flush(local, sdata);
+	mesh_path_flush_by_iface(sdata);

We can remove ieee80211_clean_sdata() then, right?

johannes

#2 lore raw
Quoted 18 lines · Johannes Berg
Quoted 17 lines · Thomas Pedersen

A couple improvements to cleanup when stopping a mesh:

- flush mpath entries.
- flush sta entries per-sdata so we don't remove entries belonging to other vifs on the same hw.

---
 net/mac80211/mesh.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
net/mac80211/mesh.c +0 -0
index 764593d..21c02c6 100644
@@ -618,7 +618,8 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
 
Quoted 7 lines

net/mac80211/mesh.c void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata) · line 622

Quoted 5 lines
net/mac80211/mesh.c +2 -1
      ifmsh->mesh_id_len = 0;
      ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED);
-     sta_info_flush(local, NULL);
+     sta_info_flush(local, sdata);
+     mesh_path_flush_by_iface(sdata);

We can remove ieee80211_clean_sdata() then, right?

Yes, looks like any mesh cleanup can happen in the netdev ops. Thanks!

Thomas