Skip to contentSkip to conversation

staging: rtl8723bs: remove dead chip code

PATCH New Adriano Cordova 1 participant 3 messages Aug 31 Staging

lore
Share & tools
lore
#0 lore raw

cover staging: rtl8723bs: remove dead chip code

These two patches remove code in the rtl8723bs driver that is never compiled or never referenced, with no change in behavior.

The first patch removes declarations guarded by BEAMFORMING_SUPPORT, which is defined to 0, so they never reach the compiler. Preprocessing the driver confirms the symbols are absent from the preprocessed output.

The second patch removes enums and defines left over from other Realtek chips that are not referenced anywhere in the driver.

Compile-tested on x86. Rebuilding drivers/staging/rtl8723bs/ and comparing all 55 '.o' files against the pre-change build shows every object file is byte-for-byte identical.

Adriano Cordova <[email protected]>

Adriano Cordova (2):
staging: rtl8723bs: remove dead beamforming code
staging: rtl8723bs: remove unused chip-type enums and defines

 drivers/staging/rtl8723bs/hal/odm.h              |  9 ---------
 .../staging/rtl8723bs/hal/odm_DynamicTxPower.h   |  1 -
 drivers/staging/rtl8723bs/hal/odm_precomp.h      |  1 -
 drivers/staging/rtl8723bs/include/hal_phy.h      | 16 ----------------
 4 files changed, 27 deletions(-)
Signature · 1 line
2.51.0
#1 lore raw

PATCH 1/2 staging: rtl8723bs: remove dead beamforming code

The beamforming declarations are guarded by

        #if (BEAMFORMING_SUPPORT == 1)

but BEAMFORMING_SUPPORT is defined to 0, so they are never compiled. The types they use (RT_BEAMFORMING_INFO, BEAMFORMING_CAP, PMGNT_INFO) are not defined anywhere either. Remove the dead declarations and the now unused macro.

---
 drivers/staging/rtl8723bs/hal/odm.h         | 8 --------
 drivers/staging/rtl8723bs/hal/odm_precomp.h | 1 -
 2 files changed, 9 deletions(-)
drivers/staging/rtl8723bs/hal/odm.h +0 -8
index a20b48660e..d29eaba41d 100644
@@ -936,10 +936,6 @@ struct dm_odm_t { /* DM_Out_Source_Dynamic_Mechanism_Structure */
 	struct timer_list FastAntTrainingTimer;
 
 	/*  ODM relative workitem. */
-
-	#if (BEAMFORMING_SUPPORT == 1)
-	RT_BEAMFORMING_INFO BeamformingInfo;
-	#endif
 };
 
 enum ODM_BB_Config_Type {
@@ -1068,10 +1064,6 @@ u32 ODM_Get_Rate_Bitmap(
 	u8 rssi_level
 );
 
-#if (BEAMFORMING_SUPPORT == 1)
-BEAMFORMING_CAP Beamforming_GetEntryBeamCapByMacId(PMGNT_INFO pMgntInfo, u8 MacId);
-#endif
-
 void odm_TXPowerTrackingInit(struct dm_odm_t *pDM_Odm);
 
 void ODM_DMInit(struct dm_odm_t *pDM_Odm);
drivers/staging/rtl8723bs/hal/odm_precomp.h +0 -1
index 2987857a87..d4390fd203 100644
@@ -19,7 +19,6 @@
 	/* include <drv_types.h> */
 	/* include <rtw_byteorder.h> */
 	/* include <hal_intf.h> */
-#define BEAMFORMING_SUPPORT 0
 
 /* 2 Hardware Parameter Files */
 
Signature · 1 line
2.51.0
#2 lore raw

PATCH 2/2 staging: rtl8723bs: remove unused chip-type enums and defines

In reply to Adriano Cordova

Remove enums and defines left over from other Realtek chips:

- the RF_8225, RF_8256, RF_8258, RF_6052 and RF_PSEUDO_11N RF-type enum
- TX_2S, TX_3S and TX_4S
- RF_PATH_MAX_92C_88E and RF_PATH_MAX_90_8812
- TX_POWER_NEAR_FIELD_THRESH_8812
- ODM_ITRF_ALL

None of them is referenced anywhere in the driver.

---
 drivers/staging/rtl8723bs/hal/odm.h              |  1 -
 .../staging/rtl8723bs/hal/odm_DynamicTxPower.h   |  1 -
 drivers/staging/rtl8723bs/include/hal_phy.h      | 16 ----------------
 3 files changed, 18 deletions(-)
drivers/staging/rtl8723bs/hal/odm.h +0 -1
index d29eaba41d..b123df98fa 100644
@@ -382,7 +382,6 @@ enum { /* _ODM_Support_Ability_Definition */
 /* 	ODM_CMNINFO_INTERFACE */
 enum { /* tag_ODM_Support_Interface_Definition */
 	ODM_ITRF_SDIO	=	0x4,
-	ODM_ITRF_ALL	=	0x7,
 };
 
 /*  ODM_CMNINFO_IC_TYPE */
drivers/staging/rtl8723bs/hal/odm_DynamicTxPower.h +0 -1
index e2d244324e..4431a3ddf1 100644
@@ -11,7 +11,6 @@
 #define		TX_POWER_NEAR_FIELD_THRESH_LVL2	74
 #define		TX_POWER_NEAR_FIELD_THRESH_LVL1	67
 #define		TX_POWER_NEAR_FIELD_THRESH_AP		0x3F
-#define		TX_POWER_NEAR_FIELD_THRESH_8812	60
 
 #define		TxHighPwrLevel_Normal		0
 #define		TxHighPwrLevel_Level1		1
drivers/staging/rtl8723bs/include/hal_phy.h +0 -16
index abc0f27fda..ec9bc47816 100644
@@ -17,16 +17,6 @@
 
 
 /*--------------------------Define Parameters-------------------------------*/
-enum {
-	RF_TYPE_MIN = 0,	/*  0 */
-	RF_8225 = 1,		/*  1 11b/g RF for verification only */
-	RF_8256 = 2,		/*  2 11b/g/n */
-	RF_8258 = 3,		/*  3 11a/b/g/n RF */
-	RF_6052 = 4,		/*  4 11b/g/n RF */
-	RF_PSEUDO_11N = 5,	/*  5, It is a temporality RF. */
-	RF_TYPE_MAX
-};
-
 enum rf_path {
 	RF_PATH_A = 0,
 	RF_PATH_B,
@@ -34,12 +24,6 @@ enum rf_path {
 };
 
 #define	TX_1S			0
-#define	TX_2S			1
-#define	TX_3S			2
-#define	TX_4S			3
-
-#define	RF_PATH_MAX_92C_88E		2
-#define	RF_PATH_MAX_90_8812		4	/* Max RF number 90 support */
 
 enum wireless_mode {
 	WIRELESS_MODE_UNKNOWN = 0x00,
Signature · 1 line
2.51.0