staging: rtl8723bs: remove some fields from the
cover staging: rtl8723bs: remove some fields from the
This series removes several unused fields from the struct hal_com_data. These fields either simply take up space or set but never subsequently used.
Nikolay Kulikov (9):
staging: rtl8723bs: remove dead fields from struct hal_com_data
staging: rtl8723bs: remove unused 'PolarityCtl' from struct
hal_com_data
staging: rtl8723bs: remove unused RegulatorMode from struct
hal_com_data
staging: rtl8723bs: remove unused 'MultiFunc' from struct hal_com_data
staging: rtl8723bs: remove unused 'EEPROMCustomerID' from hal_com_data
staging: rtl8723bs: remove unused ForcedDataRate from hal_com_data
staging: rtl8723bs: remove unused EEPROMVersion from struct
hal_com_data
staging: rtl8723bs: remove unused EEPROMBluetoothType from
hal_com_data
staging: rtl8723bs: remove unused 'bTXPowerDataReadFromEEPORM'
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 1 - .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 40 ------- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 2 - .../staging/rtl8723bs/include/hal_com_reg.h | 4 - drivers/staging/rtl8723bs/include/hal_data.h | 101 ------------------ drivers/staging/rtl8723bs/include/hal_pg.h | 6 -- .../staging/rtl8723bs/include/rtl8723b_hal.h | 9 -- 7 files changed, 163 deletions(-)
base-commit: b46e70613266e52adc412f92de7504cd14804f6d
Signature · 1 line
2.54.0
PATCH 1/9 staging: rtl8723bs: remove dead fields from struct hal_com_data
These fields exist but are never used, and nothing is ever written to them, so remove them.
--- drivers/staging/rtl8723bs/include/hal_data.h | 69 -------------------- 1 file changed, 69 deletions(-)
drivers/staging/rtl8723bs/include/hal_data.h +0 -69
@@ -188,25 +188,14 @@ struct hal_com_data {u8 rf_chip;u8 PackageType; -u8 InterfaceSel; -u8 framesync; -u32 framesyncC34; -u8 framesyncMonitor; -u8 DefaultInitialGain[4 ];/* EEPROM setting. */ -u16 EEPROMVID ; -u16 EEPROMSVID ; -u8 EEPROMCustomerID; -u8 EEPROMSubCustomerID;u8 EEPROMVersion;u8 EEPROMRegulatory;u8 EEPROMThermalMeter;u8 EEPROMBluetoothCoexist;u8 EEPROMBluetoothType;u8 EEPROMBluetoothAntNum; -u8 EEPROMBluetoothAntIsolation; -u8 EEPROMBluetoothRadioShared;u8 bTXPowerDataReadFromEEPORM;u8 bDisableSWChannelPlan;/* flag of disable software change channel plan */
@@ -226,24 +215,12 @@ struct hal_com_data {u8 Regulation2_4G; -u8 TxPwrInPercentage; - -u8 TxPwrCalibrateRate;/* TX power by rate table */ /* RF: at most 2 = AB = 0/1 */ /* CCK = 0 OFDM = 1 HT-MCS 0-7 = 2 */ -u8 TxPwrByRateTable; -u8 TxPwrByRateBand;s8 TxPwrByRateOffset[MAX_RF_PATH_NUM ][TX_PWR_BY_RATE_NUM_RATE ];/* */ -/* 2 Power Limit Table */ -u8 TxPwrLevelCck[RF_PATH_MAX_92C_88E ][CHANNEL_MAX_NUMBER ]; -u8 TxPwrLevelHT40_1S[RF_PATH_MAX_92C_88E ][CHANNEL_MAX_NUMBER ];/* For HT 40MHZ pwr */ -u8 TxPwrLevelHT40_2S[RF_PATH_MAX_92C_88E ][CHANNEL_MAX_NUMBER ];/* For HT 40MHZ pwr */ -s8 TxPwrHt20Diff[RF_PATH_MAX_92C_88E ][CHANNEL_MAX_NUMBER ];/* HT 20<->40 Pwr diff */ -u8 TxPwrLegacyHtDiff[RF_PATH_MAX_92C_88E ][CHANNEL_MAX_NUMBER ];/* For HT<->legacy pwr diff */ -/* Power Limit Table for 2.4G */ s8 TxPwrLimit_2_4G[MAX_REGULATION_NUM ] [MAX_2_4G_BANDWIDTH_NUM ]
@@ -254,52 +231,26 @@ struct hal_com_data {/* Store the original power by rate value of the base of each rate section of rf path A & B */ u8 TxPwrByRateBase2_4G[MAX_RF_PATH_NUM ][MAX_RATE_SECTION_NUM ]; -/* For power group */ -u8 PwrGroupHT20[RF_PATH_MAX_92C_88E ][CHANNEL_MAX_NUMBER ]; -u8 PwrGroupHT40[RF_PATH_MAX_92C_88E ][CHANNEL_MAX_NUMBER ]; - - - - -u8 PGMaxGroup; -u8 LegacyHTTxPowerDiff;/* Legacy to HT rate power diff */ -/* The current Tx Power Level */ -u8 CurrentCckTxPwrIdx; -u8 CurrentOfdm24GTxPwrIdx; -u8 CurrentBW2024GTxPwrIdx; -u8 CurrentBW4024GTxPwrIdx; -/* Read/write are allow for following hardware information variables */ u8 pwrGroupCnt;u32 MCSTxPowerLevelOriginalOffset[MAX_PG_GROUP ][16 ]; -u32 CCKTxPowerLevelOriginalOffset;u8 CrystalCap; -u32 AntennaTxPath;/* Antenna path Tx */ -u32 AntennaRxPath;/* Antenna path Rx */ -u8 PAType_2G; -u8 LNAType_2G; -u8 ExternalPA_2G; -u8 ExternalLNA_2G;u8 TypeGLNA;u8 TypeGPA;u8 TypeALNA;u8 TypeAPA;u8 RFEType;u8 BoardType; -u8 ExternalPA;u8 bIQKInitialized;bool bLCKInProgress;bool bSwChnl;bool bSetChnlBW; -bool bChnlBWInitialized;bool bNeedIQK; -u8 bLedOpenDrain;/* Support Open-drain arrangement for controlling the LED. Added by Roger, 2009.10.16. */ u8 TxPowerTrackControl;/* for mp mode, turn off txpwrtracking as default */ -u8 b1x1RecvCombine;/* for 1T1R receive combining */ u32 AcParam_BE;/* Original parameter for BE, use for EDCA turbo. */
@@ -307,9 +258,6 @@ struct hal_com_data {u32 RfRegChnlVal[2 ]; -/* RDG enable */ -bool bRDGEnable; -/* for host message to fw */ u8 LastHMEBoxNum;
@@ -320,46 +268,30 @@ struct hal_com_data {u8 RegFwHwTxQCtrl;u8 RegReg542;u8 RegCR_1; -u8 Reg837; -u8 RegRFPathS1;u16 RegRRSR;u8 CurAntenna;u8 AntDivCfg;u8 AntDetection; -u8 TRxAntDivType;u8 ant_path;/* for 8723B s0/s1 selection */ u8 u1ForcedIgiLb;/* forced IGI lower bound */ u8 bDumpRxPkt;/* for debug */ u8 bDumpTxPkt;/* for debug */ -u8 FwRsvdPageStartOffset;/* 2010.06.23. Added by tynli. Reserve page start offset except beacon in TxQ. */ /* 2010/08/09 MH Add CU power down mode. */ bool pwrdown; -/* Add for dual MAC 0--Mac0 1--Mac1 */ -u32 interfaceIndex; -u8 OutEpQueueSel;u8 OutEpNumber;/* 2010/12/10 MH Add for USB aggregation mode dynamic scheme. */ bool UsbRxHighSpeedMode; -/* 2010/11/22 MH Add for slim combo debug mode selective. */ -/* This is used for fix the drawback of CU TSMC-A/UMC-A cut. HW auto suspend ability. Close BT clock. */ -bool SlimComboDbg; - -/* u8 AMPDUDensity; */ -/* Auto FSM to Turn On, include clock, isolation, power control for MAC only */ u8 bMacPwrCtrlOn; -u8 RegIQKFWOffload; -struct submit_ctx iqk_sctx; -enum rt_ampdu_burst AMPDUBurstMode;/* 92C maybe not use, but for compile successfully */ u32 sdio_himr;
@@ -390,6 +322,5 @@ struct hal_com_data { };#define GET_HAL_DATA (__padapter) ((struct hal_com_data *)((__padapter)->HalData)) -#define RT_GetInterfaceSelection (_Adapter) (GET_HAL_DATA(_Adapter)->InterfaceSel)#endif /* __HAL_DATA_H__ */
base-commit: b46e70613266e52adc412f92de7504cd14804f6d
Signature · 1 line
2.54.0
PATCH 2/9 staging: rtl8723bs: remove unused 'PolarityCtl' from struct hal_com_data
In reply to Nikolay KulikovThis field is determined by the value of a bit from the hardware, but the variable is not used after assignment.
--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 1 - drivers/staging/rtl8723bs/include/hal_com_reg.h | 1 - drivers/staging/rtl8723bs/include/hal_data.h | 8 -------- 3 files changed, 10 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -1
@@ -838,7 +838,6 @@ static void ReadChipVersion8723B(struct adapter *padapter) pHalData->MultiFunc |= ((value32 &WL_FUNC_EN ) ?RT_MULTI_FUNC_WIFI :0 ); pHalData->MultiFunc |= ((value32 &BT_FUNC_EN ) ?RT_MULTI_FUNC_BT :0 ); pHalData->MultiFunc |= ((value32 &GPS_FUNC_EN ) ?RT_MULTI_FUNC_GPS :0 ); - pHalData->PolarityCtl = ((value32 &WL_HWPDN_SL ) ?RT_POLARITY_HIGH_ACT :RT_POLARITY_LOW_ACT ); }void rtl8723b_read_chip_version (struct adapter *padapter)
drivers/staging/rtl8723bs/include/hal_com_reg.h +0 -1
@@ -590,7 +590,6 @@#define C2H_EVT_FW_CLOSE 0xFF/* Set by FW indicating that FW had set the C2H command message and it's not yet read by driver. */ /* 2REG_MULTI_FUNC_CTRL(For RTL8723 Only) */ -#define WL_HWPDN_SL BIT(1)/* WiFi HW PDn polarity control */ #define WL_FUNC_EN BIT(2)/* WiFi function enable */ #define BT_FUNC_EN BIT(18)/* BT function enable */ #define GPS_FUNC_EN BIT(22)/* GPS function enable */
drivers/staging/rtl8723bs/include/hal_data.h +0 -8
@@ -21,13 +21,6 @@ enum rt_multi_func {RT_MULTI_FUNC_BT =0x02 , RT_MULTI_FUNC_GPS = 0x04, }; -/* */ -/* <Roger_Notes> For RTL8723 WiFi PDn/GPIO polarity control configuration. 2010.10.08. */ -/* */ -enum rt_polarity_ctl { -RT_POLARITY_LOW_ACT =0 , -RT_POLARITY_HIGH_ACT =1 , -};/* For RTL8723 regulator mode. by tynli. 2011.01.14. */ enum rt_regulator_mode {
@@ -163,7 +156,6 @@ struct dm_priv {struct hal_com_data {enum rt_multi_func MultiFunc;/* For multi-function consideration. */ -enum rt_polarity_ctl PolarityCtl;/* For Wifi PDn Polarity control. */ enum rt_regulator_mode RegulatorMode;/* switching regulator or LDO */ u16 FirmwareVersion;
Signature · 1 line
2.54.0
PATCH 3/9 staging: rtl8723bs: remove unused RegulatorMode from struct hal_com_data
In reply to Nikolay KulikovThis variable is set during initialization but never used, so remove it.
--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 3 --- drivers/staging/rtl8723bs/include/hal_com_reg.h | 1 - drivers/staging/rtl8723bs/include/hal_data.h | 7 ------- 3 files changed, 11 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -3
@@ -829,9 +829,6 @@ static void ReadChipVersion8723B(struct adapter *padapter) value32 =rtw_read32 (padapter,REG_SYS_CFG ); pHalData->chip_normal = ((value32 &RTL_ID ) ? false : true); -/* For regulator mode. by tynli. 2011.01.14 */ - pHalData->RegulatorMode = ((value32 &SPS_SEL ) ?RT_LDO_REGULATOR :RT_SWITCHING_REGULATOR ); -/* For multi-function consideration. Added by Roger, 2010.10.06. */ pHalData->MultiFunc =RT_MULTI_FUNC_NONE ; value32 =rtw_read32 (padapter,REG_MULTI_FUNC_CTRL );
drivers/staging/rtl8723bs/include/hal_com_reg.h +0 -1
@@ -342,7 +342,6 @@#define VENDOR_ID BIT(19)#define RTL_ID BIT(23)/* TestChip ID, 1:Test(RLE); 0:MP(RL) */ -#define SPS_SEL BIT(24)/* 1:LDO regulator mode; 0:Switching regulator mode */ #define CHIP_VER_RTL_MASK 0xF000/* Bit 12 ~ 15 */
drivers/staging/rtl8723bs/include/hal_data.h +0 -7
@@ -22,12 +22,6 @@ enum rt_multi_func { RT_MULTI_FUNC_GPS = 0x04, }; -/* For RTL8723 regulator mode. by tynli. 2011.01.14. */ -enum rt_regulator_mode { -RT_SWITCHING_REGULATOR =0 , -RT_LDO_REGULATOR =1 , -}; -enum rt_ampdu_burst {RT_AMPDU_BURST_NONE =0 ,RT_AMPDU_BURST_92D =1 ,
@@ -156,7 +150,6 @@ struct dm_priv {struct hal_com_data {enum rt_multi_func MultiFunc;/* For multi-function consideration. */ -enum rt_regulator_mode RegulatorMode;/* switching regulator or LDO */ u16 FirmwareVersion;u16 FirmwareVersionRev;
Signature · 1 line
2.54.0
PATCH 4/9 staging: rtl8723bs: remove unused 'MultiFunc' from struct hal_com_data
In reply to Nikolay KulikovThis field is set during initialization but never used, so remove it and related macros and enum.
--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 7 ------- drivers/staging/rtl8723bs/include/hal_com_reg.h | 2 -- drivers/staging/rtl8723bs/include/hal_data.h | 12 ------------ drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 5 ----- 4 files changed, 26 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -7
@@ -828,13 +828,6 @@ static void ReadChipVersion8723B(struct adapter *padapter) value32 =rtw_read32 (padapter,REG_SYS_CFG ); pHalData->chip_normal = ((value32 &RTL_ID ) ? false : true); - -/* For multi-function consideration. Added by Roger, 2010.10.06. */ - pHalData->MultiFunc =RT_MULTI_FUNC_NONE ; - value32 =rtw_read32 (padapter,REG_MULTI_FUNC_CTRL ); - pHalData->MultiFunc |= ((value32 &WL_FUNC_EN ) ?RT_MULTI_FUNC_WIFI :0 ); - pHalData->MultiFunc |= ((value32 &BT_FUNC_EN ) ?RT_MULTI_FUNC_BT :0 ); - pHalData->MultiFunc |= ((value32 &GPS_FUNC_EN ) ?RT_MULTI_FUNC_GPS :0 ); }void rtl8723b_read_chip_version (struct adapter *padapter)
drivers/staging/rtl8723bs/include/hal_com_reg.h +0 -2
@@ -589,8 +589,6 @@#define C2H_EVT_FW_CLOSE 0xFF/* Set by FW indicating that FW had set the C2H command message and it's not yet read by driver. */ /* 2REG_MULTI_FUNC_CTRL(For RTL8723 Only) */ -#define WL_FUNC_EN BIT(2)/* WiFi function enable */ #define BT_FUNC_EN BIT(18)/* BT function enable */ -#define GPS_FUNC_EN BIT(22)/* GPS function enable */ #endif /* __HAL_COMMON_H__ */
drivers/staging/rtl8723bs/include/hal_data.h +0 -12
@@ -12,16 +12,6 @@#include <hal_sdio.h> -/* */ -/* <Roger_Notes> For RTL8723 WiFi/BT/GPS multi-function configuration. 2010.10.06. */ -/* */ -enum rt_multi_func { -RT_MULTI_FUNC_NONE =0x00 , -RT_MULTI_FUNC_WIFI =0x01 , -RT_MULTI_FUNC_BT =0x02 , -RT_MULTI_FUNC_GPS =0x04 , -}; -enum rt_ampdu_burst {RT_AMPDU_BURST_NONE =0 ,RT_AMPDU_BURST_92D =1 ,
@@ -149,8 +139,6 @@ struct dm_priv {struct hal_com_data { -enum rt_multi_func MultiFunc;/* For multi-function consideration. */ -u16 FirmwareVersion;u16 FirmwareVersionRev;u16 FirmwareSubVersion;
drivers/staging/rtl8723bs/include/rtl8723b_hal.h +0 -5
@@ -180,11 +180,6 @@ enum { /* tag_Package_Definition */ PACKAGE_TFBGA79 }; -#define INCLUDE_MULTI_FUNC_BT (_Adapter) \ - (GET_HAL_DATA(_Adapter)->MultiFunc & RT_MULTI_FUNC_BT) -#define INCLUDE_MULTI_FUNC_GPS (_Adapter) \ - (GET_HAL_DATA(_Adapter)->MultiFunc & RT_MULTI_FUNC_GPS) -/* rtl8723a_hal_init.c */ s32 rtl8723b_FirmwareDownload (struct adapter *padapter,bool bUsedWoWLANFw);void rtl8723b_FirmwareSelfReset (struct adapter *padapter);
Signature · 1 line
2.54.0
PATCH 5/9 staging: rtl8723bs: remove unused 'EEPROMCustomerID' from hal_com_data
In reply to Nikolay KulikovThis field is set during initialization but never used, so remove it.
--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 12 ------------ drivers/staging/rtl8723bs/hal/sdio_halinit.c | 1 - drivers/staging/rtl8723bs/include/hal_data.h | 1 - drivers/staging/rtl8723bs/include/hal_pg.h | 1 - drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 2 -- 5 files changed, 17 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -12
@@ -1460,18 +1460,6 @@ void Hal_EfuseParseChnlPlan_8723B(Hal_ChannelPlanToRegulation (padapter, padapter->mlmepriv.ChannelPlan); } -void Hal_EfuseParseCustomerID_8723B ( -struct adapter *padapter,u8 *hwinfo,bool AutoLoadFail -) -{ -struct hal_com_data *pHalData =GET_HAL_DATA (padapter); - -if (!AutoLoadFail) - pHalData->EEPROMCustomerID = hwinfo[EEPROM_CustomID_8723B]; -else - pHalData->EEPROMCustomerID =0 ; -} -void Hal_EfuseParseXtal_8723B (struct adapter *padapter,u8 *hwinfo,bool AutoLoadFail )
drivers/staging/rtl8723bs/hal/sdio_halinit.c +0 -1
@@ -1046,7 +1046,6 @@ static void _ReadEfuseInfo8723BS(struct adapter *padapter)Hal_EfuseParseChnlPlan_8723B (padapter, hwinfo, pEEPROM->bautoload_fail_flag);Hal_EfuseParseXtal_8723B (padapter, hwinfo, pEEPROM->bautoload_fail_flag);Hal_EfuseParseThermalMeter_8723B (padapter, hwinfo, pEEPROM->bautoload_fail_flag); -Hal_EfuseParseCustomerID_8723B (padapter, hwinfo, pEEPROM->bautoload_fail_flag);Hal_EfuseParseVoltage_8723B (padapter, hwinfo, pEEPROM->bautoload_fail_flag);
drivers/staging/rtl8723bs/include/hal_data.h +0 -1
@@ -162,7 +162,6 @@ struct hal_com_data {u8 PackageType;/* EEPROM setting. */ -u8 EEPROMCustomerID;u8 EEPROMVersion;u8 EEPROMRegulatory;u8 EEPROMThermalMeter;
drivers/staging/rtl8723bs/include/hal_pg.h +0 -1
@@ -39,7 +39,6 @@#define EEPROM_RF_BOARD_OPTION_8723B 0xC1#define EEPROM_RF_BT_SETTING_8723B 0xC3#define EEPROM_VERSION_8723B 0xC4 -#define EEPROM_CustomID_8723B 0xC5#define EEPROM_DEFAULT_DIFF 0XFE/* RTL8723BS */
drivers/staging/rtl8723bs/include/rtl8723b_hal.h +0 -2
@@ -202,8 +202,6 @@ void Hal_EfuseParseEEPROMVer_8723B(struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail);void Hal_EfuseParseChnlPlan_8723B (struct adapter *padapter,u8 *hwinfo,bool AutoLoadFail); -void Hal_EfuseParseCustomerID_8723B (struct adapter *padapter,u8 *hwinfo, -bool AutoLoadFail);void Hal_EfuseParseXtal_8723B (struct adapter *padapter,u8 *hwinfo,bool AutoLoadFail); void Hal_EfuseParseThermalMeter_8723B(struct adapter *padapter, u8 *hwinfo,
Signature · 1 line
2.54.0
PATCH 6/9 staging: rtl8723bs: remove unused ForcedDataRate from hal_com_data
In reply to Nikolay KulikovThis field is set once and never used, so remove it.
--- drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 1 - drivers/staging/rtl8723bs/include/hal_data.h | 1 - 2 files changed, 2 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c +0 -1
@@ -94,7 +94,6 @@ static void Update_ODM_ComInfo_8723b(struct adapter *Adapter)ODM_CmnInfoHook (pDM_Odm,ODM_CMNINFO_NET_CLOSED , &(Adapter->net_closed));ODM_CmnInfoHook (pDM_Odm,ODM_CMNINFO_MP_MODE , &zero);ODM_CmnInfoHook (pDM_Odm,ODM_CMNINFO_FORCED_IGI_LB , &(pHalData->u1ForcedIgiLb)); -ODM_CmnInfoHook (pDM_Odm,ODM_CMNINFO_FORCED_RATE , &(pHalData->ForcedDataRate));ODM_CmnInfoHook (pDM_Odm,ODM_CMNINFO_SCAN , &(pmlmepriv->bScanInProcess));ODM_CmnInfoHook (pDM_Odm,ODM_CMNINFO_POWER_SAVING , &(pwrctrlpriv->bpower_saving));
drivers/staging/rtl8723bs/include/hal_data.h +0 -1
@@ -154,7 +154,6 @@ struct hal_com_data {u16 CustomerID;u16 BasicRateSet; -u16 ForcedDataRate;/* Force Data Rate. 0: Auto, 0x02: 1M ~ 0x6C: 54M. */ u32 ReceiveConfig;/* rf_ctrl */
Signature · 1 line
2.54.0
PATCH 7/9 staging: rtl8723bs: remove unused EEPROMVersion from struct hal_com_data
In reply to Nikolay KulikovA value is written to this field, but it is never used. Remove it, along with the associated functions and macros, to simplify the code.
--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 12 ------------ drivers/staging/rtl8723bs/hal/sdio_halinit.c | 1 - drivers/staging/rtl8723bs/include/hal_data.h | 1 - drivers/staging/rtl8723bs/include/hal_pg.h | 1 - drivers/staging/rtl8723bs/include/rtl8723b_hal.h | 2 -- 5 files changed, 17 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -12
@@ -1390,18 +1390,6 @@ void Hal_EfuseParseBTCoexistInfo_8723B(hal_btcoex_SetSingleAntPath (padapter, pHalData->ant_path); } -void Hal_EfuseParseEEPROMVer_8723B ( -struct adapter *padapter,u8 *hwinfo,bool AutoLoadFail -) -{ -struct hal_com_data *pHalData =GET_HAL_DATA (padapter); - -if (!AutoLoadFail) - pHalData->EEPROMVersion = hwinfo[EEPROM_VERSION_8723B ]; -else - pHalData->EEPROMVersion =1 ; -} -void Hal_EfuseParsePackageType_8723B (struct adapter *padapter,u8 *hwinfo,bool AutoLoadFail )
drivers/staging/rtl8723bs/hal/sdio_halinit.c +0 -1
@@ -1031,7 +1031,6 @@ static void _ReadEfuseInfo8723BS(struct adapter *padapter)Hal_InitPGData (padapter, hwinfo);Hal_EfuseParseIDCode (padapter, hwinfo); -Hal_EfuseParseEEPROMVer_8723B (padapter, hwinfo, pEEPROM->bautoload_fail_flag);Hal_EfuseParseMACAddr_8723BS (padapter, hwinfo, pEEPROM->bautoload_fail_flag);
drivers/staging/rtl8723bs/include/hal_data.h +0 -1
@@ -161,7 +161,6 @@ struct hal_com_data {u8 PackageType;/* EEPROM setting. */ -u8 EEPROMVersion;u8 EEPROMRegulatory;u8 EEPROMThermalMeter;u8 EEPROMBluetoothCoexist;
drivers/staging/rtl8723bs/include/hal_pg.h +0 -1
@@ -38,7 +38,6 @@#define EEPROM_RF_BOARD_OPTION_8723B 0xC1#define EEPROM_RF_BT_SETTING_8723B 0xC3 -#define EEPROM_VERSION_8723B 0xC4#define EEPROM_DEFAULT_DIFF 0XFE/* RTL8723BS */
drivers/staging/rtl8723bs/include/rtl8723b_hal.h +0 -2
@@ -198,8 +198,6 @@ void Hal_EfuseParseTxPowerInfo_8723B(struct adapter *padapter, u8 *PROMContent, bool AutoLoadFail);void Hal_EfuseParseBTCoexistInfo_8723B (struct adapter *padapter,u8 *hwinfo,bool AutoLoadFail); -void Hal_EfuseParseEEPROMVer_8723B (struct adapter *padapter,u8 *hwinfo, -bool AutoLoadFail);void Hal_EfuseParseChnlPlan_8723B (struct adapter *padapter,u8 *hwinfo,bool AutoLoadFail); void Hal_EfuseParseXtal_8723B(struct adapter *padapter, u8 *hwinfo,
Signature · 1 line
2.54.0
PATCH 8/9 staging: rtl8723bs: remove unused EEPROMBluetoothType from hal_com_data
In reply to Nikolay KulikovThe value 'BT_RTL8723B' is written to this field, but it is not used in any other way, so remove it.
--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 3 --- drivers/staging/rtl8723bs/include/hal_data.h | 1 - drivers/staging/rtl8723bs/include/hal_pg.h | 4 ---- 3 files changed, 8 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -3
@@ -1346,8 +1346,6 @@ void Hal_EfuseParseBTCoexistInfo_8723B(else pHalData->EEPROMBluetoothCoexist = false; - pHalData->EEPROMBluetoothType =BT_RTL8723B ; - tempval = hwinfo[EEPROM_RF_BT_SETTING_8723B ];if (tempval !=0xFF ) { pHalData->EEPROMBluetoothAntNum = tempval &BIT (0 );
@@ -1366,7 +1364,6 @@ void Hal_EfuseParseBTCoexistInfo_8723B( } }else { pHalData->EEPROMBluetoothCoexist = false; - pHalData->EEPROMBluetoothType =BT_RTL8723B ; pHalData->EEPROMBluetoothAntNum = Ant_x1; pHalData->ant_path =RF_PATH_A ; }
drivers/staging/rtl8723bs/include/hal_data.h +0 -1
@@ -164,7 +164,6 @@ struct hal_com_data {u8 EEPROMRegulatory;u8 EEPROMThermalMeter;u8 EEPROMBluetoothCoexist; -u8 EEPROMBluetoothType;u8 EEPROMBluetoothAntNum;u8 bTXPowerDataReadFromEEPORM;u8 bDisableSWChannelPlan;/* flag of disable software change channel plan */
drivers/staging/rtl8723bs/include/hal_pg.h +0 -4
@@ -60,8 +60,4 @@ enum { Ant_x1 =1 }; -enum { -BT_RTL8723B =8 , -}; -#endif
Signature · 1 line
2.54.0
PATCH 9/9 staging: rtl8723bs: remove unused 'bTXPowerDataReadFromEEPORM'
In reply to Nikolay KulikovThe 'bTXPowerDataReadFromEEPORM' field of the struct hal_com_data is set but never used; remove it.
--- drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 -- drivers/staging/rtl8723bs/include/hal_data.h | 1 - 2 files changed, 3 deletions(-)
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -2
@@ -1215,8 +1215,6 @@ static void Hal_ReadPowerValueFromPROM_8723B(return ; } - pHalData->bTXPowerDataReadFromEEPORM = true;/* YJ, move, 120316 */ -for (rfPath =0 ; rfPath <MAX_RF_PATH ; rfPath++) {/* 2 2.4G default value */ for (group =0 ; group <MAX_CHNL_GROUP_24G ; group++) {
drivers/staging/rtl8723bs/include/hal_data.h +0 -1
@@ -165,7 +165,6 @@ struct hal_com_data {u8 EEPROMThermalMeter;u8 EEPROMBluetoothCoexist;u8 EEPROMBluetoothAntNum; -u8 bTXPowerDataReadFromEEPORM;u8 bDisableSWChannelPlan;/* flag of disable software change channel plan */ bool EepromOrEfuse;
Signature · 1 line
2.54.0
Greg Kroah-Hartman
maintainerQuoted 3 lines · Nikolay Kulikov
This series removes several unused fields from the struct
hal_com_data. These fields either simply take up space or set but never subsequently used.
With this series applied, the build breaks:
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c: In function ‘Hal_ReadPowerValueFromPROM_8723B’:drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:1185:30: error: unused variable ‘pHalData’ [-Werror=unused-variable]
1185 | struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);
| ^~~~~~~~
cc1: all warnings being treated as errors