All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Kulikov <nikolayof23@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev, Nikolay Kulikov <nikolayof23@gmail.com>
Subject: [PATCH 8/9] staging: rtl8723bs: remove 'rf_chip' from struct hal_com_data
Date: Fri, 17 Jul 2026 21:52:07 +0300	[thread overview]
Message-ID: <20260717185407.56513-9-nikolayof23@gmail.com> (raw)
In-Reply-To: <20260717185407.56513-1-nikolayof23@gmail.com>

The 'rf_chip' field is set to only one value (RF_6052), which makes any
conditions with this field predictable.

Remove it and the associated static functions (_ReadRFType() and
_InitRFType()), since they simply set a value in the field and will be
empty without it.

Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
---
 .../staging/rtl8723bs/hal/rtl8723b_phycfg.c    |  2 --
 drivers/staging/rtl8723bs/hal/sdio_halinit.c   | 18 ------------------
 drivers/staging/rtl8723bs/include/hal_data.h   |  1 -
 3 files changed, 21 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
index 78fa99115751..c46a02588cfd 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
@@ -649,8 +649,6 @@ static void phy_SwChnl8723B(struct adapter *padapter)
 	struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
 	u8 channelToSW = pHalData->CurrentChannel;
 
-	if (pHalData->rf_chip == RF_PSEUDO_11N)
-		return;
 	pHalData->RfRegChnlVal[0] = ((pHalData->RfRegChnlVal[0] & 0xfffff00) | channelToSW);
 	PHY_SetRFReg(padapter, RF_PATH_A, RF_CHNLBW, 0x3FF, pHalData->RfRegChnlVal[0]);
 	PHY_SetRFReg(padapter, RF_PATH_B, RF_CHNLBW, 0x3FF, pHalData->RfRegChnlVal[0]);
diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index e11d0add8c02..57d2925642e7 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -533,13 +533,6 @@ static void _InitInterrupt(struct adapter *padapter)
 	InitInterrupt8723BSdio(padapter);
 }
 
-static void _InitRFType(struct adapter *padapter)
-{
-	struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
-
-	pHalData->rf_chip	= RF_6052;
-}
-
 static void _RfPowerSave(struct adapter *padapter)
 {
 /* YJ, TODO */
@@ -643,9 +636,6 @@ u32 rtl8723bs_hal_init(struct adapter *padapter)
 	/*  HW GPIO pin. Before PHY_RFConfig8192C. */
 	HalDetectPwrDownMode(padapter);
 
-	/*  Set RF type for BB/RF configuration */
-	_InitRFType(padapter);
-
 	/*  Save target channel */
 	/*  <Roger_Notes> Current Channel will be updated again later. */
 	pHalData->CurrentChannel = 6;
@@ -976,13 +966,6 @@ static void _EfuseCellSel(struct adapter *padapter)
 	rtw_write32(padapter, EFUSE_TEST, value32);
 }
 
-static void _ReadRFType(struct adapter *Adapter)
-{
-	struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);
-
-	pHalData->rf_chip = RF_6052;
-}
-
 static void Hal_EfuseParseMACAddr_8723BS(
 	struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail
 )
@@ -1080,7 +1063,6 @@ static s32 _ReadAdapterInfo8723BS(struct adapter *padapter)
 	rtw_write8(padapter, 0x4e, val8);
 
 	_EfuseCellSel(padapter);
-	_ReadRFType(padapter);
 	_ReadPROMContent(padapter);
 
 	if (!padapter->hw_init_completed) {
diff --git a/drivers/staging/rtl8723bs/include/hal_data.h b/drivers/staging/rtl8723bs/include/hal_data.h
index 3f37d91ebf23..6c8664b59d2f 100644
--- a/drivers/staging/rtl8723bs/include/hal_data.h
+++ b/drivers/staging/rtl8723bs/include/hal_data.h
@@ -157,7 +157,6 @@ struct hal_com_data {
 	u32 ReceiveConfig;
 
 	/* rf_ctrl */
-	u8 rf_chip;
 	u8 PackageType;
 
 	/*  EEPROM setting. */
-- 
2.55.0


  parent reply	other threads:[~2026-07-17 18:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17 18:51 [PATCH 0/9] staging: rtl8723bs: continued cleanup of struct Nikolay Kulikov
2026-07-17 18:52 ` [PATCH 1/9] staging: rtl8723bs: remove unused 'CCK_24G_Diff' from hal_com_data Nikolay Kulikov
2026-07-17 18:52 ` [PATCH 2/9] staging: rtl8723bs: remove unused array MCSTxPowerLevelOriginalOffset Nikolay Kulikov
2026-07-17 18:52 ` [PATCH 3/9] staging: rtl8723bs: remove unused 'bIQKInitialized ' from hal_com_data Nikolay Kulikov
2026-07-17 18:52 ` [PATCH 4/9] staging: rtl8723bs: remove unused 'bNeedIQK' from struct hal_com_data Nikolay Kulikov
2026-07-17 18:52 ` [PATCH 5/9] staging: rtl8723bs: hal: remove unused readings from the chip Nikolay Kulikov
2026-07-17 18:52 ` [PATCH 6/9] staging: rtl8723bs: remove unused 'UsbRxHighSpeedMode' from hal_com_data Nikolay Kulikov
2026-07-17 18:52 ` [PATCH 7/9] staging: rtl8723bs: remove unused spinlock 'SdioTxFIFOFreePageLock' Nikolay Kulikov
2026-07-17 18:52 ` Nikolay Kulikov [this message]
2026-07-17 18:52 ` [PATCH 9/9] staging: rtl8723bs: remove debug fields from hal_com_data Nikolay Kulikov

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=20260717185407.56513-9-nikolayof23@gmail.com \
    --to=nikolayof23@gmail.com \
    --cc=gregkh@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.