mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 13:59:45 -04:00
staging: r8188eu: merge ODM_ConfigBBWithHeaderFile with its callers
ODM_ConfigBBWithHeaderFile is a "multiplexer" for ODM_ReadAndConfig_... functions. It's called only from phy_BB8188E_Config_ParaFile. We can remove ODM_ConfigBBWithHeaderFile and call the ODM_ReadAndConfig_... functions directly. ODM_ReadAndConfig_PHY_REG_PG_8188E does not return an error status, there's no need for a check. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220110124638.6909-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
af5df1e7f9
commit
67396d2dfe
@@ -362,18 +362,3 @@ enum HAL_STATUS ODM_ConfigRFWithHeaderFile(struct odm_dm_struct *dm_odm)
|
||||
{
|
||||
return ODM_ReadAndConfig_RadioA_1T_8188E(dm_odm);
|
||||
}
|
||||
|
||||
enum HAL_STATUS ODM_ConfigBBWithHeaderFile(struct odm_dm_struct *dm_odm,
|
||||
enum odm_bb_config_type config_tp)
|
||||
{
|
||||
if (config_tp == CONFIG_BB_PHY_REG) {
|
||||
return ODM_ReadAndConfig_PHY_REG_1T_8188E(dm_odm);
|
||||
} else if (config_tp == CONFIG_BB_AGC_TAB) {
|
||||
return ODM_ReadAndConfig_AGC_TAB_1T_8188E(dm_odm);
|
||||
} else if (config_tp == CONFIG_BB_PHY_REG_PG) {
|
||||
ODM_ReadAndConfig_PHY_REG_PG_8188E(dm_odm);
|
||||
return HAL_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
return HAL_STATUS_FAILURE;
|
||||
}
|
||||
|
||||
@@ -493,7 +493,7 @@ static int phy_BB8188E_Config_ParaFile(struct adapter *Adapter)
|
||||
/* 1. Read PHY_REG.TXT BB INIT!! */
|
||||
/* We will separate as 88C / 92C according to chip version */
|
||||
/* */
|
||||
if (HAL_STATUS_FAILURE == ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_PHY_REG))
|
||||
if (HAL_STATUS_FAILURE == ODM_ReadAndConfig_PHY_REG_1T_8188E(&pHalData->odmpriv))
|
||||
rtStatus = _FAIL;
|
||||
if (rtStatus != _SUCCESS)
|
||||
goto phy_BB8190_Config_ParaFile_Fail;
|
||||
@@ -501,16 +501,14 @@ static int phy_BB8188E_Config_ParaFile(struct adapter *Adapter)
|
||||
/* 2. If EEPROM or EFUSE autoload OK, We must config by PHY_REG_PG.txt */
|
||||
if (!pEEPROM->bautoload_fail_flag) {
|
||||
pHalData->pwrGroupCnt = 0;
|
||||
|
||||
if (HAL_STATUS_FAILURE == ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_PHY_REG_PG))
|
||||
rtStatus = _FAIL;
|
||||
ODM_ReadAndConfig_PHY_REG_PG_8188E(&pHalData->odmpriv);
|
||||
}
|
||||
|
||||
if (rtStatus != _SUCCESS)
|
||||
goto phy_BB8190_Config_ParaFile_Fail;
|
||||
|
||||
/* 3. BB AGC table Initialization */
|
||||
if (HAL_STATUS_FAILURE == ODM_ConfigBBWithHeaderFile(&pHalData->odmpriv, CONFIG_BB_AGC_TAB))
|
||||
if (HAL_STATUS_FAILURE == ODM_ReadAndConfig_AGC_TAB_1T_8188E(&pHalData->odmpriv))
|
||||
rtStatus = _FAIL;
|
||||
|
||||
if (rtStatus != _SUCCESS)
|
||||
|
||||
@@ -67,7 +67,4 @@ void ODM_PhyStatusQuery(struct odm_dm_struct *pDM_Odm,
|
||||
struct adapter *adapt);
|
||||
|
||||
enum HAL_STATUS ODM_ConfigRFWithHeaderFile(struct odm_dm_struct *pDM_Odm);
|
||||
|
||||
enum HAL_STATUS ODM_ConfigBBWithHeaderFile(struct odm_dm_struct *pDM_Odm,
|
||||
enum odm_bb_config_type ConfigType);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user