rtl8188eu: Remove dead code for IS_HARDWARE_TYPE_

The 8188eu is an 802.11n device.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2018-11-12 12:54:37 -06:00
parent 0c57c68d3e
commit e9184bd34c
23 changed files with 31 additions and 2034 deletions

View file

@ -1139,7 +1139,6 @@ rtk_core := core/rtw_cmd.o \
core/rtw_mlme_ext.o \ core/rtw_mlme_ext.o \
core/rtw_mi.o \ core/rtw_mi.o \
core/rtw_wlan_util.o \ core/rtw_wlan_util.o \
core/rtw_vht.o \
core/rtw_pwrctrl.o \ core/rtw_pwrctrl.o \
core/rtw_rf.o \ core/rtw_rf.o \
core/rtw_recv.o \ core/rtw_recv.o \

View file

@ -632,20 +632,13 @@ void add_RATid(_adapter *padapter, struct sta_info *psta, u8 rssi_level, u8 is_u
tx_ra_bitmap = psta->ra_mask; tx_ra_bitmap = psta->ra_mask;
if (pcur_network->Configuration.DSConfig > 14) { if (pcur_network->Configuration.DSConfig > 14) {
if (tx_ra_bitmap & 0xffff000) if (tx_ra_bitmap & 0xffff000)
sta_band |= WIRELESS_11_5N ; sta_band |= WIRELESS_11_5N ;
if (tx_ra_bitmap & 0xff0) if (tx_ra_bitmap & 0xff0)
sta_band |= WIRELESS_11A; sta_band |= WIRELESS_11A;
/* 5G band */
#ifdef CONFIG_80211AC_VHT
if (psta->vhtpriv.vht_option)
sta_band = WIRELESS_11_5AC;
#endif
} else { } else {
/* 5G band */
if (tx_ra_bitmap & 0xffff000) if (tx_ra_bitmap & 0xffff000)
sta_band |= WIRELESS_11_24N; sta_band |= WIRELESS_11_24N;
@ -844,21 +837,12 @@ void update_sta_info_apmode(_adapter *padapter, struct sta_info *psta)
phtpriv_sta->candidate_tid_bitmap = 0x0;/* reset */ phtpriv_sta->candidate_tid_bitmap = 0x0;/* reset */
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */
#ifdef CONFIG_80211AC_VHT
update_sta_vht_info_apmode(padapter, psta);
#endif
update_ldpc_stbc_cap(psta); update_ldpc_stbc_cap(psta);
/* todo: init other variables */ /* todo: init other variables */
_rtw_memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats)); _rtw_memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
/* add ratid */
/* add_RATid(padapter, psta); */ /* move to ap_sta_info_defer_update() */
_enter_critical_bh(&psta->lock, &irqL); _enter_critical_bh(&psta->lock, &irqL);
psta->state |= _FW_LINKED; psta->state |= _FW_LINKED;
_exit_critical_bh(&psta->lock, &irqL); _exit_critical_bh(&psta->lock, &irqL);
@ -910,10 +894,6 @@ static void update_ap_info(_adapter *padapter, struct sta_info *psta)
_rtw_memcpy(&psta->htpriv, &pmlmepriv->htpriv, sizeof(struct ht_priv)); _rtw_memcpy(&psta->htpriv, &pmlmepriv->htpriv, sizeof(struct ht_priv));
#ifdef CONFIG_80211AC_VHT
_rtw_memcpy(&psta->vhtpriv, &pmlmepriv->vhtpriv, sizeof(struct vht_priv));
#endif /* CONFIG_80211AC_VHT */
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */
psta->state |= WIFI_AP_STATE; /* Aries, add,fix bug of flush_cam_entry at STOP AP mode , 0724 */ psta->state |= WIFI_AP_STATE; /* Aries, add,fix bug of flush_cam_entry at STOP AP mode , 0724 */
@ -1276,14 +1256,6 @@ void start_bss_network(_adapter *padapter, struct createbss_parm *parm)
update_hw_ht_param(padapter); update_hw_ht_param(padapter);
} }
#endif /* #CONFIG_80211N_HT */ #endif /* #CONFIG_80211N_HT */
#ifdef CONFIG_80211AC_VHT
if (pmlmepriv->vhtpriv.vht_option) {
pmlmeinfo->VHT_enable = _TRUE;
update_hw_vht_param(padapter);
}
#endif /* CONFIG_80211AC_VHT */
if (pmlmepriv->cur_network.join_res != _TRUE) { /* setting only at first time */ if (pmlmepriv->cur_network.join_res != _TRUE) { /* setting only at first time */
/* WEP Key will be set before this function, do not clear CAM. */ /* WEP Key will be set before this function, do not clear CAM. */
if ((psecuritypriv->dot11PrivacyAlgrthm != _WEP40_) && (psecuritypriv->dot11PrivacyAlgrthm != _WEP104_)) if ((psecuritypriv->dot11PrivacyAlgrthm != _WEP40_) && (psecuritypriv->dot11PrivacyAlgrthm != _WEP104_))
@ -1871,54 +1843,6 @@ int rtw_check_beacon_data(_adapter *padapter, u8 *pbuf, int len)
HT_info_handler(padapter, (PNDIS_802_11_VARIABLE_IEs)pHT_info_ie); HT_info_handler(padapter, (PNDIS_802_11_VARIABLE_IEs)pHT_info_ie);
} }
#endif #endif
#ifdef CONFIG_80211AC_VHT
/* Parsing VHT CAP IE */
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, EID_VHTCapability, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
if (p && ie_len > 0)
vht_cap = _TRUE;
/* Parsing VHT OPERATION IE */
pmlmepriv->vhtpriv.vht_option = _FALSE;
/* if channel in 5G band, then add vht ie . */
if ((pbss_network->Configuration.DSConfig > 14)
&& (pmlmepriv->htpriv.ht_option == _TRUE)
&& REGSTY_IS_11AC_ENABLE(pregistrypriv)
&& hal_chk_proto_cap(padapter, PROTO_CAP_11AC)
&& (!pmlmepriv->country_ent || COUNTRY_CHPLAN_EN_11AC(pmlmepriv->country_ent))
) {
if (vht_cap == _TRUE)
pmlmepriv->vhtpriv.vht_option = _TRUE;
else if (REGSTY_IS_11AC_AUTO(pregistrypriv)) {
u8 cap_len, operation_len;
rtw_vht_use_default_setting(padapter);
{
/* VHT Operation mode notifiy bit in Extended IE (127) */
uint len = 0;
SET_EXT_CAPABILITY_ELE_OP_MODE_NOTIF(pmlmepriv->ext_capab_ie_data, 1);
pmlmepriv->ext_capab_ie_len = 10;
rtw_set_ie(pbss_network->IEs + pbss_network->IELength, EID_EXTCapability, 8, pmlmepriv->ext_capab_ie_data, &len);
pbss_network->IELength += pmlmepriv->ext_capab_ie_len;
}
/* VHT Capabilities element */
cap_len = rtw_build_vht_cap_ie(padapter, pbss_network->IEs + pbss_network->IELength);
pbss_network->IELength += cap_len;
/* VHT Operation element */
operation_len = rtw_build_vht_operation_ie(padapter, pbss_network->IEs + pbss_network->IELength, pbss_network->Configuration.DSConfig);
pbss_network->IELength += operation_len;
pmlmepriv->vhtpriv.vht_option = _TRUE;
}
}
#endif /* CONFIG_80211AC_VHT */
if(pbss_network->Configuration.DSConfig <= 14 && padapter->registrypriv.wifi_spec == 1) { if(pbss_network->Configuration.DSConfig <= 14 && padapter->registrypriv.wifi_spec == 1) {
uint len = 0; uint len = 0;
@ -3407,18 +3331,6 @@ void sta_info_update(_adapter *padapter, struct sta_info *psta)
if (pmlmepriv->htpriv.ht_option == _FALSE) if (pmlmepriv->htpriv.ht_option == _FALSE)
psta->htpriv.ht_option = _FALSE; psta->htpriv.ht_option = _FALSE;
#endif #endif
#ifdef CONFIG_80211AC_VHT
/* update 802.11AC vht cap. */
if (WLAN_STA_VHT & flags)
psta->vhtpriv.vht_option = _TRUE;
else
psta->vhtpriv.vht_option = _FALSE;
if (pmlmepriv->vhtpriv.vht_option == _FALSE)
psta->vhtpriv.vht_option = _FALSE;
#endif
update_sta_info_apmode(padapter, psta); update_sta_info_apmode(padapter, psta);
} }
@ -3637,49 +3549,6 @@ void rtw_ap_update_bss_chbw(_adapter *adapter, WLAN_BSSID_EX *bss, u8 ch, u8 bw,
#define UPDATE_VHT_CAP 1 #define UPDATE_VHT_CAP 1
#define UPDATE_HT_CAP 1 #define UPDATE_HT_CAP 1
#ifdef CONFIG_80211AC_VHT
{
struct vht_priv *vhtpriv = &adapter->mlmepriv.vhtpriv;
u8 *vht_cap_ie, *vht_op_ie;
int vht_cap_ielen, vht_op_ielen;
u8 center_freq;
vht_cap_ie = rtw_get_ie((bss->IEs + sizeof(NDIS_802_11_FIXED_IEs)), EID_VHTCapability, &vht_cap_ielen, (bss->IELength - sizeof(NDIS_802_11_FIXED_IEs)));
vht_op_ie = rtw_get_ie((bss->IEs + sizeof(NDIS_802_11_FIXED_IEs)), EID_VHTOperation, &vht_op_ielen, (bss->IELength - sizeof(NDIS_802_11_FIXED_IEs)));
center_freq = rtw_get_center_ch(ch, bw, offset);
/* update vht cap ie */
if (vht_cap_ie && vht_cap_ielen) {
#if UPDATE_VHT_CAP
/* if ((bw == CHANNEL_WIDTH_160 || bw == CHANNEL_WIDTH_80_80) && pvhtpriv->sgi_160m)
SET_VHT_CAPABILITY_ELE_SHORT_GI160M(pvht_cap_ie + 2, 1);
else */
SET_VHT_CAPABILITY_ELE_SHORT_GI160M(vht_cap_ie + 2, 0);
if (bw >= CHANNEL_WIDTH_80 && vhtpriv->sgi_80m)
SET_VHT_CAPABILITY_ELE_SHORT_GI80M(vht_cap_ie + 2, 1);
else
SET_VHT_CAPABILITY_ELE_SHORT_GI80M(vht_cap_ie + 2, 0);
#endif
}
/* update vht op ie */
if (vht_op_ie && vht_op_ielen) {
if (bw < CHANNEL_WIDTH_80) {
SET_VHT_OPERATION_ELE_CHL_WIDTH(vht_op_ie + 2, 0);
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ1(vht_op_ie + 2, 0);
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ2(vht_op_ie + 2, 0);
} else if (bw == CHANNEL_WIDTH_80) {
SET_VHT_OPERATION_ELE_CHL_WIDTH(vht_op_ie + 2, 1);
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ1(vht_op_ie + 2, center_freq);
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ2(vht_op_ie + 2, 0);
} else {
RTW_ERR(FUNC_ADPT_FMT" unsupported BW:%u\n", FUNC_ADPT_ARG(adapter), bw);
rtw_warn_on(1);
}
}
}
#endif /* CONFIG_80211AC_VHT */
#ifdef CONFIG_80211N_HT #ifdef CONFIG_80211N_HT
{ {
struct ht_priv *htpriv = &adapter->mlmepriv.htpriv; struct ht_priv *htpriv = &adapter->mlmepriv.htpriv;

View file

@ -100,9 +100,6 @@ static void _get_sta_beamform_cap(PADAPTER adapter, struct sta_info *sta,
{ {
struct beamforming_info *info; struct beamforming_info *info;
struct ht_priv *ht; struct ht_priv *ht;
#ifdef CONFIG_80211AC_VHT
struct vht_priv *vht;
#endif /* CONFIG_80211AC_VHT */
u16 bf_cap; u16 bf_cap;
@ -112,9 +109,6 @@ static void _get_sta_beamform_cap(PADAPTER adapter, struct sta_info *sta,
info = GET_BEAMFORM_INFO(adapter); info = GET_BEAMFORM_INFO(adapter);
ht = &adapter->mlmepriv.htpriv; ht = &adapter->mlmepriv.htpriv;
#ifdef CONFIG_80211AC_VHT
vht = &adapter->mlmepriv.vhtpriv;
#endif /* CONFIG_80211AC_VHT */
if (is_supported_ht(sta->wireless_mode) == _TRUE) { if (is_supported_ht(sta->wireless_mode) == _TRUE) {
/* HT */ /* HT */
@ -131,40 +125,6 @@ static void _get_sta_beamform_cap(PADAPTER adapter, struct sta_info *sta,
*comp_steering = (bf_cap & BEAMFORMING_HT_BEAMFORMER_STEER_NUM) >> 4; *comp_steering = (bf_cap & BEAMFORMING_HT_BEAMFORMER_STEER_NUM) >> 4;
} }
} }
#ifdef CONFIG_80211AC_VHT
if (is_supported_vht(sta->wireless_mode) == _TRUE) {
/* VHT */
bf_cap = vht->beamform_cap;
/* We are SU Beamformee because the STA is SU Beamformer */
if (TEST_FLAG(bf_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE)) {
info->beamforming_cap |= BEAMFORMEE_CAP_VHT_SU;
*sta_bf_cap |= BEAMFORMER_CAP_VHT_SU;
/* We are MU Beamformee because the STA is MU Beamformer */
if (TEST_FLAG(bf_cap, BEAMFORMING_VHT_MU_MIMO_STA_ENABLE)) {
info->beamforming_cap |= BEAMFORMEE_CAP_VHT_MU;
*sta_bf_cap |= BEAMFORMER_CAP_VHT_MU;
}
*sounding_dim = (bf_cap & BEAMFORMING_VHT_BEAMFORMEE_SOUND_DIM) >> 12;
}
/* We are SU Beamformer because the STA is SU Beamformee */
if (TEST_FLAG(bf_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE)) {
info->beamforming_cap |= BEAMFORMER_CAP_VHT_SU;
*sta_bf_cap |= BEAMFORMEE_CAP_VHT_SU;
/* We are MU Beamformer because the STA is MU Beamformee */
if (TEST_FLAG(bf_cap, BEAMFORMING_VHT_MU_MIMO_AP_ENABLE)) {
info->beamforming_cap |= BEAMFORMER_CAP_VHT_MU;
*sta_bf_cap |= BEAMFORMEE_CAP_VHT_MU;
}
*comp_steering = (bf_cap & BEAMFORMING_VHT_BEAMFORMER_STS_CAP) >> 8;
}
}
#endif /* CONFIG_80211AC_VHT */
} }
static u8 _send_ht_ndpa_packet(PADAPTER adapter, u8 *ra, CHANNEL_WIDTH bw) static u8 _send_ht_ndpa_packet(PADAPTER adapter, u8 *ra, CHANNEL_WIDTH bw)
@ -1366,9 +1326,6 @@ static void _beamforming_enter(PADAPTER adapter, void *p)
{ {
struct mlme_priv *mlme; struct mlme_priv *mlme;
struct ht_priv *htpriv; struct ht_priv *htpriv;
#ifdef CONFIG_80211AC_VHT
struct vht_priv *vhtpriv;
#endif
struct mlme_ext_priv *mlme_ext; struct mlme_ext_priv *mlme_ext;
struct sta_info *sta, *sta_copy; struct sta_info *sta, *sta_copy;
struct beamforming_info *info; struct beamforming_info *info;
@ -1382,9 +1339,6 @@ static void _beamforming_enter(PADAPTER adapter, void *p)
mlme = &adapter->mlmepriv; mlme = &adapter->mlmepriv;
htpriv = &mlme->htpriv; htpriv = &mlme->htpriv;
#ifdef CONFIG_80211AC_VHT
vhtpriv = &mlme->vhtpriv;
#endif
mlme_ext = &adapter->mlmeextpriv; mlme_ext = &adapter->mlmeextpriv;
info = GET_BEAMFORM_INFO(adapter); info = GET_BEAMFORM_INFO(adapter);
@ -1408,11 +1362,7 @@ static void _beamforming_enter(PADAPTER adapter, void *p)
return; return;
} }
if ((0 == htpriv->beamform_cap) if ((0 == htpriv->beamform_cap)) {
#ifdef CONFIG_80211AC_VHT
&& (0 == vhtpriv->beamform_cap)
#endif
) {
RTW_INFO("The configuration disabled Beamforming! Skip...\n"); RTW_INFO("The configuration disabled Beamforming! Skip...\n");
return; return;
} }
@ -2706,9 +2656,6 @@ BOOLEAN beamforming_init_entry(PADAPTER adapter, struct sta_info *psta, u8 *idx)
{ {
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
struct ht_priv *phtpriv = &(pmlmepriv->htpriv); struct ht_priv *phtpriv = &(pmlmepriv->htpriv);
#ifdef CONFIG_80211AC_VHT
struct vht_priv *pvhtpriv = &(pmlmepriv->vhtpriv);
#endif
struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
struct beamforming_entry *pBeamformEntry = NULL; struct beamforming_entry *pBeamformEntry = NULL;
@ -2719,11 +2666,7 @@ BOOLEAN beamforming_init_entry(PADAPTER adapter, struct sta_info *psta, u8 *idx)
BEAMFORMING_CAP beamform_cap = BEAMFORMING_CAP_NONE; BEAMFORMING_CAP beamform_cap = BEAMFORMING_CAP_NONE;
/* The current setting does not support Beaforming */ /* The current setting does not support Beaforming */
if (0 == phtpriv->beamform_cap if (0 == phtpriv->beamform_cap) {
#ifdef CONFIG_80211AC_VHT
&& 0 == pvhtpriv->beamform_cap
#endif
) {
RTW_INFO("The configuration disabled Beamforming! Skip...\n"); RTW_INFO("The configuration disabled Beamforming! Skip...\n");
return _FALSE; return _FALSE;
} }
@ -2747,19 +2690,6 @@ BOOLEAN beamforming_init_entry(PADAPTER adapter, struct sta_info *psta, u8 *idx)
/* We are Beamformer because the STA is Beamformee */ /* We are Beamformer because the STA is Beamformee */
if (TEST_FLAG(cur_beamform, BEAMFORMING_HT_BEAMFORMEE_ENABLE)) if (TEST_FLAG(cur_beamform, BEAMFORMING_HT_BEAMFORMEE_ENABLE))
beamform_cap = (BEAMFORMING_CAP)(beamform_cap | BEAMFORMER_CAP_HT_EXPLICIT); beamform_cap = (BEAMFORMING_CAP)(beamform_cap | BEAMFORMER_CAP_HT_EXPLICIT);
#ifdef CONFIG_80211AC_VHT
if (is_supported_vht(wireless_mode)) {
/* 3 */ /* VHT */
cur_beamform = psta->vhtpriv.beamform_cap;
/* We are Beamformee because the STA is Beamformer */
if (TEST_FLAG(cur_beamform, BEAMFORMING_VHT_BEAMFORMER_ENABLE))
beamform_cap = (BEAMFORMING_CAP)(beamform_cap | BEAMFORMEE_CAP_VHT_SU);
/* We are Beamformer because the STA is Beamformee */
if (TEST_FLAG(cur_beamform, BEAMFORMING_VHT_BEAMFORMEE_ENABLE))
beamform_cap = (BEAMFORMING_CAP)(beamform_cap | BEAMFORMER_CAP_VHT_SU);
}
#endif /* CONFIG_80211AC_VHT */
if (beamform_cap == BEAMFORMING_CAP_NONE) if (beamform_cap == BEAMFORMING_CAP_NONE)
return _FALSE; return _FALSE;

View file

@ -1356,9 +1356,6 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
#ifdef CONFIG_80211N_HT #ifdef CONFIG_80211N_HT
struct ht_priv *phtpriv = &pmlmepriv->htpriv; struct ht_priv *phtpriv = &pmlmepriv->htpriv;
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */
#ifdef CONFIG_80211AC_VHT
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
#endif /* CONFIG_80211AC_VHT */
NDIS_802_11_NETWORK_INFRASTRUCTURE ndis_network_mode = pnetwork->network.InfrastructureMode; NDIS_802_11_NETWORK_INFRASTRUCTURE ndis_network_mode = pnetwork->network.InfrastructureMode;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
@ -1474,18 +1471,6 @@ u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network *pnetwork)
} }
} }
#ifdef CONFIG_80211AC_VHT
pvhtpriv->vht_option = _FALSE;
if (phtpriv->ht_option
&& REGSTY_IS_11AC_ENABLE(pregistrypriv)
&& hal_chk_proto_cap(padapter, PROTO_CAP_11AC)
&& (!pmlmepriv->country_ent || COUNTRY_CHPLAN_EN_11AC(pmlmepriv->country_ent))
) {
rtw_restructure_vht_ie(padapter, &pnetwork->network.IEs[0], &psecnetwork->IEs[0],
pnetwork->network.IELength, &psecnetwork->IELength);
}
#endif
rtw_append_exented_cap(padapter, &psecnetwork->IEs[0], &psecnetwork->IELength); rtw_append_exented_cap(padapter, &psecnetwork->IEs[0], &psecnetwork->IELength);
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */

View file

@ -1411,12 +1411,6 @@ int proc_get_ap_info(struct seq_file *m, void *v)
RTW_PRINT_SEL(m, "agg_enable_bitmap=%x, candidate_tid_bitmap=%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap); RTW_PRINT_SEL(m, "agg_enable_bitmap=%x, candidate_tid_bitmap=%x\n", psta->htpriv.agg_enable_bitmap, psta->htpriv.candidate_tid_bitmap);
RTW_PRINT_SEL(m, "ldpc_cap=0x%x, stbc_cap=0x%x, beamform_cap=0x%x\n", psta->htpriv.ldpc_cap, psta->htpriv.stbc_cap, psta->htpriv.beamform_cap); RTW_PRINT_SEL(m, "ldpc_cap=0x%x, stbc_cap=0x%x, beamform_cap=0x%x\n", psta->htpriv.ldpc_cap, psta->htpriv.stbc_cap, psta->htpriv.beamform_cap);
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */
#ifdef CONFIG_80211AC_VHT
RTW_PRINT_SEL(m, "vht_en=%d, vht_sgi_80m=%d\n", psta->vhtpriv.vht_option, psta->vhtpriv.sgi_80m);
RTW_PRINT_SEL(m, "vht_ldpc_cap=0x%x, vht_stbc_cap=0x%x, vht_beamform_cap=0x%x\n", psta->vhtpriv.ldpc_cap, psta->vhtpriv.stbc_cap, psta->vhtpriv.beamform_cap);
RTW_PRINT_SEL(m, "vht_mcs_map=0x%x, vht_highest_rate=0x%x, vht_ampdu_len=%d\n", *(u16 *)psta->vhtpriv.vht_mcs_map, psta->vhtpriv.vht_highest_rate, psta->vhtpriv.ampdu_len);
#endif
sta_rx_reorder_ctl_dump(m, psta); sta_rx_reorder_ctl_dump(m, psta);
} else } else
RTW_PRINT_SEL(m, "can't get sta's macaddr, cur_network's macaddr:" MAC_FMT "\n", MAC_ARG(cur_network->network.MacAddress)); RTW_PRINT_SEL(m, "can't get sta's macaddr, cur_network's macaddr:" MAC_FMT "\n", MAC_ARG(cur_network->network.MacAddress));
@ -2782,31 +2776,14 @@ void rtw_dump_dft_phy_cap(void *sel, _adapter *adapter)
{ {
struct mlme_priv *pmlmepriv = &adapter->mlmepriv; struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
struct ht_priv *phtpriv = &pmlmepriv->htpriv; struct ht_priv *phtpriv = &pmlmepriv->htpriv;
#ifdef CONFIG_80211AC_VHT
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
#endif
#ifdef CONFIG_80211AC_VHT
RTW_PRINT_SEL(sel, "[DFT CAP] VHT STBC Tx : %s\n", (TEST_FLAG(pvhtpriv->stbc_cap, STBC_VHT_ENABLE_TX)) ? "V" : "X");
RTW_PRINT_SEL(sel, "[DFT CAP] VHT STBC Rx : %s\n", (TEST_FLAG(pvhtpriv->stbc_cap, STBC_VHT_ENABLE_RX)) ? "V" : "X");
#endif
RTW_PRINT_SEL(sel, "[DFT CAP] HT STBC Tx : %s\n", (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_TX)) ? "V" : "X"); RTW_PRINT_SEL(sel, "[DFT CAP] HT STBC Tx : %s\n", (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_TX)) ? "V" : "X");
RTW_PRINT_SEL(sel, "[DFT CAP] HT STBC Rx : %s\n\n", (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_RX)) ? "V" : "X"); RTW_PRINT_SEL(sel, "[DFT CAP] HT STBC Rx : %s\n\n", (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_RX)) ? "V" : "X");
#ifdef CONFIG_80211AC_VHT
RTW_PRINT_SEL(sel, "[DFT CAP] VHT LDPC Tx : %s\n", (TEST_FLAG(pvhtpriv->ldpc_cap, LDPC_VHT_ENABLE_TX)) ? "V" : "X");
RTW_PRINT_SEL(sel, "[DFT CAP] VHT LDPC Rx : %s\n", (TEST_FLAG(pvhtpriv->ldpc_cap, LDPC_VHT_ENABLE_RX)) ? "V" : "X");
#endif
RTW_PRINT_SEL(sel, "[DFT CAP] HT LDPC Tx : %s\n", (TEST_FLAG(phtpriv->ldpc_cap, LDPC_HT_ENABLE_TX)) ? "V" : "X"); RTW_PRINT_SEL(sel, "[DFT CAP] HT LDPC Tx : %s\n", (TEST_FLAG(phtpriv->ldpc_cap, LDPC_HT_ENABLE_TX)) ? "V" : "X");
RTW_PRINT_SEL(sel, "[DFT CAP] HT LDPC Rx : %s\n\n", (TEST_FLAG(phtpriv->ldpc_cap, LDPC_HT_ENABLE_RX)) ? "V" : "X"); RTW_PRINT_SEL(sel, "[DFT CAP] HT LDPC Rx : %s\n\n", (TEST_FLAG(phtpriv->ldpc_cap, LDPC_HT_ENABLE_RX)) ? "V" : "X");
#ifdef CONFIG_BEAMFORMING #ifdef CONFIG_BEAMFORMING
#ifdef CONFIG_80211AC_VHT
RTW_PRINT_SEL(sel, "[DFT CAP] VHT MU Bfer : %s\n", (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_MU_MIMO_AP_ENABLE)) ? "V" : "X");
RTW_PRINT_SEL(sel, "[DFT CAP] VHT MU Bfee : %s\n", (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_MU_MIMO_STA_ENABLE)) ? "V" : "X");
RTW_PRINT_SEL(sel, "[DFT CAP] VHT SU Bfer : %s\n", (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE)) ? "V" : "X");
RTW_PRINT_SEL(sel, "[DFT CAP] VHT SU Bfee : %s\n", (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE)) ? "V" : "X");
#endif
RTW_PRINT_SEL(sel, "[DFT CAP] HT Bfer : %s\n", (TEST_FLAG(phtpriv->beamform_cap, BEAMFORMING_HT_BEAMFORMER_ENABLE)) ? "V" : "X"); RTW_PRINT_SEL(sel, "[DFT CAP] HT Bfer : %s\n", (TEST_FLAG(phtpriv->beamform_cap, BEAMFORMING_HT_BEAMFORMER_ENABLE)) ? "V" : "X");
RTW_PRINT_SEL(sel, "[DFT CAP] HT Bfee : %s\n", (TEST_FLAG(phtpriv->beamform_cap, BEAMFORMING_HT_BEAMFORMEE_ENABLE)) ? "V" : "X"); RTW_PRINT_SEL(sel, "[DFT CAP] HT Bfee : %s\n", (TEST_FLAG(phtpriv->beamform_cap, BEAMFORMING_HT_BEAMFORMEE_ENABLE)) ? "V" : "X");
#endif #endif
@ -2816,9 +2793,6 @@ void rtw_get_dft_phy_cap(void *sel, _adapter *adapter)
{ {
RTW_PRINT_SEL(sel, "\n ======== PHY CAP protocol ========\n"); RTW_PRINT_SEL(sel, "\n ======== PHY CAP protocol ========\n");
rtw_ht_use_default_setting(adapter); rtw_ht_use_default_setting(adapter);
#ifdef CONFIG_80211AC_VHT
rtw_vht_use_default_setting(adapter);
#endif
rtw_dump_dft_phy_cap(sel, adapter); rtw_dump_dft_phy_cap(sel, adapter);
} }

