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 08/10] staging: rtl8723bs: move normal_chip field to struct hal_com_data
Date: Sun, 3 May 2026 00:55:47 +0300 [thread overview]
Message-ID: <20260502220056.59815-9-nikolayof23@gmail.com> (raw)
In-Reply-To: <20260502220056.59815-1-nikolayof23@gmail.com>
The 'chip_normal' field is the only remaining member of the 'struct
hal_version' that is used.
Move this field to the hal_com_data struct, where other chip information
is already stored. The order of assignments and reads to this variable
remains unchanged. This is purely a data relocation patch.
Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
---
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 4 ++--
drivers/staging/rtl8723bs/include/HalVerDef.h | 1 -
drivers/staging/rtl8723bs/include/hal_data.h | 3 +++
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 0818034563b1..0c422deed545 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -835,7 +835,7 @@ static struct hal_version ReadChipVersion8723B(struct adapter *padapter)
pHalData = GET_HAL_DATA(padapter);
value32 = rtw_read32(padapter, REG_SYS_CFG);
- ChipVersion.chip_normal = ((value32 & RTL_ID) ? false : true);
+ pHalData->chip_normal = ((value32 & RTL_ID) ? false : true);
/* For regulator mode. by tynli. 2011.01.14 */
pHalData->RegulatorMode = ((value32 & SPS_SEL) ? RT_LDO_REGULATOR : RT_SWITCHING_REGULATOR);
@@ -906,7 +906,7 @@ void _InitBurstPktLen_8723BS(struct adapter *Adapter)
/* ARFB table 9 for 11ac 5G 2SS */
rtw_write32(Adapter, REG_ARFR0_8723B, 0x00000010);
- if (pHalData->VersionID.chip_normal)
+ if (pHalData->chip_normal)
rtw_write32(Adapter, REG_ARFR0_8723B+4, 0xfffff000);
else
rtw_write32(Adapter, REG_ARFR0_8723B+4, 0x3e0ff000);
diff --git a/drivers/staging/rtl8723bs/include/HalVerDef.h b/drivers/staging/rtl8723bs/include/HalVerDef.h
index 90ef37b1ddae..ed6925872d56 100644
--- a/drivers/staging/rtl8723bs/include/HalVerDef.h
+++ b/drivers/staging/rtl8723bs/include/HalVerDef.h
@@ -42,7 +42,6 @@ enum hal_vendor_e { /* tag_HAL_Manufacturer_Version_Definition */
};
struct hal_version { /* tag_HAL_VERSION */
- bool chip_normal; /* true - normal chip, false - test chip */
};
/* hal_version VersionID; */
diff --git a/drivers/staging/rtl8723bs/include/hal_data.h b/drivers/staging/rtl8723bs/include/hal_data.h
index ff4383e30322..20b14e665d99 100644
--- a/drivers/staging/rtl8723bs/include/hal_data.h
+++ b/drivers/staging/rtl8723bs/include/hal_data.h
@@ -391,6 +391,9 @@ struct hal_com_data {
/* Interrupt related register information. */
u32 SysIntrStatus;
u32 SysIntrMask;
+
+ /* Chip version information */
+ bool chip_normal; /* true - normal chip, false - test chip */
};
#define GET_HAL_DATA(__padapter) ((struct hal_com_data *)((__padapter)->HalData))
--
2.54.0
next prev parent reply other threads:[~2026-05-02 22:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-02 21:55 [PATCH 00/10] staging: rtl8723bs: remove struct hal_version Nikolay Kulikov
2026-05-02 21:55 ` [PATCH 01/10] staging: rtl8723bs: rename ChipType of struct hal_version to snake_case Nikolay Kulikov
2026-05-02 21:55 ` [PATCH 02/10] staging: rtl8723bs: replace type and rename the chip_type field Nikolay Kulikov
2026-05-02 21:55 ` [PATCH 03/10] staging: rtl8723bs: remove unused macros from include/HalVerDef.h Nikolay Kulikov
2026-05-02 21:55 ` [PATCH 04/10] staging: rtl8723bs: remove unused ICType from struct hal_version Nikolay Kulikov
2026-05-02 21:55 ` [PATCH 05/10] staging: rtl8723bs: remove unused VendorType " Nikolay Kulikov
2026-05-02 21:55 ` [PATCH 06/10] staging: rtl8723bs: remove unused CUTVersion " Nikolay Kulikov
2026-05-02 21:55 ` [PATCH 07/10] staging: rtl8723bs: remove unused ROMVer " Nikolay Kulikov
2026-05-02 21:55 ` Nikolay Kulikov [this message]
2026-05-02 21:55 ` [PATCH 09/10] staging: rtl8723bs: remove struct hal_version from include/HalVerDef.h Nikolay Kulikov
2026-05-02 21:55 ` [PATCH 10/10] staging: rtl8723bs: remove include/HalVerDef.h file 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=20260502220056.59815-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox