aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-09-10 18:01:49 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-15 16:48:20 -0400
commit472dbc45dc1966284de72d7de15690c17ed2cf33 (patch)
treee8bfb88067f7fd8845978d1613f868e6a4499999 /net/mac80211/main.c
parent7c95069522d02ff144cd421be6618dce619caf7e (diff)
mac80211: split off mesh handling entirely
This patch splits off mesh handling from the STA/IBSS. Unfortunately it increases mesh code size a bit, but I think it makes things clearer. The patch also reduces per-interface run-time memory usage. Also clean up a few places where ifdef is not required. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 6a7f4fae18c2..522fe6176485 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -252,6 +252,8 @@ static int ieee80211_open(struct net_device *dev)
252 sdata->bss = &sdata->u.ap; 252 sdata->bss = &sdata->u.ap;
253 break; 253 break;
254 case IEEE80211_IF_TYPE_MESH_POINT: 254 case IEEE80211_IF_TYPE_MESH_POINT:
255 if (!ieee80211_vif_is_mesh(&sdata->vif))
256 break;
255 /* mesh ifaces must set allmulti to forward mcast traffic */ 257 /* mesh ifaces must set allmulti to forward mcast traffic */
256 atomic_inc(&local->iff_allmultis); 258 atomic_inc(&local->iff_allmultis);
257 break; 259 break;
@@ -540,10 +542,6 @@ static int ieee80211_stop(struct net_device *dev)
540 ieee80211_configure_filter(local); 542 ieee80211_configure_filter(local);
541 netif_addr_unlock_bh(local->mdev); 543 netif_addr_unlock_bh(local->mdev);
542 break; 544 break;
543 case IEEE80211_IF_TYPE_MESH_POINT:
544 /* allmulti is always set on mesh ifaces */
545 atomic_dec(&local->iff_allmultis);
546 /* fall through */
547 case IEEE80211_IF_TYPE_STA: 545 case IEEE80211_IF_TYPE_STA:
548 case IEEE80211_IF_TYPE_IBSS: 546 case IEEE80211_IF_TYPE_IBSS:
549 sdata->u.sta.state = IEEE80211_STA_MLME_DISABLED; 547 sdata->u.sta.state = IEEE80211_STA_MLME_DISABLED;
@@ -571,6 +569,13 @@ static int ieee80211_stop(struct net_device *dev)
571 sdata->u.sta.extra_ie = NULL; 569 sdata->u.sta.extra_ie = NULL;
572 sdata->u.sta.extra_ie_len = 0; 570 sdata->u.sta.extra_ie_len = 0;
573 /* fall through */ 571 /* fall through */
572 case IEEE80211_IF_TYPE_MESH_POINT:
573 if (ieee80211_vif_is_mesh(&sdata->vif)) {
574 /* allmulti is always set on mesh ifaces */
575 atomic_dec(&local->iff_allmultis);
576 ieee80211_stop_mesh(sdata);
577 }
578 /* fall through */
574 default: 579 default:
575 conf.vif = &sdata->vif; 580 conf.vif = &sdata->vif;
576 conf.type = sdata->vif.type; 581 conf.type = sdata->vif.type;