aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2015-03-30 04:16:23 -0400
committerJohannes Berg <johannes.berg@intel.com>2015-03-30 04:48:59 -0400
commit070e176a758e5c96f112d6fc6c348fe4daef99a5 (patch)
tree0c897ed1824d9684c3ecc570a20dbcf1dd87e0b5
parentabcff6ef01f9ffa6958e50457574132f8f786308 (diff)
mac80211: send HT/VHT IEs in TDLS discovery response
These are mandated by IEEE802.11-2012 section 8.5.8.6 and IEEE802.11ac-2013 section 8.5.8.16. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/tdls.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c
index 79ed59acf0d4..fff0d864adfa 100644
--- a/net/mac80211/tdls.c
+++ b/net/mac80211/tdls.c
@@ -378,7 +378,9 @@ ieee80211_tdls_add_setup_start_ies(struct ieee80211_sub_if_data *sdata,
378 sband = local->hw.wiphy->bands[band]; 378 sband = local->hw.wiphy->bands[band];
379 memcpy(&ht_cap, &sband->ht_cap, sizeof(ht_cap)); 379 memcpy(&ht_cap, &sband->ht_cap, sizeof(ht_cap));
380 380
381 if (action_code == WLAN_TDLS_SETUP_REQUEST && ht_cap.ht_supported) { 381 if ((action_code == WLAN_TDLS_SETUP_REQUEST ||
382 action_code == WLAN_PUB_ACTION_TDLS_DISCOVER_RES) &&
383 ht_cap.ht_supported) {
382 ieee80211_apply_htcap_overrides(sdata, &ht_cap); 384 ieee80211_apply_htcap_overrides(sdata, &ht_cap);
383 385
384 /* disable SMPS in TDLS initiator */ 386 /* disable SMPS in TDLS initiator */
@@ -432,11 +434,14 @@ ieee80211_tdls_add_setup_start_ies(struct ieee80211_sub_if_data *sdata,
432 434
433 /* build the VHT-cap similarly to the HT-cap */ 435 /* build the VHT-cap similarly to the HT-cap */
434 memcpy(&vht_cap, &sband->vht_cap, sizeof(vht_cap)); 436 memcpy(&vht_cap, &sband->vht_cap, sizeof(vht_cap));
435 if (action_code == WLAN_TDLS_SETUP_REQUEST && vht_cap.vht_supported) { 437 if ((action_code == WLAN_TDLS_SETUP_REQUEST ||
438 action_code == WLAN_PUB_ACTION_TDLS_DISCOVER_RES) &&
439 vht_cap.vht_supported) {
436 ieee80211_apply_vhtcap_overrides(sdata, &vht_cap); 440 ieee80211_apply_vhtcap_overrides(sdata, &vht_cap);
437 441
438 /* the AID is present only when VHT is implemented */ 442 /* the AID is present only when VHT is implemented */
439 ieee80211_tdls_add_aid(sdata, skb); 443 if (action_code == WLAN_TDLS_SETUP_REQUEST)
444 ieee80211_tdls_add_aid(sdata, skb);
440 445
441 pos = skb_put(skb, sizeof(struct ieee80211_vht_cap) + 2); 446 pos = skb_put(skb, sizeof(struct ieee80211_vht_cap) + 2);
442 ieee80211_ie_build_vht_cap(pos, &vht_cap, vht_cap.cap); 447 ieee80211_ie_build_vht_cap(pos, &vht_cap, vht_cap.cap);