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

staging: r8188eu: remove EfuseGetCurrentSize from hal_ops

Remove EfuseGetCurrentSize from hal_ops and remove its wrapper
Efuse_GetCurrentSize(). Call rtl8188e_EfuseGetCurrentSize() directly
instead.
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210906190223.11396-27-straube.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e40aa173
...@@ -58,35 +58,6 @@ Efuse_Write1ByteToFakeContent( ...@@ -58,35 +58,6 @@ Efuse_Write1ByteToFakeContent(
return true; return true;
} }
/*-----------------------------------------------------------------------------
* Function: efuse_GetCurrentSize
*
* Overview: Get current efuse size!!!
*
* Input: NONE
*
* Output: NONE
*
* Return: NONE
*
* Revised History:
* When Who Remark
* 11/16/2008 MHC Create Version 0.
*
*---------------------------------------------------------------------------*/
u16
Efuse_GetCurrentSize(
struct adapter *pAdapter,
u8 efuseType,
bool pseudo)
{
u16 ret = 0;
ret = pAdapter->HalFunc.EfuseGetCurrentSize(pAdapter, efuseType, pseudo);
return ret;
}
/* 11/16/2008 MH Add description. Get current efuse area enabled word!!. */ /* 11/16/2008 MH Add description. Get current efuse area enabled word!!. */
u8 u8
Efuse_CalculateWordCnts(u8 word_en) Efuse_CalculateWordCnts(u8 word_en)
...@@ -404,7 +375,7 @@ u16 efuse_GetMaxSize(struct adapter *padapter) ...@@ -404,7 +375,7 @@ u16 efuse_GetMaxSize(struct adapter *padapter)
u8 efuse_GetCurrentSize(struct adapter *padapter, u16 *size) u8 efuse_GetCurrentSize(struct adapter *padapter, u16 *size)
{ {
rtl8188e_EfusePowerSwitch(padapter, false, true); rtl8188e_EfusePowerSwitch(padapter, false, true);
*size = Efuse_GetCurrentSize(padapter, EFUSE_WIFI, false); *size = rtl8188e_EfuseGetCurrentSize(padapter, EFUSE_WIFI, false);
rtl8188e_EfusePowerSwitch(padapter, false, false); rtl8188e_EfusePowerSwitch(padapter, false, false);
return _SUCCESS; return _SUCCESS;
......
...@@ -1181,7 +1181,7 @@ static u16 Hal_EfuseGetCurrentSize_Pseudo(struct adapter *pAdapter, bool bPseudo ...@@ -1181,7 +1181,7 @@ static u16 Hal_EfuseGetCurrentSize_Pseudo(struct adapter *pAdapter, bool bPseudo
return ret; return ret;
} }
static u16 rtl8188e_EfuseGetCurrentSize(struct adapter *pAdapter, u8 efuseType, bool bPseudoTest) u16 rtl8188e_EfuseGetCurrentSize(struct adapter *pAdapter, u8 efuseType, bool bPseudoTest)
{ {
u16 ret = 0; u16 ret = 0;
...@@ -1323,7 +1323,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, st ...@@ -1323,7 +1323,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, st
if (!PgWriteSuccess) if (!PgWriteSuccess)
return false; return false;
else else
efuse_addr = Efuse_GetCurrentSize(pAdapter, efuseType, bPseudoTest); efuse_addr = rtl8188e_EfuseGetCurrentSize(pAdapter, efuseType, bPseudoTest);
} else { } else {
efuse_addr = efuse_addr + (pFixPkt->word_cnts * 2) + 1; efuse_addr = efuse_addr + (pFixPkt->word_cnts * 2) + 1;
} }
...@@ -1612,7 +1612,7 @@ hal_EfusePgCheckAvailableAddr( ...@@ -1612,7 +1612,7 @@ hal_EfusePgCheckAvailableAddr(
/* Change to check TYPE_EFUSE_MAP_LEN , because 8188E raw 256, logic map over 256. */ /* Change to check TYPE_EFUSE_MAP_LEN , because 8188E raw 256, logic map over 256. */
rtl8188e_EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&efuse_max_available_len, false); rtl8188e_EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&efuse_max_available_len, false);
if (Efuse_GetCurrentSize(pAdapter, efuseType, bPseudoTest) >= efuse_max_available_len) if (rtl8188e_EfuseGetCurrentSize(pAdapter, efuseType, bPseudoTest) >= efuse_max_available_len)
return false; return false;
return true; return true;
} }
...@@ -1782,7 +1782,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) ...@@ -1782,7 +1782,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg; pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;
/* Efuse related function */ /* Efuse related function */
pHalFunc->EfuseGetCurrentSize = &rtl8188e_EfuseGetCurrentSize;
pHalFunc->Efuse_PgPacketRead = &rtl8188e_Efuse_PgPacketRead; pHalFunc->Efuse_PgPacketRead = &rtl8188e_Efuse_PgPacketRead;
pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite; pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite;
pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite; pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite;
......
...@@ -177,8 +177,6 @@ struct hal_ops { ...@@ -177,8 +177,6 @@ struct hal_ops {
enum rf_radio_path eRFPath, u32 RegAddr, enum rf_radio_path eRFPath, u32 RegAddr,
u32 BitMask, u32 Data); u32 BitMask, u32 Data);
u16 (*EfuseGetCurrentSize)(struct adapter *padapter, u8 efuseType,
bool bPseudoTest);
int (*Efuse_PgPacketRead)(struct adapter *adapter, u8 offset, int (*Efuse_PgPacketRead)(struct adapter *adapter, u8 offset,
u8 *data, bool bPseudoTest); u8 *data, bool bPseudoTest);
int (*Efuse_PgPacketWrite)(struct adapter *padapter, u8 offset, int (*Efuse_PgPacketWrite)(struct adapter *padapter, u8 offset,
...@@ -221,6 +219,7 @@ void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType, ...@@ -221,6 +219,7 @@ void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType,
bool bPseudoTest); bool bPseudoTest);
void rtl8188e_EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, void rtl8188e_EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType,
u8 type, void *pOut, bool bPseudoTest); u8 type, void *pOut, bool bPseudoTest);
u16 rtl8188e_EfuseGetCurrentSize(struct adapter *pAdapter, u8 efuseType, bool bPseudoTest);
void rtw_hal_free_data(struct adapter *padapter); void rtw_hal_free_data(struct adapter *padapter);
uint rtw_hal_init(struct adapter *padapter); uint rtw_hal_init(struct adapter *padapter);
......
...@@ -111,7 +111,6 @@ u8 rtw_BT_efuse_map_read(struct adapter *adapter, u16 addr, ...@@ -111,7 +111,6 @@ u8 rtw_BT_efuse_map_read(struct adapter *adapter, u16 addr,
u16 cnts, u8 *data); u16 cnts, u8 *data);
u8 rtw_BT_efuse_map_write(struct adapter *adapter, u16 addr, u8 rtw_BT_efuse_map_write(struct adapter *adapter, u16 addr,
u16 cnts, u8 *data); u16 cnts, u8 *data);
u16 Efuse_GetCurrentSize(struct adapter *adapter, u8 efusetype, bool test);
u8 Efuse_CalculateWordCnts(u8 word_en); u8 Efuse_CalculateWordCnts(u8 word_en);
void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf, bool test); void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf, bool test);
u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test); u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test);
......
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