* [PATCH 0/2] staging: rtl8723bs: remove dead chip code
@ 2026-08-31 2:05 Adriano Cordova
2026-08-31 2:05 ` [PATCH 1/2] staging: rtl8723bs: remove dead beamforming code Adriano Cordova
2026-08-31 2:05 ` [PATCH 2/2] staging: rtl8723bs: remove unused chip-type enums and defines Adriano Cordova
0 siblings, 2 replies; 3+ messages in thread
From: Adriano Cordova @ 2026-08-31 2:05 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Adriano Cordova
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 <adrianox@gmail.com>
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(-)
--
2.51.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] staging: rtl8723bs: remove dead beamforming code
2026-08-31 2:05 [PATCH 0/2] staging: rtl8723bs: remove dead chip code Adriano Cordova
@ 2026-08-31 2:05 ` Adriano Cordova
2026-08-31 2:05 ` [PATCH 2/2] staging: rtl8723bs: remove unused chip-type enums and defines Adriano Cordova
1 sibling, 0 replies; 3+ messages in thread
From: Adriano Cordova @ 2026-08-31 2:05 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Adriano Cordova
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.
Signed-off-by: Adriano Cordova <adrianox@gmail.com>
---
drivers/staging/rtl8723bs/hal/odm.h | 8 --------
drivers/staging/rtl8723bs/hal/odm_precomp.h | 1 -
2 files changed, 9 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/odm.h b/drivers/staging/rtl8723bs/hal/odm.h
index a20b48660e..d29eaba41d 100644
--- a/drivers/staging/rtl8723bs/hal/odm.h
+++ b/drivers/staging/rtl8723bs/hal/odm.h
@@ -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);
diff --git a/drivers/staging/rtl8723bs/hal/odm_precomp.h b/drivers/staging/rtl8723bs/hal/odm_precomp.h
index 2987857a87..d4390fd203 100644
--- a/drivers/staging/rtl8723bs/hal/odm_precomp.h
+++ b/drivers/staging/rtl8723bs/hal/odm_precomp.h
@@ -19,7 +19,6 @@
/* include <drv_types.h> */
/* include <rtw_byteorder.h> */
/* include <hal_intf.h> */
-#define BEAMFORMING_SUPPORT 0
/* 2 Hardware Parameter Files */
--
2.51.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] staging: rtl8723bs: remove unused chip-type enums and defines
2026-08-31 2:05 [PATCH 0/2] staging: rtl8723bs: remove dead chip code Adriano Cordova
2026-08-31 2:05 ` [PATCH 1/2] staging: rtl8723bs: remove dead beamforming code Adriano Cordova
@ 2026-08-31 2:05 ` Adriano Cordova
1 sibling, 0 replies; 3+ messages in thread
From: Adriano Cordova @ 2026-08-31 2:05 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, 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.
Signed-off-by: Adriano Cordova <adrianox@gmail.com>
---
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(-)
diff --git a/drivers/staging/rtl8723bs/hal/odm.h b/drivers/staging/rtl8723bs/hal/odm.h
index d29eaba41d..b123df98fa 100644
--- a/drivers/staging/rtl8723bs/hal/odm.h
+++ b/drivers/staging/rtl8723bs/hal/odm.h
@@ -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 */
diff --git a/drivers/staging/rtl8723bs/hal/odm_DynamicTxPower.h b/drivers/staging/rtl8723bs/hal/odm_DynamicTxPower.h
index e2d244324e..4431a3ddf1 100644
--- a/drivers/staging/rtl8723bs/hal/odm_DynamicTxPower.h
+++ b/drivers/staging/rtl8723bs/hal/odm_DynamicTxPower.h
@@ -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
diff --git a/drivers/staging/rtl8723bs/include/hal_phy.h b/drivers/staging/rtl8723bs/include/hal_phy.h
index abc0f27fda..ec9bc47816 100644
--- a/drivers/staging/rtl8723bs/include/hal_phy.h
+++ b/drivers/staging/rtl8723bs/include/hal_phy.h
@@ -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,
--
2.51.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-31 2:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-31 2:05 [PATCH 0/2] staging: rtl8723bs: remove dead chip code Adriano Cordova
2026-08-31 2:05 ` [PATCH 1/2] staging: rtl8723bs: remove dead beamforming code Adriano Cordova
2026-08-31 2:05 ` [PATCH 2/2] staging: rtl8723bs: remove unused chip-type enums and defines Adriano Cordova
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®