提交 b91e64aa 编写于 作者: A Ashok Nagarajan 提交者: John W. Linville

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: NAshok Nagarajan <ashok@cozybit.com>
Reviewed-by: NThomas Pedersen <thomas@cozybit.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 57aac7c5
...@@ -76,6 +76,7 @@ bool mesh_matches_local(struct ieee80211_sub_if_data *sdata, ...@@ -76,6 +76,7 @@ bool mesh_matches_local(struct ieee80211_sub_if_data *sdata,
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
struct ieee80211_local *local = sdata->local; struct ieee80211_local *local = sdata->local;
u32 basic_rates = 0; 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 * 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,10 +103,15 @@ bool mesh_matches_local(struct ieee80211_sub_if_data *sdata,
if (sdata->vif.bss_conf.basic_rates != basic_rates) if (sdata->vif.bss_conf.basic_rates != basic_rates)
goto mismatch; 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 && if (ie->ht_operation &&
(local->_oper_channel_type != local->_oper_channel_type > NL80211_CHAN_HT20 &&
ieee80211_ht_oper_to_channel_type(ie->ht_operation))) sta_channel_type > NL80211_CHAN_HT20 &&
local->_oper_channel_type != sta_channel_type)
goto mismatch; goto mismatch;
return true; return true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册