[PATCH 1/8] staging: rtl8192e: Remove unchanged variable RegRfPsLevel

From: Philipp Hortmann
Date: Sun Apr 16 2023 - 03:19:46 EST


Remove unchanged variable RegRfPsLevel and equations that have always the
same result to shorten code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@xxxxxxxxx>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 9 +--------
drivers/staging/rtl8192e/rtllib.h | 1 -
2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index dd666701138e..4b0ebe96302e 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -1089,14 +1089,7 @@ static bool _rtl92e_set_rf_power_state(struct net_device *dev,
if (i >= MAX_DOZE_WAITING_TIMES_9x)
break;
}
- if (psc->RegRfPsLevel & RT_RF_OFF_LEVL_HALT_NIC &&
- !RT_IN_PS_LEVEL(psc, RT_RF_OFF_LEVL_HALT_NIC)) {
- rtl92e_disable_nic(dev);
- RT_SET_PS_LEVEL(psc, RT_RF_OFF_LEVL_HALT_NIC);
- } else if (!(psc->RegRfPsLevel &
- RT_RF_OFF_LEVL_HALT_NIC)) {
- rtl92e_set_rf_off(dev);
- }
+ rtl92e_set_rf_off(dev);
break;
default:
bResult = false;
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index b1729d65f67f..1a0e7ae70ca6 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1237,7 +1237,6 @@ struct rt_pwr_save_ctrl {
u8 LPSAwakeIntvl;

u32 CurPsLevel;
- u32 RegRfPsLevel;
};

#define RT_RF_CHANGE_SOURCE u32
--
2.40.0