]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
mac80211: add mesh interface type
authorJohannes Berg <johannes@sipsolutions.net>
Sat, 23 Feb 2008 14:17:07 +0000 (15:17 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 6 Mar 2008 20:30:41 +0000 (15:30 -0500)
This adds the mesh interface type.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
include/net/mac80211.h
net/mac80211/ieee80211.c
net/mac80211/ieee80211_iface.c
net/mac80211/rx.c
net/mac80211/util.c

index 7a80c398123734c480f6a6a5892211918ab16779..934cc25f757ac3014e72ea17e1d5a5c9677ddb98 100644 (file)
@@ -443,6 +443,7 @@ enum ieee80211_if_types {
        IEEE80211_IF_TYPE_AP,
        IEEE80211_IF_TYPE_STA,
        IEEE80211_IF_TYPE_IBSS,
+       IEEE80211_IF_TYPE_MESH_POINT,
        IEEE80211_IF_TYPE_MNTR,
        IEEE80211_IF_TYPE_WDS,
        IEEE80211_IF_TYPE_VLAN,
index 2133c9fd27a4b2cf1f392a9844b5515de3a97ed4..1ddb8e1b6ab6c4864e67872189d621ebd4005809 100644 (file)
@@ -258,6 +258,7 @@ static int ieee80211_open(struct net_device *dev)
        case IEEE80211_IF_TYPE_STA:
        case IEEE80211_IF_TYPE_MNTR:
        case IEEE80211_IF_TYPE_IBSS:
+       case IEEE80211_IF_TYPE_MESH_POINT:
                /* no special treatment */
                break;
        case IEEE80211_IF_TYPE_INVALID:
index 677705046c6d0d31f2b953544970e7ef0d9c341e..9523aeb7103288ce9fdab07e2f918e5cbc11f258 100644 (file)
@@ -235,6 +235,7 @@ void ieee80211_if_reinit(struct net_device *dev)
 #endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
                }
                break;
+       case IEEE80211_IF_TYPE_MESH_POINT:
        case IEEE80211_IF_TYPE_STA:
        case IEEE80211_IF_TYPE_IBSS:
                kfree(sdata->u.sta.extra_ie);
index 48574f6c0e74af0c76c87d860cf590d32c315145..b7eeae0d3956eebe6e58fb73cbefca1dfe0a509d 100644 (file)
@@ -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,
                                                         bssid, hdr->addr2);
                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_AP:
                if (!bssid) {
index f64804fed0a9ca27bb9dcd8f1b5913b673ddeda8..790c32f894c0e784c77195871f9c6d47b218bfe1 100644 (file)
@@ -382,6 +382,7 @@ void ieee80211_iterate_active_interfaces(
                case IEEE80211_IF_TYPE_STA:
                case IEEE80211_IF_TYPE_IBSS:
                case IEEE80211_IF_TYPE_WDS:
+               case IEEE80211_IF_TYPE_MESH_POINT:
                        break;
                }
                if (sdata->dev == local->mdev)