aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00
diff options
context:
space:
mode:
authorAndrey Yurovsky <andrey@cozybit.com>2008-12-20 04:55:34 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:58:35 -0500
commita07dbea210e146aedf8929cdabe082b58696260c (patch)
treefeea78d288b0d004b253e52bbe6fa528258feeed /drivers/net/wireless/rt2x00
parent5352ff6510422d9a9bf13b7272f865eb53247f4d (diff)
rt2x00: Add mesh support
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>
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00config.c1
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c11
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c1
3 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c
index 2f4cb8de9981..a35265cc7540 100644
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
@@ -42,6 +42,7 @@ void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev,
42 switch (type) { 42 switch (type) {
43 case NL80211_IFTYPE_ADHOC: 43 case NL80211_IFTYPE_ADHOC:
44 case NL80211_IFTYPE_AP: 44 case NL80211_IFTYPE_AP:
45 case NL80211_IFTYPE_MESH_POINT:
45 conf.sync = TSF_SYNC_BEACON; 46 conf.sync = TSF_SYNC_BEACON;
46 break; 47 break;
47 case NL80211_IFTYPE_STATION: 48 case NL80211_IFTYPE_STATION:
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 81d7fc8635d3..6a5712c6614c 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -190,7 +190,8 @@ static void rt2x00lib_beacondone_iter(void *data, u8 *mac,
190 struct rt2x00_intf *intf = vif_to_intf(vif); 190 struct rt2x00_intf *intf = vif_to_intf(vif);
191 191
192 if (vif->type != NL80211_IFTYPE_AP && 192 if (vif->type != NL80211_IFTYPE_AP &&
193 vif->type != NL80211_IFTYPE_ADHOC) 193 vif->type != NL80211_IFTYPE_ADHOC &&
194 vif->type != NL80211_IFTYPE_MESH_POINT)
194 return; 195 return;
195 196
196 /* 197 /*
@@ -780,7 +781,8 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
780 if (rt2x00dev->ops->bcn->entry_num > 0) 781 if (rt2x00dev->ops->bcn->entry_num > 0)
781 rt2x00dev->hw->wiphy->interface_modes |= 782 rt2x00dev->hw->wiphy->interface_modes |=
782 BIT(NL80211_IFTYPE_ADHOC) | 783 BIT(NL80211_IFTYPE_ADHOC) |
783 BIT(NL80211_IFTYPE_AP); 784 BIT(NL80211_IFTYPE_AP) |
785 BIT(NL80211_IFTYPE_MESH_POINT);
784 786
785 /* 787 /*
786 * Let the driver probe the device to detect the capabilities. 788 * Let the driver probe the device to detect the capabilities.
@@ -935,10 +937,11 @@ static void rt2x00lib_resume_intf(void *data, u8 *mac,
935 937
936 938
937 /* 939 /*
938 * Master or Ad-hoc mode require a new beacon update. 940 * AP, Ad-hoc, and Mesh Point mode require a new beacon update.
939 */ 941 */
940 if (vif->type == NL80211_IFTYPE_AP || 942 if (vif->type == NL80211_IFTYPE_AP ||
941 vif->type == NL80211_IFTYPE_ADHOC) 943 vif->type == NL80211_IFTYPE_ADHOC ||
944 vif->type == NL80211_IFTYPE_MESH_POINT)
942 intf->delayed_flags |= DELAYED_UPDATE_BEACON; 945 intf->delayed_flags |= DELAYED_UPDATE_BEACON;
943 946
944 spin_unlock(&intf->lock); 947 spin_unlock(&intf->lock);
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 38edee5fe168..137386ebf68f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -226,6 +226,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
226 break; 226 break;
227 case NL80211_IFTYPE_STATION: 227 case NL80211_IFTYPE_STATION:
228 case NL80211_IFTYPE_ADHOC: 228 case NL80211_IFTYPE_ADHOC:
229 case NL80211_IFTYPE_MESH_POINT:
229 /* 230 /*
230 * We don't support mixed combinations of 231 * We don't support mixed combinations of
231 * sta and ap interfaces. 232 * sta and ap interfaces.