diff options
Diffstat (limited to 'net/mac80211/tdls.c')
-rw-r--r-- | net/mac80211/tdls.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c index 917088dfd696..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); |
@@ -852,7 +852,6 @@ ieee80211_tdls_prep_mgmt_packet(struct wiphy *wiphy, struct net_device *dev, | |||
852 | */ | 852 | */ |
853 | if ((action_code == WLAN_TDLS_TEARDOWN) && | 853 | if ((action_code == WLAN_TDLS_TEARDOWN) && |
854 | (sdata->local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)) { | 854 | (sdata->local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)) { |
855 | struct sta_info *sta = NULL; | ||
856 | bool try_resend; /* Should we keep skb for possible resend */ | 855 | bool try_resend; /* Should we keep skb for possible resend */ |
857 | 856 | ||
858 | /* If not sending directly to peer - no point in keeping skb */ | 857 | /* If not sending directly to peer - no point in keeping skb */ |