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

staging: r8188eu: remove EepromOrEfuse from struct eeprom_priv

The EepromOrEfuse flag in struct eeprom_priv is used only in the
ReadAdapterInfo8188EU function. We can remove EepromOrEfuse from struct
eeprom_priv.

As the meaning of EepromOrEfuse isn't obvious, there is a macro
is_boot_from_eeprom that's used for checking the value. We don't need the
macro, writing the check as !(eeValue & BOOT_FROM_EEPROM) makes it clear
what is checked.
Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220709171000.180481-3-martin@kaiser.cxSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ba68103d
...@@ -937,10 +937,9 @@ void ReadAdapterInfo8188EU(struct adapter *Adapter) ...@@ -937,10 +937,9 @@ void ReadAdapterInfo8188EU(struct adapter *Adapter)
if (res) if (res)
return; return;
eeprom->EepromOrEfuse = (eeValue & BOOT_FROM_EEPROM);
eeprom->bautoload_fail_flag = !(eeValue & EEPROM_EN); eeprom->bautoload_fail_flag = !(eeValue & EEPROM_EN);
if (!is_boot_from_eeprom(Adapter)) if (!(eeValue & BOOT_FROM_EEPROM))
EFUSE_ShadowMapUpdate(Adapter); EFUSE_ShadowMapUpdate(Adapter);
/* parse the eeprom/efuse content */ /* parse the eeprom/efuse content */
......
...@@ -16,8 +16,6 @@ enum hw_variables { ...@@ -16,8 +16,6 @@ enum hw_variables {
typedef s32 (*c2h_id_filter)(u8 id); typedef s32 (*c2h_id_filter)(u8 id);
#define is_boot_from_eeprom(adapter) (adapter->eeprompriv.EepromOrEfuse)
void rtl8188eu_interface_configure(struct adapter *adapt); void rtl8188eu_interface_configure(struct adapter *adapt);
void ReadAdapterInfo8188EU(struct adapter *Adapter); void ReadAdapterInfo8188EU(struct adapter *Adapter);
void rtl8188eu_init_default_value(struct adapter *adapt); void rtl8188eu_init_default_value(struct adapter *adapt);
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
struct eeprom_priv { struct eeprom_priv {
u8 bautoload_fail_flag; u8 bautoload_fail_flag;
u8 mac_addr[ETH_ALEN] __aligned(2); /* PermanentAddress */ u8 mac_addr[ETH_ALEN] __aligned(2); /* PermanentAddress */
u8 EepromOrEfuse;
u8 efuse_eeprom_data[HWSET_MAX_SIZE_512] __aligned(4); u8 efuse_eeprom_data[HWSET_MAX_SIZE_512] __aligned(4);
}; };
......
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