Commit 465095ef authored by Ivan Safonov's avatar Ivan Safonov Committed by Greg Kroah-Hartman

staging:r8188eu: refactor issue_assocreq() - remove rtw_hal_get_hwreg() call

rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value.
Replace the function call with RF_1T1R value and refactor issue_assocreq().
Signed-off-by: default avatarIvan Safonov <insafonov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 06b2775e
...@@ -1027,7 +1027,7 @@ static void issue_assocreq(struct adapter *padapter) ...@@ -1027,7 +1027,7 @@ static void issue_assocreq(struct adapter *padapter)
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
__le16 *fctrl; __le16 *fctrl;
unsigned int i, j, ie_len, index = 0; unsigned int i, j, ie_len, index = 0;
unsigned char rf_type, bssrate[NumRates], sta_bssrate[NumRates]; unsigned char bssrate[NumRates], sta_bssrate[NumRates];
struct ndis_802_11_var_ie *pIE; struct ndis_802_11_var_ie *pIE;
struct registry_priv *pregpriv = &padapter->registrypriv; struct registry_priv *pregpriv = &padapter->registrypriv;
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
...@@ -1150,25 +1150,9 @@ static void issue_assocreq(struct adapter *padapter) ...@@ -1150,25 +1150,9 @@ static void issue_assocreq(struct adapter *padapter)
/* todo: disable SM power save mode */ /* todo: disable SM power save mode */
pmlmeinfo->HT_caps.cap_info |= cpu_to_le16(0x000c); pmlmeinfo->HT_caps.cap_info |= cpu_to_le16(0x000c);
rtw_hal_get_hwreg(padapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
switch (rf_type) {
case RF_1T1R:
if (pregpriv->rx_stbc) if (pregpriv->rx_stbc)
pmlmeinfo->HT_caps.cap_info |= cpu_to_le16(0x0100);/* RX STBC One spatial stream */ pmlmeinfo->HT_caps.cap_info |= cpu_to_le16(0x0100);/* RX STBC One spatial stream */
memcpy((u8 *)&pmlmeinfo->HT_caps.mcs, MCS_rate_1R, 16); memcpy((u8 *)&pmlmeinfo->HT_caps.mcs, MCS_rate_1R, 16);
break;
case RF_2T2R:
case RF_1T2R:
default:
if ((pregpriv->rx_stbc == 0x3) ||/* enable for 2.4/5 GHz */
((pmlmeext->cur_wireless_mode & WIRELESS_11_24N) && (pregpriv->rx_stbc == 0x1)) || /* enable for 2.4GHz */
(pregpriv->wifi_spec == 1)) {
DBG_88E("declare supporting RX STBC\n");
pmlmeinfo->HT_caps.cap_info |= cpu_to_le16(0x0200);/* RX STBC two spatial stream */
}
memcpy(&pmlmeinfo->HT_caps.mcs, MCS_rate_2R, 16);
break;
}
pframe = rtw_set_ie(pframe, _HT_CAPABILITY_IE_, ie_len, (u8 *)(&(pmlmeinfo->HT_caps)), &(pattrib->pktlen)); pframe = rtw_set_ie(pframe, _HT_CAPABILITY_IE_, ie_len, (u8 *)(&(pmlmeinfo->HT_caps)), &(pattrib->pktlen));
} }
} }
......
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