From: Fabio Aiuto Date: Tue, 15 Jun 2021 11:45:34 +0000 (+0200) Subject: staging: rtl8723bs: remove unneeded DISABLE_BB_RF macro X-Git-Tag: v5.15~790^2~100 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb1c456d7f88b60b28b9f51e28031fc67cdb8d7b;p=platform%2Fkernel%2Flinux-starfive.git staging: rtl8723bs: remove unneeded DISABLE_BB_RF macro remove unneeded DISABLE_BB_RF macro. This is just a symbolic constant used to disable by hand-edit some core hardware capabilities which we want to be always enabled. So just remove it. Reviewed-by: Hans de Goede Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/1a56a6b2f9f846197e8e25769ad86ad23e530047.1623756906.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c index 8b42b19..1b0f47b 100644 --- a/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c +++ b/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c @@ -1656,9 +1656,6 @@ void PHY_IQCalibrate_8723B( if (bSingleTone || bCarrierSuppression) return; -#if DISABLE_BB_RF - return; -#endif if (pDM_Odm->RFCalibrateInfo.bIQKInProgress) return; @@ -1845,10 +1842,6 @@ void PHY_LCCalibrate_8723B(struct dm_odm_t *pDM_Odm) bool bSingleTone = false, bCarrierSuppression = false; u32 timeout = 2000, timecount = 0; -#if DISABLE_BB_RF - return; -#endif - if (!(pDM_Odm->SupportAbility & ODM_RF_CALIBRATION)) return; diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c index 011b42e..3a2e3d0 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c @@ -53,10 +53,6 @@ u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 RegAddr, u32 BitMask) { u32 OriginalValue, BitShift; -#if (DISABLE_BB_RF == 1) - return 0; -#endif - OriginalValue = rtw_read32(Adapter, RegAddr); BitShift = phy_CalculateBitShift(BitMask); @@ -88,10 +84,6 @@ void PHY_SetBBReg_8723B( /* u16 BBWaitCounter = 0; */ u32 OriginalValue, BitShift; -#if (DISABLE_BB_RF == 1) - return; -#endif - if (BitMask != bMaskDWord) { /* if not "double word" write */ OriginalValue = rtw_read32(Adapter, RegAddr); BitShift = phy_CalculateBitShift(BitMask); @@ -252,10 +244,6 @@ u32 PHY_QueryRFReg_8723B( { u32 Original_Value, BitShift; -#if (DISABLE_BB_RF == 1) - return 0; -#endif - Original_Value = phy_RFSerialRead_8723B(Adapter, eRFPath, RegAddr); BitShift = phy_CalculateBitShift(BitMask); @@ -285,10 +273,6 @@ void PHY_SetRFReg_8723B( { u32 Original_Value, BitShift; -#if (DISABLE_BB_RF == 1) - return; -#endif - /* RF data is 12 bits only */ if (BitMask != bRFRegOffsetMask) { Original_Value = phy_RFSerialRead_8723B(Adapter, eRFPath, RegAddr); diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c index a63f2f6..38acde4 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c +++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c @@ -560,11 +560,6 @@ static void _InitRFType(struct adapter *padapter) { struct hal_com_data *pHalData = GET_HAL_DATA(padapter); -#if DISABLE_BB_RF - pHalData->rf_chip = RF_PSEUDO_11N; - return; -#endif - pHalData->rf_chip = RF_6052; pHalData->rf_type = RF_1T1R; @@ -1035,11 +1030,7 @@ static void _ReadRFType(struct adapter *Adapter) { struct hal_com_data *pHalData = GET_HAL_DATA(Adapter); -#if DISABLE_BB_RF - pHalData->rf_chip = RF_PSEUDO_11N; -#else pHalData->rf_chip = RF_6052; -#endif } diff --git a/drivers/staging/rtl8723bs/include/autoconf.h b/drivers/staging/rtl8723bs/include/autoconf.h index eab9342..d1a97fe 100644 --- a/drivers/staging/rtl8723bs/include/autoconf.h +++ b/drivers/staging/rtl8723bs/include/autoconf.h @@ -12,16 +12,7 @@ * Auto Config Section */ #define LPS_RPWM_WAIT_MS 300 -#ifndef DISABLE_BB_RF -#define DISABLE_BB_RF 0 -#endif -#if DISABLE_BB_RF - #define HAL_MAC_ENABLE 0 - #define HAL_BB_ENABLE 0 - #define HAL_RF_ENABLE 0 -#else - #define HAL_MAC_ENABLE 1 - #define HAL_BB_ENABLE 1 - #define HAL_RF_ENABLE 1 -#endif +#define HAL_MAC_ENABLE 1 +#define HAL_BB_ENABLE 1 +#define HAL_RF_ENABLE 1 diff --git a/drivers/staging/rtl8723bs/include/hal_phy.h b/drivers/staging/rtl8723bs/include/hal_phy.h index 521eb1c..e9944ff 100644 --- a/drivers/staging/rtl8723bs/include/hal_phy.h +++ b/drivers/staging/rtl8723bs/include/hal_phy.h @@ -8,17 +8,11 @@ #define __HAL_PHY_H__ -#if DISABLE_BB_RF -#define HAL_FW_ENABLE 0 -#define HAL_MAC_ENABLE 0 -#define HAL_BB_ENABLE 0 -#define HAL_RF_ENABLE 0 -#else /* FPGA_PHY and ASIC */ -#define HAL_FW_ENABLE 1 -#define HAL_MAC_ENABLE 1 -#define HAL_BB_ENABLE 1 -#define HAL_RF_ENABLE 1 -#endif +/* FPGA_PHY and ASIC */ +#define HAL_FW_ENABLE 1 +#define HAL_MAC_ENABLE 1 +#define HAL_BB_ENABLE 1 +#define HAL_RF_ENABLE 1 /* */ /* Antenna detection method, i.e., using single tone detection or RSSI reported from each antenna detected. */