staging: rtl8723au: Kill off HW_VAR_INITIAL_GAIN
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 9 Apr 2014 21:20:33 +0000 (23:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Apr 2014 15:29:05 +0000 (08:29 -0700)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_mlme_ext.c
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
drivers/staging/rtl8723au/include/hal_intf.h

index a40bb035187f462fdf2c8b5d2579d1aa59066f35..8757a13086cec16432f42c30cc25d7b66d8759f4 100644 (file)
@@ -7619,7 +7619,6 @@ void site_survey23a(struct rtw_adapter *padapter)
        enum rt_scan_type ScanType = SCAN_PASSIVE;
        struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
-       u32 initialgain = 0;
 #ifdef CONFIG_8723AU_P2P
        struct wifidirect_info *pwdinfo = &padapter->wdinfo;
 
@@ -7719,8 +7718,8 @@ void site_survey23a(struct rtw_adapter *padapter)
                        rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_LISTEN);
                        pmlmeext->sitesurvey_res.state = SCAN_DISABLE;
 
-                       initialgain = 0xff; /* restore RX GAIN */
-                       rtw_hal_set_hwreg23a(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain));
+                       /* restore RX GAIN */
+                       rtl8723a_set_initial_gain(padapter, 0xff);
                        /* turn on dynamic functions */
                        Restore_DM_Func_Flag23a(padapter);
                        /* Switch_DM_Func23a(padapter, DYNAMIC_FUNC_DIG|DYNAMIC_FUNC_HP|DYNAMIC_FUNC_SS, true); */
@@ -7749,8 +7748,8 @@ void site_survey23a(struct rtw_adapter *padapter)
                        /* config MSR */
                        Set_MSR23a(padapter, (pmlmeinfo->state & 0x3));
 
-                       initialgain = 0xff; /* restore RX GAIN */
-                       rtw_hal_set_hwreg23a(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain));
+                       /* restore RX GAIN */
+                       rtl8723a_set_initial_gain(padapter, 0xff);
                        /* turn on dynamic functions */
                        Restore_DM_Func_Flag23a(padapter);
                        /* Switch_DM_Func23a(padapter, DYNAMIC_ALL_FUNC_ENABLE, true); */
@@ -9231,10 +9230,6 @@ u8 createbss_hdl23a(struct rtw_adapter *padapter, u8 *pbuf)
                Save_DM_Func_Flag23a(padapter);
                Switch_DM_Func23a(padapter, DYNAMIC_FUNC_DISABLE, false);
 
-               /* config the initial gain under linking, need to write the BB registers */
-               /* initialgain = 0x1E; */
-               /* rtw_hal_set_hwreg23a(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); */
-
                /* cancel link timer */
                del_timer_sync(&pmlmeext->link_timer);
 
@@ -9366,12 +9361,6 @@ u8 join_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf)
        /* disable dynamic functions, such as high power, DIG */
        /* Switch_DM_Func23a(padapter, DYNAMIC_FUNC_DISABLE, false); */
 
-       /* config the initial gain under linking, need to write the BB
-          registers */
-       /* initialgain = 0x1E; */
-       /* rtw_hal_set_hwreg23a(padapter, HW_VAR_INITIAL_GAIN,
-          (u8 *)(&initialgain)); */
-
        hw_var_set_bssid(padapter, pmlmeinfo->network.MacAddress);
        hw_var_set_mlme_join(padapter, 0);
 
@@ -9562,13 +9551,12 @@ u8 sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf)
 
                /* config the initial gain under scaning, need to
                   write the BB registers */
-               if ((wdev_to_priv(padapter->rtw_wdev))->p2p_enabled == true) {
+               if (wdev_to_priv(padapter->rtw_wdev)->p2p_enabled == true)
                        initialgain = 0x30;
-               else
+               else
                        initialgain = 0x1E;
 
-               rtw_hal_set_hwreg23a(padapter, HW_VAR_INITIAL_GAIN,
-                                 (u8 *)(&initialgain));
+               rtl8723a_set_initial_gain(padapter, initialgain);
 
                /* set MSR to no link state */
                Set_MSR23a(padapter, _HW_STATE_NOLINK_);
index 56c6654d61e045cdece9afe5090988af0e8c5ba3..330289b8889526564f4c8730de06b1604b849d3d 100644 (file)
@@ -3175,9 +3175,6 @@ void SetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val)
                break;
 #endif /* CONFIG_8723AU_P2P */
 
-       case HW_VAR_INITIAL_GAIN:
-               rtl8723a_set_initial_gain(padapter, *val32);
-               break;
        case HW_VAR_EFUSE_BYTES:
                pHalData->EfuseUsedBytes = *((u16 *) val);
                break;
index 01aec72ab77c261856cca896f566f8e99cdd86cb..45d6cfbe87976c177e21ed0e3b571d6a247a922e 100644 (file)
@@ -55,7 +55,6 @@ enum HW_VARIABLES {
        HW_VAR_TDLS_INIT_CH_SEN,
        HW_VAR_TDLS_RS_RCR,
        HW_VAR_TDLS_DONE_CH_SEN,
-       HW_VAR_INITIAL_GAIN,
        HW_VAR_TRIGGER_GPIO_0,
        HW_VAR_BT_SET_COEXIST,
        HW_VAR_BT_ISSUE_DELBA,