From: Martin Kaiser <martin@kaiser.cx>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Michael Straube <straube.linux@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH 05/12] staging: r8188eu: remove rtw_set_rpwm
Date: Sat, 11 Sep 2021 16:15:14 +0200 [thread overview]
Message-ID: <20210911141521.24901-6-martin@kaiser.cx> (raw)
In-Reply-To: <20210911141521.24901-1-martin@kaiser.cx>
After we dropped the call to set HW_VAR_SET_RPWM, the rtw_set_rpwm
function doesn't do anything useful.
Remove the function and the rpwm component of struct pwrctrl_priv,
which is not used outside of rtw_set_rpwm.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
.../realtek/rtl8192cu/include/rtw_pwrctrl.h | 1 -
drivers/staging/r8188eu/core/rtw_pwrctrl.c | 34 -------------------
drivers/staging/r8188eu/include/rtw_pwrctrl.h | 2 --
3 files changed, 37 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtl8192cu/include/rtw_pwrctrl.h b/drivers/net/wireless/realtek/rtl8192cu/include/rtw_pwrctrl.h
index a4cb292e1aea..303df55c521a 100644
--- a/drivers/net/wireless/realtek/rtl8192cu/include/rtw_pwrctrl.h
+++ b/drivers/net/wireless/realtek/rtl8192cu/include/rtw_pwrctrl.h
@@ -309,7 +309,6 @@ extern void cpwm_int_hdl(PADAPTER padapter, struct reportpwrstate_parm *preportp
#endif
extern void rtw_set_ps_mode(_adapter * padapter, u8 ps_mode, u8 smart_ps);
-extern void rtw_set_rpwm(_adapter * padapter, u8 val8);
extern void LeaveAllPowerSaveMode(PADAPTER Adapter);
#ifdef CONFIG_IPS
void _ips_enter(_adapter * padapter);
diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
index 86841093caa8..5b4cd8e738db 100644
--- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c
+++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
@@ -186,35 +186,6 @@ static void pwr_state_check_handler(struct timer_list *t)
rtw_ps_cmd(padapter);
}
-/*
- *
- * Parameters
- * padapter
- * pslv power state level, only could be PS_STATE_S0 ~ PS_STATE_S4
- *
- */
-void rtw_set_rpwm(struct adapter *padapter, u8 pslv)
-{
- struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
-
- pslv = PS_STATE(pslv);
-
- if (pwrpriv->rpwm == pslv)
- return;
-
- if ((padapter->bSurpriseRemoved) ||
- (!padapter->hw_init_completed)) {
- return;
- }
-
- if (padapter->bDriverStopped) {
- if (pslv < PS_STATE_S2)
- return;
- }
-
- pwrpriv->rpwm = pslv;
-}
-
static u8 PS_RDY_CHECK(struct adapter *padapter)
{
u32 curr_time, delta_time;
@@ -264,7 +235,6 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
if (pwdinfo->opp_ps == 0) {
DBG_88E("rtw_set_ps_mode: Leave 802.11 power save\n");
pwrpriv->pwr_mode = ps_mode;
- rtw_set_rpwm(padapter, PS_STATE_S4);
rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
pwrpriv->bFwCurrentInPSMode = false;
}
@@ -280,8 +250,6 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
/* Set CTWindow after LPS */
if (pwdinfo->opp_ps == 1)
p2p_ps_wk_cmd(padapter, P2P_PS_ENABLE, 0);
-
- rtw_set_rpwm(padapter, PS_STATE_S2);
}
}
@@ -416,8 +384,6 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
pwrctrlpriv->bFwCurrentInPSMode = false;
- pwrctrlpriv->rpwm = 0;
-
pwrctrlpriv->pwr_mode = PS_MODE_ACTIVE;
pwrctrlpriv->smart_ps = padapter->registrypriv.smart_ps;
pwrctrlpriv->bcn_ant_mode = 0;
diff --git a/drivers/staging/r8188eu/include/rtw_pwrctrl.h b/drivers/staging/r8188eu/include/rtw_pwrctrl.h
index 5be67644ba5f..08d821575755 100644
--- a/drivers/staging/r8188eu/include/rtw_pwrctrl.h
+++ b/drivers/staging/r8188eu/include/rtw_pwrctrl.h
@@ -151,7 +151,6 @@ enum { /* for ips_mode */
struct pwrctrl_priv {
struct semaphore lock;
- volatile u8 rpwm; /* requested power state for fw */
volatile u8 cpwm_tog; /* toggling */
u8 pwr_mode;
@@ -234,7 +233,6 @@ void rtw_free_pwrctrl_priv(struct adapter *adapter);
void rtw_set_ps_mode(struct adapter *adapter, u8 ps_mode, u8 smart_ps,
u8 bcn_ant_mode);
-void rtw_set_rpwm(struct adapter *adapter, u8 val8);
void LeaveAllPowerSaveMode(struct adapter *adapter);
void ips_enter(struct adapter *padapter);
int ips_leave(struct adapter *padapter);
--
2.20.1
next prev parent reply other threads:[~2021-09-11 14:16 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-11 14:15 [PATCH 00/12] staging: r8188eu: power management cleanup Martin Kaiser
2021-09-11 14:15 ` [PATCH 01/12] staging: r8188eu: btcoex_rfon is always false Martin Kaiser
2021-09-11 14:15 ` [PATCH 02/12] staging: r8188eu: setting HW_VAR_SET_RPWM does nothing Martin Kaiser
2021-09-11 14:15 ` [PATCH 03/12] staging: r8188eu: remove write-only variable cpwm Martin Kaiser
2021-09-11 14:15 ` [PATCH 04/12] staging: r8188eu: remove write-only variable tog Martin Kaiser
2021-09-11 14:15 ` Martin Kaiser [this message]
2021-09-11 18:33 ` [PATCH 05/12] staging: r8188eu: remove rtw_set_rpwm Michael Straube
2021-09-11 20:13 ` Martin Kaiser
2021-09-11 14:15 ` [PATCH 06/12] staging: r8188eu: remove unused power state defines Martin Kaiser
2021-09-11 14:15 ` [PATCH 07/12] staging: r8188eu: _free_pwrlock is empty Martin Kaiser
2021-09-11 14:15 ` [PATCH 08/12] staging: r8188eu: remove unused pwrctrl definitions Martin Kaiser
2021-09-11 14:15 ` [PATCH 09/12] staging: r8188eu: remove unused enum and array Martin Kaiser
2021-09-11 14:15 ` [PATCH 10/12] staging: r8188eu: rtw_set_ips_deny is not used Martin Kaiser
2021-09-11 14:15 ` [PATCH 11/12] staging: r8188eu: remove unused variable cpwm_tog Martin Kaiser
2021-09-11 14:15 ` [PATCH 12/12] staging: r8188eu: remove unused variable b_hw_radio_off Martin Kaiser
2021-09-13 16:21 ` [PATCH 00/12] staging: r8188eu: power management cleanup Greg Kroah-Hartman
2021-09-13 19:37 ` Martin Kaiser
2021-09-14 7:15 ` Greg Kroah-Hartman
2021-09-13 18:51 ` [PATCH v2 0/8] " Martin Kaiser
2021-09-13 18:51 ` [PATCH v2 1/8] staging: r8188eu: remove rtw_set_rpwm Martin Kaiser
2021-09-13 18:51 ` [PATCH v2 2/8] staging: r8188eu: remove unused power state defines Martin Kaiser
2021-09-13 18:51 ` [PATCH v2 3/8] staging: r8188eu: _free_pwrlock is empty Martin Kaiser
2021-09-13 19:38 ` Michael Straube
2021-09-13 18:51 ` [PATCH v2 4/8] staging: r8188eu: remove unused pwrctrl definitions Martin Kaiser
2021-09-13 18:51 ` [PATCH v2 5/8] staging: r8188eu: remove unused enum and array Martin Kaiser
2021-09-13 18:51 ` [PATCH v2 6/8] staging: r8188eu: rtw_set_ips_deny is not used Martin Kaiser
2021-09-13 18:51 ` [PATCH v2 7/8] staging: r8188eu: remove unused variable cpwm_tog Martin Kaiser
2021-09-13 18:51 ` [PATCH v2 8/8] staging: r8188eu: remove unused variable b_hw_radio_off Martin Kaiser
2021-09-14 9:45 ` [PATCH v2 0/8] staging: r8188eu: power management cleanup Dan Carpenter
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=20210911141521.24901-6-martin@kaiser.cx \
--to=martin@kaiser.cx \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=phil@philpotter.co.uk \
--cc=straube.linux@gmail.com \
/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).