summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/tdls.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c
index 80b66ce9157b..c9f9752217ac 100644
--- a/net/mac80211/tdls.c
+++ b/net/mac80211/tdls.c
@@ -345,24 +345,24 @@ ieee80211_tdls_add_setup_start_ies(struct ieee80211_sub_if_data *sdata,
345 */ 345 */
346 sband = local->hw.wiphy->bands[band]; 346 sband = local->hw.wiphy->bands[band];
347 memcpy(&ht_cap, &sband->ht_cap, sizeof(ht_cap)); 347 memcpy(&ht_cap, &sband->ht_cap, sizeof(ht_cap));
348 if ((action_code == WLAN_TDLS_SETUP_REQUEST || 348
349 action_code == WLAN_TDLS_SETUP_RESPONSE) && 349 if (action_code == WLAN_TDLS_SETUP_REQUEST && ht_cap.ht_supported) {
350 ht_cap.ht_supported && (!sta || sta->sta.ht_cap.ht_supported)) { 350 ieee80211_apply_htcap_overrides(sdata, &ht_cap);
351 if (action_code == WLAN_TDLS_SETUP_REQUEST) { 351
352 ieee80211_apply_htcap_overrides(sdata, &ht_cap); 352 /* disable SMPS in TDLS initiator */
353 353 ht_cap.cap |= WLAN_HT_CAP_SM_PS_DISABLED
354 /* disable SMPS in TDLS initiator */ 354 << IEEE80211_HT_CAP_SM_PS_SHIFT;
355 ht_cap.cap |= (WLAN_HT_CAP_SM_PS_DISABLED 355
356 << IEEE80211_HT_CAP_SM_PS_SHIFT); 356 pos = skb_put(skb, sizeof(struct ieee80211_ht_cap) + 2);
357 } else { 357 ieee80211_ie_build_ht_cap(pos, &ht_cap, ht_cap.cap);
358 /* disable SMPS in TDLS responder */ 358 } else if (action_code == WLAN_TDLS_SETUP_RESPONSE &&
359 sta->sta.ht_cap.cap |= 359 ht_cap.ht_supported && sta->sta.ht_cap.ht_supported) {
360 (WLAN_HT_CAP_SM_PS_DISABLED 360 /* disable SMPS in TDLS responder */
361 << IEEE80211_HT_CAP_SM_PS_SHIFT); 361 sta->sta.ht_cap.cap |= WLAN_HT_CAP_SM_PS_DISABLED
362 362 << IEEE80211_HT_CAP_SM_PS_SHIFT;
363 /* the peer caps are already intersected with our own */ 363
364 memcpy(&ht_cap, &sta->sta.ht_cap, sizeof(ht_cap)); 364 /* the peer caps are already intersected with our own */
365 } 365 memcpy(&ht_cap, &sta->sta.ht_cap, sizeof(ht_cap));
366 366
367 pos = skb_put(skb, sizeof(struct ieee80211_ht_cap) + 2); 367 pos = skb_put(skb, sizeof(struct ieee80211_ht_cap) + 2);
368 ieee80211_ie_build_ht_cap(pos, &ht_cap, ht_cap.cap); 368 ieee80211_ie_build_ht_cap(pos, &ht_cap, ht_cap.cap);