linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Kalle Valo <kvalo@kernel.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH 1/2] wifi: rtlwifi: cleanup struct rtl_ps_ctl
Date: Fri, 13 Oct 2023 08:11:28 +0000	[thread overview]
Message-ID: <a4bb3324101e4269b7a922ea8ae70875@realtek.com> (raw)
In-Reply-To: <20231011154442.52457-1-dmantipov@yandex.ru>



> -----Original Message-----
> From: Dmitry Antipov <dmantipov@yandex.ru>
> Sent: Wednesday, October 11, 2023 11:45 PM
> To: Ping-Ke Shih <pkshih@realtek.com>
> Cc: Kalle Valo <kvalo@kernel.org>; linux-wireless@vger.kernel.org; Dmitry Antipov <dmantipov@yandex.ru>
> Subject: [PATCH 1/2] wifi: rtlwifi: cleanup struct rtl_ps_ctl
> 
> 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@yandex.ru>
> ---
>  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;

'state' is also unused. 

>         }
>  }
> 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


  parent reply	other threads:[~2023-10-13  8:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11 15:44 [PATCH 1/2] wifi: rtlwifi: cleanup struct rtl_ps_ctl Dmitry Antipov
2023-10-11 15:44 ` [PATCH 2/2] wifi: rtlwifi: simplify TX command fill callbacks Dmitry Antipov
2023-10-13  9:17   ` Ping-Ke Shih
2023-10-14  6:42   ` Kalle Valo
2023-10-13  8:11 ` Ping-Ke Shih [this message]
2023-10-13 12:45   ` [PATCH] [v2] wifi: rtlwifi: cleanup struct rtl_ps_ctl Dmitry Antipov
2023-10-16  5:38     ` Ping-Ke Shih
2023-10-19  7:27     ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a4bb3324101e4269b7a922ea8ae70875@realtek.com \
    --to=pkshih@realtek.com \
    --cc=dmantipov@yandex.ru \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).