From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 03/10] staging: rtl8192e: Remove constant variable reg_max_lps_awake_intvl
Date: Fri, 6 Oct 2023 21:04:54 +0200 [thread overview]
Message-ID: <d5b2ccc0f10c28f960552dd2b2c5ec83aa62041f.1696548527.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1696548527.git.philipp.g.hortmann@gmail.com>
Remove constant variable reg_max_lps_awake_intvl as this value is just
written to MaxPeriod. Function _rtl92e_init_priv_constant() is then empty
and can be removed as well.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 10 ----------
drivers/staging/rtl8192e/rtllib.h | 1 -
drivers/staging/rtl8192e/rtllib_softmac.c | 8 +-------
3 files changed, 1 insertion(+), 18 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index f46cb152930a..7db01d68000a 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -712,15 +712,6 @@ static void _rtl92e_init_priv_handler(struct net_device *dev)
priv->rtllib->ScanOperationBackupHandler = rtl92e_scan_op_backup;
}
-static void _rtl92e_init_priv_constant(struct net_device *dev)
-{
- struct r8192_priv *priv = rtllib_priv(dev);
- struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
- &priv->rtllib->pwr_save_ctrl;
-
- psc->reg_max_lps_awake_intvl = 5;
-}
-
static void _rtl92e_init_priv_variable(struct net_device *dev)
{
struct r8192_priv *priv = rtllib_priv(dev);
@@ -838,7 +829,6 @@ static short _rtl92e_init(struct net_device *dev)
memset(&priv->stats, 0, sizeof(struct rt_stats));
_rtl92e_init_priv_handler(dev);
- _rtl92e_init_priv_constant(dev);
_rtl92e_init_priv_variable(dev);
_rtl92e_init_priv_lock(priv);
_rtl92e_init_priv_task(dev);
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 6d54c03f5680..307bcbb7fbb6 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1079,7 +1079,6 @@ struct rt_pwr_save_ctrl {
bool bLeisurePs;
u8 LpsIdleCount;
- u8 reg_max_lps_awake_intvl;
u8 LPSAwakeIntvl;
u32 CurPsLevel;
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 206f8e05d5d0..f84133744bc3 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -1588,16 +1588,10 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)
if (ieee->bAwakePktSent) {
psc->LPSAwakeIntvl = 1;
} else {
- u8 MaxPeriod = 1;
+ u8 MaxPeriod = 5;
if (psc->LPSAwakeIntvl == 0)
psc->LPSAwakeIntvl = 1;
- if (psc->reg_max_lps_awake_intvl == 0)
- MaxPeriod = 1;
- else if (psc->reg_max_lps_awake_intvl == 0xFF)
- MaxPeriod = ieee->current_network.dtim_period;
- else
- MaxPeriod = psc->reg_max_lps_awake_intvl;
psc->LPSAwakeIntvl = (psc->LPSAwakeIntvl >=
MaxPeriod) ? MaxPeriod :
(psc->LPSAwakeIntvl + 1);
--
2.42.0
next prev parent reply other threads:[~2023-10-06 19:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-06 19:04 [PATCH 00/10] staging: rtl8192e: Remove last private functions from iw_handler_def Philipp Hortmann
2023-10-06 19:04 ` [PATCH 01/10] staging: rtl8192e: Remove function _rtl92e_wx_set_force_lps() Philipp Hortmann
2023-10-06 19:04 ` [PATCH 02/10] staging: rtl8192e: Remove function _rtl92e_wx_set_lps_awake_interval() Philipp Hortmann
2023-10-06 19:04 ` Philipp Hortmann [this message]
2023-10-06 19:05 ` [PATCH 04/10] staging: rtl8192e: Remove function _rtl92e_wx_adapter_power_status() Philipp Hortmann
2023-10-06 19:05 ` [PATCH 05/10] staging: rtl8192e: Remove constant variable ps_force Philipp Hortmann
2023-10-06 19:05 ` [PATCH 06/10] staging: rtl8192e: Remove function _rtl92e_wx_set_scan_type() Philipp Hortmann
2023-10-06 19:05 ` [PATCH 07/10] staging: rtl8192e: Remove unchanged variable active_scan Philipp Hortmann
2023-10-06 19:05 ` [PATCH 08/10] staging: rtl8192e: Remove function _rtl92e_wx_set_debug() Philipp Hortmann
2023-10-06 19:05 ` [PATCH 09/10] staging: rtl8192e: Remove unused variable rt_global_debug_component Philipp Hortmann
2023-10-06 19:05 ` [PATCH 10/10] staging: rtl8192e: Remove unused file rtllib_debug.h Philipp Hortmann
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=d5b2ccc0f10c28f960552dd2b2c5ec83aa62041f.1696548527.git.philipp.g.hortmann@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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
all inboxes | Powered by JetHome®