staging: r8188eu: odm cleanups
cover staging: r8188eu: odm cleanups
This series removes unused and some set but never used variables from the odm_dm_struct structure.
Tested on x86_64 with InterTech DMG-02.
Michael Straube (5):
staging: r8188eu: remove unused variables from odm_dm_struct
staging: r8188eu: pbNet_closed is set but never used
staging: r8188eu: pSecurity is set but never used
staging: r8188eu: pNumTxBytesUnicast is set but never used
staging: r8188eu: pNumRxBytesUnicast is set but never used
drivers/staging/r8188eu/hal/odm.c | 12 ---- drivers/staging/r8188eu/hal/rtl8188e_dm.c | 4 -- drivers/staging/r8188eu/include/odm.h | 73 +---------------------- 3 files changed, 1 insertion(+), 88 deletions(-)
Signature · 1 line
2.34.0
PATCH 1/5 staging: r8188eu: remove unused variables from odm_dm_struct
There are many unused variables in the odm_dm_struct structure. Remove them.
--- drivers/staging/r8188eu/include/odm.h | 63 +-------------------------- 1 file changed, 2 insertions(+), 61 deletions(-)
drivers/staging/r8188eu/include/odm.h +2 -61
@@ -4,12 +4,6 @@ #ifndef __HALDMOUTSRC_H__ #define __HALDMOUTSRC_H__ -/* Add for AP/ADSLpseudo DM structuer requirement. */ -/* We need to remove to other position??? */ -struct rtl8192cd_priv { - u8 temp; -}; - struct rtw_dig { u8 Dig_Enable_Flag; u8 Dig_Ext_Port_Stage;
@@ -459,13 +453,7 @@ enum ant_div_type {/* Copy from SD4 defined structure. We use to support PHY DM integration. */ struct odm_dm_struct { -/* Add for different team use temporarily */ struct adapter *Adapter;/* For CE/NIC team */ -struct rtl8192cd_priv *priv;/* For AP/ADSL team */ -/* WHen you use above pointers, they must be initialized. */ -bool odm_ready; - -struct rtl8192cd_priv *fake_priv;/* ODM HANDLE, DRIVER NEEDS NOT TO HOOK------ */ bool bCckHighPower;
@@ -485,11 +473,6 @@ struct odm_dm_struct {/* Dynamic Value */ /* POINTER REFERENCE----------- */ - -u8 u8_temp; -bool bool_temp; -struct adapter *adapter_temp; -/* TX Unicast byte count */ u64 *pNumTxBytesUnicast;/* RX Unicast byte count */
@@ -504,18 +487,11 @@ struct odm_dm_struct {u8 *pBandWidth;/* Central channel location Ch1/Ch2/.... */ u8 *pChannel;/* central channel number */ -/* Common info for 92D DMSP */ -bool *pbGetValueFromOtherMac; -struct adapter **pBuddyAdapter; -bool *pbMasterOfDMSP;/* MAC0: master, MAC1: slave */ /* Common info for Status */ bool *pbScanInProcess;bool *pbPowerSaving; -/* CCA Path 2-path/path-A/path-B = 0/1/2; using ODM_CCA_PATH_E. */ -u8 *pOnePathCCA; -/* pMgntInfo->AntennaTest */ -u8 *pAntennaTest; +bool *pbNet_closed;/* POINTER REFERENCE----------- */ /* */
@@ -524,16 +500,8 @@ struct odm_dm_struct {bool bWIFI_Display;bool bLinked;u8 RSSI_Min; -u8 InterfaceIndex;/* Add for 92D dual MAC: 0--Mac0 1--Mac1 */ bool bIsMPChip;bool bOneEntryOnly; -/* Common info for BTDM */ -bool bBtDisabled;/* BT is disabled */ -bool bBtHsOperation;/* BT HS mode is under progress */ -u8 btHsDigVal;/* use BT rssi to decide the DIG value */ -bool bBtDisableEdcaTurbo;/* Under some condition, don't enable the -* EDCA Turbo */ -bool bBtBusy;/* BT is busy. */ /* CALL BY VALUE------------- */ /* 2 Define STA info. */
@@ -549,38 +517,18 @@ struct odm_dm_struct {/* Latest packet phy info (ODM write) */ struct odm_phy_dbg_info PhyDbgInfo; -/* Latest packet phy info (ODM write) */ -struct odm_mac_status_info *pMacInfo; - -/* Different Team independt structure?? */ -/* ODM Structure */ struct fast_ant_train DM_FatTable;struct rtw_dig DM_DigTable;struct rtl_ps DM_PSTable;struct dyn_primary_cca DM_PriCCA; -struct rx_hpc DM_RXHP_Table;struct false_alarm_stats FalseAlmCnt; -struct false_alarm_stats FlaseAlmCntBuddyAdapter;struct sw_ant_switch DM_SWAT_Table;bool RSSI_test;struct edca_turbo DM_EDCA_Table; -u32 WMMEDCA_BE ; -/* Copy from SD4 structure */ -/* */ -/* ================================================== */ -/* */ - -bool *pbDriverStopped; -bool *pbDriverIsGoingToPnpSetPowerSleep; -bool *pinit_adpt_in_progress;/* PSD */ -bool bUserAssignLevel; -struct timer_list PSDTimer; -u8 RSSI_BT ;/* come from BT */ -bool bPSDinProcess;bool bDMInitialGainEnable;struct odm_rate_adapt RateAdaptive;
@@ -596,14 +544,7 @@ struct odm_dm_struct {u8 BbSwingIdxCckCurrent;u8 BbSwingIdxCckBase;bool BbSwingFlagCck; -/* ODM system resource. */ - -/* ODM relative time. */ -struct timer_list PathDivSwitchTimer; -/* 2011.09.27 add for Path Diversity */ -struct timer_list CCKPathDiversityTimer; -struct timer_list FastAntTrainingTimer; -};/* DM_Dynamic_Mechanism_Structure */ +};enum odm_bb_config_type {CONFIG_BB_PHY_REG ,
Signature · 1 line
2.34.0
PATCH 2/5 staging: r8188eu: pbNet_closed is set but never used
In reply to Michael StraubepbNet_closed in odm_dm_struct is set but never used. Remove it.
--- drivers/staging/r8188eu/hal/odm.c | 3 --- drivers/staging/r8188eu/hal/rtl8188e_dm.c | 1 - drivers/staging/r8188eu/include/odm.h | 3 --- 3 files changed, 7 deletions(-)
drivers/staging/r8188eu/hal/odm.c +0 -3
@@ -252,9 +252,6 @@ void ODM_CmnInfoHook(struct odm_dm_struct *pDM_Odm, enum odm_common_info_def Cmncase ODM_CMNINFO_POWER_SAVING : pDM_Odm->pbPowerSaving = (bool *)pValue;break ; -case ODM_CMNINFO_NET_CLOSED : - pDM_Odm->pbNet_closed = (bool *)pValue; -break ;/* To remove the compiler warning, must add an empty default statement to handle the other values. */ default :/* do nothing */
drivers/staging/r8188eu/hal/rtl8188e_dm.c +0 -1
@@ -75,7 +75,6 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter)ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_SEC_MODE , &Adapter->securitypriv.dot11PrivacyAlgrthm);ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_BW , &hal_data->CurrentChannelBW);ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_CHNL , &hal_data->CurrentChannel); -ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_NET_CLOSED , &Adapter->net_closed);ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_SCAN , &pmlmepriv->bScanInProcess);ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_POWER_SAVING , &pwrctrlpriv->bpower_saving);ODM_CmnInfoInit (dm_odm,ODM_CMNINFO_RF_ANTENNA_TYPE , hal_data->TRxAntDivType);
drivers/staging/r8188eu/include/odm.h +0 -3
@@ -234,7 +234,6 @@ enum odm_common_info_def {ODM_CMNINFO_SCAN , ODM_CMNINFO_POWER_SAVING, - ODM_CMNINFO_NET_CLOSED,/* POINTER REFERENCE----------- */ /* CALL BY VALUE------------- */
@@ -491,8 +490,6 @@ struct odm_dm_struct {/* Common info for Status */ bool *pbScanInProcess;bool *pbPowerSaving; - -bool *pbNet_closed;/* POINTER REFERENCE----------- */ /* */ /* CALL BY VALUE------------- */
Signature · 1 line
2.34.0
PATCH 3/5 staging: r8188eu: pSecurity is set but never used
In reply to Michael StraubepSecurity in odm_dm_struct is set but never used. Remove it.
--- drivers/staging/r8188eu/hal/odm.c | 3 --- drivers/staging/r8188eu/hal/rtl8188e_dm.c | 1 - drivers/staging/r8188eu/include/odm.h | 3 --- 3 files changed, 7 deletions(-)
drivers/staging/r8188eu/hal/odm.c +0 -3
@@ -237,9 +237,6 @@ void ODM_CmnInfoHook(struct odm_dm_struct *pDM_Odm, enum odm_common_info_def Cmncase ODM_CMNINFO_SEC_CHNL_OFFSET : pDM_Odm->pSecChOffset = (u8 *)pValue;break ; -case ODM_CMNINFO_SEC_MODE : - pDM_Odm->pSecurity = (u8 *)pValue; -break ;case ODM_CMNINFO_BW : pDM_Odm->pBandWidth = (u8 *)pValue;break ;
drivers/staging/r8188eu/hal/rtl8188e_dm.c +0 -1
@@ -72,7 +72,6 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter)ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_RX_UNI , &Adapter->recvpriv.rx_bytes);ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_WM_MODE , &pmlmeext->cur_wireless_mode);ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_SEC_CHNL_OFFSET , &hal_data->nCur40MhzPrimeSC); -ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_SEC_MODE , &Adapter->securitypriv.dot11PrivacyAlgrthm);ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_BW , &hal_data->CurrentChannelBW);ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_CHNL , &hal_data->CurrentChannel);ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_SCAN , &pmlmepriv->bScanInProcess);
drivers/staging/r8188eu/include/odm.h +0 -3
@@ -228,7 +228,6 @@ enum odm_common_info_def {ODM_CMNINFO_RX_UNI ,ODM_CMNINFO_WM_MODE ,/* ODM_WIRELESS_MODE_E */ ODM_CMNINFO_SEC_CHNL_OFFSET ,/* ODM_SEC_CHNL_OFFSET_E */ -ODM_CMNINFO_SEC_MODE ,/* ODM_SECURITY_E */ ODM_CMNINFO_BW ,/* ODM_BW_E */ ODM_CMNINFO_CHNL,
@@ -480,8 +479,6 @@ struct odm_dm_struct {u8 *pWirelessMode;/* ODM_WIRELESS_MODE_E */ /* Secondary channel offset don't_care/below/above = 0/1/2 */ u8 *pSecChOffset; -/* Security mode Open/WEP/AES/TKIP = 0/1/2/3 */ -u8 *pSecurity;/* BW info 20M/40M/80M = 0/1/2 */ u8 *pBandWidth;/* Central channel location Ch1/Ch2/.... */
Signature · 1 line
2.34.0
PATCH 4/5 staging: r8188eu: pNumTxBytesUnicast is set but never used
In reply to Michael StraubepNumTxBytesUnicast in odm_dm_struct is set but never used. Remove it.
--- drivers/staging/r8188eu/hal/odm.c | 3 --- drivers/staging/r8188eu/hal/rtl8188e_dm.c | 1 - drivers/staging/r8188eu/include/odm.h | 3 --- 3 files changed, 7 deletions(-)
drivers/staging/r8188eu/hal/odm.c +0 -3
@@ -225,9 +225,6 @@ void ODM_CmnInfoHook(struct odm_dm_struct *pDM_Odm, enum odm_common_info_def Cmn/* */ switch (CmnInfo) {/* Dynamic call by reference pointer. */ -case ODM_CMNINFO_TX_UNI : - pDM_Odm->pNumTxBytesUnicast = (u64 *)pValue; -break ;case ODM_CMNINFO_RX_UNI : pDM_Odm->pNumRxBytesUnicast = (u64 *)pValue;break ;
drivers/staging/r8188eu/hal/rtl8188e_dm.c +0 -1
@@ -68,7 +68,6 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter)ODM_CmnInfoUpdate (dm_odm,ODM_CMNINFO_ABILITY , pdmpriv->InitODMFlag); -ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_TX_UNI , &Adapter->xmitpriv.tx_bytes);ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_RX_UNI , &Adapter->recvpriv.rx_bytes);ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_WM_MODE , &pmlmeext->cur_wireless_mode);ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_SEC_CHNL_OFFSET , &hal_data->nCur40MhzPrimeSC);
drivers/staging/r8188eu/include/odm.h +0 -3
@@ -224,7 +224,6 @@ enum odm_common_info_def {/* Dynamic value: */ /* POINTER REFERENCE----------- */ -ODM_CMNINFO_TX_UNI ,ODM_CMNINFO_RX_UNI ,ODM_CMNINFO_WM_MODE ,/* ODM_WIRELESS_MODE_E */ ODM_CMNINFO_SEC_CHNL_OFFSET, /* ODM_SEC_CHNL_OFFSET_E */
@@ -471,8 +470,6 @@ struct odm_dm_struct {/* Dynamic Value */ /* POINTER REFERENCE----------- */ -/* TX Unicast byte count */ -u64 *pNumTxBytesUnicast;/* RX Unicast byte count */ u64 *pNumRxBytesUnicast;/* Wireless mode B/G/A/N = BIT(0)/BIT(1)/BIT(2)/BIT(3) */
Signature · 1 line
2.34.0
PATCH 5/5 staging: r8188eu: pNumRxBytesUnicast is set but never used
In reply to Michael StraubepNumRxBytesUnicast in odm_dm_struct is set but never used. Remove it.
--- drivers/staging/r8188eu/hal/odm.c | 3 --- drivers/staging/r8188eu/hal/rtl8188e_dm.c | 1 - drivers/staging/r8188eu/include/odm.h | 3 --- 3 files changed, 7 deletions(-)
drivers/staging/r8188eu/hal/odm.c +0 -3
@@ -225,9 +225,6 @@ void ODM_CmnInfoHook(struct odm_dm_struct *pDM_Odm, enum odm_common_info_def Cmn/* */ switch (CmnInfo) {/* Dynamic call by reference pointer. */ -case ODM_CMNINFO_RX_UNI : - pDM_Odm->pNumRxBytesUnicast = (u64 *)pValue; -break ;case ODM_CMNINFO_WM_MODE : pDM_Odm->pWirelessMode = (u8 *)pValue;break ;
drivers/staging/r8188eu/hal/rtl8188e_dm.c +0 -1
@@ -68,7 +68,6 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter)ODM_CmnInfoUpdate (dm_odm,ODM_CMNINFO_ABILITY , pdmpriv->InitODMFlag); -ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_RX_UNI , &Adapter->recvpriv.rx_bytes);ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_WM_MODE , &pmlmeext->cur_wireless_mode);ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_SEC_CHNL_OFFSET , &hal_data->nCur40MhzPrimeSC);ODM_CmnInfoHook (dm_odm,ODM_CMNINFO_BW , &hal_data->CurrentChannelBW);
drivers/staging/r8188eu/include/odm.h +0 -3
@@ -224,7 +224,6 @@ enum odm_common_info_def {/* Dynamic value: */ /* POINTER REFERENCE----------- */ -ODM_CMNINFO_RX_UNI ,ODM_CMNINFO_WM_MODE ,/* ODM_WIRELESS_MODE_E */ ODM_CMNINFO_SEC_CHNL_OFFSET ,/* ODM_SEC_CHNL_OFFSET_E */ ODM_CMNINFO_BW, /* ODM_BW_E */
@@ -470,8 +469,6 @@ struct odm_dm_struct {/* Dynamic Value */ /* POINTER REFERENCE----------- */ -/* RX Unicast byte count */ -u64 *pNumRxBytesUnicast;/* Wireless mode B/G/A/N = BIT(0)/BIT(1)/BIT(2)/BIT(3) */ u8 *pWirelessMode;/* ODM_WIRELESS_MODE_E */ /* Secondary channel offset don't_care/below/above = 0/1/2 */
Signature · 1 line
2.34.0
Thus wrote Michael Straube ([email protected]):
Quoted 12 lines
This series removes unused and some set but never used variables from the
odm_dm_structstructure.Tested on
x86_64with InterTech DMG-02.Michael Straube (5):
staging: r8188eu: remove unused variables fromodm_dm_struct
staging: r8188eu:pbNet_closedis set but never used
staging: r8188eu: pSecurity is set but never used
staging: r8188eu: pNumTxBytesUnicast is set but never used
staging: r8188eu: pNumRxBytesUnicast is set but never used
Quoted 7 lines
drivers/staging/r8188eu/hal/odm.c | 12 ---- drivers/staging/r8188eu/hal/rtl8188e_dm.c | 4 -- drivers/staging/r8188eu/include/odm.h | 73 +---------------------- 3 files changed, 1 insertion(+), 88 deletions(-)Signature · 1 line
2.34.0
Looks good to me. For all patches: