Commit 9a66e730 authored by Dmitry Antipov's avatar Dmitry Antipov Committed by Kalle Valo

wifi: rtlwifi: cleanup struct rtl_ps_ctl

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: default avatarDmitry Antipov <dmantipov@yandex.ru>
Acked-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20231013124534.19714-1-dmantipov@yandex.ru
parent a86a8ca7
...@@ -681,25 +681,10 @@ void rtl_swlps_wq_callback(struct work_struct *work) ...@@ -681,25 +681,10 @@ void rtl_swlps_wq_callback(struct work_struct *work)
ps_work.work); ps_work.work);
struct ieee80211_hw *hw = rtlworks->hw; struct ieee80211_hw *hw = rtlworks->hw;
struct rtl_priv *rtlpriv = rtl_priv(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 */ /* we can sleep after ps null send ok */
if (rtlpriv->psc.state_inap) { if (rtlpriv->psc.state_inap)
rtl_swlps_rf_sleep(hw); 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, static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data,
......
...@@ -2032,19 +2032,15 @@ struct rtl_ps_ctl { ...@@ -2032,19 +2032,15 @@ struct rtl_ps_ctl {
/* for SW LPS*/ /* for SW LPS*/
bool sw_ps_enabled; bool sw_ps_enabled;
bool state;
bool state_inap; bool state_inap;
bool multi_buffered; bool multi_buffered;
u16 nullfunc_seq; u16 nullfunc_seq;
unsigned int dtim_counter; unsigned int dtim_counter;
unsigned int sleep_ms;
unsigned long last_sleep_jiffies; unsigned long last_sleep_jiffies;
unsigned long last_awake_jiffies; unsigned long last_awake_jiffies;
unsigned long last_delaylps_stamp_jiffies; unsigned long last_delaylps_stamp_jiffies;
unsigned long last_dtim; unsigned long last_dtim;
unsigned long last_beacon; unsigned long last_beacon;
unsigned long last_action;
unsigned long last_slept;
/*For P2P PS */ /*For P2P PS */
struct rtl_p2p_ps_info p2p_ps_info; struct rtl_p2p_ps_info p2p_ps_info;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment