]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: rtl8723bs: move normal_chip field to struct hal_com_data
authorNikolay Kulikov <nikolayof23@gmail.com>
Sat, 2 May 2026 21:55:47 +0000 (00:55 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 May 2026 14:53:19 +0000 (16:53 +0200)
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>
Link: https://patch.msgid.link/20260502220056.59815-9-nikolayof23@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
drivers/staging/rtl8723bs/include/HalVerDef.h
drivers/staging/rtl8723bs/include/hal_data.h

index 4cdef45ae15eb664e67278de179966758a65679a..5c3b92f473aa1370244eb41f9e4c8624f611e13e 100644 (file)
@@ -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);
index 90ef37b1ddaedf1dfde2972cc6661a11ea5d6ce9..ed6925872d5642161a13cf06807fef190b2799ef 100644 (file)
@@ -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; */
index ff4383e30322f3936cd15c9009a70fc71d9e079d..20b14e665d997b5c86f205a039b84c0f0bfaae1e 100644 (file)
@@ -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))