aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tdls.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-02-04 17:57:45 -0500
committerDavid S. Miller <davem@davemloft.net>2015-02-04 17:57:45 -0500
commit940288b6a560710d4c63bc84d9570779dd7dec2b (patch)
tree349a41e8d8d75239428efcfd299d4b680cc839a1 /net/mac80211/tdls.c
parent541c571fa2fdfd4782d840276c5aedb535349075 (diff)
parent79044f60caa7c377333dc8f13cf1e48c144e2521 (diff)
Merge tag 'mac80211-next-for-davem-2015-02-03' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Last round of updates for net-next: * revert a patch that caused a regression with mesh userspace (Bob) * fix a number of suspend/resume related races (from Emmanuel, Luca and myself - we'll look at backporting later) * add software implementations for new ciphers (Jouni) * add a new ACPI ID for Broadcom's rfkill (Mika) * allow using netns FD for wireless (Vadim) * some other cleanups (various) Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/tdls.c')
-rw-r--r--net/mac80211/tdls.c37
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 */