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 v2 4/8] staging: r8188eu: remove unused pwrctrl definitions
Date: Mon, 13 Sep 2021 20:51:06 +0200 [thread overview]
Message-ID: <20210913185110.3065-5-martin@kaiser.cx> (raw)
In-Reply-To: <20210913185110.3065-1-martin@kaiser.cx>
Remove a bunch of unused defines and macros and an unused struct
from rtw_pwrctrl.h.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
v2:
- rebased against today's staging-testing branch
drivers/staging/r8188eu/include/rtw_pwrctrl.h | 44 -------------------
1 file changed, 44 deletions(-)
diff --git a/drivers/staging/r8188eu/include/rtw_pwrctrl.h b/drivers/staging/r8188eu/include/rtw_pwrctrl.h
index edbb852b1288..fd9c054e2d5a 100644
--- a/drivers/staging/r8188eu/include/rtw_pwrctrl.h
+++ b/drivers/staging/r8188eu/include/rtw_pwrctrl.h
@@ -7,18 +7,6 @@
#include "osdep_service.h"
#include "drv_types.h"
-#define FW_PWR0 0
-#define FW_PWR1 1
-#define FW_PWR2 2
-#define FW_PWR3 3
-#define HW_PWR0 7
-#define HW_PWR1 6
-#define HW_PWR2 2
-#define HW_PWR3 0
-#define HW_PWR4 8
-
-#define FW_PWRMSK 0x7
-
#define XMIT_ALIVE BIT(0)
#define RECV_ALIVE BIT(1)
#define CMD_ALIVE BIT(2)
@@ -39,12 +27,6 @@ enum power_mgnt {
PS_MODE_NUM
};
-struct reportpwrstate_parm {
- unsigned char mode;
- unsigned char state; /* the CPWM value */
- unsigned short rsvd;
-};
-
static inline void _init_pwrlock(struct semaphore *plock)
{
sema_init(plock, 1);
@@ -62,10 +44,6 @@ static inline void _exit_pwrlock(struct semaphore *plock)
#define LPS_DELAY_TIME 1*HZ /* 1 sec */
-#define EXE_PWR_NONE 0x01
-#define EXE_PWR_IPS 0x02
-#define EXE_PWR_LPS 0x04
-
/* RF state. */
enum rt_rf_power_state {
rf_on, /* RF is on after RFSleep or RFOff */
@@ -75,26 +53,6 @@ enum rt_rf_power_state {
rf_max
};
-/* RF Off Level for IPS or HW/SW radio off */
-#define RT_RF_OFF_LEVL_ASPM BIT(0) /* PCI ASPM */
-#define RT_RF_OFF_LEVL_CLK_REQ BIT(1) /* PCI clock request */
-#define RT_RF_OFF_LEVL_PCI_D3 BIT(2) /* PCI D3 mode */
-#define RT_RF_OFF_LEVL_HALT_NIC BIT(3) /* NIC halt, re-init hw param*/
-#define RT_RF_OFF_LEVL_FREE_FW BIT(4) /* FW free, re-download the FW*/
-#define RT_RF_OFF_LEVL_FW_32K BIT(5) /* FW in 32k */
-#define RT_RF_PS_LEVEL_ALWAYS_ASPM BIT(6) /* Always enable ASPM and Clock
- * Req in initialization. */
-#define RT_RF_LPS_DISALBE_2R BIT(30) /* When LPS is on, disable 2R
- * if no packet is RX or TX. */
-#define RT_RF_LPS_LEVEL_ASPM BIT(31) /* LPS with ASPM */
-
-#define RT_IN_PS_LEVEL(ppsc, _PS_FLAG) \
- ((ppsc->cur_ps_level & _PS_FLAG) ? true : false)
-#define RT_CLEAR_PS_LEVEL(ppsc, _PS_FLAG) \
- (ppsc->cur_ps_level &= (~(_PS_FLAG)))
-#define RT_SET_PS_LEVEL(ppsc, _PS_FLAG) \
- (ppsc->cur_ps_level |= _PS_FLAG)
-
enum _PS_BBRegBackup_ {
PSBBREG_RF0 = 0,
PSBBREG_RF1,
@@ -209,8 +167,6 @@ int _rtw_pwr_wakeup(struct adapter *adapter, u32 ips_defer_ms,
const char *caller);
#define rtw_pwr_wakeup(adapter) \
_rtw_pwr_wakeup(adapter, RTW_PWR_STATE_CHK_INTERVAL, __func__)
-#define rtw_pwr_wakeup_ex(adapter, ips_deffer_ms) \
- _rtw_pwr_wakeup(adapter, ips_deffer_ms, __func__)
int rtw_pm_set_ips(struct adapter *adapter, u8 mode);
int rtw_pm_set_lps(struct adapter *adapter, u8 mode);
--
2.20.1
next prev parent reply other threads:[~2021-09-13 18:53 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 ` [PATCH 05/12] staging: r8188eu: remove rtw_set_rpwm Martin Kaiser
2021-09-11 18:33 ` 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 ` Martin Kaiser [this message]
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=20210913185110.3065-5-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).