staging: rtl8723bs: remove unneeded DISABLE_BB_RF macro
authorFabio Aiuto <fabioaiuto83@gmail.com>
Tue, 15 Jun 2021 11:45:34 +0000 (13:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Jun 2021 13:24:23 +0000 (15:24 +0200)
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 <hdegoede@redhat.com>
Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com>
Link: https://lore.kernel.org/r/1a56a6b2f9f846197e8e25769ad86ad23e530047.1623756906.git.fabioaiuto83@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
drivers/staging/rtl8723bs/hal/sdio_halinit.c
drivers/staging/rtl8723bs/include/autoconf.h
drivers/staging/rtl8723bs/include/hal_phy.h

index 8b42b19..1b0f47b 100644 (file)
@@ -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;
 
index 011b42e..3a2e3d0 100644 (file)
@@ -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);
index a63f2f6..38acde4 100644 (file)
@@ -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
 }
 
 
index eab9342..d1a97fe 100644 (file)
  * 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
index 521eb1c..e9944ff 100644 (file)
@@ -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. */