staging: rtl8723bs: remove 'rf_chip' from struct hal_com_data

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>
Link: https://patch.msgid.link/20260717185407.56513-9-nikolayof23@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Nikolay Kulikov 2026-07-17 21:52:07 +03:00 committed by Greg Kroah-Hartman
parent e9b50a2821
commit bbe3a0f030
3 changed files with 0 additions and 21 deletions

View File

@ -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]);

View File

@ -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) {

View File

@ -157,7 +157,6 @@ struct hal_com_data {
u32 ReceiveConfig;
/* rf_ctrl */
u8 rf_chip;
u8 PackageType;
/* EEPROM setting. */