staging: rtl8723au: Eliminate HW_VAR_DM_FUNC_OP calls
Demux the code and remove multiple call layers Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6883e7c720
commit
a945bf3012
|
@ -7718,7 +7718,7 @@ void site_survey23a(struct rtw_adapter *padapter)
|
|||
/* restore RX GAIN */
|
||||
rtl8723a_set_initial_gain(padapter, 0xff);
|
||||
/* turn on dynamic functions */
|
||||
Restore_DM_Func_Flag23a(padapter);
|
||||
rtl8723a_odm_support_ability_restore(padapter);
|
||||
/* Switch_DM_Func23a(padapter, DYNAMIC_FUNC_DIG|DYNAMIC_FUNC_HP|DYNAMIC_FUNC_SS, true); */
|
||||
|
||||
mod_timer(&pwdinfo->find_phase_timer, jiffies +
|
||||
|
@ -7747,7 +7747,7 @@ void site_survey23a(struct rtw_adapter *padapter)
|
|||
/* restore RX GAIN */
|
||||
rtl8723a_set_initial_gain(padapter, 0xff);
|
||||
/* turn on dynamic functions */
|
||||
Restore_DM_Func_Flag23a(padapter);
|
||||
rtl8723a_odm_support_ability_restore(padapter);
|
||||
/* Switch_DM_Func23a(padapter, DYNAMIC_ALL_FUNC_ENABLE, true); */
|
||||
|
||||
if (is_client_associated_to_ap23a(padapter) == true)
|
||||
|
@ -9223,7 +9223,8 @@ u8 createbss_hdl23a(struct rtw_adapter *padapter, u8 *pbuf)
|
|||
pmlmeinfo->candidate_tid_bitmap = 0;
|
||||
|
||||
/* disable dynamic functions, such as high power, DIG */
|
||||
Save_DM_Func_Flag23a(padapter);
|
||||
rtl8723a_odm_support_ability_backup(padapter);
|
||||
|
||||
Switch_DM_Func23a(padapter, DYNAMIC_FUNC_DISABLE, false);
|
||||
|
||||
/* cancel link timer */
|
||||
|
@ -9535,7 +9536,7 @@ u8 sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, u8 *pbuf)
|
|||
if ((pmlmeext->sitesurvey_res.state == SCAN_START) ||
|
||||
(pmlmeext->sitesurvey_res.state == SCAN_TXNULL)) {
|
||||
/* disable dynamic functions, such as high power, DIG */
|
||||
Save_DM_Func_Flag23a(padapter);
|
||||
rtl8723a_odm_support_ability_backup(padapter);
|
||||
Switch_DM_Func23a(padapter, DYNAMIC_FUNC_DISABLE, false);
|
||||
|
||||
/* config the initial gain under scaning, need to
|
||||
|
|
|
@ -283,19 +283,6 @@ void Update23aTblForSoftAP(u8 *bssrateset, u32 bssratelen)
|
|||
}
|
||||
}
|
||||
|
||||
void Save_DM_Func_Flag23a(struct rtw_adapter *padapter)
|
||||
{
|
||||
u8 bSaveFlag = true;
|
||||
|
||||
rtw_hal_set_hwreg23a(padapter, HW_VAR_DM_FUNC_OP, (u8 *)(&bSaveFlag));
|
||||
}
|
||||
|
||||
void Restore_DM_Func_Flag23a(struct rtw_adapter *padapter)
|
||||
{
|
||||
u8 bSaveFlag = false;
|
||||
rtw_hal_set_hwreg23a(padapter, HW_VAR_DM_FUNC_OP, (u8 *)(&bSaveFlag));
|
||||
}
|
||||
|
||||
void Switch_DM_Func23a(struct rtw_adapter *padapter, unsigned long mode, u8 enable)
|
||||
{
|
||||
if (enable == true)
|
||||
|
|
|
@ -872,16 +872,18 @@ void rtl8723a_odm_support_ability_write(struct rtw_adapter *padapter, u32 val)
|
|||
pHalData->odmpriv.SupportAbility = val;
|
||||
}
|
||||
|
||||
void rtl8723a_odm_support_ability_backup(struct rtw_adapter *padapter, u8 val)
|
||||
void rtl8723a_odm_support_ability_restore(struct rtw_adapter *padapter)
|
||||
{
|
||||
struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
|
||||
|
||||
if (val) /* save dm flag */
|
||||
pHalData->odmpriv.BK_SupportAbility =
|
||||
pHalData->odmpriv.SupportAbility;
|
||||
else /* restore dm flag */
|
||||
pHalData->odmpriv.SupportAbility =
|
||||
pHalData->odmpriv.BK_SupportAbility;
|
||||
pHalData->odmpriv.SupportAbility = pHalData->odmpriv.BK_SupportAbility;
|
||||
}
|
||||
|
||||
void rtl8723a_odm_support_ability_backup(struct rtw_adapter *padapter)
|
||||
{
|
||||
struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
|
||||
|
||||
pHalData->odmpriv.BK_SupportAbility = pHalData->odmpriv.SupportAbility;
|
||||
}
|
||||
|
||||
void rtl8723a_odm_support_ability_set(struct rtw_adapter *padapter, u32 val)
|
||||
|
|
|
@ -3142,9 +3142,6 @@ void SetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val)
|
|||
case HW_VAR_DM_FLAG:
|
||||
rtl8723a_odm_support_ability_write(padapter, *val32);
|
||||
break;
|
||||
case HW_VAR_DM_FUNC_OP:
|
||||
rtl8723a_odm_support_ability_backup(padapter, *val);
|
||||
break;
|
||||
case HW_VAR_DM_FUNC_SET:
|
||||
rtl8723a_odm_support_ability_set(padapter, *val32);
|
||||
break;
|
||||
|
|
|
@ -202,7 +202,8 @@ void rtl8723a_set_nav_upper(struct rtw_adapter *padapter, u32 usNavUpper);
|
|||
void rtl8723a_set_initial_gain(struct rtw_adapter *padapter, u32 rx_gain);
|
||||
|
||||
void rtl8723a_odm_support_ability_write(struct rtw_adapter *padapter, u32 val);
|
||||
void rtl8723a_odm_support_ability_backup(struct rtw_adapter *padapter, u8 val);
|
||||
void rtl8723a_odm_support_ability_backup(struct rtw_adapter *padapter);
|
||||
void rtl8723a_odm_support_ability_restore(struct rtw_adapter *padapter);
|
||||
void rtl8723a_odm_support_ability_set(struct rtw_adapter *padapter, u32 val);
|
||||
void rtl8723a_odm_support_ability_clr(struct rtw_adapter *padapter, u32 val);
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@ enum HW_VARIABLES {
|
|||
HW_VAR_TXPAUSE,
|
||||
HW_VAR_RF_TYPE,
|
||||
HW_VAR_DM_FLAG,
|
||||
HW_VAR_DM_FUNC_OP,
|
||||
HW_VAR_DM_FUNC_SET,
|
||||
HW_VAR_DM_FUNC_CLR,
|
||||
HW_VAR_CAM_READ,
|
||||
|
|
|
@ -474,8 +474,6 @@ void get_rate_set23a(struct rtw_adapter *padapter, unsigned char *pbssrate,
|
|||
void UpdateBrateTbl23a(struct rtw_adapter *padapter,u8 *mBratesOS);
|
||||
void Update23aTblForSoftAP(u8 *bssrateset, u32 bssratelen);
|
||||
|
||||
void Save_DM_Func_Flag23a(struct rtw_adapter *padapter);
|
||||
void Restore_DM_Func_Flag23a(struct rtw_adapter *padapter);
|
||||
void Switch_DM_Func23a(struct rtw_adapter *padapter, unsigned long mode, u8 enable);
|
||||
|
||||
void Set_MSR23a(struct rtw_adapter *padapter, u8 type);
|
||||
|
|
Loading…
Reference in a new issue