Remove some unused constants, macros, and structs.
Capitalize a constant.
The patch order matters - please apply in order.
Teddy Engel (5):
staging: rtl8192e: Remove unused constants
staging: rtl8192e: Remove unused struct phy_ofdm_rx_status_rxsc
staging: rtl8192e: Capitalize constant RegC38_TH
staging: rtl8192e: Remove unused macro dm_tx_bb_gain_idx_to_amplify
staging: rtl8192e: Remove unnecessary pre-declaration of struct
net_device
drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 9 ---------
drivers/staging/rtl8192e/rtl8192e/rtl_cam.h | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 4 ++--
drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 6 +-----
drivers/staging/rtl8192e/rtl8192e/rtl_pci.h | 1 -
5 files changed, 3 insertions(+), 18 deletions(-)
--
2.39.2
Remove unused constants: IC_VersionCut_C, IC_VersionCut_E, WA_IOT_TH_VAL
Signed-off-by: Teddy Engel <[email protected]>
---
v2: Combine unused constants patches
---
drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 2 --
drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 2 --
2 files changed, 4 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8190P_def.h b/drivers/staging/rtl8192e/rtl8192e/r8190P_def.h
index 8c85f1c866d3..486397d7db84 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8190P_def.h
+++ b/drivers/staging/rtl8192e/rtl8192e/r8190P_def.h
@@ -88,9 +88,7 @@ enum version_8190_loopback {
VERSION_8190_BE
};
-#define IC_VersionCut_C 0x2
#define IC_VersionCut_D 0x3
-#define IC_VersionCut_E 0x4
enum rf_optype {
RF_OP_By_SW_3wire = 0,
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
index 84e673452be4..863af8ef9f94 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
@@ -33,8 +33,6 @@
#define RATE_ADAPTIVE_TH_LOW_40M 10
#define VERY_LOW_RSSI 15
-#define WA_IOT_TH_VAL 25
-
#define E_FOR_TX_POWER_TRACK 300
#define TX_POWER_NEAR_FIELD_THRESH_HIGH 68
#define TX_POWER_NEAR_FIELD_THRESH_LOW 62
--
2.39.2
According to kernel coding style, capitalize defined constant.
Signed-off-by: Teddy Engel <[email protected]>
---
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 4 ++--
drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index 5392d2daf870..4863ced04916 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -1752,7 +1752,7 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev)
if (priv->rtllib->link_state == MAC80211_LINKED) {
if (priv->undecorated_smoothed_pwdb <=
- RegC38_TH) {
+ REG_C38_TH) {
if (reg_c38_State !=
RegC38_NonFsync_Other_AP) {
rtl92e_writeb(dev,
@@ -1763,7 +1763,7 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev)
RegC38_NonFsync_Other_AP;
}
} else if (priv->undecorated_smoothed_pwdb >=
- (RegC38_TH + 5)) {
+ (REG_C38_TH + 5)) {
if (reg_c38_State) {
rtl92e_writeb(dev,
rOFDM0_RxDetector3,
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
index 863af8ef9f94..3add5aa933b8 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
@@ -42,7 +42,7 @@
#define CURRENT_TX_RATE_REG 0x1e0
#define INITIAL_TX_RATE_REG 0x1e1
#define TX_RETRY_COUNT_REG 0x1ac
-#define RegC38_TH 20
+#define REG_C38_TH 20
/*--------------------------Define Parameters-------------------------------*/
--
2.39.2
Remove unused macro.
Signed-off-by: Teddy Engel <[email protected]>
---
drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
index 3add5aa933b8..55641f17412b 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.h
@@ -133,8 +133,6 @@ extern struct dig_t dm_digtable;
extern const u32 dm_tx_bb_gain[TX_BB_GAIN_TABLE_LEN];
extern const u8 dm_cck_tx_bb_gain[CCK_TX_BB_GAIN_TABLE_LEN][8];
extern const u8 dm_cck_tx_bb_gain_ch14[CCK_TX_BB_GAIN_TABLE_LEN][8];
-/* Maps table index to iq amplify gain (dB, 12 to -24dB) */
-#define dm_tx_bb_gain_idx_to_amplify(idx) (-idx + 12)
/*------------------------Export global variable----------------------------*/
--
2.39.2
Remove unused struct declaration.
Signed-off-by: Teddy Engel <[email protected]>
---
drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8190P_def.h b/drivers/staging/rtl8192e/rtl8192e/r8190P_def.h
index 486397d7db84..d87bace0a19b 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8190P_def.h
+++ b/drivers/staging/rtl8192e/rtl8192e/r8190P_def.h
@@ -136,13 +136,6 @@ struct tx_fwinfo_8190pci {
u32 PacketID:13;
};
-struct phy_ofdm_rx_status_rxsc_sgien_exintfflag {
- u8 reserved:4;
- u8 rxsc:2;
- u8 sgi_en:1;
- u8 ex_intf_flag:1;
-};
-
struct phy_sts_ofdm_819xpci {
u8 trsw_gain_X[4];
u8 pwdb_all;
--
2.39.2
On 6/13/24 22:15, Teddy Engel wrote:
> Remove some unused constants, macros, and structs.
> Capitalize a constant.
>
> The patch order matters - please apply in order.
>
> Teddy Engel (5):
> staging: rtl8192e: Remove unused constants
> staging: rtl8192e: Remove unused struct phy_ofdm_rx_status_rxsc
> staging: rtl8192e: Capitalize constant RegC38_TH
> staging: rtl8192e: Remove unused macro dm_tx_bb_gain_idx_to_amplify
> staging: rtl8192e: Remove unnecessary pre-declaration of struct
> net_device
>
> drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 9 ---------
> drivers/staging/rtl8192e/rtl8192e/rtl_cam.h | 1 -
> drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 4 ++--
> drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 6 +-----
> drivers/staging/rtl8192e/rtl8192e/rtl_pci.h | 1 -
> 5 files changed, 3 insertions(+), 18 deletions(-)
>
Tested-by: Philipp Hortmann <[email protected]>