diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-12-03 03:20:41 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-06 16:01:28 -0500 |
commit | 09b174702601079c3a04806754be30ffbd70db4d (patch) | |
tree | a98e00fafeb106a8d9fb3d336250bb4220be09ac /net/mac80211/mesh.c | |
parent | 45904f21655cf4f0ae7d0fab5906fe51bf56ecf4 (diff) |
mac80211: move mesh filter adjusting
Logically, the filter adjusting belongs with
starting/stopping mesh, not interface up/down,
so move it there.
Tested-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mesh.c')
-rw-r--r-- | net/mac80211/mesh.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 78a36c79bdcc..0d3234875ac5 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -513,6 +513,11 @@ void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata) | |||
513 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; | 513 | struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; |
514 | struct ieee80211_local *local = sdata->local; | 514 | struct ieee80211_local *local = sdata->local; |
515 | 515 | ||
516 | local->fif_other_bss++; | ||
517 | /* mesh ifaces must set allmulti to forward mcast traffic */ | ||
518 | atomic_inc(&local->iff_allmultis); | ||
519 | ieee80211_configure_filter(local); | ||
520 | |||
516 | set_bit(MESH_WORK_HOUSEKEEPING, &ifmsh->wrkq_flags); | 521 | set_bit(MESH_WORK_HOUSEKEEPING, &ifmsh->wrkq_flags); |
517 | ieee80211_mesh_root_setup(ifmsh); | 522 | ieee80211_mesh_root_setup(ifmsh); |
518 | ieee80211_queue_work(&local->hw, &sdata->work); | 523 | ieee80211_queue_work(&local->hw, &sdata->work); |
@@ -524,6 +529,8 @@ void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata) | |||
524 | 529 | ||
525 | void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata) | 530 | void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata) |
526 | { | 531 | { |
532 | struct ieee80211_local *local = sdata->local; | ||
533 | |||
527 | del_timer_sync(&sdata->u.mesh.housekeeping_timer); | 534 | del_timer_sync(&sdata->u.mesh.housekeeping_timer); |
528 | del_timer_sync(&sdata->u.mesh.mesh_path_root_timer); | 535 | del_timer_sync(&sdata->u.mesh.mesh_path_root_timer); |
529 | /* | 536 | /* |
@@ -534,6 +541,10 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata) | |||
534 | * it no longer is. | 541 | * it no longer is. |
535 | */ | 542 | */ |
536 | cancel_work_sync(&sdata->work); | 543 | cancel_work_sync(&sdata->work); |
544 | |||
545 | local->fif_other_bss--; | ||
546 | atomic_dec(&local->iff_allmultis); | ||
547 | ieee80211_configure_filter(local); | ||
537 | } | 548 | } |
538 | 549 | ||
539 | static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, | 550 | static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, |