staging: rtl8192e: Remove unused RF90_PATH_C and ..D starting .._phyreg.h
cover staging: rtl8192e: Remove unused RF90_PATH_C and ..D starting .._phyreg.h
Remove unused RF90_PATH_C and RF90_PATH_D. Justification can be quite complex. Some variables are unused then those are completely removed.
The following code lines are mandatory:
enum rf90_radio_path {
RF90_PATH_A = 0,
RF90_PATH_B = 1,
RF90_PATH_C = 2,
RF90_PATH_D = 3,
RF90_PATH_MAX
};Index is saved in variable name: eRFPath
Code likes to shorten variable name to the array with this line:
pPhyReg = &priv->phy_reg_def[eRFPath];
Tested with rtl8192e
Transferred this patch over wlan connection of rtl8192e
Philipp Hortmann (12):
staging: rtl8192e: Remove unused RF90_PATH_C and ..D in
rtl92e_config_rf
staging: rtl8192e: Remove unused RF90_PATH_C and ..D for rfintfs
staging: rtl8192e: Remove unused variable rfintfi
staging: rtl8192e: Remove unused RF90_PATH_C and ..D for rfintfo and
..fe
staging: rtl8192e: Remove unused RF90_PATH_C and ..D for rf3wireOffset
staging: rtl8192e: Remove unused variable rfLSSI_Select and
rfTxGainStage
staging: rtl8192e: Remove unused variable rfHSSIPara1 and
rfSwitchControl
staging: rtl8192e: Remove unused variable rfAGCControl1 and
rfAGCControl2
staging: rtl8192e: Remove unused variable rfRxIQImbalance and rfRxAFE
staging: rtl8192e: Remove unused variable rfTxIQImbalance and rfTxAFE
staging: rtl8192e: Remove unused RF90_PATH_C and ..D for
rfLSSIReadBack
staging: rtl8192e: Remove unused RF90_PATH_C and ..D for rfHSSIPara2
.../staging/rtl8192e/rtl8192e/r8190P_def.h | 11 --- .../rtl8192e/rtl8192e/r8190P_rtl8256.c | 4 -- .../staging/rtl8192e/rtl8192e/r8192E_phy.c | 68 ------------------- .../staging/rtl8192e/rtl8192e/r8192E_phyreg.h | 37 ---------- 4 files changed, 120 deletions(-)
Signature · 1 line
2.39.2
PATCH 1/12 staging: rtl8192e: Remove unused RF90_PATH_C and ..D in rtl92e_config_rf
Remove unused case RF90_PATH_C and case RF90_PATH_D. The termination condition for the loop is set topriv->num_total_rf_path = RTL819X_TOTAL_RF_PATH = 2. Because of this eRFPath cannot reach the values 2 for RF90_PATH_C and 3 for RF90_PATH_D.
--- drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c +0 -4
@@ -74,12 +74,10 @@ bool rtl92e_config_rf(struct net_device *dev)switch (eRFPath) {case RF90_PATH_A : -case RF90_PATH_C : u4RegValue =rtl92e_get_bb_reg (dev, pPhyReg->rfintfs, bRFSI_RFENV);break ;case RF90_PATH_B : -case RF90_PATH_D : u4RegValue =rtl92e_get_bb_reg (dev, pPhyReg->rfintfs, bRFSI_RFENV<<16 );break ;
@@ -120,12 +118,10 @@ bool rtl92e_config_rf(struct net_device *dev)switch (eRFPath) {case RF90_PATH_A : -case RF90_PATH_C :rtl92e_set_bb_reg (dev, pPhyReg->rfintfs, bRFSI_RFENV, u4RegValue);break ;case RF90_PATH_B : -case RF90_PATH_D :rtl92e_set_bb_reg (dev, pPhyReg->rfintfs, bRFSI_RFENV<<16 , u4RegValue);break ;
Signature · 1 line
2.39.2
PATCH 2/12 staging: rtl8192e: Remove unused RF90_PATH_C and ..D for rfintfs
In reply to Philipp HortmannRemove unused priv->phy_reg_def[RF90_PATH_C].rfintfs and priv->phy_reg_def[RF90_PATH_D].rfintfs.
The termination condition for the loop is set to priv->num_total_rf_path = RTL819X_TOTAL_RF_PATH = 2. Because of this pPhyReg = &priv->phy_reg_def[eRFPath]; pPhyReg cannot point to array element 2 for RF90_PATH_C and 3 for RF90_PATH_D.
--- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 2 -- drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h | 1 - 2 files changed, 3 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +0 -2
@@ -358,8 +358,6 @@ static void _rtl92e_init_bb_rf_reg_def(struct net_device *dev) priv->phy_reg_def[RF90_PATH_A ].rfintfs = rFPGA0_XAB_RFInterfaceSW; priv->phy_reg_def[RF90_PATH_B ].rfintfs = rFPGA0_XAB_RFInterfaceSW; - priv->phy_reg_def[RF90_PATH_C ].rfintfs = rFPGA0_XCD_RFInterfaceSW; - priv->phy_reg_def[RF90_PATH_D ].rfintfs = rFPGA0_XCD_RFInterfaceSW; priv->phy_reg_def[RF90_PATH_A ].rfintfi = rFPGA0_XAB_RFInterfaceRB; priv->phy_reg_def[RF90_PATH_B ].rfintfi = rFPGA0_XAB_RFInterfaceRB;
drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h +0 -1
@@ -69,7 +69,6 @@#define rFPGA0_XC_RFInterfaceOE 0x868#define rFPGA0_XD_RFInterfaceOE 0x86c#define rFPGA0_XAB_RFInterfaceSW 0x870 -#define rFPGA0_XCD_RFInterfaceSW 0x874#define rFPGA0_XAB_RFParameter 0x878#define rFPGA0_XCD_RFParameter 0x87c#define rFPGA0_AnalogParameter1 0x880
Signature · 1 line
2.39.2
PATCH 3/12 staging: rtl8192e: Remove unused variable rfintfi
In reply to Philipp HortmannRemove unused variable rfintfi because it is just once set and not used. Remove unused constants as well.
--- drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 1 - drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 5 ----- drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h | 2 -- 3 files changed, 8 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8190P_def.h +0 -1
@@ -103,7 +103,6 @@ enum rf_optype {struct bb_reg_definition {u32 rfintfs; -u32 rfintfi;u32 rfintfo;u32 rfintfe;u32 rf3wireOffset;
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +0 -5
@@ -359,11 +359,6 @@ static void _rtl92e_init_bb_rf_reg_def(struct net_device *dev) priv->phy_reg_def[RF90_PATH_A ].rfintfs = rFPGA0_XAB_RFInterfaceSW; priv->phy_reg_def[RF90_PATH_B ].rfintfs = rFPGA0_XAB_RFInterfaceSW; - priv->phy_reg_def[RF90_PATH_A ].rfintfi = rFPGA0_XAB_RFInterfaceRB; - priv->phy_reg_def[RF90_PATH_B ].rfintfi = rFPGA0_XAB_RFInterfaceRB; - priv->phy_reg_def[RF90_PATH_C ].rfintfi = rFPGA0_XCD_RFInterfaceRB; - priv->phy_reg_def[RF90_PATH_D ].rfintfi = rFPGA0_XCD_RFInterfaceRB; - priv->phy_reg_def[RF90_PATH_A ].rfintfo = rFPGA0_XA_RFInterfaceOE; priv->phy_reg_def[RF90_PATH_B ].rfintfo = rFPGA0_XB_RFInterfaceOE; priv->phy_reg_def[RF90_PATH_C ].rfintfo = rFPGA0_XC_RFInterfaceOE;
drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h +0 -2
@@ -80,8 +80,6 @@#define rFPGA0_XC_LSSIReadBack 0x8a8#define rFPGA0_XD_LSSIReadBack 0x8ac#define rFPGA0_PSDReport 0x8b4 -#define rFPGA0_XAB_RFInterfaceRB 0x8e0 -#define rFPGA0_XCD_RFInterfaceRB 0x8e4/* Page 9 - RF mode & OFDM TxSC */ #define rFPGA1_RFMOD 0x900
Signature · 1 line
2.39.2
PATCH 4/12 staging: rtl8192e: Remove unused RF90_PATH_C and ..D for rfintfo and ..fe
In reply to Philipp HortmannRemove unused priv->phy_reg_def[RF90_PATH_C].rfintfo and priv->phy_reg_def[RF90_PATH_D].rfintfo and
remove unused priv->phy_reg_def[RF90_PATH_C].rfintfe and priv->phy_reg_def[RF90_PATH_D].rfintfe.
The termination condition for the loop is set to priv->num_total_rf_path = RTL819X_TOTAL_RF_PATH = 2. Because of this pPhyReg = &priv->phy_reg_def[eRFPath]; pPhyReg cannot point to array element 2 for RF90_PATH_C and 3 for RF90_PATH_D. Remove unused constants as well.
--- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 4 ---- drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h | 2 -- 2 files changed, 6 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +0 -4
@@ -361,13 +361,9 @@ static void _rtl92e_init_bb_rf_reg_def(struct net_device *dev) priv->phy_reg_def[RF90_PATH_A ].rfintfo = rFPGA0_XA_RFInterfaceOE; priv->phy_reg_def[RF90_PATH_B ].rfintfo = rFPGA0_XB_RFInterfaceOE; - priv->phy_reg_def[RF90_PATH_C ].rfintfo = rFPGA0_XC_RFInterfaceOE; - priv->phy_reg_def[RF90_PATH_D ].rfintfo = rFPGA0_XD_RFInterfaceOE; priv->phy_reg_def[RF90_PATH_A ].rfintfe = rFPGA0_XA_RFInterfaceOE; priv->phy_reg_def[RF90_PATH_B ].rfintfe = rFPGA0_XB_RFInterfaceOE; - priv->phy_reg_def[RF90_PATH_C ].rfintfe = rFPGA0_XC_RFInterfaceOE; - priv->phy_reg_def[RF90_PATH_D ].rfintfe = rFPGA0_XD_RFInterfaceOE; priv->phy_reg_def[RF90_PATH_A ].rf3wireOffset = rFPGA0_XA_LSSIParameter; priv->phy_reg_def[RF90_PATH_B ].rf3wireOffset = rFPGA0_XB_LSSIParameter;
drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h +0 -2
@@ -66,8 +66,6 @@#define rFPGA0_XCD_SwitchControl 0x85c#define rFPGA0_XA_RFInterfaceOE 0x860#define rFPGA0_XB_RFInterfaceOE 0x864 -#define rFPGA0_XC_RFInterfaceOE 0x868 -#define rFPGA0_XD_RFInterfaceOE 0x86c#define rFPGA0_XAB_RFInterfaceSW 0x870#define rFPGA0_XAB_RFParameter 0x878#define rFPGA0_XCD_RFParameter 0x87c
Signature · 1 line
2.39.2
PATCH 5/12 staging: rtl8192e: Remove unused RF90_PATH_C and ..D for rf3wireOffset
In reply to Philipp HortmannRemove unused priv->phy_reg_def[RF90_PATH_C].rf3wireOffset and priv->phy_reg_def[RF90_PATH_D].rf3wireOffset. rf3wireOffset is used in _rtl92e_phy_rf_read and _rtl92e_phy_rf_write which are used in:rtl92e_set_rf_reg and rtl92e_get_rf_reg are used in:rtl92e_set_bandwidth (eRFPath only for 0 and 1) rtl92e_config_rf (eRFPath only for 0 and 1) _rtl92e_phy_switch_channel_step (eRFPath only for 0 and 1) _rtl92e_dm_check_tx_power_tracking_thermal (eRFPath only for 0) rtl92e_check_bb_and_rf is used in:rtl92e_config_rf (eRFPath only for 0 and 1) _rtl92e_bb_config_para_file (eRFPath only for 0) rtl92e_config_rf_path is used in:rtl92e_config_rf (eRFPath only for 0 and 1)
Remove dead code and constants.
--- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 2 -- drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h | 2 -- 2 files changed, 4 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +0 -2
@@ -367,8 +367,6 @@ static void _rtl92e_init_bb_rf_reg_def(struct net_device *dev) priv->phy_reg_def[RF90_PATH_A ].rf3wireOffset = rFPGA0_XA_LSSIParameter; priv->phy_reg_def[RF90_PATH_B ].rf3wireOffset = rFPGA0_XB_LSSIParameter; - priv->phy_reg_def[RF90_PATH_C ].rf3wireOffset = rFPGA0_XC_LSSIParameter; - priv->phy_reg_def[RF90_PATH_D ].rf3wireOffset = rFPGA0_XD_LSSIParameter; priv->phy_reg_def[RF90_PATH_A ].rfLSSI_Select = rFPGA0_XAB_RFParameter; priv->phy_reg_def[RF90_PATH_B ].rfLSSI_Select = rFPGA0_XAB_RFParameter;
drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h +0 -2
@@ -58,8 +58,6 @@#define rFPGA0_XD_HSSIParameter2 0x83c#define rFPGA0_XA_LSSIParameter 0x840#define rFPGA0_XB_LSSIParameter 0x844 -#define rFPGA0_XC_LSSIParameter 0x848 -#define rFPGA0_XD_LSSIParameter 0x84c#define rFPGA0_RFWakeUpParameter 0x850#define rFPGA0_RFSleepUpParameter 0x854#define rFPGA0_XAB_SwitchControl 0x858
Signature · 1 line
2.39.2
PATCH 6/12 staging: rtl8192e: Remove unused variable rfLSSI_Select and rfTxGainStage
In reply to Philipp HortmannRemove unused variable rfLSSI_Select and rfTxGainStage because they are just once set and not used. Remove unused constants as well.
--- drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 2 -- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 10 ---------- drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h | 2 -- 3 files changed, 14 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8190P_def.h +0 -2
@@ -106,8 +106,6 @@ struct bb_reg_definition {u32 rfintfo;u32 rfintfe;u32 rf3wireOffset; -u32 rfLSSI_Select; -u32 rfTxGainStage;u32 rfHSSIPara1;u32 rfHSSIPara2;u32 rfSwitchControl;
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +0 -10
@@ -368,16 +368,6 @@ static void _rtl92e_init_bb_rf_reg_def(struct net_device *dev) priv->phy_reg_def[RF90_PATH_A ].rf3wireOffset = rFPGA0_XA_LSSIParameter; priv->phy_reg_def[RF90_PATH_B ].rf3wireOffset = rFPGA0_XB_LSSIParameter; - priv->phy_reg_def[RF90_PATH_A ].rfLSSI_Select = rFPGA0_XAB_RFParameter; - priv->phy_reg_def[RF90_PATH_B ].rfLSSI_Select = rFPGA0_XAB_RFParameter; - priv->phy_reg_def[RF90_PATH_C ].rfLSSI_Select = rFPGA0_XCD_RFParameter; - priv->phy_reg_def[RF90_PATH_D ].rfLSSI_Select = rFPGA0_XCD_RFParameter; - - priv->phy_reg_def[RF90_PATH_A ].rfTxGainStage = rFPGA0_TxGainStage; - priv->phy_reg_def[RF90_PATH_B ].rfTxGainStage = rFPGA0_TxGainStage; - priv->phy_reg_def[RF90_PATH_C ].rfTxGainStage = rFPGA0_TxGainStage; - priv->phy_reg_def[RF90_PATH_D ].rfTxGainStage = rFPGA0_TxGainStage; - priv->phy_reg_def[RF90_PATH_A ].rfHSSIPara1 = rFPGA0_XA_HSSIParameter1; priv->phy_reg_def[RF90_PATH_B ].rfHSSIPara1 = rFPGA0_XB_HSSIParameter1; priv->phy_reg_def[RF90_PATH_C ].rfHSSIPara1 = rFPGA0_XC_HSSIParameter1;
drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h +0 -2
@@ -65,8 +65,6 @@#define rFPGA0_XA_RFInterfaceOE 0x860#define rFPGA0_XB_RFInterfaceOE 0x864#define rFPGA0_XAB_RFInterfaceSW 0x870 -#define rFPGA0_XAB_RFParameter 0x878 -#define rFPGA0_XCD_RFParameter 0x87c#define rFPGA0_AnalogParameter1 0x880#define rFPGA0_AnalogParameter2 0x884#define rFPGA0_AnalogParameter3 0x888
Signature · 1 line
2.39.2
PATCH 7/12 staging: rtl8192e: Remove unused variable rfHSSIPara1 and rfSwitchControl
In reply to Philipp HortmannRemove unused variable rfHSSIPara1 and rfSwitchControl because they are just once set and not used. Remove unused constants as well.
--- drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 2 -- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 10 ---------- drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h | 6 ------ 3 files changed, 18 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8190P_def.h +0 -2
@@ -106,9 +106,7 @@ struct bb_reg_definition {u32 rfintfo;u32 rfintfe;u32 rf3wireOffset; -u32 rfHSSIPara1;u32 rfHSSIPara2; -u32 rfSwitchControl;u32 rfAGCControl1;u32 rfAGCControl2;u32 rfRxIQImbalance;
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +0 -10
@@ -368,21 +368,11 @@ static void _rtl92e_init_bb_rf_reg_def(struct net_device *dev) priv->phy_reg_def[RF90_PATH_A ].rf3wireOffset = rFPGA0_XA_LSSIParameter; priv->phy_reg_def[RF90_PATH_B ].rf3wireOffset = rFPGA0_XB_LSSIParameter; - priv->phy_reg_def[RF90_PATH_A ].rfHSSIPara1 = rFPGA0_XA_HSSIParameter1; - priv->phy_reg_def[RF90_PATH_B ].rfHSSIPara1 = rFPGA0_XB_HSSIParameter1; - priv->phy_reg_def[RF90_PATH_C ].rfHSSIPara1 = rFPGA0_XC_HSSIParameter1; - priv->phy_reg_def[RF90_PATH_D ].rfHSSIPara1 = rFPGA0_XD_HSSIParameter1; - priv->phy_reg_def[RF90_PATH_A ].rfHSSIPara2 = rFPGA0_XA_HSSIParameter2; priv->phy_reg_def[RF90_PATH_B ].rfHSSIPara2 = rFPGA0_XB_HSSIParameter2; priv->phy_reg_def[RF90_PATH_C ].rfHSSIPara2 = rFPGA0_XC_HSSIParameter2; priv->phy_reg_def[RF90_PATH_D ].rfHSSIPara2 = rFPGA0_XD_HSSIParameter2; - priv->phy_reg_def[RF90_PATH_A ].rfSwitchControl = rFPGA0_XAB_SwitchControl; - priv->phy_reg_def[RF90_PATH_B ].rfSwitchControl = rFPGA0_XAB_SwitchControl; - priv->phy_reg_def[RF90_PATH_C ].rfSwitchControl = rFPGA0_XCD_SwitchControl; - priv->phy_reg_def[RF90_PATH_D ].rfSwitchControl = rFPGA0_XCD_SwitchControl; - priv->phy_reg_def[RF90_PATH_A ].rfAGCControl1 = rOFDM0_XAAGCCore1; priv->phy_reg_def[RF90_PATH_B ].rfAGCControl1 = rOFDM0_XBAGCCore1; priv->phy_reg_def[RF90_PATH_C ].rfAGCControl1 = rOFDM0_XCAGCCore1;
drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h +0 -6
@@ -48,20 +48,14 @@#define rFPGA0_TxGainStage 0x80c#define rFPGA0_RFTiming1 0x810#define rFPGA0_RFTiming2 0x814 -#define rFPGA0_XA_HSSIParameter1 0x820#define rFPGA0_XA_HSSIParameter2 0x824 -#define rFPGA0_XB_HSSIParameter1 0x828#define rFPGA0_XB_HSSIParameter2 0x82c -#define rFPGA0_XC_HSSIParameter1 0x830#define rFPGA0_XC_HSSIParameter2 0x834 -#define rFPGA0_XD_HSSIParameter1 0x838#define rFPGA0_XD_HSSIParameter2 0x83c#define rFPGA0_XA_LSSIParameter 0x840#define rFPGA0_XB_LSSIParameter 0x844#define rFPGA0_RFWakeUpParameter 0x850#define rFPGA0_RFSleepUpParameter 0x854 -#define rFPGA0_XAB_SwitchControl 0x858 -#define rFPGA0_XCD_SwitchControl 0x85c#define rFPGA0_XA_RFInterfaceOE 0x860#define rFPGA0_XB_RFInterfaceOE 0x864#define rFPGA0_XAB_RFInterfaceSW 0x870
Signature · 1 line
2.39.2
PATCH 8/12 staging: rtl8192e: Remove unused variable rfAGCControl1 and rfAGCControl2
In reply to Philipp HortmannRemove unused variable rfAGCControl1 and rfAGCControl2 because they are just once set and not used. Remove unused constants as well.
--- drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 2 -- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 10 ---------- drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h | 4 ---- 3 files changed, 16 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8190P_def.h +0 -2
@@ -107,8 +107,6 @@ struct bb_reg_definition {u32 rfintfe;u32 rf3wireOffset;u32 rfHSSIPara2; -u32 rfAGCControl1; -u32 rfAGCControl2;u32 rfRxIQImbalance;u32 rfRxAFE;u32 rfTxIQImbalance;
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +0 -10
@@ -373,16 +373,6 @@ static void _rtl92e_init_bb_rf_reg_def(struct net_device *dev) priv->phy_reg_def[RF90_PATH_C ].rfHSSIPara2 = rFPGA0_XC_HSSIParameter2; priv->phy_reg_def[RF90_PATH_D ].rfHSSIPara2 = rFPGA0_XD_HSSIParameter2; - priv->phy_reg_def[RF90_PATH_A ].rfAGCControl1 = rOFDM0_XAAGCCore1; - priv->phy_reg_def[RF90_PATH_B ].rfAGCControl1 = rOFDM0_XBAGCCore1; - priv->phy_reg_def[RF90_PATH_C ].rfAGCControl1 = rOFDM0_XCAGCCore1; - priv->phy_reg_def[RF90_PATH_D ].rfAGCControl1 = rOFDM0_XDAGCCore1; - - priv->phy_reg_def[RF90_PATH_A ].rfAGCControl2 = rOFDM0_XAAGCCore2; - priv->phy_reg_def[RF90_PATH_B ].rfAGCControl2 = rOFDM0_XBAGCCore2; - priv->phy_reg_def[RF90_PATH_C ].rfAGCControl2 = rOFDM0_XCAGCCore2; - priv->phy_reg_def[RF90_PATH_D ].rfAGCControl2 = rOFDM0_XDAGCCore2; - priv->phy_reg_def[RF90_PATH_A ].rfRxIQImbalance = rOFDM0_XARxIQImbalance; priv->phy_reg_def[RF90_PATH_B ].rfRxIQImbalance = rOFDM0_XBRxIQImbalance; priv->phy_reg_def[RF90_PATH_C ].rfRxIQImbalance = rOFDM0_XCRxIQImbalance;
drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h +0 -4
@@ -117,13 +117,9 @@#define rOFDM0_CCADropThreshold 0xc48#define rOFDM0_ECCAThreshold 0xc4c/* Energy CCA */ #define rOFDM0_XAAGCCore1 0xc50 -#define rOFDM0_XAAGCCore2 0xc54#define rOFDM0_XBAGCCore1 0xc58 -#define rOFDM0_XBAGCCore2 0xc5c#define rOFDM0_XCAGCCore1 0xc60 -#define rOFDM0_XCAGCCore2 0xc64#define rOFDM0_XDAGCCore1 0xc68 -#define rOFDM0_XDAGCCore2 0xc6c#define rOFDM0_AGCParameter1 0xc70#define rOFDM0_AGCParameter2 0xc74#define rOFDM0_AGCRSSITable 0xc78
Signature · 1 line
2.39.2
PATCH 9/12 staging: rtl8192e: Remove unused variable rfRxIQImbalance and rfRxAFE
In reply to Philipp HortmannRemove unused variable rfRxIQImbalance and rfRxAFE because they are just once set and not used. Remove unused constants with commenting line.
--- drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 2 -- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 10 ---------- drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h | 9 --------- 3 files changed, 21 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8190P_def.h +0 -2
@@ -107,8 +107,6 @@ struct bb_reg_definition {u32 rfintfe;u32 rf3wireOffset;u32 rfHSSIPara2; -u32 rfRxIQImbalance; -u32 rfRxAFE;u32 rfTxIQImbalance;u32 rfTxAFE;u32 rfLSSIReadBack;
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +0 -10
@@ -373,16 +373,6 @@ static void _rtl92e_init_bb_rf_reg_def(struct net_device *dev) priv->phy_reg_def[RF90_PATH_C ].rfHSSIPara2 = rFPGA0_XC_HSSIParameter2; priv->phy_reg_def[RF90_PATH_D ].rfHSSIPara2 = rFPGA0_XD_HSSIParameter2; - priv->phy_reg_def[RF90_PATH_A ].rfRxIQImbalance = rOFDM0_XARxIQImbalance; - priv->phy_reg_def[RF90_PATH_B ].rfRxIQImbalance = rOFDM0_XBRxIQImbalance; - priv->phy_reg_def[RF90_PATH_C ].rfRxIQImbalance = rOFDM0_XCRxIQImbalance; - priv->phy_reg_def[RF90_PATH_D ].rfRxIQImbalance = rOFDM0_XDRxIQImbalance; - - priv->phy_reg_def[RF90_PATH_A ].rfRxAFE = rOFDM0_XARxAFE; - priv->phy_reg_def[RF90_PATH_B ].rfRxAFE = rOFDM0_XBRxAFE; - priv->phy_reg_def[RF90_PATH_C ].rfRxAFE = rOFDM0_XCRxAFE; - priv->phy_reg_def[RF90_PATH_D ].rfRxAFE = rOFDM0_XDRxAFE; - priv->phy_reg_def[RF90_PATH_A ].rfTxIQImbalance = rOFDM0_XATxIQImbalance; priv->phy_reg_def[RF90_PATH_B ].rfTxIQImbalance = rOFDM0_XBTxIQImbalance; priv->phy_reg_def[RF90_PATH_C ].rfTxIQImbalance = rOFDM0_XCTxIQImbalance;
drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h +0 -9
@@ -98,15 +98,6 @@#define rOFDM0_TRxPathEnable 0xc04#define rOFDM0_TRMuxPar 0xc08#define rOFDM0_TRSWIsolation 0xc0c -/* RxIQ DC offset, Rx digital filter, DC notch filter */ -#define rOFDM0_XARxAFE 0xc10 -#define rOFDM0_XARxIQImbalance 0xc14/* RxIQ imbalance matrix */ -#define rOFDM0_XBRxAFE 0xc18 -#define rOFDM0_XBRxIQImbalance 0xc1c -#define rOFDM0_XCRxAFE 0xc20 -#define rOFDM0_XCRxIQImbalance 0xc24 -#define rOFDM0_XDRxAFE 0xc28 -#define rOFDM0_XDRxIQImbalance 0xc2c#define rOFDM0_RxDetector1 0xc30/* PD, BW & SBD */ #define rOFDM0_RxDetector2 0xc34/* SBD */ #define rOFDM0_RxDetector3 0xc38/* Frame Sync */
Signature · 1 line
2.39.2
PATCH 10/12 staging: rtl8192e: Remove unused variable rfTxIQImbalance and rfTxAFE
In reply to Philipp HortmannRemove unused variable rfTxIQImbalance and rfTxAFE because they are just once set and not used. Remove unused constants.
--- drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 2 -- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 10 ---------- drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h | 5 ----- 3 files changed, 17 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8190P_def.h +0 -2
@@ -107,8 +107,6 @@ struct bb_reg_definition {u32 rfintfe;u32 rf3wireOffset;u32 rfHSSIPara2; -u32 rfTxIQImbalance; -u32 rfTxAFE;u32 rfLSSIReadBack;u32 rfLSSIReadBackPi; };
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +0 -10
@@ -373,16 +373,6 @@ static void _rtl92e_init_bb_rf_reg_def(struct net_device *dev) priv->phy_reg_def[RF90_PATH_C ].rfHSSIPara2 = rFPGA0_XC_HSSIParameter2; priv->phy_reg_def[RF90_PATH_D ].rfHSSIPara2 = rFPGA0_XD_HSSIParameter2; - priv->phy_reg_def[RF90_PATH_A ].rfTxIQImbalance = rOFDM0_XATxIQImbalance; - priv->phy_reg_def[RF90_PATH_B ].rfTxIQImbalance = rOFDM0_XBTxIQImbalance; - priv->phy_reg_def[RF90_PATH_C ].rfTxIQImbalance = rOFDM0_XCTxIQImbalance; - priv->phy_reg_def[RF90_PATH_D ].rfTxIQImbalance = rOFDM0_XDTxIQImbalance; - - priv->phy_reg_def[RF90_PATH_A ].rfTxAFE = rOFDM0_XATxAFE; - priv->phy_reg_def[RF90_PATH_B ].rfTxAFE = rOFDM0_XBTxAFE; - priv->phy_reg_def[RF90_PATH_C ].rfTxAFE = rOFDM0_XCTxAFE; - priv->phy_reg_def[RF90_PATH_D ].rfTxAFE = rOFDM0_XDTxAFE; - priv->phy_reg_def[RF90_PATH_A ].rfLSSIReadBack = rFPGA0_XA_LSSIReadBack; priv->phy_reg_def[RF90_PATH_B ].rfLSSIReadBack = rFPGA0_XB_LSSIReadBack; priv->phy_reg_def[RF90_PATH_C ].rfLSSIReadBack = rFPGA0_XC_LSSIReadBack;
drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h +0 -5
@@ -117,12 +117,7 @@#define rOFDM0_HTSTFAGC 0xc7c#define rOFDM0_XATxIQImbalance 0xc80#define rOFDM0_XATxAFE 0xc84 -#define rOFDM0_XBTxIQImbalance 0xc88 -#define rOFDM0_XBTxAFE 0xc8c#define rOFDM0_XCTxIQImbalance 0xc90 -#define rOFDM0_XCTxAFE 0xc94 -#define rOFDM0_XDTxIQImbalance 0xc98 -#define rOFDM0_XDTxAFE 0xc9c#define rOFDM0_RxHPParameter 0xce0#define rOFDM0_TxPseudoNoiseWgt 0xce4#define rOFDM0_FrameSync 0xcf0
Signature · 1 line
2.39.2
PATCH 11/12 staging: rtl8192e: Remove unused RF90_PATH_C and ..D for rfLSSIReadBack
In reply to Philipp HortmannRemove unused priv->phy_reg_def[RF90_PATH_C].rfLSSIReadBack and priv->phy_reg_def[RF90_PATH_D].rfLSSIReadBack. rfLSSIReadBack is used in:_rtl92e_phy_rf_read which is used in:rtl92e_set_rf_reg and rtl92e_get_rf_reg are used in:rtl92e_set_bandwidth (eRFPath only for 0 and 1) rtl92e_config_rf (eRFPath only for 0 and 1) _rtl92e_phy_switch_channel_step (eRFPath only for 0 and 1) _rtl92e_dm_check_tx_power_tracking_thermal (eRFPath only for 0) rtl92e_check_bb_and_rf is used in:rtl92e_config_rf (eRFPath only for 0 and 1) _rtl92e_bb_config_para_file (eRFPath only for 0) rtl92e_config_rf_path is used in:rtl92e_config_rf (eRFPath only for 0 and 1)
Remove dead code and constants.
--- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 3 --- drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h | 2 -- 2 files changed, 5 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +0 -3
@@ -375,9 +375,6 @@ static void _rtl92e_init_bb_rf_reg_def(struct net_device *dev) priv->phy_reg_def[RF90_PATH_A ].rfLSSIReadBack = rFPGA0_XA_LSSIReadBack; priv->phy_reg_def[RF90_PATH_B ].rfLSSIReadBack = rFPGA0_XB_LSSIReadBack; - priv->phy_reg_def[RF90_PATH_C ].rfLSSIReadBack = rFPGA0_XC_LSSIReadBack; - priv->phy_reg_def[RF90_PATH_D ].rfLSSIReadBack = rFPGA0_XD_LSSIReadBack; - } bool rtl92e_check_bb_and_rf(struct net_device *dev, enum hw90_block CheckBlock,
drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h +0 -2
@@ -65,8 +65,6 @@#define rFPGA0_AnalogParameter4 0x88c#define rFPGA0_XA_LSSIReadBack 0x8a0#define rFPGA0_XB_LSSIReadBack 0x8a4 -#define rFPGA0_XC_LSSIReadBack 0x8a8 -#define rFPGA0_XD_LSSIReadBack 0x8ac#define rFPGA0_PSDReport 0x8b4/* Page 9 - RF mode & OFDM TxSC */
Signature · 1 line
2.39.2
PATCH 12/12 staging: rtl8192e: Remove unused RF90_PATH_C and ..D for rfHSSIPara2
In reply to Philipp HortmannRemove unused priv->phy_reg_def[RF90_PATH_C].rfHSSIPara2 and priv->phy_reg_def[RF90_PATH_D].rfHSSIPara2. rfHSSIPara2 is used in rtl92e_set_bb_reg which is used in:rtl92e_config_rf (eRFPath only for 0 and 1) _rtl92e_phy_rf_read which is used in:rtl92e_set_rf_reg and rtl92e_get_rf_reg are used in:rtl92e_set_bandwidth (eRFPath only for 0 and 1) rtl92e_config_rf (eRFPath only for 0 and 1) _rtl92e_phy_switch_channel_step (eRFPath only for 0 and 1) _rtl92e_dm_check_tx_power_tracking_thermal (eRFPath only for 0) rtl92e_check_bb_and_rf is used in:rtl92e_config_rf (eRFPath only for 0 and 1) _rtl92e_bb_config_para_file (eRFPath only for 0) rtl92e_config_rf_path is used in:rtl92e_config_rf (eRFPath only for 0 and 1)
Remove dead code and constants.
--- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 2 -- drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h | 2 -- 2 files changed, 4 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +0 -2
@@ -370,8 +370,6 @@ static void _rtl92e_init_bb_rf_reg_def(struct net_device *dev) priv->phy_reg_def[RF90_PATH_A ].rfHSSIPara2 = rFPGA0_XA_HSSIParameter2; priv->phy_reg_def[RF90_PATH_B ].rfHSSIPara2 = rFPGA0_XB_HSSIParameter2; - priv->phy_reg_def[RF90_PATH_C ].rfHSSIPara2 = rFPGA0_XC_HSSIParameter2; - priv->phy_reg_def[RF90_PATH_D ].rfHSSIPara2 = rFPGA0_XD_HSSIParameter2; priv->phy_reg_def[RF90_PATH_A ].rfLSSIReadBack = rFPGA0_XA_LSSIReadBack; priv->phy_reg_def[RF90_PATH_B ].rfLSSIReadBack = rFPGA0_XB_LSSIReadBack;
drivers/staging/rtl8192e/rtl8192e/r8192E_phyreg.h +0 -2
@@ -50,8 +50,6 @@#define rFPGA0_RFTiming2 0x814#define rFPGA0_XA_HSSIParameter2 0x824#define rFPGA0_XB_HSSIParameter2 0x82c -#define rFPGA0_XC_HSSIParameter2 0x834 -#define rFPGA0_XD_HSSIParameter2 0x83c#define rFPGA0_XA_LSSIParameter 0x840#define rFPGA0_XB_LSSIParameter 0x844#define rFPGA0_RFWakeUpParameter 0x850
Signature · 1 line
2.39.2