提交 f33f8483 编写于 作者: I Ilan Peer 提交者: Johannes Berg

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: NIlan Peer <ilan.peer@intel.com>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 be69c24a
...@@ -2437,26 +2437,6 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, ...@@ -2437,26 +2437,6 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
sband->n_channels = ARRAY_SIZE(hwsim_channels_5ghz); sband->n_channels = ARRAY_SIZE(hwsim_channels_5ghz);
sband->bitrates = data->rates + 4; sband->bitrates = data->rates + 4;
sband->n_bitrates = ARRAY_SIZE(hwsim_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.vht_supported = true;
sband->vht_cap.cap = sband->vht_cap.cap =
...@@ -2482,6 +2462,26 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, ...@@ -2482,6 +2462,26 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
IEEE80211_VHT_MCS_SUPPORT_0_8 << 14); IEEE80211_VHT_MCS_SUPPORT_0_8 << 14);
sband->vht_cap.vht_mcs.tx_mcs_map = sband->vht_cap.vht_mcs.tx_mcs_map =
sband->vht_cap.vht_mcs.rx_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 */ /* By default all radios belong to the first group */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册