staging: r8188eu: clean up _PHY_PathADDAOn
authorMartin Kaiser <martin@kaiser.cx>
Sun, 7 Nov 2021 14:31:00 +0000 (15:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Nov 2021 09:02:03 +0000 (10:02 +0100)
The only caller sets isPathAOn = true and is2t = false. Remove the
parameters and resulting dead code.

Make the function static, it's used only inside HalPhyRf_8188e.c.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211107143100.9047-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/HalPhyRf_8188e.c
drivers/staging/r8188eu/include/HalPhyRf_8188e.h

index 6b49aca..5c82e5f 100644 (file)
@@ -596,29 +596,19 @@ _PHY_ReloadMACRegisters(
        rtw_write32(adapt, MACReg[i], MACBackup[i]);
 }
 
-void
+static void
 _PHY_PathADDAOn(
                struct adapter *adapt,
-               u32 *ADDAReg,
-               bool isPathAOn,
-               bool is2t
-       )
+               u32 *ADDAReg)
 {
-       u32 pathOn;
        u32 i;
        struct hal_data_8188e   *pHalData = GET_HAL_DATA(adapt);
        struct odm_dm_struct *dm_odm = &pHalData->odmpriv;
 
-       pathOn = isPathAOn ? 0x04db25a4 : 0x0b1b25a4;
-       if (!is2t) {
-               pathOn = 0x0bdb25a0;
-               ODM_SetBBReg(dm_odm, ADDAReg[0], bMaskDWord, 0x0b1b25a0);
-       } else {
-               ODM_SetBBReg(dm_odm, ADDAReg[0], bMaskDWord, pathOn);
-       }
+       ODM_SetBBReg(dm_odm, ADDAReg[0], bMaskDWord, 0x0b1b25a0);
 
        for (i = 1; i < IQK_ADDA_REG_NUM; i++)
-               ODM_SetBBReg(dm_odm, ADDAReg[i], bMaskDWord, pathOn);
+               ODM_SetBBReg(dm_odm, ADDAReg[i], bMaskDWord, 0x0bdb25a0);
 }
 
 void
@@ -768,7 +758,7 @@ static void phy_IQCalibrate_8188E(struct adapter *adapt, s32 result[][8], u8 t)
                _PHY_SaveADDARegisters(adapt, IQK_BB_REG_92C, dm_odm->RFCalibrateInfo.IQK_BB_backup, IQK_BB_REG_NUM);
        }
 
-       _PHY_PathADDAOn(adapt, ADDA_REG, true, false);
+       _PHY_PathADDAOn(adapt, ADDA_REG);
        if (t == 0)
                dm_odm->RFCalibrateInfo.bRfPiEnable = (u8)ODM_GetBBReg(dm_odm, rFPGA0_XA_HSSIParameter1, BIT(8));
 
index 60909ea..b75a5d8 100644 (file)
@@ -30,9 +30,6 @@ void PHY_DigitalPredistortion_8188E(struct adapter *pAdapter);
 void _PHY_SaveADDARegisters(struct adapter *pAdapter, u32 *ADDAReg,
                            u32 *ADDABackup, u32 RegisterNum);
 
-void _PHY_PathADDAOn(struct adapter *pAdapter, u32 *ADDAReg,
-                    bool isPathAOn, bool is2T);
-
 void _PHY_MACSettingCalibration(struct adapter *pAdapter, u32 *MACReg,
                                u32 *MACBackup);