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

staging: r8188eu: convert PHY_MACConfig8188E() to common error logic

Convert the function PHY_MACConfig8188E() away from returning _FAIL or
_SUCCESS which uses inverted error logic. Use the common error logic
instead. Return 0 for success and negative values for failure.
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/20230115210734.18610-2-straube.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0d456053
...@@ -315,21 +315,20 @@ rtl8188e_PHY_SetRFReg( ...@@ -315,21 +315,20 @@ rtl8188e_PHY_SetRFReg(
* 08/12/2008 MHC Create Version 0. * 08/12/2008 MHC Create Version 0.
* *
*---------------------------------------------------------------------------*/ *---------------------------------------------------------------------------*/
s32 PHY_MACConfig8188E(struct adapter *Adapter) int PHY_MACConfig8188E(struct adapter *Adapter)
{ {
struct hal_data_8188e *pHalData = &Adapter->haldata; struct hal_data_8188e *pHalData = &Adapter->haldata;
int rtStatus = _SUCCESS; int err;
/* */ /* */
/* Config MAC */ /* Config MAC */
/* */ /* */
if (ODM_ReadAndConfig_MAC_REG_8188E(&pHalData->odmpriv)) err = ODM_ReadAndConfig_MAC_REG_8188E(&pHalData->odmpriv);
rtStatus = _FAIL;
/* 2010.07.13 AMPDU aggregation number B */ /* 2010.07.13 AMPDU aggregation number B */
rtw_write16(Adapter, REG_MAX_AGGR_NUM, MAX_AGGR_NUM); rtw_write16(Adapter, REG_MAX_AGGR_NUM, MAX_AGGR_NUM);
return rtStatus; return err;
} }
/** /**
......
...@@ -600,9 +600,8 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter) ...@@ -600,9 +600,8 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter)
Adapter->pwrctrlpriv.bFwCurrentInPSMode = false; Adapter->pwrctrlpriv.bFwCurrentInPSMode = false;
haldata->LastHMEBoxNum = 0; haldata->LastHMEBoxNum = 0;
status = PHY_MACConfig8188E(Adapter); if (PHY_MACConfig8188E(Adapter))
if (status == _FAIL) return _FAIL;
goto exit;
/* */ /* */
/* d. Initialize BB related configurations. */ /* d. Initialize BB related configurations. */
......
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