Commit 65be27da authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: Use struct ieee80211_ht_cap and associated #defines

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 198e95d5
...@@ -623,15 +623,18 @@ static void update_hw_ht_param(struct rtw_adapter *padapter) ...@@ -623,15 +623,18 @@ static void update_hw_ht_param(struct rtw_adapter *padapter)
AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
AMPDU_para [4:2]:Min MPDU Start Spacing AMPDU_para [4:2]:Min MPDU Start Spacing
*/ */
max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03; max_AMPDU_len = pmlmeinfo->ht_cap.ampdu_params_info &
IEEE80211_HT_AMPDU_PARM_FACTOR;
min_MPDU_spacing = (pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x1c) >> 2; min_MPDU_spacing = (pmlmeinfo->ht_cap.ampdu_params_info &
IEEE80211_HT_AMPDU_PARM_DENSITY) >> 2;
rtl8723a_set_ampdu_min_space(padapter, min_MPDU_spacing); rtl8723a_set_ampdu_min_space(padapter, min_MPDU_spacing);
rtl8723a_set_ampdu_factor(padapter, max_AMPDU_len); rtl8723a_set_ampdu_factor(padapter, max_AMPDU_len);
/* Config SM Power Save setting */ /* Config SM Power Save setting */
pmlmeinfo->SM_PS = (pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info & 0x0C) >> 2; pmlmeinfo->SM_PS = (le16_to_cpu(pmlmeinfo->ht_cap.cap_info) &
IEEE80211_HT_CAP_SM_PS) >> 2;
if (pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC) if (pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC)
DBG_8723A("%s(): WLAN_HT_CAP_SM_PS_STATIC\n", __func__); DBG_8723A("%s(): WLAN_HT_CAP_SM_PS_STATIC\n", __func__);
} }
......
...@@ -399,15 +399,18 @@ u16 rtw_get_cur_max_rate23a(struct rtw_adapter *adapter) ...@@ -399,15 +399,18 @@ u16 rtw_get_cur_max_rate23a(struct rtw_adapter *adapter)
/* short_GI = (pht_capie->cap_info & (IEEE80211_HT_CAP /* short_GI = (pht_capie->cap_info & (IEEE80211_HT_CAP
_SGI_20|IEEE80211_HT_CAP_SGI_40)) ? 1 : 0; */ _SGI_20|IEEE80211_HT_CAP_SGI_40)) ? 1 : 0; */
short_GI_20 = (pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info&IEEE80211_HT_CAP_SGI_20) ? 1:0; short_GI_20 =
short_GI_40 = (pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info&IEEE80211_HT_CAP_SGI_40) ? 1:0; (pmlmeinfo->ht_cap.cap_info &
cpu_to_le16(IEEE80211_HT_CAP_SGI_20)) ? 1:0;
short_GI_40 =
(pmlmeinfo->ht_cap.cap_info &
cpu_to_le16(IEEE80211_HT_CAP_SGI_40)) ? 1:0;
rf_type = rtl8723a_get_rf_type(adapter); rf_type = rtl8723a_get_rf_type(adapter);
max_rate = rtw_mcs_rate23a(rf_type, bw_40MHz & max_rate = rtw_mcs_rate23a(rf_type, bw_40MHz &
pregistrypriv->cbw40_enable, pregistrypriv->cbw40_enable,
short_GI_20, short_GI_40, short_GI_20, short_GI_40,
&pmlmeinfo->HT_caps.u.HT_cap_element.mcs_info &pmlmeinfo->ht_cap.mcs);
);
} }
} else { } else {
while ((pcur_bss->SupportedRates[i] != 0) && while ((pcur_bss->SupportedRates[i] != 0) &&
......
...@@ -2320,7 +2320,8 @@ void rtw_update_ht_cap23a(struct rtw_adapter *padapter, u8 *pie, uint ie_len) ...@@ -2320,7 +2320,8 @@ void rtw_update_ht_cap23a(struct rtw_adapter *padapter, u8 *pie, uint ie_len)
/* update cur_bwmode & cur_ch_offset */ /* update cur_bwmode & cur_ch_offset */
if (pregistrypriv->cbw40_enable && if (pregistrypriv->cbw40_enable &&
pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info & BIT(1) && pmlmeinfo->ht_cap.cap_info &
cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH_20_40) &&
pmlmeinfo->HT_info.infos[0] & BIT(2)) { pmlmeinfo->HT_info.infos[0] & BIT(2)) {
int i; int i;
u8 rf_type; u8 rf_type;
...@@ -2330,9 +2331,11 @@ void rtw_update_ht_cap23a(struct rtw_adapter *padapter, u8 *pie, uint ie_len) ...@@ -2330,9 +2331,11 @@ void rtw_update_ht_cap23a(struct rtw_adapter *padapter, u8 *pie, uint ie_len)
/* update the MCS rates */ /* update the MCS rates */
for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; i++) { for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; i++) {
if (rf_type == RF_1T1R || rf_type == RF_1T2R) if (rf_type == RF_1T1R || rf_type == RF_1T2R)
pmlmeinfo->HT_caps.u.HT_cap_element.mcs_info.rx_mask[i] &= MCS_rate_1R23A[i]; pmlmeinfo->ht_cap.mcs.rx_mask[i] &=
MCS_rate_1R23A[i];
else else
pmlmeinfo->HT_caps.u.HT_cap_element.mcs_info.rx_mask[i] &= MCS_rate_2R23A[i]; pmlmeinfo->ht_cap.mcs.rx_mask[i] &=
MCS_rate_2R23A[i];
} }
/* switch to the 40M Hz mode accoring to the AP */ /* switch to the 40M Hz mode accoring to the AP */
pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_40; pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_40;
...@@ -2356,8 +2359,9 @@ void rtw_update_ht_cap23a(struct rtw_adapter *padapter, u8 *pie, uint ie_len) ...@@ -2356,8 +2359,9 @@ void rtw_update_ht_cap23a(struct rtw_adapter *padapter, u8 *pie, uint ie_len)
/* */ /* */
/* Config SM Power Save setting */ /* Config SM Power Save setting */
/* */ /* */
pmlmeinfo->SM_PS = (pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info & pmlmeinfo->SM_PS =
0x0C) >> 2; (le16_to_cpu(pmlmeinfo->ht_cap.cap_info) &
IEEE80211_HT_CAP_SM_PS) >> IEEE80211_HT_CAP_SM_PS_SHIFT;
if (pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC) if (pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC)
DBG_8723A("%s(): WLAN_HT_CAP_SM_PS_STATIC\n", __func__); DBG_8723A("%s(): WLAN_HT_CAP_SM_PS_STATIC\n", __func__);
......
...@@ -3476,19 +3476,22 @@ static void issue_assocreq(struct rtw_adapter *padapter) ...@@ -3476,19 +3476,22 @@ static void issue_assocreq(struct rtw_adapter *padapter)
p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, pie, pie_len); p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, pie, pie_len);
if (p && !is_ap_in_tkip23a(padapter)) { if (p && !is_ap_in_tkip23a(padapter)) {
memcpy(&pmlmeinfo->HT_caps, p + 2, struct ieee80211_ht_cap *cap = &pmlmeinfo->ht_cap;
sizeof(struct HT_caps_element));
memcpy(cap, p + 2, sizeof(struct ieee80211_ht_cap));
/* to disable 40M Hz support while gd_bw_40MHz_en = 0 */ /* to disable 40M Hz support while gd_bw_40MHz_en = 0 */
if (pregpriv->cbw40_enable == 0) { if (pregpriv->cbw40_enable == 0) {
pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info &= (~(BIT(6) | BIT(1))); cap->cap_info &= ~cpu_to_le16(
IEEE80211_HT_CAP_SGI_40 |
IEEE80211_HT_CAP_SUP_WIDTH_20_40);
} else { } else {
pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info |= BIT(1); cap->cap_info |= cpu_to_le16(
IEEE80211_HT_CAP_SUP_WIDTH_20_40);
} }
/* todo: disable SM power save mode */ /* todo: disable SM power save mode */
pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info |= cap->cap_info |= cpu_to_le16(IEEE80211_HT_CAP_SM_PS);
0x000c;
rf_type = rtl8723a_get_rf_type(padapter); rf_type = rtl8723a_get_rf_type(padapter);
/* switch (pregpriv->rf_config) */ /* switch (pregpriv->rf_config) */
...@@ -3496,9 +3499,9 @@ static void issue_assocreq(struct rtw_adapter *padapter) ...@@ -3496,9 +3499,9 @@ static void issue_assocreq(struct rtw_adapter *padapter)
case RF_1T1R: case RF_1T1R:
/* RX STBC One spatial stream */ /* RX STBC One spatial stream */
if (pregpriv->rx_stbc) if (pregpriv->rx_stbc)
pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info |= cpu_to_le16(0x0100); cap->cap_info |= cpu_to_le16(1 << IEEE80211_HT_CAP_RX_STBC_SHIFT);
memcpy(&pmlmeinfo->HT_caps.u.HT_cap_element.mcs_info, MCS_rate_1R23A, 16); memcpy(&cap->mcs, MCS_rate_1R23A, 16);
break; break;
case RF_2T2R: case RF_2T2R:
...@@ -3517,23 +3520,23 @@ static void issue_assocreq(struct rtw_adapter *padapter) ...@@ -3517,23 +3520,23 @@ static void issue_assocreq(struct rtw_adapter *padapter)
pregpriv->wifi_spec == 1) { pregpriv->wifi_spec == 1) {
DBG_8723A("declare supporting RX " DBG_8723A("declare supporting RX "
"STBC\n"); "STBC\n");
pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info |= cpu_to_le16(0x0200);/* RX STBC two spatial stream */ /* RX STBC two spatial stream */
cap->cap_info |= cpu_to_le16(2 << IEEE80211_HT_CAP_RX_STBC_SHIFT);
} }
memcpy(&pmlmeinfo->HT_caps.u.HT_cap_element.mcs_info, MCS_rate_2R23A, 16); memcpy(&cap->mcs, MCS_rate_2R23A, 16);
break; break;
} }
pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info =
cpu_to_le16(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info);
if (rtl8723a_BT_coexist(padapter) && if (rtl8723a_BT_coexist(padapter) &&
rtl8723a_BT_using_antenna_1(padapter)) { rtl8723a_BT_using_antenna_1(padapter)) {
/* set to 8K */ /* set to 8K */
pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para &= (u8)~IEEE80211_HT_AMPDU_PARM_FACTOR; cap->ampdu_params_info &=
/* pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para |= MAX_AMPDU_FACTOR_8K */ ~IEEE80211_HT_AMPDU_PARM_FACTOR;
/* cap->ampdu_params_info |= MAX_AMPDU_FACTOR_8K */
} }
pframe = rtw_set_ie23a(pframe, WLAN_EID_HT_CAPABILITY, pframe = rtw_set_ie23a(pframe, WLAN_EID_HT_CAPABILITY,
p[1], (u8 *)&pmlmeinfo->HT_caps, p[1], (u8 *)&pmlmeinfo->ht_cap,
&pattrib->pktlen); &pattrib->pktlen);
} }
} }
...@@ -4679,10 +4682,11 @@ int collect_bss_info23a(struct rtw_adapter *padapter, ...@@ -4679,10 +4682,11 @@ int collect_bss_info23a(struct rtw_adapter *padapter,
bssid->IEs + ie_offset, bssid->IEs + ie_offset,
bssid->IELength - ie_offset); bssid->IELength - ie_offset);
if (p && p[1] > 0) { if (p && p[1] > 0) {
struct HT_caps_element *pHT_caps; struct ieee80211_ht_cap *pHT_caps;
pHT_caps = (struct HT_caps_element *)(p + 2); pHT_caps = (struct ieee80211_ht_cap *)(p + 2);
if (pHT_caps->u.HT_cap_element.HT_caps_info & BIT(14)) if (pHT_caps->cap_info &
cpu_to_le16(IEEE80211_HT_CAP_40MHZ_INTOLERANT))
pmlmepriv->num_FortyMHzIntolerant++; pmlmepriv->num_FortyMHzIntolerant++;
} else } else
pmlmepriv->num_sta_no_ht++; pmlmepriv->num_sta_no_ht++;
...@@ -5392,7 +5396,7 @@ void update_sta_info23a(struct rtw_adapter *padapter, struct sta_info *psta) ...@@ -5392,7 +5396,7 @@ void update_sta_info23a(struct rtw_adapter *padapter, struct sta_info *psta)
psta->htpriv.ampdu_enable = pmlmepriv->htpriv.ampdu_enable; psta->htpriv.ampdu_enable = pmlmepriv->htpriv.ampdu_enable;
if (support_short_GI23a(padapter, &pmlmeinfo->HT_caps)) if (support_short_GI23a(padapter, &pmlmeinfo->ht_cap))
psta->htpriv.sgi = true; psta->htpriv.sgi = true;
psta->qos_option = true; psta->qos_option = true;
......
...@@ -720,6 +720,8 @@ void HT_caps_handler23a(struct rtw_adapter *padapter, u8 *p) ...@@ -720,6 +720,8 @@ void HT_caps_handler23a(struct rtw_adapter *padapter, u8 *p)
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct ht_priv *phtpriv = &pmlmepriv->htpriv; struct ht_priv *phtpriv = &pmlmepriv->htpriv;
struct ieee80211_ht_cap *cap;
u8 *dstcap;
if (!p) if (!p)
return; return;
...@@ -729,44 +731,44 @@ void HT_caps_handler23a(struct rtw_adapter *padapter, u8 *p) ...@@ -729,44 +731,44 @@ void HT_caps_handler23a(struct rtw_adapter *padapter, u8 *p)
pmlmeinfo->HT_caps_enable = 1; pmlmeinfo->HT_caps_enable = 1;
cap = &pmlmeinfo->ht_cap;
dstcap = (u8 *)cap;
for (i = 0; i < p[1]; i++) { for (i = 0; i < p[1]; i++) {
if (i != 2) { if (i != 2) {
/* Commented by Albert 2010/07/12 */ dstcap[i] &= p[i + 2];
/* Got the endian issue here. */
pmlmeinfo->HT_caps.u.HT_cap[i] &= p[i + 2];
} else { } else {
/* modify from fw by Thomas 2010/11/17 */ /* modify from fw by Thomas 2010/11/17 */
if ((pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x3) > (p[i + 2] & 0x3)) if ((cap->ampdu_params_info &
max_AMPDU_len = p[i + 2] & 0x3; IEEE80211_HT_AMPDU_PARM_FACTOR) >
(p[i + 2] & IEEE80211_HT_AMPDU_PARM_FACTOR))
max_AMPDU_len = p[i + 2] &
IEEE80211_HT_AMPDU_PARM_FACTOR;
else else
max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x3; max_AMPDU_len = cap->ampdu_params_info &
IEEE80211_HT_AMPDU_PARM_FACTOR;
if ((pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x1c) > (p[i + 2] & 0x1c))
min_MPDU_spacing = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x1c; if ((cap->ampdu_params_info &
IEEE80211_HT_AMPDU_PARM_DENSITY) >
(p[i + 2] & IEEE80211_HT_AMPDU_PARM_DENSITY))
min_MPDU_spacing = cap->ampdu_params_info &
IEEE80211_HT_AMPDU_PARM_DENSITY;
else else
min_MPDU_spacing = p[i + 2] & 0x1c; min_MPDU_spacing = p[i + 2] &
IEEE80211_HT_AMPDU_PARM_DENSITY;
pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para = cap->ampdu_params_info =
max_AMPDU_len | min_MPDU_spacing; max_AMPDU_len | min_MPDU_spacing;
} }
} }
/* Commented by Albert 2010/07/12 */
/* Have to handle the endian issue after copying. */
/* HT_ext_caps didn't be used yet. */
pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info =
le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info);
pmlmeinfo->HT_caps.u.HT_cap_element.HT_ext_caps =
le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_ext_caps);
rf_type = rtl8723a_get_rf_type(padapter); rf_type = rtl8723a_get_rf_type(padapter);
/* update the MCS rates */ /* update the MCS rates */
for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; i++) { for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; i++) {
if (rf_type == RF_1T1R || rf_type == RF_1T2R) if (rf_type == RF_1T1R || rf_type == RF_1T2R)
pmlmeinfo->HT_caps.u.HT_cap_element.mcs_info.rx_mask[i] &= MCS_rate_1R23A[i]; cap->mcs.rx_mask[i] &= MCS_rate_1R23A[i];
else else
pmlmeinfo->HT_caps.u.HT_cap_element.mcs_info.rx_mask[i] &= MCS_rate_2R23A[i]; cap->mcs.rx_mask[i] &= MCS_rate_2R23A[i];
} }
return; return;
} }
...@@ -816,10 +818,12 @@ void HTOnAssocRsp23a(struct rtw_adapter *padapter) ...@@ -816,10 +818,12 @@ void HTOnAssocRsp23a(struct rtw_adapter *padapter)
AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
AMPDU_para [4:2]:Min MPDU Start Spacing AMPDU_para [4:2]:Min MPDU Start Spacing
*/ */
max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03; max_AMPDU_len = pmlmeinfo->ht_cap.ampdu_params_info &
IEEE80211_HT_AMPDU_PARM_FACTOR;
min_MPDU_spacing = min_MPDU_spacing =
(pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x1c) >> 2; (pmlmeinfo->ht_cap.ampdu_params_info &
IEEE80211_HT_AMPDU_PARM_DENSITY) >> 2;
rtl8723a_set_ampdu_min_space(padapter, min_MPDU_spacing); rtl8723a_set_ampdu_min_space(padapter, min_MPDU_spacing);
rtl8723a_set_ampdu_factor(padapter, max_AMPDU_len); rtl8723a_set_ampdu_factor(padapter, max_AMPDU_len);
...@@ -1338,18 +1342,18 @@ unsigned int update_supported_rate23a(unsigned char *ptn, unsigned int ptn_sz) ...@@ -1338,18 +1342,18 @@ unsigned int update_supported_rate23a(unsigned char *ptn, unsigned int ptn_sz)
return mask; return mask;
} }
unsigned int update_MSC_rate23a(struct HT_caps_element *pHT_caps) unsigned int update_MSC_rate23a(struct ieee80211_ht_cap *pHT_caps)
{ {
unsigned int mask = 0; unsigned int mask = 0;
mask = pHT_caps->u.HT_cap_element.mcs_info.rx_mask[0] << 12 | mask = pHT_caps->mcs.rx_mask[0] << 12 |
pHT_caps->u.HT_cap_element.mcs_info.rx_mask[1] << 20; pHT_caps->mcs.rx_mask[1] << 20;
return mask; return mask;
} }
int support_short_GI23a(struct rtw_adapter *padapter, int support_short_GI23a(struct rtw_adapter *padapter,
struct HT_caps_element *pHT_caps) struct ieee80211_ht_cap *pHT_caps)
{ {
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;
...@@ -1361,7 +1365,7 @@ int support_short_GI23a(struct rtw_adapter *padapter, ...@@ -1361,7 +1365,7 @@ int support_short_GI23a(struct rtw_adapter *padapter,
return _FAIL; return _FAIL;
bit_offset = (pmlmeext->cur_bwmode & HT_CHANNEL_WIDTH_40)? 6: 5; bit_offset = (pmlmeext->cur_bwmode & HT_CHANNEL_WIDTH_40)? 6: 5;
if (pHT_caps->u.HT_cap_element.HT_caps_info & (0x1 << bit_offset)) if (pHT_caps->cap_info & cpu_to_le16(0x1 << bit_offset))
return _SUCCESS; return _SUCCESS;
else else
return _FAIL; return _FAIL;
......
...@@ -5871,8 +5871,8 @@ btdm_1AntUpdateHalRAMask(struct rtw_adapter *padapter, u32 mac_id, u32 filter) ...@@ -5871,8 +5871,8 @@ btdm_1AntUpdateHalRAMask(struct rtw_adapter *padapter, u32 mac_id, u32 filter)
mask = update_supported_rate23a(cur_network->SupportedRates, mask = update_supported_rate23a(cur_network->SupportedRates,
supportRateNum); supportRateNum);
mask |= (pmlmeinfo->HT_enable) ? mask |= (pmlmeinfo->HT_enable) ?
update_MSC_rate23a(&pmlmeinfo->HT_caps):0; update_MSC_rate23a(&pmlmeinfo->ht_cap):0;
if (support_short_GI23a(padapter, &pmlmeinfo->HT_caps)) if (support_short_GI23a(padapter, &pmlmeinfo->ht_cap))
shortGIrate = true; shortGIrate = true;
break; break;
case 1:/* for broadcast/multicast */ case 1:/* for broadcast/multicast */
......
...@@ -1532,9 +1532,9 @@ void rtl8723a_update_ramask(struct rtw_adapter *padapter, ...@@ -1532,9 +1532,9 @@ void rtl8723a_update_ramask(struct rtw_adapter *padapter,
mask = update_supported_rate23a(cur_network->SupportedRates, mask = update_supported_rate23a(cur_network->SupportedRates,
supportRateNum); supportRateNum);
mask |= (pmlmeinfo->HT_enable) ? mask |= (pmlmeinfo->HT_enable) ?
update_MSC_rate23a(&pmlmeinfo->HT_caps) : 0; update_MSC_rate23a(&pmlmeinfo->ht_cap) : 0;
if (support_short_GI23a(padapter, &pmlmeinfo->HT_caps)) if (support_short_GI23a(padapter, &pmlmeinfo->ht_cap))
shortGIrate = true; shortGIrate = true;
break; break;
......
...@@ -366,7 +366,7 @@ struct mlme_ext_info ...@@ -366,7 +366,7 @@ struct mlme_ext_info
struct ADDBA_request ADDBA_req; struct ADDBA_request ADDBA_req;
struct WMM_para_element WMM_param; struct WMM_para_element WMM_param;
struct HT_caps_element HT_caps; struct ieee80211_ht_cap ht_cap;
struct HT_info_element HT_info; struct HT_info_element HT_info;
struct wlan_bssid_ex network;/* join network or bss_network, if in ap mode, it is the same to cur_network.network */ struct wlan_bssid_ex network;/* join network or bss_network, if in ap mode, it is the same to cur_network.network */
struct FW_Sta_Info FW_sta_info[NUM_STA]; struct FW_Sta_Info FW_sta_info[NUM_STA];
...@@ -536,7 +536,7 @@ int update_sta_support_rate23a(struct rtw_adapter *padapter, u8* pvar_ie, ...@@ -536,7 +536,7 @@ int update_sta_support_rate23a(struct rtw_adapter *padapter, u8* pvar_ie,
void update_sta_info23a(struct rtw_adapter *padapter, struct sta_info *psta); void update_sta_info23a(struct rtw_adapter *padapter, struct sta_info *psta);
unsigned int update_basic_rate23a(unsigned char *ptn, unsigned int ptn_sz); unsigned int update_basic_rate23a(unsigned char *ptn, unsigned int ptn_sz);
unsigned int update_supported_rate23a(unsigned char *ptn, unsigned int ptn_sz); unsigned int update_supported_rate23a(unsigned char *ptn, unsigned int ptn_sz);
unsigned int update_MSC_rate23a(struct HT_caps_element *pHT_caps); unsigned int update_MSC_rate23a(struct ieee80211_ht_cap *ht_cap);
void Update_RA_Entry23a(struct rtw_adapter *padapter, struct sta_info *psta); void Update_RA_Entry23a(struct rtw_adapter *padapter, struct sta_info *psta);
void set_sta_rate23a(struct rtw_adapter *padapter, struct sta_info *psta); void set_sta_rate23a(struct rtw_adapter *padapter, struct sta_info *psta);
...@@ -545,7 +545,7 @@ int receive_disconnect23a(struct rtw_adapter *padapter, ...@@ -545,7 +545,7 @@ int receive_disconnect23a(struct rtw_adapter *padapter,
unsigned char get_highest_rate_idx23a(u32 mask); unsigned char get_highest_rate_idx23a(u32 mask);
int support_short_GI23a(struct rtw_adapter *padapter, int support_short_GI23a(struct rtw_adapter *padapter,
struct HT_caps_element *pHT_caps); struct ieee80211_ht_cap *ht_cap);
bool is_ap_in_tkip23a(struct rtw_adapter *padapter); bool is_ap_in_tkip23a(struct rtw_adapter *padapter);
bool is_ap_in_wep23a(struct rtw_adapter *padapter); bool is_ap_in_wep23a(struct rtw_adapter *padapter);
bool should_forbid_n_rate23a(struct rtw_adapter *padapter); bool should_forbid_n_rate23a(struct rtw_adapter *padapter);
......
...@@ -76,20 +76,6 @@ struct ieee80211_ht_addt_info { ...@@ -76,20 +76,6 @@ struct ieee80211_ht_addt_info {
unsigned char basic_set[16]; unsigned char basic_set[16];
} __packed; } __packed;
struct HT_caps_element {
union {
struct {
unsigned short HT_caps_info;
unsigned char AMPDU_para;
struct ieee80211_mcs_info mcs_info;
unsigned short HT_ext_caps;
unsigned int Beamforming_caps;
unsigned char ASEL_caps;
} HT_cap_element;
unsigned char HT_cap[26];
} u;
} __packed;
struct HT_info_element { struct HT_info_element {
unsigned char primary_channel; unsigned char primary_channel;
unsigned char infos[5]; unsigned char infos[5];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment