Commit 0e4427f4 authored by Alison Schofield's avatar Alison Schofield Committed by Greg Kroah-Hartman

staging: r8723au: move function type in line with function name

Move function types to be adjacent to the function names in
declarations to improve readability.
Signed-off-by: default avatarAlison Schofield <amsfield22@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5e3144c1
...@@ -87,8 +87,7 @@ static void Efuse_PowerSwitch(struct rtw_adapter *padapter, ...@@ -87,8 +87,7 @@ static void Efuse_PowerSwitch(struct rtw_adapter *padapter,
} }
} }
u16 u16 Efuse_GetCurrentSize23a(struct rtw_adapter *pAdapter, u8 efuseType)
Efuse_GetCurrentSize23a(struct rtw_adapter *pAdapter, u8 efuseType)
{ {
u16 ret = 0; u16 ret = 0;
...@@ -101,8 +100,7 @@ Efuse_GetCurrentSize23a(struct rtw_adapter *pAdapter, u8 efuseType) ...@@ -101,8 +100,7 @@ Efuse_GetCurrentSize23a(struct rtw_adapter *pAdapter, u8 efuseType)
} }
/* Get current efuse area enabled word */ /* Get current efuse area enabled word */
u8 u8 Efuse_CalculateWordCnts23a(u8 word_en)
Efuse_CalculateWordCnts23a(u8 word_en)
{ {
return hweight8((~word_en) & 0xf); return hweight8((~word_en) & 0xf);
} }
...@@ -113,8 +111,7 @@ Efuse_CalculateWordCnts23a(u8 word_en) ...@@ -113,8 +111,7 @@ Efuse_CalculateWordCnts23a(u8 word_en)
* Assumptions: 1. Boot from E-Fuse and successfully auto-load. * Assumptions: 1. Boot from E-Fuse and successfully auto-load.
* 2. PASSIVE_LEVEL (USB interface) * 2. PASSIVE_LEVEL (USB interface)
*/ */
void void ReadEFuseByte23a(struct rtw_adapter *Adapter, u16 _offset, u8 *pbuf)
ReadEFuseByte23a(struct rtw_adapter *Adapter, u16 _offset, u8 *pbuf)
{ {
u32 value32; u32 value32;
u8 readbyte; u8 readbyte;
...@@ -151,9 +148,8 @@ ReadEFuseByte23a(struct rtw_adapter *Adapter, u16 _offset, u8 *pbuf) ...@@ -151,9 +148,8 @@ ReadEFuseByte23a(struct rtw_adapter *Adapter, u16 _offset, u8 *pbuf)
*pbuf = (u8)(value32 & 0xff); *pbuf = (u8)(value32 & 0xff);
} }
void void EFUSE_GetEfuseDefinition23a(struct rtw_adapter *pAdapter, u8 efuseType,
EFUSE_GetEfuseDefinition23a(struct rtw_adapter *pAdapter, u8 efuseType, u8 type, void *pOut)
u8 type, void *pOut)
{ {
u8 *pu1Tmp; u8 *pu1Tmp;
u16 *pu2Tmp; u16 *pu2Tmp;
...@@ -235,8 +231,7 @@ EFUSE_GetEfuseDefinition23a(struct rtw_adapter *pAdapter, u8 efuseType, ...@@ -235,8 +231,7 @@ EFUSE_GetEfuseDefinition23a(struct rtw_adapter *pAdapter, u8 efuseType,
} }
/* Copy from WMAC for EFUSE read 1 byte. */ /* Copy from WMAC for EFUSE read 1 byte. */
u8 u8 EFUSE_Read1Byte23a(struct rtw_adapter *Adapter, u16 Address)
EFUSE_Read1Byte23a(struct rtw_adapter *Adapter, u16 Address)
{ {
u8 data; u8 data;
u8 Bytetemp = {0x00}; u8 Bytetemp = {0x00};
...@@ -279,10 +274,8 @@ EFUSE_Read1Byte23a(struct rtw_adapter *Adapter, u16 Address) ...@@ -279,10 +274,8 @@ EFUSE_Read1Byte23a(struct rtw_adapter *Adapter, u16 Address)
} }
/* Copy from WMAC fot EFUSE write 1 byte. */ /* Copy from WMAC fot EFUSE write 1 byte. */
void void EFUSE_Write1Byte(struct rtw_adapter *Adapter, u16 Address, u8 Value);
EFUSE_Write1Byte(struct rtw_adapter *Adapter, u16 Address, u8 Value); void EFUSE_Write1Byte(struct rtw_adapter *Adapter, u16 Address, u8 Value)
void
EFUSE_Write1Byte(struct rtw_adapter *Adapter, u16 Address, u8 Value)
{ {
u8 Bytetemp = {0x00}; u8 Bytetemp = {0x00};
u8 temp = {0x00}; u8 temp = {0x00};
...@@ -324,8 +317,7 @@ EFUSE_Write1Byte(struct rtw_adapter *Adapter, u16 Address, u8 Value) ...@@ -324,8 +317,7 @@ EFUSE_Write1Byte(struct rtw_adapter *Adapter, u16 Address, u8 Value)
} }
/* Read one byte from real Efuse. */ /* Read one byte from real Efuse. */
int int efuse_OneByteRead23a(struct rtw_adapter *pAdapter, u16 addr, u8 *data)
efuse_OneByteRead23a(struct rtw_adapter *pAdapter, u16 addr, u8 *data)
{ {
u8 tmpidx = 0; u8 tmpidx = 0;
int bResult; int bResult;
...@@ -353,8 +345,7 @@ efuse_OneByteRead23a(struct rtw_adapter *pAdapter, u16 addr, u8 *data) ...@@ -353,8 +345,7 @@ efuse_OneByteRead23a(struct rtw_adapter *pAdapter, u16 addr, u8 *data)
} }
/* Write one byte to reald Efuse. */ /* Write one byte to reald Efuse. */
int int efuse_OneByteWrite23a(struct rtw_adapter *pAdapter, u16 addr, u8 data)
efuse_OneByteWrite23a(struct rtw_adapter *pAdapter, u16 addr, u8 data)
{ {
u8 tmpidx = 0; u8 tmpidx = 0;
int bResult; int bResult;
...@@ -385,10 +376,7 @@ efuse_OneByteWrite23a(struct rtw_adapter *pAdapter, u16 addr, u8 data) ...@@ -385,10 +376,7 @@ efuse_OneByteWrite23a(struct rtw_adapter *pAdapter, u16 addr, u8 data)
} }
/* Read allowed word in current efuse section data. */ /* Read allowed word in current efuse section data. */
void void efuse_WordEnableDataRead23a(u8 word_en, u8 *sourdata, u8 *targetdata)
efuse_WordEnableDataRead23a(u8 word_en,
u8 *sourdata,
u8 *targetdata)
{ {
if (!(word_en&BIT(0))) { if (!(word_en&BIT(0))) {
targetdata[0] = sourdata[0]; targetdata[0] = sourdata[0];
...@@ -514,10 +502,8 @@ int rtw_BT_efuse_map_read23a(struct rtw_adapter *padapter, ...@@ -514,10 +502,8 @@ int rtw_BT_efuse_map_read23a(struct rtw_adapter *padapter,
} }
/* Read All Efuse content */ /* Read All Efuse content */
void void Efuse_ReadAllMap(struct rtw_adapter *pAdapter, u8 efuseType, u8 *Efuse);
Efuse_ReadAllMap(struct rtw_adapter *pAdapter, u8 efuseType, u8 *Efuse); void Efuse_ReadAllMap(struct rtw_adapter *pAdapter, u8 efuseType, u8 *Efuse)
void
Efuse_ReadAllMap(struct rtw_adapter *pAdapter, u8 efuseType, u8 *Efuse)
{ {
u16 mapLen = 0; u16 mapLen = 0;
...@@ -538,16 +524,16 @@ Efuse_ReadAllMap(struct rtw_adapter *pAdapter, u8 efuseType, u8 *Efuse) ...@@ -538,16 +524,16 @@ Efuse_ReadAllMap(struct rtw_adapter *pAdapter, u8 efuseType, u8 *Efuse)
* *
* Read from efuse init map by one/two/four bytes * Read from efuse init map by one/two/four bytes
*/ */
static void static void efuse_ShadowRead1Byte(struct rtw_adapter *pAdapter, u16 Offset,
efuse_ShadowRead1Byte(struct rtw_adapter *pAdapter, u16 Offset, u8 *Value) u8 *Value)
{ {
struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter); struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter);
*Value = pEEPROM->efuse_eeprom_data[Offset]; *Value = pEEPROM->efuse_eeprom_data[Offset];
} }
static void static void efuse_ShadowRead2Byte(struct rtw_adapter *pAdapter, u16 Offset,
efuse_ShadowRead2Byte(struct rtw_adapter *pAdapter, u16 Offset, u16 *Value) u16 *Value)
{ {
struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter); struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter);
...@@ -555,8 +541,8 @@ efuse_ShadowRead2Byte(struct rtw_adapter *pAdapter, u16 Offset, u16 *Value) ...@@ -555,8 +541,8 @@ efuse_ShadowRead2Byte(struct rtw_adapter *pAdapter, u16 Offset, u16 *Value)
*Value |= pEEPROM->efuse_eeprom_data[Offset+1]<<8; *Value |= pEEPROM->efuse_eeprom_data[Offset+1]<<8;
} }
static void static void efuse_ShadowRead4Byte(struct rtw_adapter *pAdapter, u16 Offset,
efuse_ShadowRead4Byte(struct rtw_adapter *pAdapter, u16 Offset, u32 *Value) u32 *Value)
{ {
struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter); struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter);
...@@ -567,7 +553,6 @@ efuse_ShadowRead4Byte(struct rtw_adapter *pAdapter, u16 Offset, u32 *Value) ...@@ -567,7 +553,6 @@ efuse_ShadowRead4Byte(struct rtw_adapter *pAdapter, u16 Offset, u32 *Value)
} }
/* Transfer current EFUSE content to shadow init and modify map. */ /* Transfer current EFUSE content to shadow init and modify map. */
void EFUSE_ShadowMapUpdate23a(struct rtw_adapter *pAdapter, u8 efuseType) void EFUSE_ShadowMapUpdate23a(struct rtw_adapter *pAdapter, u8 efuseType)
{ {
struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter); struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter);
...@@ -584,9 +569,8 @@ void EFUSE_ShadowMapUpdate23a(struct rtw_adapter *pAdapter, u8 efuseType) ...@@ -584,9 +569,8 @@ void EFUSE_ShadowMapUpdate23a(struct rtw_adapter *pAdapter, u8 efuseType)
} }
/* Read from efuse init map */ /* Read from efuse init map */
void void EFUSE_ShadowRead23a(struct rtw_adapter *pAdapter, u8 Type,
EFUSE_ShadowRead23a(struct rtw_adapter *pAdapter, u16 Offset, u32 *Value)
u8 Type, u16 Offset, u32 *Value)
{ {
if (Type == 1) if (Type == 1)
efuse_ShadowRead1Byte(pAdapter, Offset, (u8 *)Value); efuse_ShadowRead1Byte(pAdapter, Offset, (u8 *)Value);
......
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