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>
This commit is contained in:
committed by
John W. Linville
parent
7c95069522
commit
472dbc45dc
@ -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;
|
||||
|
Reference in New Issue
Block a user