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/iface.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/iface.c')
-rw-r--r-- | net/mac80211/iface.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 7aa85591dbe7..96e27f1e79fb 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -197,11 +197,6 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up) | |||
197 | sdata->bss = &sdata->u.ap; | 197 | sdata->bss = &sdata->u.ap; |
198 | break; | 198 | break; |
199 | case NL80211_IFTYPE_MESH_POINT: | 199 | case NL80211_IFTYPE_MESH_POINT: |
200 | if (!ieee80211_vif_is_mesh(&sdata->vif)) | ||
201 | break; | ||
202 | /* mesh ifaces must set allmulti to forward mcast traffic */ | ||
203 | atomic_inc(&local->iff_allmultis); | ||
204 | break; | ||
205 | case NL80211_IFTYPE_STATION: | 200 | case NL80211_IFTYPE_STATION: |
206 | case NL80211_IFTYPE_MONITOR: | 201 | case NL80211_IFTYPE_MONITOR: |
207 | case NL80211_IFTYPE_ADHOC: | 202 | case NL80211_IFTYPE_ADHOC: |
@@ -274,9 +269,6 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up) | |||
274 | } | 269 | } |
275 | 270 | ||
276 | if (ieee80211_vif_is_mesh(&sdata->vif)) { | 271 | if (ieee80211_vif_is_mesh(&sdata->vif)) { |
277 | local->fif_other_bss++; | ||
278 | ieee80211_configure_filter(local); | ||
279 | |||
280 | ieee80211_start_mesh(sdata); | 272 | ieee80211_start_mesh(sdata); |
281 | } else if (sdata->vif.type == NL80211_IFTYPE_AP) { | 273 | } else if (sdata->vif.type == NL80211_IFTYPE_AP) { |
282 | local->fif_pspoll++; | 274 | local->fif_pspoll++; |
@@ -504,16 +496,8 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, | |||
504 | ieee80211_configure_filter(local); | 496 | ieee80211_configure_filter(local); |
505 | break; | 497 | break; |
506 | case NL80211_IFTYPE_MESH_POINT: | 498 | case NL80211_IFTYPE_MESH_POINT: |
507 | if (ieee80211_vif_is_mesh(&sdata->vif)) { | 499 | if (ieee80211_vif_is_mesh(&sdata->vif)) |
508 | /* other_bss and allmulti are always set on mesh | ||
509 | * ifaces */ | ||
510 | local->fif_other_bss--; | ||
511 | atomic_dec(&local->iff_allmultis); | ||
512 | |||
513 | ieee80211_configure_filter(local); | ||
514 | |||
515 | ieee80211_stop_mesh(sdata); | 500 | ieee80211_stop_mesh(sdata); |
516 | } | ||
517 | /* fall through */ | 501 | /* fall through */ |
518 | default: | 502 | default: |
519 | flush_work(&sdata->work); | 503 | flush_work(&sdata->work); |