Remove set but otherwise unused 'sleep_ms', 'last_action', 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. Signed-off-by: Dmitry Antipov <dmantipov@xxxxxxxxx> --- drivers/net/wireless/realtek/rtlwifi/ps.c | 10 ---------- drivers/net/wireless/realtek/rtlwifi/wifi.h | 3 --- 2 files changed, 13 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/ps.c b/drivers/net/wireless/realtek/rtlwifi/ps.c index 629c03271bde..ba61fcec9fae 100644 --- a/drivers/net/wireless/realtek/rtlwifi/ps.c +++ b/drivers/net/wireless/realtek/rtlwifi/ps.c @@ -688,16 +688,6 @@ void rtl_swlps_wq_callback(struct work_struct *work) /* we can sleep after ps null send ok */ 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; } } diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h index 47b4685b6d24..cabf6c82a639 100644 --- a/drivers/net/wireless/realtek/rtlwifi/wifi.h +++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h @@ -2037,14 +2037,11 @@ struct rtl_ps_ctl { 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; -- 2.41.0