Commit 6d09f25a authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman

staging: r8188eu: convert ODM_ReadAndConfig_PHY_REG_1T_8188E() to int

The function ODM_ReadAndConfig_PHY_REG_1T_8188E() has return type
'enum HAL_STATUS'. Convert the return type to int and use common
kernel error logic. Return 0 on success and negative values on
failure. The goal is to get rid of enum HAL_STATUS in the end.
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20220928144323.13164-4-straube.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9090b84a
...@@ -473,7 +473,7 @@ static void odm_ConfigBB_PHY_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr, u32 ...@@ -473,7 +473,7 @@ static void odm_ConfigBB_PHY_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr, u32
} }
} }
enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *dm_odm) int ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *dm_odm)
{ {
u32 hex = 0; u32 hex = 0;
u32 i = 0; u32 i = 0;
...@@ -483,7 +483,6 @@ enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *dm_odm) ...@@ -483,7 +483,6 @@ enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *dm_odm)
struct adapter *adapter = dm_odm->Adapter; struct adapter *adapter = dm_odm->Adapter;
struct xmit_frame *pxmit_frame = NULL; struct xmit_frame *pxmit_frame = NULL;
u8 bndy_cnt = 1; u8 bndy_cnt = 1;
enum HAL_STATUS rst = HAL_STATUS_SUCCESS;
hex += ODM_ITRF_USB << 8; hex += ODM_ITRF_USB << 8;
hex += ODM_CE << 16; hex += ODM_CE << 16;
hex += 0xFF000000; hex += 0xFF000000;
...@@ -493,7 +492,7 @@ enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *dm_odm) ...@@ -493,7 +492,7 @@ enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *dm_odm)
pxmit_frame = rtw_IOL_accquire_xmit_frame(adapter); pxmit_frame = rtw_IOL_accquire_xmit_frame(adapter);
if (!pxmit_frame) { if (!pxmit_frame) {
pr_info("rtw_IOL_accquire_xmit_frame failed\n"); pr_info("rtw_IOL_accquire_xmit_frame failed\n");
return HAL_STATUS_FAILURE; return -ENOMEM;
} }
} }
...@@ -575,11 +574,11 @@ enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *dm_odm) ...@@ -575,11 +574,11 @@ enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *dm_odm)
} }
if (biol) { if (biol) {
if (!rtl8188e_IOL_exec_cmds_sync(dm_odm->Adapter, pxmit_frame, 1000, bndy_cnt)) { if (!rtl8188e_IOL_exec_cmds_sync(dm_odm->Adapter, pxmit_frame, 1000, bndy_cnt)) {
rst = HAL_STATUS_FAILURE;
pr_info("~~~ IOL Config %s Failed !!!\n", __func__); pr_info("~~~ IOL Config %s Failed !!!\n", __func__);
return -1;
} }
} }
return rst; return 0;
} }
/****************************************************************************** /******************************************************************************
......
...@@ -455,7 +455,7 @@ static int phy_BB8188E_Config_ParaFile(struct adapter *Adapter) ...@@ -455,7 +455,7 @@ static int phy_BB8188E_Config_ParaFile(struct adapter *Adapter)
/* 1. Read PHY_REG.TXT BB INIT!! */ /* 1. Read PHY_REG.TXT BB INIT!! */
/* We will separate as 88C / 92C according to chip version */ /* We will separate as 88C / 92C according to chip version */
/* */ /* */
if (HAL_STATUS_FAILURE == ODM_ReadAndConfig_PHY_REG_1T_8188E(&pHalData->odmpriv)) if (ODM_ReadAndConfig_PHY_REG_1T_8188E(&pHalData->odmpriv))
return _FAIL; return _FAIL;
/* 2. If EEPROM or EFUSE autoload OK, We must config by PHY_REG_PG.txt */ /* 2. If EEPROM or EFUSE autoload OK, We must config by PHY_REG_PG.txt */
......
...@@ -16,7 +16,7 @@ enum HAL_STATUS ODM_ReadAndConfig_AGC_TAB_1T_8188E(struct odm_dm_struct *odm); ...@@ -16,7 +16,7 @@ enum HAL_STATUS ODM_ReadAndConfig_AGC_TAB_1T_8188E(struct odm_dm_struct *odm);
* PHY_REG_1T.TXT * PHY_REG_1T.TXT
******************************************************************************/ ******************************************************************************/
enum HAL_STATUS ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *odm); int ODM_ReadAndConfig_PHY_REG_1T_8188E(struct odm_dm_struct *odm);
/****************************************************************************** /******************************************************************************
* PHY_REG_PG.TXT * PHY_REG_PG.TXT
......
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