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 1/8] staging: rtl8192e: Remove unchanged variable RegRfPsLevel
Date: Sun, 16 Apr 2023 09:19:37 +0200 [thread overview]
Message-ID: <49162b0041db33c6c43c4126839baed69c76cb89.1681627603.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1681627603.git.philipp.g.hortmann@gmail.com>
Remove unchanged variable RegRfPsLevel and equations that have always the
same result to shorten code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 9 +--------
drivers/staging/rtl8192e/rtllib.h | 1 -
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index dd666701138e..4b0ebe96302e 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -1089,14 +1089,7 @@ static bool _rtl92e_set_rf_power_state(struct net_device *dev,
if (i >= MAX_DOZE_WAITING_TIMES_9x)
break;
}
- if (psc->RegRfPsLevel & RT_RF_OFF_LEVL_HALT_NIC &&
- !RT_IN_PS_LEVEL(psc, RT_RF_OFF_LEVL_HALT_NIC)) {
- rtl92e_disable_nic(dev);
- RT_SET_PS_LEVEL(psc, RT_RF_OFF_LEVL_HALT_NIC);
- } else if (!(psc->RegRfPsLevel &
- RT_RF_OFF_LEVL_HALT_NIC)) {
- rtl92e_set_rf_off(dev);
- }
+ rtl92e_set_rf_off(dev);
break;
default:
bResult = false;
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index b1729d65f67f..1a0e7ae70ca6 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1237,7 +1237,6 @@ struct rt_pwr_save_ctrl {
u8 LPSAwakeIntvl;
u32 CurPsLevel;
- u32 RegRfPsLevel;
};
#define RT_RF_CHANGE_SOURCE u32
--
2.40.0
next prev parent reply other threads:[~2023-04-16 7:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-16 7:19 [PATCH 0/8] staging: rtl8192e: Remove unchanged variables around rf_power_state Philipp Hortmann
2023-04-16 7:19 ` Philipp Hortmann [this message]
2023-04-16 7:19 ` [PATCH 2/8] staging: rtl8192e: Remove unused function rtl92e_disable_nic Philipp Hortmann
2023-04-16 7:19 ` [PATCH 3/8] staging: rtl8192e: Remove unused macro RT_SET_PS_LEVEL Philipp Hortmann
2023-04-16 7:19 ` [PATCH 4/8] staging: rtl8192e: Remove second initialization of bActuallySet Philipp Hortmann
2023-04-16 7:20 ` [PATCH 5/8] staging: rtl8192e: Remove set to true while true of bfirst_after_down Philipp Hortmann
2023-04-16 7:20 ` [PATCH 6/8] staging: rtl8192e: Remove unchanged variable chan_forced Philipp Hortmann
2023-04-16 7:20 ` [PATCH 7/8] staging: rtl8192e: Remove unchanged variable frame_sync_monitor Philipp Hortmann
2023-04-16 7:20 ` [PATCH 8/8] staging: rtl8192e: Remove unchanged variables bfsync_processing and more 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=49162b0041db33c6c43c4126839baed69c76cb89.1681627603.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®