]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
rt2x00: Add mesh support
authorAndrey Yurovsky <andrey@cozybit.com>
Sat, 20 Dec 2008 09:55:34 +0000 (10:55 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 29 Jan 2009 20:58:35 +0000 (15:58 -0500)
This adds initial support for Mesh Point mode.  For this we tell mac80211 that
we support NL80211_IFTYPE_MESH_POINT.  We also need to send beacons.  mac80211
will configure our RX filter accordingly.

Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00config.c
drivers/net/wireless/rt2x00/rt2x00dev.c
drivers/net/wireless/rt2x00/rt2x00mac.c

index 2f4cb8de998156fc37b1acb038638120b7d0c16c..a35265cc7540ddb78882f3488dcf77d6ab079bc7 100644 (file)
@@ -42,6 +42,7 @@ void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev,
        switch (type) {
        case NL80211_IFTYPE_ADHOC:
        case NL80211_IFTYPE_AP:
+       case NL80211_IFTYPE_MESH_POINT:
                conf.sync = TSF_SYNC_BEACON;
                break;
        case NL80211_IFTYPE_STATION:
index 81d7fc8635d31d577b4fef1443a2c726b8a01158..6a5712c6614cca9767fdfa6fbd4acccebaefa04b 100644 (file)
@@ -190,7 +190,8 @@ static void rt2x00lib_beacondone_iter(void *data, u8 *mac,
        struct rt2x00_intf *intf = vif_to_intf(vif);
 
        if (vif->type != NL80211_IFTYPE_AP &&
-           vif->type != NL80211_IFTYPE_ADHOC)
+           vif->type != NL80211_IFTYPE_ADHOC &&
+           vif->type != NL80211_IFTYPE_MESH_POINT)
                return;
 
        /*
@@ -780,7 +781,8 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
        if (rt2x00dev->ops->bcn->entry_num > 0)
                rt2x00dev->hw->wiphy->interface_modes |=
                    BIT(NL80211_IFTYPE_ADHOC) |
-                   BIT(NL80211_IFTYPE_AP);
+                   BIT(NL80211_IFTYPE_AP) |
+                   BIT(NL80211_IFTYPE_MESH_POINT);
 
        /*
         * Let the driver probe the device to detect the capabilities.
@@ -935,10 +937,11 @@ static void rt2x00lib_resume_intf(void *data, u8 *mac,
 
 
        /*
-        * Master or Ad-hoc mode require a new beacon update.
+        * AP, Ad-hoc, and Mesh Point mode require a new beacon update.
         */
        if (vif->type == NL80211_IFTYPE_AP ||
-           vif->type == NL80211_IFTYPE_ADHOC)
+           vif->type == NL80211_IFTYPE_ADHOC ||
+           vif->type == NL80211_IFTYPE_MESH_POINT)
                intf->delayed_flags |= DELAYED_UPDATE_BEACON;
 
        spin_unlock(&intf->lock);
index 38edee5fe1683c1022e3739efa808e0292f61eea..137386ebf68f61273195e69b289a5179dce2d8ac 100644 (file)
@@ -226,6 +226,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
                break;
        case NL80211_IFTYPE_STATION:
        case NL80211_IFTYPE_ADHOC:
+       case NL80211_IFTYPE_MESH_POINT:
                /*
                 * We don't support mixed combinations of
                 * sta and ap interfaces.