View file

@ -1560,35 +1560,6 @@ void rtw_ies_get_chbw(u8 *ies, int ies_len, u8 *ch, u8 *bw, u8 *offset)
} }
} }
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */
#ifdef CONFIG_80211AC_VHT
{
u8 *vht_op_ie;
int vht_op_ielen;
vht_op_ie = rtw_get_ie(ies, EID_VHTOperation, &vht_op_ielen, ies_len);
if (vht_op_ie && vht_op_ielen) {
/* enable VHT 80 before check enable HT40 or not */
if (GET_VHT_OPERATION_ELE_CHL_WIDTH(vht_op_ie + 2) >= 1) {
/* for HT40, enable VHT80 */
if (*bw == CHANNEL_WIDTH_40)
*bw = CHANNEL_WIDTH_80;
/* for HT20, enable VHT20 */
else if (*bw == CHANNEL_WIDTH_20) {
/* modify VHT OP IE */
SET_VHT_OPERATION_ELE_CHL_WIDTH(vht_op_ie + 2, 0);
/* reset to 0 for VHT20 */
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ1(vht_op_ie + 2, 0);
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ2(vht_op_ie + 2, 0);
}
} else {
/*
VHT OP WIDTH = 0 under HT20/HT40
if REGSTY_BW_5G(pregistrypriv) < CHANNEL_WIDTH_80 in rtw_build_vht_operation_ie
*/
}
}
}
#endif
} }
void rtw_bss_get_chbw(WLAN_BSSID_EX *bss, u8 *ch, u8 *bw, u8 *offset) void rtw_bss_get_chbw(WLAN_BSSID_EX *bss, u8 *ch, u8 *bw, u8 *offset)

View file

