Commit 6032f934 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

mac80211: add mesh interface type

This adds the mesh interface type.
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 2ec600d6
...@@ -443,6 +443,7 @@ enum ieee80211_if_types { ...@@ -443,6 +443,7 @@ enum ieee80211_if_types {
IEEE80211_IF_TYPE_AP, IEEE80211_IF_TYPE_AP,
IEEE80211_IF_TYPE_STA, IEEE80211_IF_TYPE_STA,
IEEE80211_IF_TYPE_IBSS, IEEE80211_IF_TYPE_IBSS,
IEEE80211_IF_TYPE_MESH_POINT,
IEEE80211_IF_TYPE_MNTR, IEEE80211_IF_TYPE_MNTR,
IEEE80211_IF_TYPE_WDS, IEEE80211_IF_TYPE_WDS,
IEEE80211_IF_TYPE_VLAN, IEEE80211_IF_TYPE_VLAN,
......
...@@ -258,6 +258,7 @@ static int ieee80211_open(struct net_device *dev) ...@@ -258,6 +258,7 @@ static int ieee80211_open(struct net_device *dev)
case IEEE80211_IF_TYPE_STA: case IEEE80211_IF_TYPE_STA:
case IEEE80211_IF_TYPE_MNTR: case IEEE80211_IF_TYPE_MNTR:
case IEEE80211_IF_TYPE_IBSS: case IEEE80211_IF_TYPE_IBSS:
case IEEE80211_IF_TYPE_MESH_POINT:
/* no special treatment */ /* no special treatment */
break; break;
case IEEE80211_IF_TYPE_INVALID: case IEEE80211_IF_TYPE_INVALID:
......
...@@ -235,6 +235,7 @@ void ieee80211_if_reinit(struct net_device *dev) ...@@ -235,6 +235,7 @@ void ieee80211_if_reinit(struct net_device *dev)
#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
} }
break; break;
case IEEE80211_IF_TYPE_MESH_POINT:
case IEEE80211_IF_TYPE_STA: case IEEE80211_IF_TYPE_STA:
case IEEE80211_IF_TYPE_IBSS: case IEEE80211_IF_TYPE_IBSS:
kfree(sdata->u.sta.extra_ie); kfree(sdata->u.sta.extra_ie);
......
...@@ -1713,6 +1713,16 @@ static int prepare_for_handlers(struct ieee80211_sub_if_data *sdata, ...@@ -1713,6 +1713,16 @@ static int prepare_for_handlers(struct ieee80211_sub_if_data *sdata,
rx->sta = ieee80211_ibss_add_sta(sdata->dev, rx->skb, rx->sta = ieee80211_ibss_add_sta(sdata->dev, rx->skb,
bssid, hdr->addr2); bssid, hdr->addr2);
break; break;
case IEEE80211_IF_TYPE_MESH_POINT:
if (!multicast &&
compare_ether_addr(sdata->dev->dev_addr,
hdr->addr1) != 0) {
if (!(sdata->dev->flags & IFF_PROMISC))
return 0;
rx->flags &= ~IEEE80211_TXRXD_RXRA_MATCH;
}
break;
case IEEE80211_IF_TYPE_VLAN: case IEEE80211_IF_TYPE_VLAN:
case IEEE80211_IF_TYPE_AP: case IEEE80211_IF_TYPE_AP:
if (!bssid) { if (!bssid) {
......
...@@ -382,6 +382,7 @@ void ieee80211_iterate_active_interfaces( ...@@ -382,6 +382,7 @@ void ieee80211_iterate_active_interfaces(
case IEEE80211_IF_TYPE_STA: case IEEE80211_IF_TYPE_STA:
case IEEE80211_IF_TYPE_IBSS: case IEEE80211_IF_TYPE_IBSS:
case IEEE80211_IF_TYPE_WDS: case IEEE80211_IF_TYPE_WDS:
case IEEE80211_IF_TYPE_MESH_POINT:
break; break;
} }
if (sdata->dev == local->mdev) if (sdata->dev == local->mdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment