linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: improve cleanup when leaving mesh
@ 2012-08-01 21:15 Thomas Pedersen
  2012-08-02  6:32 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Pedersen @ 2012-08-01 21:15 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, javier, 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.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
---
 net/mac80211/mesh.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 764593d..21c02c6 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -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);
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mac80211: improve cleanup when leaving mesh
  2012-08-01 21:15 [PATCH] mac80211: improve cleanup when leaving mesh Thomas Pedersen
@ 2012-08-02  6:32 ` Johannes Berg
  2012-08-02 18:32   ` Thomas Pedersen
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2012-08-02  6:32 UTC (permalink / raw)
  To: Thomas Pedersen; +Cc: linux-wireless, javier

On Wed, 2012-08-01 at 14:15 -0700, Thomas Pedersen wrote:
> 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.
> 
> Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
> ---
>  net/mac80211/mesh.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
> index 764593d..21c02c6 100644
> --- a/net/mac80211/mesh.c
> +++ b/net/mac80211/mesh.c
> @@ -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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mac80211: improve cleanup when leaving mesh
  2012-08-02  6:32 ` Johannes Berg
@ 2012-08-02 18:32   ` Thomas Pedersen
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Pedersen @ 2012-08-02 18:32 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, javier

On Wed, Aug 1, 2012 at 11:32 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Wed, 2012-08-01 at 14:15 -0700, Thomas Pedersen wrote:
>> 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.
>>
>> Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
>> ---
>>  net/mac80211/mesh.c |    3 ++-
>>  1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
>> index 764593d..21c02c6 100644
>> --- a/net/mac80211/mesh.c
>> +++ b/net/mac80211/mesh.c
>> @@ -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?

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

Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-02 18:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-01 21:15 [PATCH] mac80211: improve cleanup when leaving mesh Thomas Pedersen
2012-08-02  6:32 ` Johannes Berg
2012-08-02 18:32   ` Thomas Pedersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).