staging: rtl8188eu: remove struct eeprom_priv's EepromOrEfuse
This setting is used only in one place. There's no need to store it in a global struct. While at it, merge the two-line Hal_InitPGData88E function and its only caller. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210718173610.894-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a9dc3f67dc
commit
264d306464
@ -228,12 +228,6 @@ s32 InitLLTTable(struct adapter *padapter, u8 txpktbuf_bndy)
|
||||
return status;
|
||||
}
|
||||
|
||||
void Hal_InitPGData88E(struct adapter *padapter)
|
||||
{
|
||||
if (!is_boot_from_eeprom(padapter))
|
||||
EFUSE_ShadowMapUpdate(padapter);
|
||||
}
|
||||
|
||||
void Hal_EfuseParseIDCode88E(struct adapter *padapter, u8 *hwinfo)
|
||||
{
|
||||
struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(padapter);
|
||||
|
@ -995,10 +995,11 @@ void rtw_hal_read_chip_info(struct adapter *Adapter)
|
||||
struct eeprom_priv *eeprom = GET_EEPROM_EFUSE_PRIV(Adapter);
|
||||
u8 eeValue = usb_read8(Adapter, REG_9346CR);
|
||||
|
||||
eeprom->EepromOrEfuse = (eeValue & BOOT_FROM_EEPROM) ? true : false;
|
||||
eeprom->bautoload_fail_flag = (eeValue & EEPROM_EN) ? false : true;
|
||||
|
||||
Hal_InitPGData88E(Adapter);
|
||||
if (eeValue & BOOT_FROM_EEPROM)
|
||||
EFUSE_ShadowMapUpdate(Adapter);
|
||||
|
||||
readAdapterInfo_8188EU(Adapter);
|
||||
}
|
||||
|
||||
|
@ -131,8 +131,6 @@ enum hardware_type {
|
||||
|
||||
#define GET_EEPROM_EFUSE_PRIV(adapter) (&adapter->eeprompriv)
|
||||
|
||||
#define is_boot_from_eeprom(adapter) (adapter->eeprompriv.EepromOrEfuse)
|
||||
|
||||
void UpdateHalRAMask8188EUsb(struct adapter *adapt, u32 mac_id, u8 rssi_level);
|
||||
u32 rtl8188eu_hal_deinit(struct adapter *Adapter);
|
||||
u32 rtl8188eu_hal_init(struct adapter *Adapter);
|
||||
|
@ -196,8 +196,6 @@ struct hal_data_8188e {
|
||||
u8 bTXPowerDataReadFromEEPORM;
|
||||
u8 EEPROMThermalMeter;
|
||||
|
||||
bool EepromOrEfuse;
|
||||
|
||||
u8 Index24G_CCK_Base[MAX_RF_PATH][CHANNEL_MAX_NUMBER];
|
||||
u8 Index24G_BW40_Base[MAX_RF_PATH][CHANNEL_MAX_NUMBER];
|
||||
/* If only one tx, only BW20 and OFDM are used. */
|
||||
@ -298,7 +296,6 @@ void rtl8188e_InitializeFirmwareVars(struct adapter *padapter);
|
||||
s32 InitLLTTable(struct adapter *padapter, u8 txpktbuf_bndy);
|
||||
|
||||
/* EFuse */
|
||||
void Hal_InitPGData88E(struct adapter *padapter);
|
||||
void Hal_EfuseParseIDCode88E(struct adapter *padapter, u8 *hwinfo);
|
||||
void Hal_ReadTxPowerInfo88E(struct adapter *padapter, u8 *hwinfo,
|
||||
bool AutoLoadFail);
|
||||
|
Loading…
Reference in New Issue
Block a user