aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-04-07 13:32:47 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-04-10 14:24:17 -0400
commita21a4d3e8ad4d513f5a6eefc91510febb205f601 (patch)
tree28303bcfe8d84e07eacea58ae7c519cee964bf87 /net/mac80211
parent0eabccd940f0f25da0ae29e555fddb8fb84d8e27 (diff)
mac80211: always advertise STBC/MCSes even if no AP support
Advertise STBC capabilities and MCS rates even if the AP doesn't support them. This has always been the right thing to do, but used to be problematic with some APs. Now WFA testing requires this so re-enable it, problematic APs would then presumably not pass the test and be fixed. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mlme.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 79647eaecc8d..cf40fac0aae8 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -604,7 +604,6 @@ static void ieee80211_add_vht_ie(struct ieee80211_sub_if_data *sdata,
604 u8 *pos; 604 u8 *pos;
605 u32 cap; 605 u32 cap;
606 struct ieee80211_sta_vht_cap vht_cap; 606 struct ieee80211_sta_vht_cap vht_cap;
607 int i;
608 607
609 BUILD_BUG_ON(sizeof(vht_cap) != sizeof(sband->vht_cap)); 608 BUILD_BUG_ON(sizeof(vht_cap) != sizeof(sband->vht_cap));
610 609
@@ -632,37 +631,6 @@ static void ieee80211_add_vht_ie(struct ieee80211_sub_if_data *sdata,
632 cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE))) 631 cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE)))
633 cap &= ~IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE; 632 cap &= ~IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE;
634 633
635 if (!(ap_vht_cap->vht_cap_info &
636 cpu_to_le32(IEEE80211_VHT_CAP_TXSTBC)))
637 cap &= ~(IEEE80211_VHT_CAP_RXSTBC_1 |
638 IEEE80211_VHT_CAP_RXSTBC_3 |
639 IEEE80211_VHT_CAP_RXSTBC_4);
640
641 for (i = 0; i < 8; i++) {
642 int shift = i * 2;
643 u16 mask = IEEE80211_VHT_MCS_NOT_SUPPORTED << shift;
644 u16 ap_mcs, our_mcs;
645
646 ap_mcs = (le16_to_cpu(ap_vht_cap->supp_mcs.tx_mcs_map) &
647 mask) >> shift;
648 our_mcs = (le16_to_cpu(vht_cap.vht_mcs.rx_mcs_map) &
649 mask) >> shift;
650
651 if (our_mcs == IEEE80211_VHT_MCS_NOT_SUPPORTED)
652 continue;
653
654 switch (ap_mcs) {
655 default:
656 if (our_mcs <= ap_mcs)
657 break;
658 /* fall through */
659 case IEEE80211_VHT_MCS_NOT_SUPPORTED:
660 vht_cap.vht_mcs.rx_mcs_map &= cpu_to_le16(~mask);
661 vht_cap.vht_mcs.rx_mcs_map |=
662 cpu_to_le16(ap_mcs << shift);
663 }
664 }
665
666 /* reserve and fill IE */ 634 /* reserve and fill IE */
667 pos = skb_put(skb, sizeof(struct ieee80211_vht_cap) + 2); 635 pos = skb_put(skb, sizeof(struct ieee80211_vht_cap) + 2);
668 ieee80211_ie_build_vht_cap(pos, &vht_cap, cap); 636 ieee80211_ie_build_vht_cap(pos, &vht_cap, cap);