Commit 14dbcfc4 authored by Martin Kaiser's avatar Martin Kaiser Committed by Greg Kroah-Hartman

staging: r8188eu: merge EFUSE_ShadowMapUpdate with its caller

Merge the EFUSE_ShadowMapUpdate function into ReadAdapterInfo8188EU, which
is the only caller.

Merging the two functions makes it clearer that eeprom->efuse_eeprom_data
is in fact a temporary buffer that stores info read from efuses.
Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-5-martin@kaiser.cxSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1c4d6546
......@@ -72,33 +72,3 @@ ReadEFuseByte(
/* FIXME: return an error to caller */
}
/*-----------------------------------------------------------------------------
* Function: EFUSE_ShadowMapUpdate
*
* Overview: Transfer current EFUSE content to shadow init and modify map.
*
* Input: NONE
*
* Output: NONE
*
* Return: NONE
*
* Revised History:
* When Who Remark
* 11/13/2008 MHC Create Version 0.
*
*---------------------------------------------------------------------------*/
void EFUSE_ShadowMapUpdate(struct adapter *pAdapter)
{
struct eeprom_priv *pEEPROM = &pAdapter->eeprompriv;
if (pEEPROM->bautoload_fail_flag) {
memset(pEEPROM->efuse_eeprom_data, 0xFF, EFUSE_MAP_LEN_88E);
return;
}
rtl8188e_EfusePowerSwitch(pAdapter, true);
rtl8188e_ReadEFuse(pAdapter, 0, EFUSE_MAP_LEN_88E, pEEPROM->efuse_eeprom_data);
rtl8188e_EfusePowerSwitch(pAdapter, false);
}
......@@ -939,8 +939,15 @@ void ReadAdapterInfo8188EU(struct adapter *Adapter)
eeprom->bautoload_fail_flag = !(eeValue & EEPROM_EN);
if (!(eeValue & BOOT_FROM_EEPROM))
EFUSE_ShadowMapUpdate(Adapter);
if (!(eeValue & BOOT_FROM_EEPROM)) {
if (eeprom->bautoload_fail_flag) {
memset(eeprom->efuse_eeprom_data, 0xFF, EFUSE_MAP_LEN_88E);
} else {
rtl8188e_EfusePowerSwitch(Adapter, true);
rtl8188e_ReadEFuse(Adapter, 0, EFUSE_MAP_LEN_88E, eeprom->efuse_eeprom_data);
rtl8188e_EfusePowerSwitch(Adapter, false);
}
}
/* parse the eeprom/efuse content */
Hal_EfuseParseIDCode88E(Adapter, eeprom->efuse_eeprom_data);
......
......@@ -8,6 +8,4 @@
void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf);
void EFUSE_ShadowMapUpdate(struct adapter *adapter);
#endif
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