Commit 7c82a2b9 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: Kill off HW_VAR_INITIAL_GAIN

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dce610a7
...@@ -7619,7 +7619,6 @@ void site_survey23a(struct rtw_adapter *padapter) ...@@ -7619,7 +7619,6 @@ void site_survey23a(struct rtw_adapter *padapter)
enum rt_scan_type ScanType = SCAN_PASSIVE; enum rt_scan_type ScanType = SCAN_PASSIVE;
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;
u32 initialgain = 0;
#ifdef CONFIG_8723AU_P2P #ifdef CONFIG_8723AU_P2P
struct wifidirect_info *pwdinfo = &padapter->wdinfo; struct wifidirect_info *pwdinfo = &padapter->wdinfo;
...@@ -7719,8 +7718,8 @@ void site_survey23a(struct rtw_adapter *padapter) ...@@ -7719,8 +7718,8 @@ void site_survey23a(struct rtw_adapter *padapter)
rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_LISTEN); rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_LISTEN);
pmlmeext->sitesurvey_res.state = SCAN_DISABLE; pmlmeext->sitesurvey_res.state = SCAN_DISABLE;
initialgain = 0xff; /* restore RX GAIN */ /* restore RX GAIN */
rtw_hal_set_hwreg23a(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); rtl8723a_set_initial_gain(padapter, 0xff);
/* turn on dynamic functions */ /* turn on dynamic functions */
Restore_DM_Func_Flag23a(padapter); Restore_DM_Func_Flag23a(padapter);
/* Switch_DM_Func23a(padapter, DYNAMIC_FUNC_DIG|DYNAMIC_FUNC_HP|DYNAMIC_FUNC_SS, true); */ /* 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) ...@@ -7749,8 +7748,8 @@ void site_survey23a(struct rtw_adapter *padapter)
/* config MSR */ /* config MSR */
Set_MSR23a(padapter, (pmlmeinfo->state & 0x3)); Set_MSR23a(padapter, (pmlmeinfo->state & 0x3));
initialgain = 0xff; /* restore RX GAIN */ /* restore RX GAIN */
rtw_hal_set_hwreg23a(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); rtl8723a_set_initial_gain(padapter, 0xff);
/* turn on dynamic functions */ /* turn on dynamic functions */
Restore_DM_Func_Flag23a(padapter); Restore_DM_Func_Flag23a(padapter);
/* Switch_DM_Func23a(padapter, DYNAMIC_ALL_FUNC_ENABLE, true); */ /* Switch_DM_Func23a(padapter, DYNAMIC_ALL_FUNC_ENABLE, true); */
...@@ -9231,10 +9230,6 @@ u8 createbss_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) ...@@ -9231,10 +9230,6 @@ u8 createbss_hdl23a(struct rtw_adapter *padapter, u8 *pbuf)
Save_DM_Func_Flag23a(padapter); Save_DM_Func_Flag23a(padapter);
Switch_DM_Func23a(padapter, DYNAMIC_FUNC_DISABLE, false); 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 */ /* cancel link timer */
del_timer_sync(&pmlmeext->link_timer); del_timer_sync(&pmlmeext->link_timer);
...@@ -9366,12 +9361,6 @@ u8 join_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) ...@@ -9366,12 +9361,6 @@ u8 join_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf)
/* disable dynamic functions, such as high power, DIG */ /* disable dynamic functions, such as high power, DIG */
/* Switch_DM_Func23a(padapter, DYNAMIC_FUNC_DISABLE, false); */ /* 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_bssid(padapter, pmlmeinfo->network.MacAddress);
hw_var_set_mlme_join(padapter, 0); hw_var_set_mlme_join(padapter, 0);
...@@ -9562,13 +9551,12 @@ u8 sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf) ...@@ -9562,13 +9551,12 @@ u8 sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf)
/* config the initial gain under scaning, need to /* config the initial gain under scaning, need to
write the BB registers */ 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; initialgain = 0x30;
} else else
initialgain = 0x1E; initialgain = 0x1E;
rtw_hal_set_hwreg23a(padapter, HW_VAR_INITIAL_GAIN, rtl8723a_set_initial_gain(padapter, initialgain);
(u8 *)(&initialgain));
/* set MSR to no link state */ /* set MSR to no link state */
Set_MSR23a(padapter, _HW_STATE_NOLINK_); Set_MSR23a(padapter, _HW_STATE_NOLINK_);
......
...@@ -3175,9 +3175,6 @@ void SetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val) ...@@ -3175,9 +3175,6 @@ void SetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val)
break; break;
#endif /* CONFIG_8723AU_P2P */ #endif /* CONFIG_8723AU_P2P */
case HW_VAR_INITIAL_GAIN:
rtl8723a_set_initial_gain(padapter, *val32);
break;
case HW_VAR_EFUSE_BYTES: case HW_VAR_EFUSE_BYTES:
pHalData->EfuseUsedBytes = *((u16 *) val); pHalData->EfuseUsedBytes = *((u16 *) val);
break; break;
......
...@@ -55,7 +55,6 @@ enum HW_VARIABLES { ...@@ -55,7 +55,6 @@ enum HW_VARIABLES {
HW_VAR_TDLS_INIT_CH_SEN, HW_VAR_TDLS_INIT_CH_SEN,
HW_VAR_TDLS_RS_RCR, HW_VAR_TDLS_RS_RCR,
HW_VAR_TDLS_DONE_CH_SEN, HW_VAR_TDLS_DONE_CH_SEN,
HW_VAR_INITIAL_GAIN,
HW_VAR_TRIGGER_GPIO_0, HW_VAR_TRIGGER_GPIO_0,
HW_VAR_BT_SET_COEXIST, HW_VAR_BT_SET_COEXIST,
HW_VAR_BT_ISSUE_DELBA, HW_VAR_BT_ISSUE_DELBA,
......
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