@ -1012,10 +1012,6 @@ u16 rtw_get_cur_max_rate(_adapter *adapter)
, psta->htpriv.ht_cap.supp_mcs_set , psta->htpriv.ht_cap.supp_mcs_set
); );
} }
#ifdef CONFIG_80211AC_VHT
else if (is_supported_vht(psta->wireless_mode))
max_rate = ((rtw_vht_mcs_to_data_rate(psta->bw_mode, short_GI, pmlmepriv->vhtpriv.vht_highest_rate) + 1) >> 1) * 10;
#endif /* CONFIG_80211AC_VHT */
else else
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */
{ {

View file

@ -4308,20 +4308,12 @@ void rtw_append_exented_cap(_adapter *padapter, u8 *out_ie, uint *pout_len)
{ {
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct ht_priv *phtpriv = &pmlmepriv->htpriv; struct ht_priv *phtpriv = &pmlmepriv->htpriv;
#ifdef CONFIG_80211AC_VHT
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
#endif /* CONFIG_80211AC_VHT */
u8 cap_content[8] = { 0 }; u8 cap_content[8] = { 0 };
u8 *pframe; u8 *pframe;
u8 null_content[8] = {0}; u8 null_content[8] = {0};
if (phtpriv->bss_coexist) if (phtpriv->bss_coexist)
SET_EXT_CAPABILITY_ELE_BSS_COEXIST(cap_content, 1); SET_EXT_CAPABILITY_ELE_BSS_COEXIST(cap_content, 1);
#ifdef CONFIG_80211AC_VHT
if (pvhtpriv->vht_option)
SET_EXT_CAPABILITY_ELE_OP_MODE_NOTIF(cap_content, 1);
#endif /* CONFIG_80211AC_VHT */
/* /*
From 802.11 specification,if a STA does not support any of capabilities defined From 802.11 specification,if a STA does not support any of capabilities defined
in the Extended Capabilities element, then the STA is not required to in the Extended Capabilities element, then the STA is not required to

View file

@ -2832,31 +2832,6 @@ bypass_ht_chk:
} }
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */
#ifdef CONFIG_80211AC_VHT
if (pmlmepriv->vhtpriv.vht_option == _FALSE)
goto bypass_vht_chk;
_rtw_memset(&pstat->vhtpriv, 0, sizeof(struct vht_priv));
if (elems.vht_capabilities && elems.vht_capabilities_len == 12) {
pstat->flags |= WLAN_STA_VHT;
_rtw_memcpy(pstat->vhtpriv.vht_cap, elems.vht_capabilities, 12);
if (elems.vht_op_mode_notify && elems.vht_op_mode_notify_len == 1)
_rtw_memcpy(&pstat->vhtpriv.vht_op_mode_notify, elems.vht_op_mode_notify, 1);
else /* for Frame without Operating Mode notify ie; default: 80M */
pstat->vhtpriv.vht_op_mode_notify = CHANNEL_WIDTH_80;
} else
pstat->flags &= ~WLAN_STA_VHT;
bypass_vht_chk:
if ((pmlmepriv->vhtpriv.vht_option == _FALSE) && (pstat->flags & WLAN_STA_VHT)) {
rtw_warn_on(1);
status = _STATS_FAILURE_;
goto OnAssocReqFail;
}
#endif /* CONFIG_80211AC_VHT */
if (((pstat->flags & WLAN_STA_HT) || (pstat->flags & WLAN_STA_VHT)) && if (((pstat->flags & WLAN_STA_HT) || (pstat->flags & WLAN_STA_VHT)) &&
((pstat->wpa2_pairwise_cipher & WPA_CIPHER_TKIP) || ((pstat->wpa2_pairwise_cipher & WPA_CIPHER_TKIP) ||
(pstat->wpa_pairwise_cipher & WPA_CIPHER_TKIP))) { (pstat->wpa_pairwise_cipher & WPA_CIPHER_TKIP))) {
@ -2870,7 +2845,6 @@ bypass_vht_chk:
*/ */
} }
/* /*
* if (hapd->iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G) */ /* ? */ * if (hapd->iface->current_mode->mode == HOSTAPD_MODE_IEEE80211G) */ /* ? */
pstat->flags |= WLAN_STA_NONERP; pstat->flags |= WLAN_STA_NONERP;
@ -3125,16 +3099,6 @@ unsigned int OnAssocRsp(_adapter *padapter, union recv_frame *precv_frame)
HT_info_handler(padapter, pIE); HT_info_handler(padapter, pIE);
break; break;
#ifdef CONFIG_80211AC_VHT
case EID_VHTCapability:
VHT_caps_handler(padapter, pIE);
break;
case EID_VHTOperation:
VHT_operation_handler(padapter, pIE);
break;
#endif
case _ERPINFO_IE_: case _ERPINFO_IE_:
ERP_IE_handler(padapter, pIE); ERP_IE_handler(padapter, pIE);
break; break;
@ -7070,52 +7034,6 @@ unsigned int OnAction_wmm(_adapter *padapter, union recv_frame *precv_frame)
unsigned int OnAction_vht(_adapter *padapter, union recv_frame *precv_frame) unsigned int OnAction_vht(_adapter *padapter, union recv_frame *precv_frame)
{ {
#ifdef CONFIG_80211AC_VHT
struct rx_pkt_attrib *prxattrib = &precv_frame->u.hdr.attrib;
u8 *pframe = precv_frame->u.hdr.rx_data;
uint frame_len = precv_frame->u.hdr.len;
struct rtw_ieee80211_hdr_3addr *whdr = (struct rtw_ieee80211_hdr_3addr *)pframe;
u8 *frame_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr);
u8 category, action;
struct sta_info *psta = NULL;
/* check RA matches or not */
if (!_rtw_memcmp(adapter_mac_addr(padapter), GetAddr1Ptr(pframe), ETH_ALEN))
goto exit;
category = frame_body[0];
if (category != RTW_WLAN_CATEGORY_VHT)
goto exit;
action = frame_body[1];
switch (action) {
case RTW_WLAN_ACTION_VHT_COMPRESSED_BEAMFORMING:
#ifdef CONFIG_BEAMFORMING
/*RTW_INFO("RTW_WLAN_ACTION_VHT_COMPRESSED_BEAMFORMING\n");*/
rtw_beamforming_get_report_frame(padapter, precv_frame);
#endif /*CONFIG_BEAMFORMING*/
break;
case RTW_WLAN_ACTION_VHT_OPMODE_NOTIFICATION:
/* CategoryCode(1) + ActionCode(1) + OpModeNotification(1) */
/* RTW_INFO("RTW_WLAN_ACTION_VHT_OPMODE_NOTIFICATION\n"); */
psta = rtw_get_stainfo(&padapter->stapriv, whdr->addr2);
if (psta)
rtw_process_vht_op_mode_notify(padapter, &frame_body[2], psta);
break;
case RTW_WLAN_ACTION_VHT_GROUPID_MANAGEMENT:
#ifdef CONFIG_BEAMFORMING
#ifdef RTW_BEAMFORMING_VERSION_2
rtw_beamforming_get_vht_gid_mgnt_frame(padapter, precv_frame);
#endif /* RTW_BEAMFORMING_VERSION_2 */
#endif /* CONFIG_BEAMFORMING */
break;
default:
break;
}
exit:
#endif /* CONFIG_80211AC_VHT */
return _SUCCESS; return _SUCCESS;
} }
@ -7307,22 +7225,7 @@ void update_monitor_frame_attrib(_adapter *padapter, struct pkt_attrib *pattrib)
wireless_mode = WIRELESS_11G; wireless_mode = WIRELESS_11G;
pattrib->raid = rtw_get_mgntframe_raid(padapter, wireless_mode); pattrib->raid = rtw_get_mgntframe_raid(padapter, wireless_mode);
#ifdef CONFIG_80211AC_VHT
if (pHalData->rf_type == RF_1T1R)
pattrib->raid = RATEID_IDX_VHT_1SS;
else if (pHalData->rf_type == RF_2T2R || pHalData->rf_type == RF_2T4R)
pattrib->raid = RATEID_IDX_VHT_2SS;
else if (pHalData->rf_type == RF_3T3R)
pattrib->raid = RATEID_IDX_VHT_3SS;
else
pattrib->raid = RATEID_IDX_BGN_40M_1SS;
#endif
#ifdef CONFIG_80211AC_VHT
pattrib->rate = MGN_VHT1SS_MCS9;
#else
pattrib->rate = MGN_MCS7; pattrib->rate = MGN_MCS7;
#endif
pattrib->encrypt = _NO_PRIVACY_; pattrib->encrypt = _NO_PRIVACY_;
pattrib->bswenc = _FALSE; pattrib->bswenc = _FALSE;
@ -8591,30 +8494,6 @@ void issue_asocrsp(_adapter *padapter, unsigned short status, struct sta_info *p
} }
} }
#ifdef CONFIG_80211AC_VHT
if ((pstat->flags & WLAN_STA_VHT) && (pmlmepriv->vhtpriv.vht_option)
&& (pstat->wpa_pairwise_cipher != WPA_CIPHER_TKIP)
&& (pstat->wpa2_pairwise_cipher != WPA_CIPHER_TKIP)) {
u32 ie_len = 0;
/* FILL VHT CAP IE */
pbuf = rtw_get_ie(ie + _BEACON_IE_OFFSET_, EID_VHTCapability, &ie_len, (pnetwork->IELength - _BEACON_IE_OFFSET_));
if (pbuf && ie_len > 0) {
_rtw_memcpy(pframe, pbuf, ie_len + 2);
pframe += (ie_len + 2);
pattrib->pktlen += (ie_len + 2);
}
/* FILL VHT OPERATION IE */
pbuf = rtw_get_ie(ie + _BEACON_IE_OFFSET_, EID_VHTOperation, &ie_len, (pnetwork->IELength - _BEACON_IE_OFFSET_));
if (pbuf && ie_len > 0) {
_rtw_memcpy(pframe, pbuf, ie_len + 2);
pframe += (ie_len + 2);
pattrib->pktlen += (ie_len + 2);
}
}
#endif /* CONFIG_80211AC_VHT */
/* FILL WMM IE */ /* FILL WMM IE */
if ((pstat->flags & WLAN_STA_WME) && (pmlmepriv->qospriv.qos_option)) { if ((pstat->flags & WLAN_STA_WME) && (pmlmepriv->qospriv.qos_option)) {
uint ie_len = 0; uint ie_len = 0;
@ -8937,17 +8816,6 @@ void _issue_assocreq(_adapter *padapter, u8 is_reassoc)
pframe = rtw_set_ie(pframe, EID_EXTCapability, pIE->Length, pIE->data, &(pattrib->pktlen)); pframe = rtw_set_ie(pframe, EID_EXTCapability, pIE->Length, pIE->data, &(pattrib->pktlen));
break; break;
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */
#ifdef CONFIG_80211AC_VHT
case EID_VHTCapability:
if (padapter->mlmepriv.vhtpriv.vht_option == _TRUE)
pframe = rtw_set_ie(pframe, EID_VHTCapability, pIE->Length, pIE->data, &(pattrib->pktlen));
break;
case EID_OpModeNotification:
if (padapter->mlmepriv.vhtpriv.vht_option == _TRUE)
pframe = rtw_set_ie(pframe, EID_OpModeNotification, pIE->Length, pIE->data, &(pattrib->pktlen));
break;
#endif /* CONFIG_80211AC_VHT */
default: default:
break; break;
} }
@ -11817,10 +11685,6 @@ void update_sta_info(_adapter *padapter, struct sta_info *psta)
if (pmlmepriv->qospriv.qos_option) if (pmlmepriv->qospriv.qos_option)
psta->qos_option = _TRUE; psta->qos_option = _TRUE;
#ifdef CONFIG_80211AC_VHT
_rtw_memcpy(&psta->vhtpriv, &pmlmepriv->vhtpriv, sizeof(struct vht_priv));
#endif /* CONFIG_80211AC_VHT */
update_ldpc_stbc_cap(psta); update_ldpc_stbc_cap(psta);
_enter_critical_bh(&psta->lock, &irqL); _enter_critical_bh(&psta->lock, &irqL);
@ -11965,11 +11829,6 @@ void mlmeext_joinbss_event_callback(_adapter *padapter, int join_res)
/* HT */ /* HT */
HTOnAssocRsp(padapter); HTOnAssocRsp(padapter);
#ifdef CONFIG_80211AC_VHT
/* VHT */
VHTOnAssocRsp(padapter);
#endif
psta = rtw_get_stainfo(pstapriv, cur_network->MacAddress); psta = rtw_get_stainfo(pstapriv, cur_network->MacAddress);
if (psta) { /* only for infra. mode */ if (psta) { /* only for infra. mode */
/* RTW_INFO("set_sta_rate\n"); */ /* RTW_INFO("set_sta_rate\n"); */
@ -13321,14 +13180,6 @@ u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf)
break; break;
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */
#ifdef CONFIG_80211AC_VHT
case EID_VHTCapability: /* Get VHT Cap IE. */
pmlmeinfo->VHT_enable = 1;
break;
case EID_VHTOperation: /* Get VHT Operation IE. */
break;
#endif /* CONFIG_80211AC_VHT */
default: default:
break; break;
} }
@ -13341,48 +13192,12 @@ u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf)
rtw_adjust_chbw(padapter, pmlmeext->cur_channel, &pmlmeext->cur_bwmode, &pmlmeext->cur_ch_offset); rtw_adjust_chbw(padapter, pmlmeext->cur_channel, &pmlmeext->cur_bwmode, &pmlmeext->cur_ch_offset);
#if 0
if (padapter->registrypriv.wifi_spec) {
/* for WiFi test, follow WMM test plan spec */
acparm = 0x002F431C; /* VO */
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VO, (u8 *)(&acparm));
acparm = 0x005E541C; /* VI */
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VI, (u8 *)(&acparm));
acparm = 0x0000A525; /* BE */
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BE, (u8 *)(&acparm));
acparm = 0x0000A549; /* BK */
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BK, (u8 *)(&acparm));
/* for WiFi test, mixed mode with intel STA under bg mode throughput issue */
if (padapter->mlmepriv.htpriv.ht_option == _FALSE) {
acparm = 0x00004320;
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BE, (u8 *)(&acparm));
}
} else {
acparm = 0x002F3217; /* VO */
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VO, (u8 *)(&acparm));
acparm = 0x005E4317; /* VI */
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VI, (u8 *)(&acparm));
acparm = 0x00105320; /* BE */
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BE, (u8 *)(&acparm));
acparm = 0x0000A444; /* BK */
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_BK, (u8 *)(&acparm));
}
#endif
/* check channel, bandwidth, offset and switch */ /* check channel, bandwidth, offset and switch */
if (rtw_chk_start_clnt_join(padapter, &u_ch, &u_bw, &u_offset) == _FAIL) { if (rtw_chk_start_clnt_join(padapter, &u_ch, &u_bw, &u_offset) == _FAIL) {
report_join_res(padapter, (-4)); report_join_res(padapter, (-4));
return H2C_SUCCESS; return H2C_SUCCESS;
} }
/* disable dynamic functions, such as high power, DIG */
/*rtw_phydm_func_disable_all(padapter);*/
/* config the initial gain under linking, need to write the BB registers */
/* initialgain = 0x1E; */
/*rtw_hal_set_odm_var(padapter, HAL_ODM_INITIAL_GAIN, &initialgain, _FALSE);*/
rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, pmlmeinfo->network.MacAddress); rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, pmlmeinfo->network.MacAddress);
join_type = 0; join_type = 0;
rtw_hal_set_hwreg(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type)); rtw_hal_set_hwreg(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type));
@ -13401,7 +13216,6 @@ u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf)
start_clnt_join(padapter); start_clnt_join(padapter);
return H2C_SUCCESS; return H2C_SUCCESS;
} }
u8 disconnect_hdl(_adapter *padapter, unsigned char *pbuf) u8 disconnect_hdl(_adapter *padapter, unsigned char *pbuf)
@ -15475,14 +15289,8 @@ u8 tdls_hdl(_adapter *padapter, unsigned char *pbuf)
if (ptdls_sta->ra_mask & 0xff0) if (ptdls_sta->ra_mask & 0xff0)
sta_band |= WIRELESS_11A; sta_band |= WIRELESS_11A;
/* 5G band */
#ifdef CONFIG_80211AC_VHT
if (ptdls_sta->vhtpriv.vht_option)
sta_band = WIRELESS_11_5AC;
#endif
} else { } else {
/* 5G band */
if (ptdls_sta->ra_mask & 0xffff000) if (ptdls_sta->ra_mask & 0xffff000)
sta_band |= WIRELESS_11_24N; sta_band |= WIRELESS_11_24N;

View file

@ -226,17 +226,6 @@ static void mp_init_xmit_attrib(struct mp_tx *pmptx, PADAPTER padapter)
pattrib->qos_en = _FALSE; pattrib->qos_en = _FALSE;
pattrib->pktlen = 1500; pattrib->pktlen = 1500;
#ifdef CONFIG_80211AC_VHT
if (pHalData->rf_type == RF_1T1R)
pattrib->raid = RATEID_IDX_VHT_1SS;
else if (pHalData->rf_type == RF_2T2R || pHalData->rf_type == RF_2T4R)
pattrib->raid = RATEID_IDX_VHT_2SS;
else if (pHalData->rf_type == RF_3T3R)
pattrib->raid = RATEID_IDX_VHT_3SS;
else
pattrib->raid = RATEID_IDX_BGN_40M_1SS;
#endif
} }
s32 init_mp_priv(PADAPTER padapter) s32 init_mp_priv(PADAPTER padapter)

View file

@ -570,11 +570,7 @@ const u8 _rf_type_to_rf_rx_cnt[] = {
4, 4,
}; };
#ifdef CONFIG_80211AC_VHT
#define COUNTRY_CHPLAN_ASSIGN_EN_11AC(_val) , .en_11ac = (_val)
#else
#define COUNTRY_CHPLAN_ASSIGN_EN_11AC(_val) #define COUNTRY_CHPLAN_ASSIGN_EN_11AC(_val)
#endif
#if RTW_DEF_MODULE_REGULATORY_CERT #if RTW_DEF_MODULE_REGULATORY_CERT
#define COUNTRY_CHPLAN_ASSIGN_DEF_MODULE_FLAGS(_val) , .def_module_flags = (_val) #define COUNTRY_CHPLAN_ASSIGN_DEF_MODULE_FLAGS(_val) , .def_module_flags = (_val)

View file

