From: Nikolay Kulikov Date: Sat, 2 May 2026 21:55:47 +0000 (+0300) Subject: staging: rtl8723bs: move normal_chip field to struct hal_com_data X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=3778b29eaa1b5587b540b86daeb84d42c72d1697;p=thirdparty%2Fkernel%2Flinux.git staging: rtl8723bs: move normal_chip field to struct hal_com_data 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 Link: https://patch.msgid.link/20260502220056.59815-9-nikolayof23@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c index 4cdef45ae15eb..5c3b92f473aa1 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 90ef37b1ddaed..ed6925872d564 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 ff4383e30322f..20b14e665d997 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))