aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAshok Nagarajan <ashok@cozybit.com>2012-04-30 17:20:31 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-05-08 21:53:58 -0400
commitb91e64aad2c78b0477b9eb3a26335668b4032002 (patch)
tree3ee73d514f4fc86097cbbd0799c1dab911d29be9 /net
parent57aac7c51c07ca7a2361477f352af422259301bd (diff)
mac80211: Allow nonHT/HT peering in mesh
Now that we have protection enabled, allow non-HT and HT20 stations to peer with HT40+/- stations. Peering is still disallowed for HT40+/- mismatch. Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Reviewed-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mesh.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 8a952e04690a..0fabb8bae9fb 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -76,6 +76,7 @@ bool mesh_matches_local(struct ieee80211_sub_if_data *sdata,
76 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; 76 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
77 struct ieee80211_local *local = sdata->local; 77 struct ieee80211_local *local = sdata->local;
78 u32 basic_rates = 0; 78 u32 basic_rates = 0;
79 enum nl80211_channel_type sta_channel_type = NL80211_CHAN_NO_HT;
79 80
80 /* 81 /*
81 * As support for each feature is added, check for matching 82 * As support for each feature is added, check for matching
@@ -102,10 +103,15 @@ bool mesh_matches_local(struct ieee80211_sub_if_data *sdata,
102 if (sdata->vif.bss_conf.basic_rates != basic_rates) 103 if (sdata->vif.bss_conf.basic_rates != basic_rates)
103 goto mismatch; 104 goto mismatch;
104 105
105 /* disallow peering with mismatched channel types for now */ 106 if (ie->ht_operation)
107 sta_channel_type =
108 ieee80211_ht_oper_to_channel_type(ie->ht_operation);
109
110 /* Disallow HT40+/- mismatch */
106 if (ie->ht_operation && 111 if (ie->ht_operation &&
107 (local->_oper_channel_type != 112 local->_oper_channel_type > NL80211_CHAN_HT20 &&
108 ieee80211_ht_oper_to_channel_type(ie->ht_operation))) 113 sta_channel_type > NL80211_CHAN_HT20 &&
114 local->_oper_channel_type != sta_channel_type)
109 goto mismatch; 115 goto mismatch;
110 116
111 return true; 117 return true;