diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index afd81c7..6f9ecaa 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -8904,6 +8904,23 @@ static void rtw_cfg80211_init_vht_capab(_adapter *padapter } #endif /* defined(CONFIG_80211AC_VHT) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)) */ +static void rtw_cfg80211_create_vht_cap(struct ieee80211_sta_vht_cap *vht_cap) +{ + u16 mcs_map; + int i; + + vht_cap->vht_supported = 1; + vht_cap->cap = IEEE80211_VHT_CAP_RXLDPC; + + mcs_map = 0; + for (i = 0; i < 8; i++) { + mcs_map |= IEEE80211_VHT_MCS_SUPPORT_0_9 << (i*2); + } + + vht_cap->vht_mcs.rx_mcs_map = cpu_to_le16(mcs_map); + vht_cap->vht_mcs.tx_mcs_map = cpu_to_le16(mcs_map); +} + void rtw_cfg80211_init_wdev_data(_adapter *padapter) { #ifdef CONFIG_CONCURRENT_MODE @@ -8919,6 +8936,7 @@ void rtw_cfg80211_init_wiphy(_adapter *padapter) struct ieee80211_supported_band *band; struct wireless_dev *pwdev = padapter->rtw_wdev; struct wiphy *wiphy = pwdev->wiphy; + struct ieee80211_sta_vht_cap *vht_cap; rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type)); @@ -8929,6 +8947,7 @@ void rtw_cfg80211_init_wiphy(_adapter *padapter) if (band) { #if defined(CONFIG_80211N_HT) rtw_cfg80211_init_ht_capab(padapter, &band->ht_cap, BAND_ON_2_4G, rf_type); + rtw_cfg80211_create_vht_cap(&band->vht_cap); #endif } }