wifi: rtlwifi: cleanup struct rtl_ps_ctl
authorDmitry Antipov <dmantipov@yandex.ru>
Fri, 13 Oct 2023 12:45:31 +0000 (15:45 +0300)
committerKalle Valo <kvalo@kernel.org>
Thu, 19 Oct 2023 07:27:28 +0000 (10:27 +0300)
Remove set but otherwise unused 'sleep_ms', 'last_action', 'state'
and 'last_slept' members of 'struct rtl_ps_ctl' (these seems to be
a leftovers from some older code) and adjust 'rtl_swlps_wq_callback()'
accordingly. Compile tested only.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20231013124534.19714-1-dmantipov@yandex.ru
drivers/net/wireless/realtek/rtlwifi/ps.c
drivers/net/wireless/realtek/rtlwifi/wifi.h

index 629c03271bde7f4e704932922d8d852390c280be..6241e4fed4f649e7c019e997911ce224418d3844 100644 (file)
@@ -681,25 +681,10 @@ void rtl_swlps_wq_callback(struct work_struct *work)
                                                  ps_work.work);
        struct ieee80211_hw *hw = rtlworks->hw;
        struct rtl_priv *rtlpriv = rtl_priv(hw);
-       bool ps = false;
-
-       ps = (hw->conf.flags & IEEE80211_CONF_PS);
 
        /* we can sleep after ps null send ok */
-       if (rtlpriv->psc.state_inap) {
+       if (rtlpriv->psc.state_inap)
                rtl_swlps_rf_sleep(hw);
-
-               if (rtlpriv->psc.state && !ps) {
-                       rtlpriv->psc.sleep_ms = jiffies_to_msecs(jiffies -
-                                                rtlpriv->psc.last_action);
-               }
-
-               if (ps)
-                       rtlpriv->psc.last_slept = jiffies;
-
-               rtlpriv->psc.last_action = jiffies;
-               rtlpriv->psc.state = ps;
-       }
 }
 
 static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data,
index b60169196eab3fdc157d49f0503bc0e87f097b0a..b064863ad59b623ad722ec31f10c63c59c4b707e 100644 (file)
@@ -2032,19 +2032,15 @@ struct rtl_ps_ctl {
 
        /* for SW LPS*/
        bool sw_ps_enabled;
-       bool state;
        bool state_inap;
        bool multi_buffered;
        u16 nullfunc_seq;
        unsigned int dtim_counter;
-       unsigned int sleep_ms;
        unsigned long last_sleep_jiffies;
        unsigned long last_awake_jiffies;
        unsigned long last_delaylps_stamp_jiffies;
        unsigned long last_dtim;
        unsigned long last_beacon;
-       unsigned long last_action;
-       unsigned long last_slept;
 
        /*For P2P PS */
        struct rtl_p2p_ps_info p2p_ps_info;