@ -421,122 +421,6 @@ u8 *rtw_tdls_set_ht_cap(_adapter *padapter, u8 *pframe, struct pkt_attrib *pattr
} }
#endif #endif
#ifdef CONFIG_80211AC_VHT
void rtw_tdls_process_vht_cap(_adapter *padapter, struct sta_info *ptdls_sta, u8 *data, u8 Length)
{
struct hal_spec_t *hal_spec = GET_HAL_SPEC(padapter);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
u8 cur_ldpc_cap = 0, cur_stbc_cap = 0, cur_beamform_cap = 0, rf_type = RF_1T1R, tx_nss = 0;
u8 *pcap_mcs;
_rtw_memset(&ptdls_sta->vhtpriv, 0, sizeof(struct vht_priv));
if (data && Length == 12) {
ptdls_sta->flags |= WLAN_STA_VHT;
_rtw_memcpy(ptdls_sta->vhtpriv.vht_cap, data, 12);
#if 0
if (elems.vht_op_mode_notify && elems.vht_op_mode_notify_len == 1)
_rtw_memcpy(&pstat->vhtpriv.vht_op_mode_notify, elems.vht_op_mode_notify, 1);
else /* for Frame without Operating Mode notify ie; default: 80M */
pstat->vhtpriv.vht_op_mode_notify = CHANNEL_WIDTH_80;
#else
ptdls_sta->vhtpriv.vht_op_mode_notify = CHANNEL_WIDTH_80;
#endif
} else
ptdls_sta->flags &= ~WLAN_STA_VHT;
if (ptdls_sta->flags & WLAN_STA_VHT) {
if (REGSTY_IS_11AC_ENABLE(&padapter->registrypriv)
&& hal_chk_proto_cap(padapter, PROTO_CAP_11AC)
&& (!pmlmepriv->country_ent || COUNTRY_CHPLAN_EN_11AC(pmlmepriv->country_ent)))
ptdls_sta->vhtpriv.vht_option = _TRUE;
else
ptdls_sta->vhtpriv.vht_option = _FALSE;
}
/* B4 Rx LDPC */
if (TEST_FLAG(pvhtpriv->ldpc_cap, LDPC_VHT_ENABLE_TX) &&
GET_VHT_CAPABILITY_ELE_RX_LDPC(data)) {
SET_FLAG(cur_ldpc_cap, (LDPC_VHT_ENABLE_TX | LDPC_VHT_CAP_TX));
RTW_INFO("Current VHT LDPC Setting = %02X\n", cur_ldpc_cap);
}
ptdls_sta->vhtpriv.ldpc_cap = cur_ldpc_cap;
/* B5 Short GI for 80 MHz */
ptdls_sta->vhtpriv.sgi_80m = (GET_VHT_CAPABILITY_ELE_SHORT_GI80M(data) & pvhtpriv->sgi_80m) ? _TRUE : _FALSE;
/* B8 B9 B10 Rx STBC */
if (TEST_FLAG(pvhtpriv->stbc_cap, STBC_VHT_ENABLE_TX) &&
GET_VHT_CAPABILITY_ELE_RX_STBC(data)) {
SET_FLAG(cur_stbc_cap, (STBC_VHT_ENABLE_TX | STBC_VHT_CAP_TX));
RTW_INFO("Current VHT STBC Setting = %02X\n", cur_stbc_cap);
}
ptdls_sta->vhtpriv.stbc_cap = cur_stbc_cap;
/* B11 SU Beamformer Capable, the target supports Beamformer and we are Beamformee */
if (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE) &&
GET_VHT_CAPABILITY_ELE_SU_BFEE(data))
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE);
/* B12 SU Beamformee Capable, the target supports Beamformee and we are Beamformer */
if (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE) &&
GET_VHT_CAPABILITY_ELE_SU_BFER(data))
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE);
ptdls_sta->vhtpriv.beamform_cap = cur_beamform_cap;
if (cur_beamform_cap)
RTW_INFO("Current VHT Beamforming Setting = %02X\n", cur_beamform_cap);
/* B23 B24 B25 Maximum A-MPDU Length Exponent */
ptdls_sta->vhtpriv.ampdu_len = GET_VHT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(data);
pcap_mcs = GET_VHT_CAPABILITY_ELE_RX_MCS(data);
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
tx_nss = rtw_min(rf_type_to_rf_tx_cnt(rf_type), hal_spec->tx_nss_num);
rtw_vht_nss_to_mcsmap(tx_nss, ptdls_sta->vhtpriv.vht_mcs_map, pcap_mcs);
ptdls_sta->vhtpriv.vht_highest_rate = rtw_get_vht_highest_rate(ptdls_sta->vhtpriv.vht_mcs_map);
}
u8 *rtw_tdls_set_aid(_adapter *padapter, u8 *pframe, struct pkt_attrib *pattrib)
{
return rtw_set_ie(pframe, EID_AID, 2, (u8 *)&(padapter->mlmepriv.cur_network.aid), &(pattrib->pktlen));
}
u8 *rtw_tdls_set_vht_cap(_adapter *padapter, u8 *pframe, struct pkt_attrib *pattrib)
{
u32 ie_len = 0;
rtw_vht_use_default_setting(padapter);
ie_len = rtw_build_vht_cap_ie(padapter, pframe);
pattrib->pktlen += ie_len;
return pframe + ie_len;
}
u8 *rtw_tdls_set_vht_operation(_adapter *padapter, u8 *pframe, struct pkt_attrib *pattrib, u8 channel)
{
u32 ie_len = 0;
ie_len = rtw_build_vht_operation_ie(padapter, pframe, channel);
pattrib->pktlen += ie_len;
return pframe + ie_len;
}
u8 *rtw_tdls_set_vht_op_mode_notify(_adapter *padapter, u8 *pframe, struct pkt_attrib *pattrib, u8 bw)
{
u32 ie_len = 0;
ie_len = rtw_build_vht_op_mode_notify_ie(padapter, pframe, bw);
pattrib->pktlen += ie_len;
return pframe + ie_len;
}
#endif
u8 *rtw_tdls_set_sup_ch(struct mlme_ext_priv *pmlmeext, u8 *pframe, struct pkt_attrib *pattrib) u8 *rtw_tdls_set_sup_ch(struct mlme_ext_priv *pmlmeext, u8 *pframe, struct pkt_attrib *pattrib)
{ {
u8 sup_ch[30 * 2] = {0x00}, ch_set_idx = 0, sup_ch_idx = 2; u8 sup_ch[30 * 2] = {0x00}, ch_set_idx = 0, sup_ch_idx = 2;
@ -1739,13 +1623,6 @@ sint On_TDLS_Setup_Req(_adapter *padapter, union recv_frame *precv_frame)
case _HT_CAPABILITY_IE_: case _HT_CAPABILITY_IE_:
rtw_tdls_process_ht_cap(padapter, ptdls_sta, pIE->data, pIE->Length); rtw_tdls_process_ht_cap(padapter, ptdls_sta, pIE->data, pIE->Length);
break; break;
#endif
#ifdef CONFIG_80211AC_VHT
case EID_AID:
break;
case EID_VHTCapability:
rtw_tdls_process_vht_cap(padapter, ptdls_sta, pIE->data, pIE->Length);
break;
#endif #endif
case EID_BSSCoexistence: case EID_BSSCoexistence:
break; break;
@ -1926,17 +1803,6 @@ int On_TDLS_Setup_Rsp(_adapter *padapter, union recv_frame *precv_frame)
case _HT_CAPABILITY_IE_: case _HT_CAPABILITY_IE_:
rtw_tdls_process_ht_cap(padapter, ptdls_sta, pIE->data, pIE->Length); rtw_tdls_process_ht_cap(padapter, ptdls_sta, pIE->data, pIE->Length);
break; break;
#endif
#ifdef CONFIG_80211AC_VHT
case EID_AID:
/* todo in the future if necessary */
break;
case EID_VHTCapability:
rtw_tdls_process_vht_cap(padapter, ptdls_sta, pIE->data, pIE->Length);
break;
case EID_OpModeNotification:
rtw_process_vht_op_mode_notify(padapter, pIE->data, ptdls_sta);
break;
#endif #endif
case EID_BSSCoexistence: case EID_BSSCoexistence:
break; break;
@ -2080,13 +1946,6 @@ int On_TDLS_Setup_Cfm(_adapter *padapter, union recv_frame *precv_frame)
#ifdef CONFIG_80211N_HT #ifdef CONFIG_80211N_HT
case _HT_EXTRA_INFO_IE_: case _HT_EXTRA_INFO_IE_:
break; break;
#endif
#ifdef CONFIG_80211AC_VHT
case EID_VHTOperation:
break;
case EID_OpModeNotification:
rtw_process_vht_op_mode_notify(padapter, pIE->data, ptdls_sta);
break;
#endif #endif
case _LINK_ID_IE_: case _LINK_ID_IE_:
plinkid_ie = (u8 *)pIE; plinkid_ie = (u8 *)pIE;
@ -2690,17 +2549,6 @@ void rtw_build_tdls_setup_req_ies(_adapter *padapter, struct xmit_frame *pxmitfr
if ((pregistrypriv->wmm_enable == _TRUE) || (padapter->mlmepriv.htpriv.ht_option == _TRUE)) if ((pregistrypriv->wmm_enable == _TRUE) || (padapter->mlmepriv.htpriv.ht_option == _TRUE))
pframe = rtw_tdls_set_qos_cap(pframe, pattrib); pframe = rtw_tdls_set_qos_cap(pframe, pattrib);
#ifdef CONFIG_80211AC_VHT
if ((padapter->mlmepriv.htpriv.ht_option == _TRUE) && (pmlmeext->cur_channel > 14)
&& REGSTY_IS_11AC_ENABLE(pregistrypriv)
&& hal_chk_proto_cap(padapter, PROTO_CAP_11AC)
&& (!padapter->mlmepriv.country_ent || COUNTRY_CHPLAN_EN_11AC(padapter->mlmepriv.country_ent))
) {
pframe = rtw_tdls_set_aid(padapter, pframe, pattrib);
pframe = rtw_tdls_set_vht_cap(padapter, pframe, pattrib);
}
#endif
#ifdef CONFIG_WFD #ifdef CONFIG_WFD
if (padapter->wdinfo.wfd_tdls_enable == 1) if (padapter->wdinfo.wfd_tdls_enable == 1)
wfd_ie_tdls(padapter, pframe, &(pattrib->pktlen)); wfd_ie_tdls(padapter, pframe, &(pattrib->pktlen));
@ -2790,18 +2638,6 @@ void rtw_build_tdls_setup_rsp_ies(_adapter *padapter, struct xmit_frame *pxmitfr
if ((pregistrypriv->wmm_enable == _TRUE) || (padapter->mlmepriv.htpriv.ht_option == _TRUE)) if ((pregistrypriv->wmm_enable == _TRUE) || (padapter->mlmepriv.htpriv.ht_option == _TRUE))
pframe = rtw_tdls_set_qos_cap(pframe, pattrib); pframe = rtw_tdls_set_qos_cap(pframe, pattrib);
#ifdef CONFIG_80211AC_VHT
if ((padapter->mlmepriv.htpriv.ht_option == _TRUE) && (pmlmeext->cur_channel > 14)
&& REGSTY_IS_11AC_ENABLE(pregistrypriv)
&& hal_chk_proto_cap(padapter, PROTO_CAP_11AC)
&& (!padapter->mlmepriv.country_ent || COUNTRY_CHPLAN_EN_11AC(padapter->mlmepriv.country_ent))
) {
pframe = rtw_tdls_set_aid(padapter, pframe, pattrib);
pframe = rtw_tdls_set_vht_cap(padapter, pframe, pattrib);
pframe = rtw_tdls_set_vht_op_mode_notify(padapter, pframe, pattrib, pmlmeext->cur_bwmode);
}
#endif
#ifdef CONFIG_WFD #ifdef CONFIG_WFD
if (padapter->wdinfo.wfd_tdls_enable) if (padapter->wdinfo.wfd_tdls_enable)
wfd_ie_tdls(padapter, pframe, &(pattrib->pktlen)); wfd_ie_tdls(padapter, pframe, &(pattrib->pktlen));
@ -2865,18 +2701,6 @@ void rtw_build_tdls_setup_cfm_ies(_adapter *padapter, struct xmit_frame *pxmitfr
if (ptdls_sta->qos_option == _TRUE) if (ptdls_sta->qos_option == _TRUE)
pframe = rtw_tdls_set_wmm_params(padapter, pframe, pattrib); pframe = rtw_tdls_set_wmm_params(padapter, pframe, pattrib);
#ifdef CONFIG_80211AC_VHT
if ((padapter->mlmepriv.htpriv.ht_option == _TRUE)
&& (ptdls_sta->vhtpriv.vht_option == _TRUE) && (pmlmeext->cur_channel > 14)
&& REGSTY_IS_11AC_ENABLE(pregistrypriv)
&& hal_chk_proto_cap(padapter, PROTO_CAP_11AC)
&& (!padapter->mlmepriv.country_ent || COUNTRY_CHPLAN_EN_11AC(padapter->mlmepriv.country_ent))
) {
pframe = rtw_tdls_set_vht_operation(padapter, pframe, pattrib, pmlmeext->cur_channel);
pframe = rtw_tdls_set_vht_op_mode_notify(padapter, pframe, pattrib, pmlmeext->cur_bwmode);
}
#endif
} }
void rtw_build_tdls_teardown_ies(_adapter *padapter, struct xmit_frame *pxmitframe, u8 *pframe, struct tdls_txmgmt *ptxmgmt) void rtw_build_tdls_teardown_ies(_adapter *padapter, struct xmit_frame *pxmitframe, u8 *pframe, struct tdls_txmgmt *ptxmgmt)

View file

@ -1,803 +0,0 @@
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#define _RTW_VHT_C
#include <drv_types.h>
#include <hal_data.h>
#ifdef CONFIG_80211AC_VHT
/* 20/40/80, ShortGI, MCS Rate */
const u16 VHT_MCS_DATA_RATE[3][2][30] = {
{ {
13, 26, 39, 52, 78, 104, 117, 130, 156, 156,
26, 52, 78, 104, 156, 208, 234, 260, 312, 312,
39, 78, 117, 156, 234, 312, 351, 390, 468, 520
}, /* Long GI, 20MHz */
{
14, 29, 43, 58, 87, 116, 130, 144, 173, 173,
29, 58, 87, 116, 173, 231, 260, 289, 347, 347,
43, 87, 130, 173, 260, 347, 390, 433, 520, 578
}
}, /* Short GI, 20MHz */
{ {
27, 54, 81, 108, 162, 216, 243, 270, 324, 360,
54, 108, 162, 216, 324, 432, 486, 540, 648, 720,
81, 162, 243, 324, 486, 648, 729, 810, 972, 1080
}, /* Long GI, 40MHz */
{
30, 60, 90, 120, 180, 240, 270, 300, 360, 400,
60, 120, 180, 240, 360, 480, 540, 600, 720, 800,
90, 180, 270, 360, 540, 720, 810, 900, 1080, 1200
}
}, /* Short GI, 40MHz */
{ {
59, 117, 176, 234, 351, 468, 527, 585, 702, 780,
117, 234, 351, 468, 702, 936, 1053, 1170, 1404, 1560,
176, 351, 527, 702, 1053, 1404, 1580, 1755, 2106, 2340
}, /* Long GI, 80MHz */
{
65, 130, 195, 260, 390, 520, 585, 650, 780, 867,
130, 260, 390, 520, 780, 1040, 1170, 1300, 1560, 1734,
195, 390, 585, 780, 1170, 1560, 1755, 1950, 2340, 2600
}
} /* Short GI, 80MHz */
};
u8 rtw_get_vht_highest_rate(u8 *pvht_mcs_map)
{
u8 i, j;
u8 bit_map;
u8 vht_mcs_rate = 0;
for (i = 0; i < 2; i++) {
if (pvht_mcs_map[i] != 0xff) {
for (j = 0; j < 8; j += 2) {
bit_map = (pvht_mcs_map[i] >> j) & 3;
if (bit_map != 3)
vht_mcs_rate = MGN_VHT1SS_MCS7 + 10 * j / 2 + i * 40 + bit_map; /* VHT rate indications begin from 0x90 */
}
}
}
/* RTW_INFO("HighestVHTMCSRate is %x\n", vht_mcs_rate); */
return vht_mcs_rate;
}
u8 rtw_vht_mcsmap_to_nss(u8 *pvht_mcs_map)
{
u8 i, j;
u8 bit_map;
u8 nss = 0;
for (i = 0; i < 2; i++) {
if (pvht_mcs_map[i] != 0xff) {
for (j = 0; j < 8; j += 2) {
bit_map = (pvht_mcs_map[i] >> j) & 3;
if (bit_map != 3)
nss++;
}
}
}
/* RTW_INFO("%s : %dSS\n", __func__, nss); */
return nss;
}
void rtw_vht_nss_to_mcsmap(u8 nss, u8 *target_mcs_map, u8 *cur_mcs_map)
{
u8 i, j;
u8 cur_rate, target_rate;
for (i = 0; i < 2; i++) {
target_mcs_map[i] = 0;
for (j = 0; j < 8; j += 2) {
cur_rate = (cur_mcs_map[i] >> j) & 3;
if (cur_rate == 3) /* 0x3 indicates not supported that num of SS */
target_rate = 3;
else if (nss <= ((j / 2) + i * 4))
target_rate = 3;
else
target_rate = cur_rate;
target_mcs_map[i] |= (target_rate << j);
}
}
/* RTW_INFO("%s : %dSS\n", __func__, nss); */
}
u16 rtw_vht_mcs_to_data_rate(u8 bw, u8 short_GI, u8 vht_mcs_rate)
{
if (vht_mcs_rate > MGN_VHT3SS_MCS9)
vht_mcs_rate = MGN_VHT3SS_MCS9;
/* RTW_INFO("bw=%d, short_GI=%d, ((vht_mcs_rate - MGN_VHT1SS_MCS0)&0x3f)=%d\n", bw, short_GI, ((vht_mcs_rate - MGN_VHT1SS_MCS0)&0x3f)); */
return VHT_MCS_DATA_RATE[bw][short_GI][((vht_mcs_rate - MGN_VHT1SS_MCS0) & 0x3f)];
}
void rtw_vht_use_default_setting(_adapter *padapter)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
struct registry_priv *pregistrypriv = &padapter->registrypriv;
BOOLEAN bHwLDPCSupport = _FALSE, bHwSTBCSupport = _FALSE;
#ifdef CONFIG_BEAMFORMING
BOOLEAN bHwSupportBeamformer = _FALSE, bHwSupportBeamformee = _FALSE;
u8 mu_bfer, mu_bfee;
#endif /* CONFIG_BEAMFORMING */
u8 rf_type = 0;
u8 tx_nss, rx_nss;
struct hal_spec_t *hal_spec = GET_HAL_SPEC(padapter);
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
pvhtpriv->sgi_80m = TEST_FLAG(pregistrypriv->short_gi, BIT2) ? _TRUE : _FALSE;
/* LDPC support */
rtw_hal_get_def_var(padapter, HAL_DEF_RX_LDPC, (u8 *)&bHwLDPCSupport);
CLEAR_FLAGS(pvhtpriv->ldpc_cap);
if (bHwLDPCSupport) {
if (TEST_FLAG(pregistrypriv->ldpc_cap, BIT0))
SET_FLAG(pvhtpriv->ldpc_cap, LDPC_VHT_ENABLE_RX);
}
rtw_hal_get_def_var(padapter, HAL_DEF_TX_LDPC, (u8 *)&bHwLDPCSupport);
if (bHwLDPCSupport) {
if (TEST_FLAG(pregistrypriv->ldpc_cap, BIT1))
SET_FLAG(pvhtpriv->ldpc_cap, LDPC_VHT_ENABLE_TX);
}
if (pvhtpriv->ldpc_cap)
RTW_INFO("[VHT] Support LDPC = 0x%02X\n", pvhtpriv->ldpc_cap);
/* STBC */
rtw_hal_get_def_var(padapter, HAL_DEF_TX_STBC, (u8 *)&bHwSTBCSupport);
CLEAR_FLAGS(pvhtpriv->stbc_cap);
if (bHwSTBCSupport) {
if (TEST_FLAG(pregistrypriv->stbc_cap, BIT1))
SET_FLAG(pvhtpriv->stbc_cap, STBC_VHT_ENABLE_TX);
}
rtw_hal_get_def_var(padapter, HAL_DEF_RX_STBC, (u8 *)&bHwSTBCSupport);
if (bHwSTBCSupport) {
if (TEST_FLAG(pregistrypriv->stbc_cap, BIT0))
SET_FLAG(pvhtpriv->stbc_cap, STBC_VHT_ENABLE_RX);
}
if (pvhtpriv->stbc_cap)
RTW_INFO("[VHT] Support STBC = 0x%02X\n", pvhtpriv->stbc_cap);
/* Beamforming setting */
CLEAR_FLAGS(pvhtpriv->beamform_cap);
#ifdef CONFIG_BEAMFORMING
rtw_hal_get_def_var(padapter, HAL_DEF_EXPLICIT_BEAMFORMER, (u8 *)&bHwSupportBeamformer);
rtw_hal_get_def_var(padapter, HAL_DEF_EXPLICIT_BEAMFORMEE, (u8 *)&bHwSupportBeamformee);
mu_bfer = _FALSE;
mu_bfee = _FALSE;
rtw_hal_get_def_var(padapter, HAL_DEF_VHT_MU_BEAMFORMER, &mu_bfer);
rtw_hal_get_def_var(padapter, HAL_DEF_VHT_MU_BEAMFORMEE, &mu_bfee);
if (TEST_FLAG(pregistrypriv->beamform_cap, BIT0) && bHwSupportBeamformer) {
#ifdef CONFIG_CONCURRENT_MODE
if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE) {
SET_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE);
RTW_INFO("[VHT] CONCURRENT AP Support Beamformer\n");
if (TEST_FLAG(pregistrypriv->beamform_cap, BIT(2))
&& (_TRUE == mu_bfer)) {
SET_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_MU_MIMO_AP_ENABLE);
RTW_INFO("[VHT] Support MU-MIMO AP\n");
}
} else
RTW_INFO("[VHT] CONCURRENT not AP ;not allow Support Beamformer\n");
#else
SET_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE);
RTW_INFO("[VHT] Support Beamformer\n");
if (TEST_FLAG(pregistrypriv->beamform_cap, BIT(2))
&& (_TRUE == mu_bfer)
&& ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE)) {
SET_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_MU_MIMO_AP_ENABLE);
RTW_INFO("[VHT] Support MU-MIMO AP\n");
}
#endif
}
if (TEST_FLAG(pregistrypriv->beamform_cap, BIT1) && bHwSupportBeamformee) {
SET_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE);
RTW_INFO("[VHT] Support Beamformee\n");
if (TEST_FLAG(pregistrypriv->beamform_cap, BIT(3))
&& (_TRUE == mu_bfee)
&& ((pmlmeinfo->state & 0x03) != WIFI_FW_AP_STATE)) {
SET_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_MU_MIMO_STA_ENABLE);
RTW_INFO("[VHT] Support MU-MIMO STA\n");
}
}
#endif /* CONFIG_BEAMFORMING */
pvhtpriv->ampdu_len = pregistrypriv->ampdu_factor;
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
tx_nss = rtw_min(rf_type_to_rf_tx_cnt(rf_type), hal_spec->tx_nss_num);
rx_nss = rtw_min(rf_type_to_rf_rx_cnt(rf_type), hal_spec->rx_nss_num);
/* for now, vhtpriv.vht_mcs_map comes from RX NSS */
rtw_vht_nss_to_mcsmap(rx_nss, pvhtpriv->vht_mcs_map, pregistrypriv->vht_rx_mcs_map);
pvhtpriv->vht_highest_rate = rtw_get_vht_highest_rate(pvhtpriv->vht_mcs_map);
}
u64 rtw_vht_mcs_map_to_bitmap(u8 *mcs_map, u8 nss)
{
u8 i, j, tmp;
u64 bitmap = 0;
u8 bits_nss = nss * 2;
for (i = j = 0; i < bits_nss; i += 2, j += 10) {
/* every two bits means single sptial stream */
tmp = (mcs_map[i / 8] >> i) & 3;
switch (tmp) {
case 2:
bitmap = bitmap | (0x03ff << j);
break;
case 1:
bitmap = bitmap | (0x01ff << j);
break;
case 0:
bitmap = bitmap | (0x00ff << j);
break;
default:
break;
}
}
RTW_INFO("vht_mcs_map=%02x %02x, nss=%u => bitmap=%016llx\n"
, mcs_map[0], mcs_map[1], nss, bitmap);
return bitmap;
}
void update_sta_vht_info_apmode(_adapter *padapter, PVOID sta)
{
struct sta_info *psta = (struct sta_info *)sta;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct vht_priv *pvhtpriv_ap = &pmlmepriv->vhtpriv;
struct vht_priv *pvhtpriv_sta = &psta->vhtpriv;
struct ht_priv *phtpriv_sta = &psta->htpriv;
u8 cur_ldpc_cap = 0, cur_stbc_cap = 0, bw_mode = 0;
u16 cur_beamform_cap = 0;
u8 *pcap_mcs;
if (pvhtpriv_sta->vht_option == _FALSE)
return;
bw_mode = GET_VHT_OPERATING_MODE_FIELD_CHNL_WIDTH(&pvhtpriv_sta->vht_op_mode_notify);
/* if (bw_mode > psta->bw_mode) */
psta->bw_mode = bw_mode;
/* B4 Rx LDPC */
if (TEST_FLAG(pvhtpriv_ap->ldpc_cap, LDPC_VHT_ENABLE_TX) &&
GET_VHT_CAPABILITY_ELE_RX_LDPC(pvhtpriv_sta->vht_cap)) {
SET_FLAG(cur_ldpc_cap, (LDPC_VHT_ENABLE_TX | LDPC_VHT_CAP_TX));
RTW_INFO("Current STA(%d) VHT LDPC = %02X\n", psta->aid, cur_ldpc_cap);
}
pvhtpriv_sta->ldpc_cap = cur_ldpc_cap;
if (psta->bw_mode > pmlmeext->cur_bwmode)
psta->bw_mode = pmlmeext->cur_bwmode;
if (psta->bw_mode == CHANNEL_WIDTH_80) {
/* B5 Short GI for 80 MHz */
pvhtpriv_sta->sgi_80m = (GET_VHT_CAPABILITY_ELE_SHORT_GI80M(pvhtpriv_sta->vht_cap) & pvhtpriv_ap->sgi_80m) ? _TRUE : _FALSE;
/* RTW_INFO("Current STA ShortGI80MHz = %d\n", pvhtpriv_sta->sgi_80m); */
} else if (psta->bw_mode >= CHANNEL_WIDTH_160) {
/* B5 Short GI for 80 MHz */
pvhtpriv_sta->sgi_80m = (GET_VHT_CAPABILITY_ELE_SHORT_GI160M(pvhtpriv_sta->vht_cap) & pvhtpriv_ap->sgi_80m) ? _TRUE : _FALSE;
/* RTW_INFO("Current STA ShortGI160MHz = %d\n", pvhtpriv_sta->sgi_80m); */
}
/* B8 B9 B10 Rx STBC */
if (TEST_FLAG(pvhtpriv_ap->stbc_cap, STBC_VHT_ENABLE_TX) &&
GET_VHT_CAPABILITY_ELE_RX_STBC(pvhtpriv_sta->vht_cap)) {
SET_FLAG(cur_stbc_cap, (STBC_VHT_ENABLE_TX | STBC_VHT_CAP_TX));
RTW_INFO("Current STA(%d) VHT STBC = %02X\n", psta->aid, cur_stbc_cap);
}
pvhtpriv_sta->stbc_cap = cur_stbc_cap;
#ifdef CONFIG_BEAMFORMING
/* B11 SU Beamformer Capable, the target supports Beamformer and we are Beamformee */
if (TEST_FLAG(pvhtpriv_ap->beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE) &&
GET_VHT_CAPABILITY_ELE_SU_BFEE(pvhtpriv_sta->vht_cap)) {
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE);
/*Shift to BEAMFORMING_VHT_BEAMFORMER_STS_CAP*/
SET_FLAG(cur_beamform_cap, GET_VHT_CAPABILITY_ELE_SU_BFEE_STS_CAP(pvhtpriv_sta->vht_cap) << 8);
}
/* B12 SU Beamformee Capable, the target supports Beamformee and we are Beamformer */
if (TEST_FLAG(pvhtpriv_ap->beamform_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE) &&
GET_VHT_CAPABILITY_ELE_SU_BFER(pvhtpriv_sta->vht_cap)) {
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE);
/*Shit to BEAMFORMING_VHT_BEAMFORMEE_SOUND_DIM*/
SET_FLAG(cur_beamform_cap, GET_VHT_CAPABILITY_ELE_SU_BFER_SOUND_DIM_NUM(pvhtpriv_sta->vht_cap) << 12);
}
pvhtpriv_sta->beamform_cap = cur_beamform_cap;
if (cur_beamform_cap)
RTW_INFO("Current STA(%d) VHT Beamforming Setting = %02X\n", psta->aid, cur_beamform_cap);
#endif
/* B23 B24 B25 Maximum A-MPDU Length Exponent */
pvhtpriv_sta->ampdu_len = GET_VHT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pvhtpriv_sta->vht_cap);
pcap_mcs = GET_VHT_CAPABILITY_ELE_RX_MCS(pvhtpriv_sta->vht_cap);
_rtw_memcpy(pvhtpriv_sta->vht_mcs_map, pcap_mcs, 2);
pvhtpriv_sta->vht_highest_rate = rtw_get_vht_highest_rate(pvhtpriv_sta->vht_mcs_map);
}
void update_hw_vht_param(_adapter *padapter)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
u8 ht_AMPDU_len;
ht_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03;
if (pvhtpriv->ampdu_len > ht_AMPDU_len)
rtw_hal_set_hwreg(padapter, HW_VAR_AMPDU_FACTOR, (u8 *)(&pvhtpriv->ampdu_len));
}
void VHT_caps_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
{
struct hal_spec_t *hal_spec = GET_HAL_SPEC(padapter);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
u8 cur_ldpc_cap = 0, cur_stbc_cap = 0, rf_type = RF_1T1R, tx_nss = 0;
u16 cur_beamform_cap = 0;
u8 *pcap_mcs;
if (pIE == NULL)
return;
if (pvhtpriv->vht_option == _FALSE)
return;
pmlmeinfo->VHT_enable = 1;
/* B4 Rx LDPC */
if (TEST_FLAG(pvhtpriv->ldpc_cap, LDPC_VHT_ENABLE_TX) &&
GET_VHT_CAPABILITY_ELE_RX_LDPC(pIE->data)) {
SET_FLAG(cur_ldpc_cap, (LDPC_VHT_ENABLE_TX | LDPC_VHT_CAP_TX));
RTW_INFO("Current VHT LDPC Setting = %02X\n", cur_ldpc_cap);
}
pvhtpriv->ldpc_cap = cur_ldpc_cap;
/* B5 Short GI for 80 MHz */
pvhtpriv->sgi_80m = (GET_VHT_CAPABILITY_ELE_SHORT_GI80M(pIE->data) & pvhtpriv->sgi_80m) ? _TRUE : _FALSE;
/* RTW_INFO("Current ShortGI80MHz = %d\n", pvhtpriv->sgi_80m); */
/* B8 B9 B10 Rx STBC */
if (TEST_FLAG(pvhtpriv->stbc_cap, STBC_VHT_ENABLE_TX) &&
GET_VHT_CAPABILITY_ELE_RX_STBC(pIE->data)) {
SET_FLAG(cur_stbc_cap, (STBC_VHT_ENABLE_TX | STBC_VHT_CAP_TX));
RTW_INFO("Current VHT STBC Setting = %02X\n", cur_stbc_cap);
}
pvhtpriv->stbc_cap = cur_stbc_cap;
#ifdef CONFIG_BEAMFORMING
#ifdef RTW_BEAMFORMING_VERSION_2
/*
* B11 SU Beamformer Capable,
* the target supports Beamformer and we are Beamformee
*/
if (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE)
&& GET_VHT_CAPABILITY_ELE_SU_BFER(pIE->data)) {
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE);
/* Shift to BEAMFORMING_VHT_BEAMFORMEE_STS_CAP */
SET_FLAG(cur_beamform_cap, GET_VHT_CAPABILITY_ELE_SU_BFEE_STS_CAP(pIE->data) << 8);
/*
* B19 MU Beamformer Capable,
* the target supports Beamformer and we are Beamformee
*/
if (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_MU_MIMO_STA_ENABLE)
&& GET_VHT_CAPABILITY_ELE_MU_BFER(pIE->data))
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_MU_MIMO_STA_ENABLE);
}
/*
* B12 SU Beamformee Capable,
* the target supports Beamformee and we are Beamformer
*/
if (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE)
&& GET_VHT_CAPABILITY_ELE_SU_BFEE(pIE->data)) {
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE);
/* Shit to BEAMFORMING_VHT_BEAMFORMER_SOUND_DIM */
SET_FLAG(cur_beamform_cap, GET_VHT_CAPABILITY_ELE_SU_BFER_SOUND_DIM_NUM(pIE->data) << 12);
/*
* B20 MU Beamformee Capable,
* the target supports Beamformee and we are Beamformer
*/
if (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_MU_MIMO_AP_ENABLE)
&& GET_VHT_CAPABILITY_ELE_MU_BFEE(pIE->data))
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_MU_MIMO_AP_ENABLE);
}
pvhtpriv->beamform_cap = cur_beamform_cap;
RTW_INFO("Current VHT Beamforming Setting=0x%04X\n", cur_beamform_cap);
#else /* !RTW_BEAMFORMING_VERSION_2 */
/* B11 SU Beamformer Capable, the target supports Beamformer and we are Beamformee */
if (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE) &&
GET_VHT_CAPABILITY_ELE_SU_BFEE(pIE->data)) {
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE);
/*Shift to BEAMFORMING_VHT_BEAMFORMER_STS_CAP*/
SET_FLAG(cur_beamform_cap, GET_VHT_CAPABILITY_ELE_SU_BFEE_STS_CAP(pIE->data) << 8);
}
/* B12 SU Beamformee Capable, the target supports Beamformee and we are Beamformer */
if (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE) &&
GET_VHT_CAPABILITY_ELE_SU_BFER(pIE->data)) {
SET_FLAG(cur_beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE);
/*Shit to BEAMFORMING_VHT_BEAMFORMEE_SOUND_DIM*/
SET_FLAG(cur_beamform_cap, GET_VHT_CAPABILITY_ELE_SU_BFER_SOUND_DIM_NUM(pIE->data) << 12);
}
pvhtpriv->beamform_cap = cur_beamform_cap;
if (cur_beamform_cap)
RTW_INFO("Current VHT Beamforming Setting = %02X\n", cur_beamform_cap);
#endif /* !RTW_BEAMFORMING_VERSION_2 */
#endif /* CONFIG_BEAMFORMING */
/* B23 B24 B25 Maximum A-MPDU Length Exponent */
pvhtpriv->ampdu_len = GET_VHT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pIE->data);
pcap_mcs = GET_VHT_CAPABILITY_ELE_RX_MCS(pIE->data);
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
tx_nss = rtw_min(rf_type_to_rf_tx_cnt(rf_type), hal_spec->tx_nss_num);
rtw_vht_nss_to_mcsmap(tx_nss, pvhtpriv->vht_mcs_map, pcap_mcs);
pvhtpriv->vht_highest_rate = rtw_get_vht_highest_rate(pvhtpriv->vht_mcs_map);
}
void VHT_operation_handler(_adapter *padapter, PNDIS_802_11_VARIABLE_IEs pIE)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
if (pIE == NULL)
return;
if (pvhtpriv->vht_option == _FALSE)
return;
}
void rtw_process_vht_op_mode_notify(_adapter *padapter, u8 *pframe, PVOID sta)
{
struct sta_info *psta = (struct sta_info *)sta;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct registry_priv *regsty = adapter_to_regsty(padapter);
u8 target_bw;
u8 target_rxss, current_rxss;
u8 update_ra = _FALSE;
if (pvhtpriv->vht_option == _FALSE)
return;
target_bw = GET_VHT_OPERATING_MODE_FIELD_CHNL_WIDTH(pframe);
target_rxss = (GET_VHT_OPERATING_MODE_FIELD_RX_NSS(pframe) + 1);
if (target_bw != psta->bw_mode) {
if (hal_is_bw_support(padapter, target_bw)
&& REGSTY_IS_BW_5G_SUPPORT(regsty, target_bw)
) {
update_ra = _TRUE;
psta->bw_mode = target_bw;
}
}
current_rxss = rtw_vht_mcsmap_to_nss(psta->vhtpriv.vht_mcs_map);
if (target_rxss != current_rxss) {
u8 vht_mcs_map[2] = {};
update_ra = _TRUE;
rtw_vht_nss_to_mcsmap(target_rxss, vht_mcs_map, psta->vhtpriv.vht_mcs_map);
_rtw_memcpy(psta->vhtpriv.vht_mcs_map, vht_mcs_map, 2);
rtw_hal_update_sta_rate_mask(padapter, psta);
}
if (update_ra)
rtw_dm_ra_mask_wk_cmd(padapter, (u8 *)psta);
}
u32 rtw_build_vht_operation_ie(_adapter *padapter, u8 *pbuf, u8 channel)
{
struct registry_priv *pregistrypriv = &padapter->registrypriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
/* struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; */
u8 ChnlWidth, center_freq, bw_mode;
u32 len = 0;
u8 operation[5];
_rtw_memset(operation, 0, 5);
bw_mode = REGSTY_BW_5G(pregistrypriv); /* TODO: control op bw with other info */
if (hal_chk_bw_cap(padapter, BW_CAP_80M | BW_CAP_160M)
&& REGSTY_BW_5G(pregistrypriv) >= CHANNEL_WIDTH_80
) {
center_freq = rtw_get_center_ch(channel, bw_mode, HAL_PRIME_CHNL_OFFSET_LOWER);
ChnlWidth = 1;
} else {
center_freq = 0;
ChnlWidth = 0;
}
SET_VHT_OPERATION_ELE_CHL_WIDTH(operation, ChnlWidth);
/* center frequency */
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ1(operation, center_freq);/* Todo: need to set correct center channel */
SET_VHT_OPERATION_ELE_CHL_CENTER_FREQ2(operation, 0);
_rtw_memcpy(operation + 3, pvhtpriv->vht_mcs_map, 2);
rtw_set_ie(pbuf, EID_VHTOperation, 5, operation, &len);
return len;
}
u32 rtw_build_vht_op_mode_notify_ie(_adapter *padapter, u8 *pbuf, u8 bw)
{
/* struct registry_priv *pregistrypriv = &padapter->registrypriv; */
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
u32 len = 0;
u8 opmode = 0;
u8 chnl_width, rx_nss;
chnl_width = bw;
rx_nss = rtw_vht_mcsmap_to_nss(pvhtpriv->vht_mcs_map);
SET_VHT_OPERATING_MODE_FIELD_CHNL_WIDTH(&opmode, chnl_width);
SET_VHT_OPERATING_MODE_FIELD_RX_NSS(&opmode, (rx_nss - 1));
SET_VHT_OPERATING_MODE_FIELD_RX_NSS_TYPE(&opmode, 0); /* Todo */
pvhtpriv->vht_op_mode_notify = opmode;
pbuf = rtw_set_ie(pbuf, EID_OpModeNotification, 1, &opmode, &len);
return len;
}
u32 rtw_build_vht_cap_ie(_adapter *padapter, u8 *pbuf)
{
u8 bw, rf_type, rf_num, rx_stbc_nss = 0;
u16 HighestRate;
u8 *pcap, *pcap_mcs;
u32 len = 0;
u32 rx_packet_offset, max_recvbuf_sz;
struct registry_priv *pregistrypriv = &padapter->registrypriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
pcap = pvhtpriv->vht_cap;
_rtw_memset(pcap, 0, 32);
/* B0 B1 Maximum MPDU Length */
rtw_hal_get_def_var(padapter, HAL_DEF_RX_PACKET_OFFSET, &rx_packet_offset);
rtw_hal_get_def_var(padapter, HAL_DEF_MAX_RECVBUF_SZ, &max_recvbuf_sz);
RTW_DBG("%s, line%d, Available RX buf size = %d bytes\n.", __func__, __LINE__, max_recvbuf_sz - rx_packet_offset);
if ((max_recvbuf_sz - rx_packet_offset) >= 11454) {
SET_VHT_CAPABILITY_ELE_MAX_MPDU_LENGTH(pcap, 2);
RTW_INFO("%s, line%d, Set MAX MPDU len = 11454 bytes\n.", __func__, __LINE__);
} else if ((max_recvbuf_sz - rx_packet_offset) >= 7991) {
SET_VHT_CAPABILITY_ELE_MAX_MPDU_LENGTH(pcap, 1);
RTW_INFO("%s, line%d, Set MAX MPDU len = 7991 bytes\n.", __func__, __LINE__);
} else if ((max_recvbuf_sz - rx_packet_offset) >= 3895) {
SET_VHT_CAPABILITY_ELE_MAX_MPDU_LENGTH(pcap, 0);
RTW_INFO("%s, line%d, Set MAX MPDU len = 3895 bytes\n.", __func__, __LINE__);
} else
RTW_ERR("%s, line%d, Error!! Available RX buf size < 3895 bytes\n.", __func__, __LINE__);
/* B2 B3 Supported Channel Width Set */
if (hal_chk_bw_cap(padapter, BW_CAP_160M) && REGSTY_IS_BW_5G_SUPPORT(pregistrypriv, CHANNEL_WIDTH_160)) {
if (hal_chk_bw_cap(padapter, BW_CAP_80_80M) && REGSTY_IS_BW_5G_SUPPORT(pregistrypriv, CHANNEL_WIDTH_80_80))
SET_VHT_CAPABILITY_ELE_CHL_WIDTH(pcap, 2);
else
SET_VHT_CAPABILITY_ELE_CHL_WIDTH(pcap, 1);
} else
SET_VHT_CAPABILITY_ELE_CHL_WIDTH(pcap, 0);
/* B4 Rx LDPC */
if (TEST_FLAG(pvhtpriv->ldpc_cap, LDPC_VHT_ENABLE_RX)) {
SET_VHT_CAPABILITY_ELE_RX_LDPC(pcap, 1);
RTW_INFO("[VHT] Declare supporting RX LDPC\n");
}
/* B5 ShortGI for 80MHz */
SET_VHT_CAPABILITY_ELE_SHORT_GI80M(pcap, pvhtpriv->sgi_80m ? 1 : 0); /* We can receive Short GI of 80M */
if (pvhtpriv->sgi_80m)
RTW_INFO("[VHT] Declare supporting SGI 80MHz\n");
/* B6 ShortGI for 160MHz */
/* SET_VHT_CAPABILITY_ELE_SHORT_GI160M(pcap, pvhtpriv->sgi_80m? 1 : 0); */
/* B7 Tx STBC */
if (TEST_FLAG(pvhtpriv->stbc_cap, STBC_VHT_ENABLE_TX)) {
SET_VHT_CAPABILITY_ELE_TX_STBC(pcap, 1);
RTW_INFO("[VHT] Declare supporting TX STBC\n");
}
/* B8 B9 B10 Rx STBC */
if (TEST_FLAG(pvhtpriv->stbc_cap, STBC_VHT_ENABLE_RX)) {
rtw_hal_get_def_var(padapter, HAL_DEF_RX_STBC, (u8 *)(&rx_stbc_nss));
SET_VHT_CAPABILITY_ELE_RX_STBC(pcap, rx_stbc_nss);
RTW_INFO("[VHT] Declare supporting RX STBC = %d\n", rx_stbc_nss);
}
/* B11 SU Beamformer Capable */
if (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMER_ENABLE)) {
SET_VHT_CAPABILITY_ELE_SU_BFER(pcap, 1);
RTW_INFO("[VHT] Declare supporting SU Bfer\n");
/* B16 17 18 Number of Sounding Dimensions */
rtw_hal_get_def_var(padapter, HAL_DEF_BEAMFORMER_CAP, (u8 *)&rf_num);
SET_VHT_CAPABILITY_ELE_SOUNDING_DIMENSIONS(pcap, rf_num);
/* B19 MU Beamformer Capable */
if (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_MU_MIMO_AP_ENABLE)) {
SET_VHT_CAPABILITY_ELE_MU_BFER(pcap, 1);
RTW_INFO("[VHT] Declare supporting MU Bfer\n");
}
}
/* B12 SU Beamformee Capable */
if (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_BEAMFORMEE_ENABLE)) {
SET_VHT_CAPABILITY_ELE_SU_BFEE(pcap, 1);
RTW_INFO("[VHT] Declare supporting SU Bfee\n");
/* B13 14 15 Compressed Steering Number of Beamformer Antennas Supported */
rtw_hal_get_def_var(padapter, HAL_DEF_BEAMFORMEE_CAP, (u8 *)&rf_num);
SET_VHT_CAPABILITY_ELE_BFER_ANT_SUPP(pcap, rf_num);
/* B20 SU Beamformee Capable */
if (TEST_FLAG(pvhtpriv->beamform_cap, BEAMFORMING_VHT_MU_MIMO_STA_ENABLE)) {
SET_VHT_CAPABILITY_ELE_MU_BFEE(pcap, 1);
RTW_INFO("[VHT] Declare supporting MU Bfee\n");
}
}
/* B21 VHT TXOP PS */
SET_VHT_CAPABILITY_ELE_TXOP_PS(pcap, 0);
/* B22 +HTC-VHT Capable */
SET_VHT_CAPABILITY_ELE_HTC_VHT(pcap, 1);
/* B23 24 25 Maximum A-MPDU Length Exponent */
if (pregistrypriv->ampdu_factor != 0xFE)
SET_VHT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pcap, pregistrypriv->ampdu_factor);
else
SET_VHT_CAPABILITY_ELE_MAX_RXAMPDU_FACTOR(pcap, 7);
/* B26 27 VHT Link Adaptation Capable */
SET_VHT_CAPABILITY_ELE_LINK_ADAPTION(pcap, 0);
pcap_mcs = GET_VHT_CAPABILITY_ELE_RX_MCS(pcap);
_rtw_memcpy(pcap_mcs, pvhtpriv->vht_mcs_map, 2);
pcap_mcs = GET_VHT_CAPABILITY_ELE_TX_MCS(pcap);
_rtw_memcpy(pcap_mcs, pvhtpriv->vht_mcs_map, 2);
/* find the largest bw supported by both registry and hal */
bw = hal_largest_bw(padapter, REGSTY_BW_5G(pregistrypriv));
HighestRate = VHT_MCS_DATA_RATE[bw][pvhtpriv->sgi_80m][((pvhtpriv->vht_highest_rate - MGN_VHT1SS_MCS0) & 0x3f)];
HighestRate = (HighestRate + 1) >> 1;
SET_VHT_CAPABILITY_ELE_MCS_RX_HIGHEST_RATE(pcap, HighestRate); /* indicate we support highest rx rate is 600Mbps. */
SET_VHT_CAPABILITY_ELE_MCS_TX_HIGHEST_RATE(pcap, HighestRate); /* indicate we support highest tx rate is 600Mbps. */
pbuf = rtw_set_ie(pbuf, EID_VHTCapability, 12, pcap, &len);
return len;
}
u32 rtw_restructure_vht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, uint in_len, uint *pout_len)
{
u32 ielen = 0, out_len = 0;
u8 cap_len = 0, notify_len = 0, notify_bw = 0, operation_bw = 0, supported_chnl_width = 0;
u8 *p, *pframe;
struct registry_priv *pregistrypriv = &padapter->registrypriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
rtw_vht_use_default_setting(padapter);
p = rtw_get_ie(in_ie + 12, EID_VHTCapability, &ielen, in_len - 12);
if (p && ielen > 0) {
supported_chnl_width = GET_VHT_CAPABILITY_ELE_CHL_WIDTH(p + 2);
/* VHT Capabilities element */
cap_len = rtw_build_vht_cap_ie(padapter, out_ie + *pout_len);
*pout_len += cap_len;
/* Get HT BW */
p = rtw_get_ie(in_ie + 12, _HT_EXTRA_INFO_IE_, &ielen, in_len - 12);
if (p && ielen > 0) {
struct HT_info_element *pht_info = (struct HT_info_element *)(p + 2);
if (pht_info->infos[0] & BIT(2))
operation_bw = CHANNEL_WIDTH_40;
else
operation_bw = CHANNEL_WIDTH_20;
}
/* VHT Operation element */
p = rtw_get_ie(in_ie + 12, EID_VHTOperation, &ielen, in_len - 12);
if (p && ielen > 0) {
out_len = *pout_len;
if (GET_VHT_OPERATION_ELE_CHL_WIDTH(p + 2) >= 1) {
if (supported_chnl_width == 2)
operation_bw = CHANNEL_WIDTH_80_80;
else if (supported_chnl_width == 1)
operation_bw = CHANNEL_WIDTH_160;
else
operation_bw = CHANNEL_WIDTH_80;
}
pframe = rtw_set_ie(out_ie + out_len, EID_VHTOperation, ielen, p + 2 , pout_len);
}
/* find the largest bw supported by both registry and hal */
notify_bw = hal_largest_bw(padapter, REGSTY_BW_5G(pregistrypriv));
if (notify_bw > operation_bw)
notify_bw = operation_bw;
/* Operating Mode Notification element */
notify_len = rtw_build_vht_op_mode_notify_ie(padapter, out_ie + *pout_len, notify_bw);
*pout_len += notify_len;
pvhtpriv->vht_option = _TRUE;
}
return pvhtpriv->vht_option;
}
void VHTOnAssocRsp(_adapter *padapter)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct vht_priv *pvhtpriv = &pmlmepriv->vhtpriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
u8 ht_AMPDU_len;
RTW_INFO("%s\n", __func__);
if (!pmlmeinfo->HT_enable)
return;
if (!pmlmeinfo->VHT_enable)
return;
ht_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03;
if (pvhtpriv->ampdu_len > ht_AMPDU_len)
rtw_hal_set_hwreg(padapter, HW_VAR_AMPDU_FACTOR, (u8 *)(&pvhtpriv->ampdu_len));
rtw_hal_set_hwreg(padapter, HW_VAR_AMPDU_MAX_TIME, (u8 *)(&pvhtpriv->vht_highest_rate));
}
#endif /* CONFIG_80211AC_VHT */

