]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: rtl8192e: Remove unchanged variable RegRfPsLevel
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Sun, 16 Apr 2023 07:19:37 +0000 (09:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Apr 2023 11:55:19 +0000 (13:55 +0200)
Remove unchanged variable RegRfPsLevel and equations that have always the
same result to shorten code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/49162b0041db33c6c43c4126839baed69c76cb89.1681627603.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
drivers/staging/rtl8192e/rtllib.h

index dd666701138e1d1cfb5e52bbe2216718aa716828..4b0ebe96302ec916b426d14155e7848bd11d8b25 100644 (file)
@@ -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;
index b1729d65f67f6b116eb01069825180d13647f058..1a0e7ae70ca68838c7aa91e5df7d6c4d09127494 100644 (file)
@@ -1237,7 +1237,6 @@ struct rt_pwr_save_ctrl {
        u8                              LPSAwakeIntvl;
 
        u32                             CurPsLevel;
-       u32                             RegRfPsLevel;
 };
 
 #define RT_RF_CHANGE_SOURCE u32