summaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 6a7f4fae18c..522fe617648 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -252,6 +252,8 @@ static int ieee80211_open(struct net_device *dev)
sdata->bss = &sdata->u.ap;
break;
case IEEE80211_IF_TYPE_MESH_POINT:
+ if (!ieee80211_vif_is_mesh(&sdata->vif))
+ break;
/* mesh ifaces must set allmulti to forward mcast traffic */
atomic_inc(&local->iff_allmultis);
break;
@@ -540,10 +542,6 @@ static int ieee80211_stop(struct net_device *dev)
ieee80211_configure_filter(local);
netif_addr_unlock_bh(local->mdev);
break;
- case IEEE80211_IF_TYPE_MESH_POINT:
- /* allmulti is always set on mesh ifaces */
- atomic_dec(&local->iff_allmultis);
- /* fall through */
case IEEE80211_IF_TYPE_STA:
case IEEE80211_IF_TYPE_IBSS:
sdata->u.sta.state = IEEE80211_STA_MLME_DISABLED;
@@ -571,6 +569,13 @@ static int ieee80211_stop(struct net_device *dev)
sdata->u.sta.extra_ie = NULL;
sdata->u.sta.extra_ie_len = 0;
/* fall through */
+ case IEEE80211_IF_TYPE_MESH_POINT:
+ if (ieee80211_vif_is_mesh(&sdata->vif)) {
+ /* allmulti is always set on mesh ifaces */
+ atomic_dec(&local->iff_allmultis);
+ ieee80211_stop_mesh(sdata);
+ }
+ /* fall through */
default:
conf.vif = &sdata->vif;
conf.type = sdata->vif.type;