mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 07:16:42 +07:00
mac80211_hwsim: Set VHT capabilities only for the 5.2 GHz band
Previously, VHT capabilities and supported MCSs where set for all bands, although VHT is only allowed on 5.2 GHz band. Fix it. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
be69c24a18
commit
f33f8483f9
@ -2437,26 +2437,6 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
|
||||
sband->n_channels = ARRAY_SIZE(hwsim_channels_5ghz);
|
||||
sband->bitrates = data->rates + 4;
|
||||
sband->n_bitrates = ARRAY_SIZE(hwsim_rates) - 4;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
|
||||
sband->ht_cap.ht_supported = true;
|
||||
sband->ht_cap.cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 |
|
||||
IEEE80211_HT_CAP_GRN_FLD |
|
||||
IEEE80211_HT_CAP_SGI_20 |
|
||||
IEEE80211_HT_CAP_SGI_40 |
|
||||
IEEE80211_HT_CAP_DSSSCCK40;
|
||||
sband->ht_cap.ampdu_factor = 0x3;
|
||||
sband->ht_cap.ampdu_density = 0x6;
|
||||
memset(&sband->ht_cap.mcs, 0,
|
||||
sizeof(sband->ht_cap.mcs));
|
||||
sband->ht_cap.mcs.rx_mask[0] = 0xff;
|
||||
sband->ht_cap.mcs.rx_mask[1] = 0xff;
|
||||
sband->ht_cap.mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
|
||||
|
||||
hw->wiphy->bands[band] = sband;
|
||||
|
||||
sband->vht_cap.vht_supported = true;
|
||||
sband->vht_cap.cap =
|
||||
@ -2482,6 +2462,26 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
|
||||
IEEE80211_VHT_MCS_SUPPORT_0_8 << 14);
|
||||
sband->vht_cap.vht_mcs.tx_mcs_map =
|
||||
sband->vht_cap.vht_mcs.rx_mcs_map;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
|
||||
sband->ht_cap.ht_supported = true;
|
||||
sband->ht_cap.cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 |
|
||||
IEEE80211_HT_CAP_GRN_FLD |
|
||||
IEEE80211_HT_CAP_SGI_20 |
|
||||
IEEE80211_HT_CAP_SGI_40 |
|
||||
IEEE80211_HT_CAP_DSSSCCK40;
|
||||
sband->ht_cap.ampdu_factor = 0x3;
|
||||
sband->ht_cap.ampdu_density = 0x6;
|
||||
memset(&sband->ht_cap.mcs, 0,
|
||||
sizeof(sband->ht_cap.mcs));
|
||||
sband->ht_cap.mcs.rx_mask[0] = 0xff;
|
||||
sband->ht_cap.mcs.rx_mask[1] = 0xff;
|
||||
sband->ht_cap.mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
|
||||
|
||||
hw->wiphy->bands[band] = sband;
|
||||
}
|
||||
|
||||
/* By default all radios belong to the first group */
|
||||
|
Loading…
Reference in New Issue
Block a user