diff options
author | Martin Kaiser <martin@kaiser.cx> | 2022-07-09 20:09:50 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-11 11:06:45 +0300 |
commit | 14dbcfc4c9368d3a45db0d2d94f6b23708c72bf5 (patch) | |
tree | 4495f16ae8a307b32b60a24c84c2450fc911ed0c /drivers/staging/r8188eu | |
parent | 1c4d6546c3a4ee20e2f5ba525e35e779614954c8 (diff) | |
download | linux-14dbcfc4c9368d3a45db0d2d94f6b23708c72bf5.tar.xz |
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: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/r8188eu')
-rw-r--r-- | drivers/staging/r8188eu/core/rtw_efuse.c | 30 | ||||
-rw-r--r-- | drivers/staging/r8188eu/hal/usb_halinit.c | 11 | ||||
-rw-r--r-- | drivers/staging/r8188eu/include/rtw_efuse.h | 2 |
3 files changed, 9 insertions, 34 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c index 8005ed8d3a20..df9534dd25cb 100644 --- a/drivers/staging/r8188eu/core/rtw_efuse.c +++ b/drivers/staging/r8188eu/core/rtw_efuse.c @@ -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); -} diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c index 2d5d81e96c8b..8b9c3dea589b 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -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); diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h index 2daf69f554d5..3d688a0e6dfb 100644 --- a/drivers/staging/r8188eu/include/rtw_efuse.h +++ b/drivers/staging/r8188eu/include/rtw_efuse.h @@ -8,6 +8,4 @@ void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf); -void EFUSE_ShadowMapUpdate(struct adapter *adapter); - #endif |