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 <nikolayof23@gmail.com>
Link: https://patch.msgid.link/20260502220056.59815-9-nikolayof23@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Nikolay Kulikov 2026-05-03 00:55:47 +03:00 committed by Greg Kroah-Hartman
parent faf9f114a8
commit 3778b29eaa
3 changed files with 5 additions and 3 deletions

View 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);

View 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; */

View 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))