diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-11-12 05:51:50 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-11-26 06:43:00 -0500 |
commit | b296005c000ae1c82d7bae7be7d10bb71758d1e4 (patch) | |
tree | 03af24bad1b00eacda998a55add6fcb0c61fbe57 /drivers/net/wireless/mac80211_hwsim.c | |
parent | 7173a1fa53dff94f771a66b93623500424376015 (diff) |
mac80211_hwsim: advertise VHT support
If the number of channels is > 1, which means that
hwsim will use mac80211 channel contexts, it can
also advertise VHT support.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 6be3faeaa59a..f1c05d57298c 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -2208,6 +2208,34 @@ static int __init init_mac80211_hwsim(void) | |||
2208 | sband->ht_cap.mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED; | 2208 | sband->ht_cap.mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED; |
2209 | 2209 | ||
2210 | hw->wiphy->bands[band] = sband; | 2210 | hw->wiphy->bands[band] = sband; |
2211 | |||
2212 | if (channels == 1) | ||
2213 | continue; | ||
2214 | |||
2215 | sband->vht_cap.vht_supported = true; | ||
2216 | sband->vht_cap.cap = | ||
2217 | IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 | | ||
2218 | IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ | | ||
2219 | IEEE80211_VHT_CAP_RXLDPC | | ||
2220 | IEEE80211_VHT_CAP_SHORT_GI_80 | | ||
2221 | IEEE80211_VHT_CAP_SHORT_GI_160 | | ||
2222 | IEEE80211_VHT_CAP_TXSTBC | | ||
2223 | IEEE80211_VHT_CAP_RXSTBC_1 | | ||
2224 | IEEE80211_VHT_CAP_RXSTBC_2 | | ||
2225 | IEEE80211_VHT_CAP_RXSTBC_3 | | ||
2226 | IEEE80211_VHT_CAP_RXSTBC_4 | | ||
2227 | IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT; | ||
2228 | sband->vht_cap.vht_mcs.rx_mcs_map = | ||
2229 | cpu_to_le16(IEEE80211_VHT_MCS_SUPPORT_0_8 << 0 | | ||
2230 | IEEE80211_VHT_MCS_SUPPORT_0_8 << 2 | | ||
2231 | IEEE80211_VHT_MCS_SUPPORT_0_9 << 4 | | ||
2232 | IEEE80211_VHT_MCS_SUPPORT_0_8 << 6 | | ||
2233 | IEEE80211_VHT_MCS_SUPPORT_0_8 << 8 | | ||
2234 | IEEE80211_VHT_MCS_SUPPORT_0_9 << 10 | | ||
2235 | IEEE80211_VHT_MCS_SUPPORT_0_9 << 12 | | ||
2236 | IEEE80211_VHT_MCS_SUPPORT_0_8 << 14); | ||
2237 | sband->vht_cap.vht_mcs.tx_mcs_map = | ||
2238 | sband->vht_cap.vht_mcs.rx_mcs_map; | ||
2211 | } | 2239 | } |
2212 | /* By default all radios are belonging to the first group */ | 2240 | /* By default all radios are belonging to the first group */ |
2213 | data->group = 1; | 2241 | data->group = 1; |