提交 890b7878 编写于 作者: A Arik Nemtsov 提交者: Johannes Berg

mac80211: TDLS: use the BSS chandef for HT/VHT operation IEs

The chandef of the current channel context might be wider (though
compatible). The TDLS link cares only about the channel of the BSS.

In addition make sure to specify the VHT operation IE when VHT is supported
on a non-2.4GHz band, as required by IEEE802.11ac-2013. This is not the
same as HT-operation, to be specified only if the BSS doesn't support HT.
Signed-off-by: NArik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 96a4688e
...@@ -527,30 +527,19 @@ ieee80211_tdls_add_setup_cfm_ies(struct ieee80211_sub_if_data *sdata, ...@@ -527,30 +527,19 @@ ieee80211_tdls_add_setup_cfm_ies(struct ieee80211_sub_if_data *sdata,
/* if HT support is only added in TDLS, we need an HT-operation IE */ /* if HT support is only added in TDLS, we need an HT-operation IE */
if (!ap_sta->sta.ht_cap.ht_supported && sta->sta.ht_cap.ht_supported) { if (!ap_sta->sta.ht_cap.ht_supported && sta->sta.ht_cap.ht_supported) {
struct ieee80211_chanctx_conf *chanctx_conf = pos = skb_put(skb, 2 + sizeof(struct ieee80211_ht_operation));
rcu_dereference(sdata->vif.chanctx_conf); /* send an empty HT operation IE */
if (!WARN_ON(!chanctx_conf)) { ieee80211_ie_build_ht_oper(pos, &sta->sta.ht_cap,
pos = skb_put(skb, 2 + &sdata->vif.bss_conf.chandef, 0);
sizeof(struct ieee80211_ht_operation));
/* send an empty HT operation IE */
ieee80211_ie_build_ht_oper(pos, &sta->sta.ht_cap,
&chanctx_conf->def, 0);
}
} }
ieee80211_tdls_add_link_ie(sdata, skb, peer, initiator); ieee80211_tdls_add_link_ie(sdata, skb, peer, initiator);
/* only include VHT-operation if not on the 2.4GHz band */ /* only include VHT-operation if not on the 2.4GHz band */
if (band != IEEE80211_BAND_2GHZ && !ap_sta->sta.vht_cap.vht_supported && if (band != IEEE80211_BAND_2GHZ && sta->sta.vht_cap.vht_supported) {
sta->sta.vht_cap.vht_supported) { pos = skb_put(skb, 2 + sizeof(struct ieee80211_vht_operation));
struct ieee80211_chanctx_conf *chanctx_conf = ieee80211_ie_build_vht_oper(pos, &sta->sta.vht_cap,
rcu_dereference(sdata->vif.chanctx_conf); &sdata->vif.bss_conf.chandef);
if (!WARN_ON(!chanctx_conf)) {
pos = skb_put(skb, 2 +
sizeof(struct ieee80211_vht_operation));
ieee80211_ie_build_vht_oper(pos, &sta->sta.vht_cap,
&chanctx_conf->def);
}
} }
rcu_read_unlock(); rcu_read_unlock();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册