View file

@ -116,12 +116,6 @@ static s8 rtw_get_tx_nss(_adapter *adapter, struct sta_info *psta)
if (RF_TYPE_VALID(custom_rf_type)) if (RF_TYPE_VALID(custom_rf_type))
rf_type = custom_rf_type; rf_type = custom_rf_type;
#ifdef CONFIG_80211AC_VHT
if (psta->vhtpriv.vht_option) {
nss = rtw_min(rf_type_to_rf_tx_cnt(rf_type), hal_spec->tx_nss_num);
nss = rtw_min(nss, rtw_vht_mcsmap_to_nss(psta->vhtpriv.vht_mcs_map));
} else
#endif /* CONFIG_80211AC_VHT */
if (psta->htpriv.ht_option) { if (psta->htpriv.ht_option) {
nss = rtw_min(rf_type_to_rf_tx_cnt(rf_type), hal_spec->tx_nss_num); nss = rtw_min(rf_type_to_rf_tx_cnt(rf_type), hal_spec->tx_nss_num);
nss = rtw_min(nss, rtw_ht_mcsset_to_nss(psta->htpriv.ht_cap.supp_mcs_set)); nss = rtw_min(nss, rtw_ht_mcsset_to_nss(psta->htpriv.ht_cap.supp_mcs_set));
@ -219,50 +213,15 @@ u8 networktype_to_raid_ex(_adapter *adapter, struct sta_info *psta)
RTW_INFO("tx_nss error!(tx_nss=%d)\n", tx_nss); RTW_INFO("tx_nss error!(tx_nss=%d)\n", tx_nss);
} }
break; break;
#ifdef CONFIG_80211AC_VHT
case WIRELESS_11_5AC:
if (tx_nss == 1)
raid = RATEID_IDX_VHT_1SS;
else if (tx_nss == 2)
raid = RATEID_IDX_VHT_2SS;
else if (tx_nss == 3)
raid = RATEID_IDX_VHT_3SS;
else
RTW_INFO("tx_nss error!(tx_nss=%d)\n", tx_nss);
break;
case WIRELESS_11_24AC:
if (psta->bw_mode >= CHANNEL_WIDTH_80) {
if (tx_nss == 1)
raid = RATEID_IDX_VHT_1SS;
else if (tx_nss == 2)
raid = RATEID_IDX_VHT_2SS;
else if (tx_nss == 3)
raid = RATEID_IDX_VHT_3SS;
else
RTW_INFO("tx_nss error!(tx_nss=%d)\n", tx_nss);
} else {
if (tx_nss == 1)
raid = RATEID_IDX_MIX1;
else if (tx_nss == 2)
raid = RATEID_IDX_MIX2;
else if (tx_nss == 3)
raid = RATEID_IDX_VHT_3SS;
else
RTW_INFO("tx_nss error!(tx_nss=%d)\n", tx_nss);
}
break;
#endif
default: default:
RTW_INFO("unexpected wireless mode!(psta->wireless_mode=%x)\n", psta->wireless_mode); RTW_INFO("unexpected wireless mode!(psta->wireless_mode=%x)\n", psta->wireless_mode);
break; break;
} }
/* RTW_INFO("psta->wireless_mode=%x, tx_nss=%d\n", psta->wireless_mode, tx_nss); */
return raid; return raid;
} }
#endif #endif
u8 judge_network_type(_adapter *padapter, unsigned char *rate, int ratelen) u8 judge_network_type(_adapter *padapter, unsigned char *rate, int ratelen)
{ {
@ -2232,15 +2191,6 @@ void update_ldpc_stbc_cap(struct sta_info *psta)
{ {
#ifdef CONFIG_80211N_HT #ifdef CONFIG_80211N_HT
#ifdef CONFIG_80211AC_VHT
if (psta->vhtpriv.vht_option) {
if (TEST_FLAG(psta->vhtpriv.ldpc_cap, LDPC_VHT_ENABLE_TX))
psta->ldpc = 1;
if (TEST_FLAG(psta->vhtpriv.stbc_cap, STBC_VHT_ENABLE_TX))
psta->stbc = 1;
} else
#endif /* CONFIG_80211AC_VHT */
if (psta->htpriv.ht_option) { if (psta->htpriv.ht_option) {
if (TEST_FLAG(psta->htpriv.ldpc_cap, LDPC_HT_ENABLE_TX)) if (TEST_FLAG(psta->htpriv.ldpc_cap, LDPC_HT_ENABLE_TX))
psta->ldpc = 1; psta->ldpc = 1;
@ -2251,7 +2201,6 @@ void update_ldpc_stbc_cap(struct sta_info *psta)
psta->ldpc = 0; psta->ldpc = 0;
psta->stbc = 0; psta->stbc = 0;
} }
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */
} }
@ -2718,11 +2667,6 @@ void update_beacon_info(_adapter *padapter, u8 *pframe, uint pkt_len, struct sta
/* HT_info_handler(padapter, pIE); */ /* HT_info_handler(padapter, pIE); */
bwmode_update_check(padapter, pIE); bwmode_update_check(padapter, pIE);
break; break;
#ifdef CONFIG_80211AC_VHT
case EID_OpModeNotification:
rtw_process_vht_op_mode_notify(padapter, pIE->data, psta);
break;
#endif /* CONFIG_80211AC_VHT */
case _ERPINFO_IE_: case _ERPINFO_IE_:
ERP_IE_handler(padapter, pIE); ERP_IE_handler(padapter, pIE);
VCS_update(padapter, psta); VCS_update(padapter, psta);

View file

@ -683,10 +683,6 @@ u8 query_ra_short_GI(struct sta_info *psta, u8 bw)
u8 sgi = _FALSE, sgi_20m = _FALSE, sgi_40m = _FALSE, sgi_80m = _FALSE; u8 sgi = _FALSE, sgi_20m = _FALSE, sgi_40m = _FALSE, sgi_80m = _FALSE;
#ifdef CONFIG_80211N_HT #ifdef CONFIG_80211N_HT
#ifdef CONFIG_80211AC_VHT
if (psta->vhtpriv.vht_option)
sgi_80m = psta->vhtpriv.sgi_80m;
#endif
sgi_20m = psta->htpriv.sgi_20m; sgi_20m = psta->htpriv.sgi_20m;
sgi_40m = psta->htpriv.sgi_40m; sgi_40m = psta->htpriv.sgi_40m;
#endif #endif

View file

@ -1838,12 +1838,6 @@ void rtw_hal_update_sta_rate_mask(PADAPTER padapter, struct sta_info *psta)
#ifdef CONFIG_80211N_HT #ifdef CONFIG_80211N_HT
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type)); rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
tx_nss = rtw_min(rf_type_to_rf_tx_cnt(rf_type), hal_spec->tx_nss_num); tx_nss = rtw_min(rf_type_to_rf_tx_cnt(rf_type), hal_spec->tx_nss_num);
#ifdef CONFIG_80211AC_VHT
if (psta->vhtpriv.vht_option) {
/* AC mode ra_bitmap */
tx_ra_bitmap |= (rtw_vht_mcs_map_to_bitmap(psta->vhtpriv.vht_mcs_map, tx_nss) << 12);
} else
#endif /* CONFIG_80211AC_VHT */
if (psta->htpriv.ht_option) { if (psta->htpriv.ht_option) {
/* n mode ra_bitmap */ /* n mode ra_bitmap */

View file

@ -868,14 +868,8 @@ static s8 phydm_rssi_report(struct PHY_DM_STRUCT *p_dm_odm, u8 mac_id)
if (tx_bf_en) if (tx_bf_en)
STBC_TX = 0; STBC_TX = 0;
else {
#ifdef CONFIG_80211AC_VHT
if (is_supported_vht(p_entry->wireless_mode))
STBC_TX = TEST_FLAG(p_entry->vhtpriv.stbc_cap, STBC_VHT_ENABLE_TX);
else else
#endif
STBC_TX = TEST_FLAG(p_entry->htpriv.stbc_cap, STBC_HT_ENABLE_TX); STBC_TX = TEST_FLAG(p_entry->htpriv.stbc_cap, STBC_HT_ENABLE_TX);
}
h2c_parameter[0] = (u8)(p_entry->mac_id & 0xFF); h2c_parameter[0] = (u8)(p_entry->mac_id & 0xFF);
h2c_parameter[2] = p_entry->rssi_stat.undecorated_smoothed_pwdb & 0x7F; h2c_parameter[2] = p_entry->rssi_stat.undecorated_smoothed_pwdb & 0x7F;

View file

@ -58,10 +58,6 @@ typedef struct _ADAPTER _adapter, ADAPTER, *PADAPTER;
#include <rtw_ht.h> #include <rtw_ht.h>
#endif #endif
#ifdef CONFIG_80211AC_VHT
#include <rtw_vht.h>
#endif
#ifdef CONFIG_INTEL_WIDI #ifdef CONFIG_INTEL_WIDI
#include <rtw_intel_widi.h> #include <rtw_intel_widi.h>
#endif #endif
@ -249,12 +245,6 @@ struct registry_priv {
u8 beamformee_rf_num; u8 beamformee_rf_num;
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */
#ifdef CONFIG_80211AC_VHT
u8 vht_enable; /* 0:disable, 1:enable, 2:auto */
u8 ampdu_factor;
u8 vht_rx_mcs_map[2];
#endif /* CONFIG_80211AC_VHT */
u8 lowrate_two_xmit; u8 lowrate_two_xmit;
u8 rf_config ; u8 rf_config ;

View file

@ -664,9 +664,6 @@ struct mlme_priv {
#endif #endif
#ifdef CONFIG_80211AC_VHT
struct vht_priv vhtpriv;
#endif
#ifdef CONFIG_BEAMFORMING #ifdef CONFIG_BEAMFORMING
#ifndef RTW_BEAMFORMING_VERSION_2 #ifndef RTW_BEAMFORMING_VERSION_2
#if (BEAMFORMING_SUPPORT == 0)/*for driver beamforming*/ #if (BEAMFORMING_SUPPORT == 0)/*for driver beamforming*/

View file

@ -244,19 +244,12 @@ bool rtw_chbw_to_freq_range(u8 ch, u8 bw, u8 offset, u32 *hi, u32 *lo);
struct country_chplan { struct country_chplan {
char alpha2[2]; char alpha2[2];
u8 chplan; u8 chplan;
#ifdef CONFIG_80211AC_VHT
u8 en_11ac;
#endif
#if RTW_DEF_MODULE_REGULATORY_CERT #if RTW_DEF_MODULE_REGULATORY_CERT
u8 def_module_flags; /* RTW_MODULE_RTLXXX */ u8 def_module_flags; /* RTW_MODULE_RTLXXX */
#endif #endif
}; };
#ifdef CONFIG_80211AC_VHT
#define COUNTRY_CHPLAN_EN_11AC(_ent) ((_ent)->en_11ac)
#else
#define COUNTRY_CHPLAN_EN_11AC(_ent) 0 #define COUNTRY_CHPLAN_EN_11AC(_ent) 0
#endif
#if RTW_DEF_MODULE_REGULATORY_CERT #if RTW_DEF_MODULE_REGULATORY_CERT
#define COUNTRY_CHPLAN_DEF_MODULE_FALGS(_ent) ((_ent)->def_module_flags) #define COUNTRY_CHPLAN_DEF_MODULE_FALGS(_ent) ((_ent)->def_module_flags)

View file

@ -329,10 +329,6 @@ struct sta_info {
struct ht_priv htpriv; struct ht_priv htpriv;
#endif #endif
#ifdef CONFIG_80211AC_VHT
struct vht_priv vhtpriv;
#endif
/* Notes: */ /* Notes: */
/* STA_Mode: */ /* STA_Mode: */
/* curr_network(mlme_priv/security_priv/qos/ht) + sta_info: (STA & AP) CAP/INFO */ /* curr_network(mlme_priv/security_priv/qos/ht) + sta_info: (STA & AP) CAP/INFO */

View file

@ -450,12 +450,6 @@ static inline char *iwe_stream_protocol_process(_adapter *padapter,
if (p && ht_ielen > 0) if (p && ht_ielen > 0)
ht_cap = _TRUE; ht_cap = _TRUE;
#ifdef CONFIG_80211AC_VHT
/* parsing VHT_CAP_IE */
p = rtw_get_ie(&pnetwork->network.IEs[ie_offset], EID_VHTCapability, &vht_ielen, pnetwork->network.IELength - ie_offset);
if (p && vht_ielen > 0)
vht_cap = _TRUE;
#endif
/* Add the protocol name */ /* Add the protocol name */
iwe->cmd = SIOCGIWNAME; iwe->cmd = SIOCGIWNAME;
if ((rtw_is_cckratesonly_included((u8 *)&pnetwork->network.SupportedRates)) == _TRUE) { if ((rtw_is_cckratesonly_included((u8 *)&pnetwork->network.SupportedRates)) == _TRUE) {
@ -470,17 +464,10 @@ static inline char *iwe_stream_protocol_process(_adapter *padapter,
snprintf(iwe->u.name, IFNAMSIZ, "IEEE 802.11bg"); snprintf(iwe->u.name, IFNAMSIZ, "IEEE 802.11bg");
} else { } else {
if (pnetwork->network.Configuration.DSConfig > 14) { if (pnetwork->network.Configuration.DSConfig > 14) {
#ifdef CONFIG_80211AC_VHT
if (vht_cap == _TRUE)
snprintf(iwe->u.name, IFNAMSIZ, "IEEE 802.11AC");
else
#endif
{
if (ht_cap == _TRUE) if (ht_cap == _TRUE)
snprintf(iwe->u.name, IFNAMSIZ, "IEEE 802.11an"); snprintf(iwe->u.name, IFNAMSIZ, "IEEE 802.11an");
else else
snprintf(iwe->u.name, IFNAMSIZ, "IEEE 802.11a"); snprintf(iwe->u.name, IFNAMSIZ, "IEEE 802.11a");
}
} else { } else {
if (ht_cap == _TRUE) if (ht_cap == _TRUE)
snprintf(iwe->u.name, IFNAMSIZ, "IEEE 802.11gn"); snprintf(iwe->u.name, IFNAMSIZ, "IEEE 802.11gn");
@ -517,26 +504,6 @@ static inline char *iwe_stream_rate_process(_adapter *padapter,
short_GI = (le16_to_cpu(pht_capie->cap_info) & (IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40)) ? 1 : 0; short_GI = (le16_to_cpu(pht_capie->cap_info) & (IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40)) ? 1 : 0;
} }
#ifdef CONFIG_80211AC_VHT
/* parsing VHT_CAP_IE */
p = rtw_get_ie(&pnetwork->network.IEs[ie_offset], EID_VHTCapability, &vht_ielen, pnetwork->network.IELength - ie_offset);
if (p && vht_ielen > 0) {
u8 mcs_map[2];
vht_cap = _TRUE;
bw_160MHz = GET_VHT_CAPABILITY_ELE_CHL_WIDTH(p + 2);
if (bw_160MHz)
short_GI = GET_VHT_CAPABILITY_ELE_SHORT_GI160M(p + 2);
else
short_GI = GET_VHT_CAPABILITY_ELE_SHORT_GI80M(p + 2);
_rtw_memcpy(mcs_map, GET_VHT_CAPABILITY_ELE_TX_MCS(p + 2), 2);
vht_highest_rate = rtw_get_vht_highest_rate(mcs_map);
vht_data_rate = rtw_vht_mcs_to_data_rate(CHANNEL_WIDTH_80, short_GI, vht_highest_rate);
}
#endif
/*Add basic and extended rates */ /*Add basic and extended rates */
p = custom; p = custom;
p += snprintf(p, MAX_CUSTOM_LEN - (p - custom), " Rates (Mb/s): "); p += snprintf(p, MAX_CUSTOM_LEN - (p - custom), " Rates (Mb/s): ");
@ -548,11 +515,6 @@ static inline char *iwe_stream_rate_process(_adapter *padapter,
"%d%s ", rate >> 1, (rate & 1) ? ".5" : ""); "%d%s ", rate >> 1, (rate & 1) ? ".5" : "");
i++; i++;
} }
#ifdef CONFIG_80211AC_VHT
if (vht_cap == _TRUE)
max_rate = vht_data_rate;
else
#endif
if (ht_cap == _TRUE) { if (ht_cap == _TRUE) {
if (mcs_rate & 0x8000) /* MCS15 */ if (mcs_rate & 0x8000) /* MCS15 */
max_rate = (bw_40MHz) ? ((short_GI) ? 300 : 270) : ((short_GI) ? 144 : 130); max_rate = (bw_40MHz) ? ((short_GI) ? 300 : 270) : ((short_GI) ? 144 : 130);
@ -804,7 +766,6 @@ static inline char *iwe_stream_net_rsv_process(_adapter *padapter,
return start; return start;
} }
#if 1
static char *translate_scan(_adapter *padapter, static char *translate_scan(_adapter *padapter,
struct iw_request_info *info, struct wlan_network *pnetwork, struct iw_request_info *info, struct wlan_network *pnetwork,
char *start, char *stop) char *start, char *stop)
@ -837,374 +798,6 @@ static char *translate_scan(_adapter *padapter,
return start; return start;
} }
#else
static char *translate_scan(_adapter *padapter,
struct iw_request_info *info, struct wlan_network *pnetwork,
char *start, char *stop)
{
struct iw_event iwe;
u16 cap;
u32 ht_ielen = 0, vht_ielen = 0;
char custom[MAX_CUSTOM_LEN];
char *p;
u16 max_rate = 0, rate, ht_cap = _FALSE, vht_cap = _FALSE;
u32 i = 0;
char *current_val;
long rssi;
u8 bw_40MHz = 0, short_GI = 0, bw_160MHz = 0, vht_highest_rate = 0;
u16 mcs_rate = 0, vht_data_rate = 0;
u8 ie_offset = (pnetwork->network.Reserved[0] == 2 ? 0 : 12);
struct registry_priv *pregpriv = &padapter->registrypriv;
if (_FALSE == search_p2p_wfd_ie(padapter, info, pnetwork, start, stop))
return start;
/* AP MAC address */
iwe.cmd = SIOCGIWAP;
iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
_rtw_memcpy(iwe.u.ap_addr.sa_data, pnetwork->network.MacAddress, ETH_ALEN);
start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_ADDR_LEN);
/* Add the ESSID */
iwe.cmd = SIOCGIWESSID;
iwe.u.data.flags = 1;
iwe.u.data.length = min((u16)pnetwork->network.Ssid.SsidLength, (u16)32);
start = iwe_stream_add_point(info, start, stop, &iwe, pnetwork->network.Ssid.Ssid);
/* parsing HT_CAP_IE */
if (pnetwork->network.Reserved[0] == 2) /* Probe Request */
p = rtw_get_ie(&pnetwork->network.IEs[0], _HT_CAPABILITY_IE_, &ht_ielen, pnetwork->network.IELength);
else
p = rtw_get_ie(&pnetwork->network.IEs[12], _HT_CAPABILITY_IE_, &ht_ielen, pnetwork->network.IELength - 12);
if (p && ht_ielen > 0) {
struct rtw_ieee80211_ht_cap *pht_capie;
ht_cap = _TRUE;
pht_capie = (struct rtw_ieee80211_ht_cap *)(p + 2);
_rtw_memcpy(&mcs_rate , pht_capie->supp_mcs_set, 2);
bw_40MHz = (pht_capie->cap_info & IEEE80211_HT_CAP_SUP_WIDTH) ? 1 : 0;
short_GI = (pht_capie->cap_info & (IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_SGI_40)) ? 1 : 0;
}
#ifdef CONFIG_80211AC_VHT
/* parsing VHT_CAP_IE */
p = rtw_get_ie(&pnetwork->network.IEs[ie_offset], EID_VHTCapability, &vht_ielen, pnetwork->network.IELength - ie_offset);
if (p && vht_ielen > 0) {
u8 mcs_map[2];
vht_cap = _TRUE;
bw_160MHz = GET_VHT_CAPABILITY_ELE_CHL_WIDTH(p + 2);
if (bw_160MHz)
short_GI = GET_VHT_CAPABILITY_ELE_SHORT_GI160M(p + 2);
else
short_GI = GET_VHT_CAPABILITY_ELE_SHORT_GI80M(p + 2);
_rtw_memcpy(mcs_map, GET_VHT_CAPABILITY_ELE_TX_MCS(p + 2), 2);
vht_highest_rate = rtw_get_vht_highest_rate(mcs_map);
vht_data_rate = rtw_vht_mcs_to_data_rate(CHANNEL_WIDTH_80, short_GI, vht_highest_rate);
}
#endif
/* Add the protocol name */
iwe.cmd = SIOCGIWNAME;
if ((rtw_is_cckratesonly_included((u8 *)&pnetwork->network.SupportedRates)) == _TRUE) {
if (ht_cap == _TRUE)
snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11bn");
else
snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11b");
} else if ((rtw_is_cckrates_included((u8 *)&pnetwork->network.SupportedRates)) == _TRUE) {
if (ht_cap == _TRUE)
snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11bgn");
else
snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11bg");
} else {
if (pnetwork->network.Configuration.DSConfig > 14) {
if (vht_cap == _TRUE)
snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11AC");
else if (ht_cap == _TRUE)
snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11an");
else
snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11a");
} else {
if (ht_cap == _TRUE)
snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11gn");
else
snprintf(iwe.u.name, IFNAMSIZ, "IEEE 802.11g");
}
}
start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_CHAR_LEN);
/* Add mode */
if (pnetwork->network.Reserved[0] == 2) /* Probe Request */
cap = 0;
else {
iwe.cmd = SIOCGIWMODE;
_rtw_memcpy((u8 *)&cap, rtw_get_capability_from_ie(pnetwork->network.IEs), 2);
cap = le16_to_cpu(cap);
}
if (cap & (WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_BSS)) {
if (cap & WLAN_CAPABILITY_BSS)
iwe.u.mode = IW_MODE_MASTER;
else
iwe.u.mode = IW_MODE_ADHOC;
start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_UINT_LEN);
}
if (pnetwork->network.Configuration.DSConfig < 1 /*|| pnetwork->network.Configuration.DSConfig>14*/)
pnetwork->network.Configuration.DSConfig = 1;
/* Add frequency/channel */
iwe.cmd = SIOCGIWFREQ;
iwe.u.freq.m = rtw_ch2freq(pnetwork->network.Configuration.DSConfig) * 100000;
iwe.u.freq.e = 1;
iwe.u.freq.i = pnetwork->network.Configuration.DSConfig;
start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_FREQ_LEN);
/* Add encryption capability */
iwe.cmd = SIOCGIWENCODE;
if (cap & WLAN_CAPABILITY_PRIVACY)
iwe.u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY;
else
iwe.u.data.flags = IW_ENCODE_DISABLED;
iwe.u.data.length = 0;
start = iwe_stream_add_point(info, start, stop, &iwe, pnetwork->network.Ssid.Ssid);
/*Add basic and extended rates */
max_rate = 0;
p = custom;
p += snprintf(p, MAX_CUSTOM_LEN - (p - custom), " Rates (Mb/s): ");
while (pnetwork->network.SupportedRates[i] != 0) {
rate = pnetwork->network.SupportedRates[i] & 0x7F;
if (rate > max_rate)
max_rate = rate;
p += snprintf(p, MAX_CUSTOM_LEN - (p - custom),
"%d%s ", rate >> 1, (rate & 1) ? ".5" : "");
i++;
}
if (vht_cap == _TRUE)
max_rate = vht_data_rate;
else if (ht_cap == _TRUE) {
if (mcs_rate & 0x8000) /* MCS15 */
max_rate = (bw_40MHz) ? ((short_GI) ? 300 : 270) : ((short_GI) ? 144 : 130);
else if (mcs_rate & 0x0080) /* MCS7 */
max_rate = (bw_40MHz) ? ((short_GI) ? 150 : 135) : ((short_GI) ? 72 : 65);
else { /* default MCS7 */
/* RTW_INFO("wx_get_scan, mcs_rate_bitmap=0x%x\n", mcs_rate); */
max_rate = (bw_40MHz) ? ((short_GI) ? 150 : 135) : ((short_GI) ? 72 : 65);
}
max_rate = max_rate * 2; /* Mbps/2; */
}
iwe.cmd = SIOCGIWRATE;
iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0;
iwe.u.bitrate.value = max_rate * 500000;
start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_PARAM_LEN);
/* parsing WPA/WPA2 IE */
if (pnetwork->network.Reserved[0] != 2) { /* Probe Request */
u8 buf[MAX_WPA_IE_LEN * 2];
u8 wpa_ie[255], rsn_ie[255];
u16 wpa_len = 0, rsn_len = 0;
u8 *p;
sint out_len = 0;
out_len = rtw_get_sec_ie(pnetwork->network.IEs , pnetwork->network.IELength, rsn_ie, &rsn_len, wpa_ie, &wpa_len);
if (wpa_len > 0) {
p = buf;
_rtw_memset(buf, 0, MAX_WPA_IE_LEN * 2);
p += sprintf(p, "wpa_ie=");
for (i = 0; i < wpa_len; i++)
p += sprintf(p, "%02x", wpa_ie[i]);
if (wpa_len > 100) {
printk("-----------------Len %d----------------\n", wpa_len);
for (i = 0; i < wpa_len; i++)
printk("%02x ", wpa_ie[i]);
printk("\n");
printk("-----------------Len %d----------------\n", wpa_len);
}
_rtw_memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVCUSTOM;
iwe.u.data.length = strlen(buf);
start = iwe_stream_add_point(info, start, stop, &iwe, buf);
_rtw_memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVGENIE;
iwe.u.data.length = wpa_len;
start = iwe_stream_add_point(info, start, stop, &iwe, wpa_ie);
}
if (rsn_len > 0) {
p = buf;
_rtw_memset(buf, 0, MAX_WPA_IE_LEN * 2);
p += sprintf(p, "rsn_ie=");
for (i = 0; i < rsn_len; i++)
p += sprintf(p, "%02x", rsn_ie[i]);
_rtw_memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVCUSTOM;
iwe.u.data.length = strlen(buf);
start = iwe_stream_add_point(info, start, stop, &iwe, buf);
_rtw_memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVGENIE;
iwe.u.data.length = rsn_len;
start = iwe_stream_add_point(info, start, stop, &iwe, rsn_ie);
}
}
{ /* parsing WPS IE */
uint cnt = 0, total_ielen;
u8 *wpsie_ptr = NULL;
uint wps_ielen = 0;
u8 *ie_ptr = pnetwork->network.IEs + ie_offset;
total_ielen = pnetwork->network.IELength - ie_offset;
if (pnetwork->network.Reserved[0] == 2) { /* Probe Request */
ie_ptr = pnetwork->network.IEs;
total_ielen = pnetwork->network.IELength;
} else { /* Beacon or Probe Respones */
ie_ptr = pnetwork->network.IEs + _FIXED_IE_LENGTH_;
total_ielen = pnetwork->network.IELength - _FIXED_IE_LENGTH_;
}
while (cnt < total_ielen) {
if (rtw_is_wps_ie(&ie_ptr[cnt], &wps_ielen) && (wps_ielen > 2)) {
wpsie_ptr = &ie_ptr[cnt];
iwe.cmd = IWEVGENIE;
iwe.u.data.length = (u16)wps_ielen;
start = iwe_stream_add_point(info, start, stop, &iwe, wpsie_ptr);
}
cnt += ie_ptr[cnt + 1] + 2; /* goto next */
}
}
#ifdef CONFIG_WAPI_SUPPORT
if (pnetwork->network.Reserved[0] != 2) { /* Probe Request */
sint out_len_wapi = 0;
/* here use static for stack size */
static u8 buf_wapi[MAX_WAPI_IE_LEN * 2];
static u8 wapi_ie[MAX_WAPI_IE_LEN];
u16 wapi_len = 0;
u16 i;
_rtw_memset(buf_wapi, 0, MAX_WAPI_IE_LEN);
_rtw_memset(wapi_ie, 0, MAX_WAPI_IE_LEN);
out_len_wapi = rtw_get_wapi_ie(pnetwork->network.IEs , pnetwork->network.IELength, wapi_ie, &wapi_len);
RTW_INFO("rtw_wx_get_scan: %s ", pnetwork->network.Ssid.Ssid);
RTW_INFO("rtw_wx_get_scan: ssid = %d ", wapi_len);
if (wapi_len > 0) {
p = buf_wapi;
_rtw_memset(buf_wapi, 0, MAX_WAPI_IE_LEN * 2);
p += sprintf(p, "wapi_ie=");
for (i = 0; i < wapi_len; i++)
p += sprintf(p, "%02x", wapi_ie[i]);
_rtw_memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVCUSTOM;
iwe.u.data.length = strlen(buf_wapi);
start = iwe_stream_add_point(info, start, stop, &iwe, buf_wapi);
_rtw_memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVGENIE;
iwe.u.data.length = wapi_len;
start = iwe_stream_add_point(info, start, stop, &iwe, wapi_ie);
}
}
#endif
{
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
u8 ss, sq;
/* Add quality statistics */
iwe.cmd = IWEVQUAL;
iwe.u.qual.updated = IW_QUAL_QUAL_UPDATED | IW_QUAL_LEVEL_UPDATED
#if defined(CONFIG_SIGNAL_DISPLAY_DBM) && defined(CONFIG_BACKGROUND_NOISE_MONITOR)
| IW_QUAL_NOISE_UPDATED
#else
| IW_QUAL_NOISE_INVALID
#endif
#ifdef CONFIG_SIGNAL_DISPLAY_DBM
| IW_QUAL_DBM
#endif
;
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE &&
is_same_network(&pmlmepriv->cur_network.network, &pnetwork->network, 0)) {
ss = padapter->recvpriv.signal_strength;
sq = padapter->recvpriv.signal_qual;
} else {
ss = pnetwork->network.PhyInfo.SignalStrength;
sq = pnetwork->network.PhyInfo.SignalQuality;
}
#ifdef CONFIG_SIGNAL_DISPLAY_DBM
iwe.u.qual.level = (u8) translate_percentage_to_dbm(ss); /* dbm */
#else
#ifdef CONFIG_SIGNAL_SCALE_MAPPING
iwe.u.qual.level = (u8)ss; /* % */
#else
{
/* Do signal scale mapping when using percentage as the unit of signal strength, since the scale mapping is skipped in odm */
HAL_DATA_TYPE *pHal = GET_HAL_DATA(padapter);
iwe.u.qual.level = (u8)odm_signal_scale_mapping(&pHal->odmpriv, ss);
}
#endif
#endif
iwe.u.qual.qual = (u8)sq; /* signal quality */
#ifdef CONFIG_PLATFORM_ROCKCHIPS
iwe.u.qual.noise = -100; /* noise level suggest by zhf@rockchips */
#else
#if defined(CONFIG_SIGNAL_DISPLAY_DBM) && defined(CONFIG_BACKGROUND_NOISE_MONITOR)
{
s16 tmp_noise = 0;
rtw_hal_get_odm_var(padapter, HAL_ODM_NOISE_MONITOR, &(pnetwork->network.Configuration.DSConfig), &(tmp_noise));
iwe.u.qual.noise = tmp_noise ;
}
#else
iwe.u.qual.noise = 0; /* noise level */
#endif
#endif /* CONFIG_PLATFORM_ROCKCHIPS */
/* RTW_INFO("iqual=%d, ilevel=%d, inoise=%d, iupdated=%d\n", iwe.u.qual.qual, iwe.u.qual.level , iwe.u.qual.noise, iwe.u.qual.updated); */
start = iwe_stream_add_event(info, start, stop, &iwe, IW_EV_QUAL_LEN);
}
{
u8 buf[MAX_WPA_IE_LEN];
u8 *p, *pos;
int len;
p = buf;
pos = pnetwork->network.Reserved;
_rtw_memset(buf, 0, MAX_WPA_IE_LEN);
p += sprintf(p, "fm=%02X%02X", pos[1], pos[0]);
_rtw_memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVCUSTOM;
iwe.u.data.length = strlen(buf);
start = iwe_stream_add_point(info, start, stop, &iwe, buf);
}
return start;
}
#endif
static int wpa_set_auth_algs(struct net_device *dev, u32 value) static int wpa_set_auth_algs(struct net_device *dev, u32 value)
{ {
@ -1677,11 +1270,6 @@ static int rtw_wx_get_name(struct net_device *dev,
if (p && ht_ielen > 0) if (p && ht_ielen > 0)
ht_cap = _TRUE; ht_cap = _TRUE;
#ifdef CONFIG_80211AC_VHT
if (pmlmepriv->vhtpriv.vht_option == _TRUE)
vht_cap = _TRUE;
#endif
prates = &pcur_bss->SupportedRates; prates = &pcur_bss->SupportedRates;
if (rtw_is_cckratesonly_included((u8 *)prates) == _TRUE) { if (rtw_is_cckratesonly_included((u8 *)prates) == _TRUE) {
@ -1696,17 +1284,10 @@ static int rtw_wx_get_name(struct net_device *dev,
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bg"); snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bg");
} else { } else {
if (pcur_bss->Configuration.DSConfig > 14) { if (pcur_bss->Configuration.DSConfig > 14) {
#ifdef CONFIG_80211AC_VHT
if (vht_cap == _TRUE)
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11AC");
else
#endif
{
if (ht_cap == _TRUE) if (ht_cap == _TRUE)
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11an"); snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11an");
else else
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11a"); snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11a");
}
} else { } else {
if (ht_cap == _TRUE) if (ht_cap == _TRUE)
snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11gn"); snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11gn");

View file

@ -147,17 +147,6 @@ static int rtw_bfee_rf_number = 0; /*BeamformeeCapRfNum Rf path number, 0 for a
#endif /* CONFIG_80211N_HT */ #endif /* CONFIG_80211N_HT */
#ifdef CONFIG_80211AC_VHT
static int rtw_vht_enable = 1; /* 0:disable, 1:enable, 2:force auto enable */
module_param(rtw_vht_enable, int, 0644);
static int rtw_ampdu_factor = 7;
static uint rtw_vht_rx_mcs_map = 0xaaaa;
module_param(rtw_vht_rx_mcs_map, uint, 0644);
MODULE_PARM_DESC(rtw_vht_rx_mcs_map, "VHT RX MCS map");
#endif /* CONFIG_80211AC_VHT */
static int rtw_lowrate_two_xmit = 1;/* Use 2 path Tx to transmit MCS0~7 and legacy mode */ static int rtw_lowrate_two_xmit = 1;/* Use 2 path Tx to transmit MCS0~7 and legacy mode */
static int rtw_rf_config = RF_TYPE_AUTO; static int rtw_rf_config = RF_TYPE_AUTO;
@ -756,13 +745,6 @@ uint loadparam(_adapter *padapter)
registry_par->beamformee_rf_num = (u8)rtw_bfee_rf_number; registry_par->beamformee_rf_num = (u8)rtw_bfee_rf_number;
#endif #endif
#ifdef CONFIG_80211AC_VHT
registry_par->vht_enable = (u8)rtw_vht_enable;
registry_par->ampdu_factor = (u8)rtw_ampdu_factor;
registry_par->vht_rx_mcs_map[0] = (u8)(rtw_vht_rx_mcs_map & 0xFF);
registry_par->vht_rx_mcs_map[1] = (u8)((rtw_vht_rx_mcs_map & 0xFF00) >> 8);
#endif
#ifdef CONFIG_TX_EARLY_MODE #ifdef CONFIG_TX_EARLY_MODE
registry_par->early_mode = (u8)rtw_early_mode; registry_par->early_mode = (u8)rtw_early_mode;
#endif #endif