mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-29 08:27:41 +00:00
Fix VHT capabilities
This commit is contained in:
parent
59055bb267
commit
59f2baf8cf
@ -6338,21 +6338,35 @@ static void rtw_cfg80211_init_ht_capab(_adapter *padapter, struct ieee80211_sta_
|
||||
|
||||
}
|
||||
|
||||
static void rtw_cfg80211_create_vht_cap(struct ieee80211_sta_vht_cap *vht_cap)
|
||||
static void rtw_cfg80211_create_vht_cap(_adapter *padapter, struct ieee80211_sta_vht_cap *vht_cap)
|
||||
{
|
||||
#ifdef CONFIG_80211AC_VHT
|
||||
static int highest_rates[] = {433, 866, 1300, 1733}; // 80 MHz
|
||||
u16 mcs_map;
|
||||
int i;
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
|
||||
|
||||
vht_cap->vht_supported = 1;
|
||||
vht_cap->cap = IEEE80211_VHT_CAP_RXLDPC;
|
||||
vht_cap->cap = IEEE80211_VHT_CAP_RXLDPC|IEEE80211_VHT_CAP_SHORT_GI_80|IEEE80211_VHT_CAP_TXSTBC|
|
||||
IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE;
|
||||
|
||||
mcs_map = 0;
|
||||
for (i = 0; i < 8; i++) {
|
||||
mcs_map |= IEEE80211_VHT_MCS_SUPPORT_0_9 << (i*2);
|
||||
if(i < pHalData->NumTotalRFPath)
|
||||
mcs_map |= IEEE80211_VHT_MCS_SUPPORT_0_9 << (i*2);
|
||||
else
|
||||
mcs_map |= IEEE80211_VHT_MCS_NOT_SUPPORTED << (i*2);
|
||||
}
|
||||
|
||||
vht_cap->vht_mcs.tx_mcs_map =
|
||||
vht_cap->vht_mcs.rx_mcs_map = cpu_to_le16(mcs_map);
|
||||
vht_cap->vht_mcs.tx_mcs_map = cpu_to_le16(mcs_map);
|
||||
vht_cap->vht_mcs.tx_highest =
|
||||
vht_cap->vht_mcs.rx_highest = cpu_to_le16(highest_rates[pHalData->NumTotalRFPath-1]);
|
||||
#else
|
||||
vht_cap->vht_supported = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void rtw_cfg80211_init_wiphy(_adapter *padapter)
|
||||
@ -6377,7 +6391,7 @@ void rtw_cfg80211_init_wiphy(_adapter *padapter)
|
||||
bands = wiphy->bands[IEEE80211_BAND_5GHZ];
|
||||
if(bands) {
|
||||
rtw_cfg80211_init_ht_capab(padapter, &bands->ht_cap, IEEE80211_BAND_5GHZ, rf_type);
|
||||
rtw_cfg80211_create_vht_cap(&bands->vht_cap);
|
||||
rtw_cfg80211_create_vht_cap(padapter, &bands->vht_cap);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -124,7 +124,7 @@ int rtw_ldpc_cap = 0x33;
|
||||
// BIT0: Enable VHT STBC Rx, BIT1: Enable VHT STBC Tx, BIT4: Enable HT STBC Rx, BIT5: Enable HT STBC Tx
|
||||
int rtw_stbc_cap = 0x33;
|
||||
// BIT0: Enable VHT Beamformer, BIT1: Enable VHT Beamformee, BIT4: Enable HT Beamformer, BIT5: Enable HT Beamformee
|
||||
int rtw_beamform_cap = 0x2;
|
||||
int rtw_beamform_cap = 0x3;
|
||||
int rtw_bfer_rf_number = 0; /*BeamformerCapRfNum Rf path number, 0 for auto, others for manual*/
|
||||
int rtw_bfee_rf_number = 0; /*BeamformeeCapRfNum Rf path number, 0 for auto, others for manual*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user