]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging:r8188eu: refactor rtw_get_cur_max_rate() - remove rtw_hal_get_hwreg() call
authorIvan Safonov <insafonov@gmail.com>
Tue, 14 Feb 2017 22:25:27 +0000 (01:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:17:00 +0000 (09:17 +0100)
rtw_hal_get_hwreg(..., HW_VAR_RF_TYPE,...) always return RF_1T1R value.
Replace the function call with RF_1T1R value
and refactor rtw_get_cur_max_rate().

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_ioctl_set.c

index 67508a6cf0e560bf96914912cae4a96557964d4e..d8d88b5f68e5689c75d0ac20bd7f8fd488321a36 100644 (file)
@@ -569,7 +569,6 @@ u16 rtw_get_cur_max_rate(struct adapter *adapter)
        struct registry_priv *pregistrypriv = &adapter->registrypriv;
        struct mlme_priv        *pmlmepriv = &adapter->mlmepriv;
        struct wlan_bssid_ex  *pcur_bss = &pmlmepriv->cur_network.network;
-       u8      rf_type = 0;
        u8      bw_40MHz = 0, short_GI_20 = 0, short_GI_40 = 0;
        u32     ht_ielen = 0;
 
@@ -586,9 +585,8 @@ u16 rtw_get_cur_max_rate(struct adapter *adapter)
                        short_GI_20 = (le16_to_cpu(pmlmeinfo->HT_caps.cap_info) & IEEE80211_HT_CAP_SGI_20) ? 1 : 0;
                        short_GI_40 = (le16_to_cpu(pmlmeinfo->HT_caps.cap_info) & IEEE80211_HT_CAP_SGI_40) ? 1 : 0;
 
-                       rtw_hal_get_hwreg(adapter, HW_VAR_RF_TYPE, (u8 *)(&rf_type));
                        max_rate = rtw_mcs_rate(
-                               rf_type,
+                               RF_1T1R,
                                bw_40MHz & (pregistrypriv->cbw40_enable),
                                short_GI_20,
                                short_GI_40,