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 4/4] staging: r8188eu: remove constant variable eRFPath
Date: Thu, 3 Feb 2022 21:32:17 +0100 [thread overview]
Message-ID: <20220203203217.252156-5-martin@kaiser.cx> (raw)
In-Reply-To: <20220203203217.252156-1-martin@kaiser.cx>
In the _PHY_SwChnl8192C function, eRFPath is always zero. Remove the
variable and use 0 in the code. Replace (enum rf_radio_path)0 with
RF_PATH_A.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
index 8279768201b7..6e26359bdda7 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
@@ -712,7 +712,6 @@ void PHY_SetBWMode8188E(struct adapter *Adapter, enum ht_channel_width Bandwidth
static void _PHY_SwChnl8192C(struct adapter *Adapter, u8 channel)
{
- u8 eRFPath = 0;
u32 param1, param2;
struct hal_data_8188e *pHalData = &Adapter->haldata;
@@ -725,8 +724,8 @@ static void _PHY_SwChnl8192C(struct adapter *Adapter, u8 channel)
/* s2. RF dependent command - CmdID_RF_WriteReg, param1=RF_CHNLBW, param2=channel */
param1 = RF_CHNLBW;
param2 = channel;
- pHalData->RfRegChnlVal[eRFPath] = ((pHalData->RfRegChnlVal[eRFPath] & 0xfffffc00) | param2);
- rtl8188e_PHY_SetRFReg(Adapter, (enum rf_radio_path)eRFPath, param1, bRFRegOffsetMask, pHalData->RfRegChnlVal[eRFPath]);
+ pHalData->RfRegChnlVal[0] = ((pHalData->RfRegChnlVal[0] & 0xfffffc00) | param2);
+ rtl8188e_PHY_SetRFReg(Adapter, RF_PATH_A, param1, bRFRegOffsetMask, pHalData->RfRegChnlVal[0]);
}
void PHY_SwChnl8188E(struct adapter *Adapter, u8 channel)
--
2.30.2
next prev parent reply other threads:[~2022-02-03 20:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-03 20:32 [PATCH 0/4] staging: r8188eu: remove unused code for RF_PATH_B Martin Kaiser
2022-02-03 20:32 ` [PATCH 1/4] staging: r8188eu: remove constant parameter of phy_LCCalibrate_8188E Martin Kaiser
2022-02-03 20:32 ` [PATCH 2/4] staging: r8188eu: remove dead code for tx power tracking Martin Kaiser
2022-02-03 20:32 ` [PATCH 3/4] staging: r8188eu: remove constant parameter of odm_ConfigRFReg_8188E Martin Kaiser
2022-02-03 20:32 ` Martin Kaiser [this message]
2022-02-04 9:09 ` [PATCH v2 0/4] staging: r8188eu: remove unused code for RF_PATH_B Martin Kaiser
2022-02-04 9:09 ` [PATCH v2 1/4] staging: r8188eu: remove constant parameter of phy_LCCalibrate_8188E Martin Kaiser
2022-02-04 9:09 ` [PATCH v2 2/4] staging: r8188eu: remove dead code for tx power tracking Martin Kaiser
2022-02-04 9:09 ` [PATCH v2 3/4] staging: r8188eu: remove constant parameter of odm_ConfigRFReg_8188E Martin Kaiser
2022-02-04 9:09 ` [PATCH v2 4/4] staging: r8188eu: remove constant variable eRFPath Martin Kaiser
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=20220203203217.252156-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
all inboxes | Powered by JetHome®