Commit c4f6cf0e authored by navin patidar's avatar navin patidar Committed by Greg Kroah-Hartman

staging: rtl8188eu: Efuse_GetCurrentSize(): Remove parameter bool test

test is always false.
Signed-off-by: default avatarnavin patidar <navin.patidar@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 142547b3
...@@ -215,7 +215,7 @@ u16 efuse_GetMaxSize(struct adapter *padapter) ...@@ -215,7 +215,7 @@ u16 efuse_GetMaxSize(struct adapter *padapter)
u8 efuse_GetCurrentSize(struct adapter *padapter, u16 *size) u8 efuse_GetCurrentSize(struct adapter *padapter, u16 *size)
{ {
Efuse_PowerSwitch(padapter, false, true); Efuse_PowerSwitch(padapter, false, true);
*size = Efuse_GetCurrentSize(padapter, false); *size = Efuse_GetCurrentSize(padapter);
Efuse_PowerSwitch(padapter, false, false); Efuse_PowerSwitch(padapter, false, false);
return _SUCCESS; return _SUCCESS;
......
...@@ -934,17 +934,14 @@ u8 Efuse_WordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_e ...@@ -934,17 +934,14 @@ u8 Efuse_WordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_e
return badworden; return badworden;
} }
u16 Efuse_GetCurrentSize(struct adapter *pAdapter, bool bPseudoTest) u16 Efuse_GetCurrentSize(struct adapter *pAdapter)
{ {
int bContinual = true; int bContinual = true;
u16 efuse_addr = 0; u16 efuse_addr = 0;
u8 hoffset = 0, hworden = 0; u8 hoffset = 0, hworden = 0;
u8 efuse_data, word_cnts = 0; u8 efuse_data, word_cnts = 0;
if (bPseudoTest) rtw_hal_get_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&efuse_addr);
efuse_addr = (u16)(fakeEfuseUsedBytes);
else
rtw_hal_get_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&efuse_addr);
while (bContinual && while (bContinual &&
efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data) && efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data) &&
...@@ -973,10 +970,7 @@ u16 Efuse_GetCurrentSize(struct adapter *pAdapter, bool bPseudoTest) ...@@ -973,10 +970,7 @@ u16 Efuse_GetCurrentSize(struct adapter *pAdapter, bool bPseudoTest)
} }
} }
if (bPseudoTest) rtw_hal_set_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&efuse_addr);
fakeEfuseUsedBytes = efuse_addr;
else
rtw_hal_set_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&efuse_addr);
return efuse_addr; return efuse_addr;
} }
...@@ -1085,7 +1079,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, st ...@@ -1085,7 +1079,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, bPseudoTest); efuse_addr = Efuse_GetCurrentSize(pAdapter);
} else { } else {
efuse_addr = efuse_addr + (pFixPkt->word_cnts*2) + 1; efuse_addr = efuse_addr + (pFixPkt->word_cnts*2) + 1;
} }
...@@ -1374,7 +1368,7 @@ hal_EfusePgCheckAvailableAddr( ...@@ -1374,7 +1368,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. */
EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&efuse_max_available_len); EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&efuse_max_available_len);
if (Efuse_GetCurrentSize(pAdapter, bPseudoTest) >= efuse_max_available_len) if (Efuse_GetCurrentSize(pAdapter) >= efuse_max_available_len)
return false; return false;
return true; return true;
} }
......
...@@ -123,7 +123,7 @@ u8 rtw_efuse_access(struct adapter *adapter, u8 read, u16 start_addr, ...@@ -123,7 +123,7 @@ u8 rtw_efuse_access(struct adapter *adapter, u8 read, u16 start_addr,
u16 cnts, u8 *data); u16 cnts, u8 *data);
u8 rtw_efuse_map_read(struct adapter *adapter, u16 addr, u16 cnts, u8 *data); u8 rtw_efuse_map_read(struct adapter *adapter, u16 addr, u16 cnts, u8 *data);
u8 rtw_efuse_map_write(struct adapter *adapter, u16 addr, u16 cnts, u8 *data); u8 rtw_efuse_map_write(struct adapter *adapter, u16 addr, u16 cnts, u8 *data);
u16 Efuse_GetCurrentSize(struct adapter *adapter, bool test); u16 Efuse_GetCurrentSize(struct adapter *adapter);
u8 Efuse_CalculateWordCnts(u8 word_en); u8 Efuse_CalculateWordCnts(u8 word_en);
void EFUSE_GetEfuseDefinition(struct adapter *adapt, u8 type, u8 type1, void EFUSE_GetEfuseDefinition(struct adapter *adapt, u8 type, u8 type1,
void *out); void *out);
......
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