staging: rtl8723bs: remove unused BoardType field and its parser
PATCH 1/1 staging: rtl8723bs: remove unused BoardType field and its parser
Hal_EfuseParseBoardType_8723BS() reads the board option byte from the efuse and stores bits 5 through 7 in pHalData->BoardType. Nothing in the driver ever reads pHalData->BoardType, so the value isn't used.
The function also tries to fall back to a default when the efuse byte is unprogrammed, but the check can never be true:
BoardType = (hwinfo[...] & 0xE0) >> 5; /* at most 7 */
if (BoardType == 0xFF) /* never true */Remove the function, the one place it's called, and the unused BoardType member of struct hal_com_data. This doesn't change how the driver behaves.
Signed-off-by Rishik Yechuri <[email protected]>
---
Notes:
Compile-tested only. I don't have the rtl8723bs hardware.
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 16 ---------------- drivers/staging/rtl8723bs/include/hal_data.h | 1 - 2 files changed, 17 deletions(-)
drivers/staging/rtl8723bs/hal/sdio_halinit.c +0 -16
@@ -933,21 +933,6 @@ static void Hal_EfuseParseMACAddr_8723BS( } } -static void Hal_EfuseParseBoardType_8723BS ( -struct adapter *padapter,u8 *hwinfo,bool AutoLoadFail -) -{ -struct hal_com_data *pHalData =GET_HAL_DATA (padapter); - -if (!AutoLoadFail) { - pHalData->BoardType = (hwinfo[EEPROM_RF_BOARD_OPTION_8723B ] &0xE0 ) >>5 ; -if (pHalData->BoardType ==0xFF ) - pHalData->BoardType = (EEPROM_DEFAULT_BOARD_OPTION &0xE0 ) >>5 ; - }else { - pHalData->BoardType =0 ; - } -} -static void _ReadEfuseInfo8723BS (struct adapter *padapter) {struct eeprom_priv *pEEPROM =GET_EEPROM_EFUSE_PRIV (padapter);
@@ -963,7 +948,6 @@ static void _ReadEfuseInfo8723BS(struct adapter *padapter)Hal_EfuseParseMACAddr_8723BS (padapter, hwinfo, pEEPROM->bautoload_fail_flag);Hal_EfuseParseTxPowerInfo_8723B (padapter, hwinfo, pEEPROM->bautoload_fail_flag); -Hal_EfuseParseBoardType_8723BS (padapter, hwinfo, pEEPROM->bautoload_fail_flag);/* Read Bluetooth co-exist and initialize */ Hal_EfuseParsePackageType_8723B (padapter, hwinfo, pEEPROM->bautoload_fail_flag);
drivers/staging/rtl8723bs/include/hal_data.h +0 -1
@@ -186,7 +186,6 @@ struct hal_com_data {u8 TypeALNA;u8 TypeAPA;u8 RFEType; -u8 BoardType;bool bLCKInProgress;bool bSwChnl;
Signature · 1 line
2.43.0