mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
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: Michael 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.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0d4560530d
commit
6eacd2420a
|
|
@ -315,21 +315,20 @@ rtl8188e_PHY_SetRFReg(
|
|||
* 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;
|
||||
int rtStatus = _SUCCESS;
|
||||
int err;
|
||||
|
||||
/* */
|
||||
/* Config MAC */
|
||||
/* */
|
||||
if (ODM_ReadAndConfig_MAC_REG_8188E(&pHalData->odmpriv))
|
||||
rtStatus = _FAIL;
|
||||
err = ODM_ReadAndConfig_MAC_REG_8188E(&pHalData->odmpriv);
|
||||
|
||||
/* 2010.07.13 AMPDU aggregation number B */
|
||||
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)
|
|||
Adapter->pwrctrlpriv.bFwCurrentInPSMode = false;
|
||||
haldata->LastHMEBoxNum = 0;
|
||||
|
||||
status = PHY_MACConfig8188E(Adapter);
|
||||
if (status == _FAIL)
|
||||
goto exit;
|
||||
if (PHY_MACConfig8188E(Adapter))
|
||||
return _FAIL;
|
||||
|
||||
/* */
|
||||
/* d. Initialize BB related configurations. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user