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>
This commit is contained in:
Johannes Berg 2013-04-07 19:32:47 +02:00
parent 0eabccd940
commit a21a4d3e8a
1 changed files with 0 additions and 32 deletions

View File

@ -604,7 +604,6 @@ static void ieee80211_add_vht_ie(struct ieee80211_sub_if_data *sdata,
u8 *pos; u8 *pos;
u32 cap; u32 cap;
struct ieee80211_sta_vht_cap vht_cap; struct ieee80211_sta_vht_cap vht_cap;
int i;
BUILD_BUG_ON(sizeof(vht_cap) != sizeof(sband->vht_cap)); BUILD_BUG_ON(sizeof(vht_cap) != sizeof(sband->vht_cap));
@ -632,37 +631,6 @@ static void ieee80211_add_vht_ie(struct ieee80211_sub_if_data *sdata,
cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE))) cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE)))
cap &= ~IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE; cap &= ~IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE;
if (!(ap_vht_cap->vht_cap_info &
cpu_to_le32(IEEE80211_VHT_CAP_TXSTBC)))
cap &= ~(IEEE80211_VHT_CAP_RXSTBC_1 |
IEEE80211_VHT_CAP_RXSTBC_3 |
IEEE80211_VHT_CAP_RXSTBC_4);
for (i = 0; i < 8; i++) {
int shift = i * 2;
u16 mask = IEEE80211_VHT_MCS_NOT_SUPPORTED << shift;
u16 ap_mcs, our_mcs;
ap_mcs = (le16_to_cpu(ap_vht_cap->supp_mcs.tx_mcs_map) &
mask) >> shift;
our_mcs = (le16_to_cpu(vht_cap.vht_mcs.rx_mcs_map) &
mask) >> shift;
if (our_mcs == IEEE80211_VHT_MCS_NOT_SUPPORTED)
continue;
switch (ap_mcs) {
default:
if (our_mcs <= ap_mcs)
break;
/* fall through */
case IEEE80211_VHT_MCS_NOT_SUPPORTED:
vht_cap.vht_mcs.rx_mcs_map &= cpu_to_le16(~mask);
vht_cap.vht_mcs.rx_mcs_map |=
cpu_to_le16(ap_mcs << shift);
}
}
/* reserve and fill IE */ /* reserve and fill IE */
pos = skb_put(skb, sizeof(struct ieee80211_vht_cap) + 2); pos = skb_put(skb, sizeof(struct ieee80211_vht_cap) + 2);
ieee80211_ie_build_vht_cap(pos, &vht_cap, cap); ieee80211_ie_build_vht_cap(pos, &vht_cap, cap);