diff options
author | Ashok Nagarajan <ashok@cozybit.com> | 2012-05-01 01:20:31 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-05-09 05:53:58 +0400 |
commit | b91e64aad2c78b0477b9eb3a26335668b4032002 (patch) | |
tree | 3ee73d514f4fc86097cbbd0799c1dab911d29be9 /net/mac80211 | |
parent | 57aac7c51c07ca7a2361477f352af422259301bd (diff) | |
download | linux-b91e64aad2c78b0477b9eb3a26335668b4032002.tar.xz |
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/mac80211')
-rw-r--r-- | net/mac80211/mesh.c | 12 |
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, struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; struct ieee80211_local *local = sdata->local; u32 basic_rates = 0; + enum nl80211_channel_type sta_channel_type = NL80211_CHAN_NO_HT; /* * As support for each feature is added, check for matching @@ -102,10 +103,15 @@ bool mesh_matches_local(struct ieee80211_sub_if_data *sdata, if (sdata->vif.bss_conf.basic_rates != basic_rates) goto mismatch; - /* disallow peering with mismatched channel types for now */ + if (ie->ht_operation) + sta_channel_type = + ieee80211_ht_oper_to_channel_type(ie->ht_operation); + + /* Disallow HT40+/- mismatch */ if (ie->ht_operation && - (local->_oper_channel_type != - ieee80211_ht_oper_to_channel_type(ie->ht_operation))) + local->_oper_channel_type > NL80211_CHAN_HT20 && + sta_channel_type > NL80211_CHAN_HT20 && + local->_oper_channel_type != sta_channel_type) goto mismatch; return true; |