staging: r8188eu: remove rf_type from storePwrIndexDiffRateOffset()
authorMichael Straube <straube.linux@gmail.com>
Sun, 28 Nov 2021 17:09:17 +0000 (18:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Dec 2021 14:13:36 +0000 (15:13 +0100)
pHalData->rf_type is always RF_1T1R. Remove unnecessary checks and
related dead code from storePwrIndexDiffRateOffset().

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20211128170924.5874-4-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/rtl8188e_phycfg.c

index 47402851700b333065f25b7da69ab4ea3a0c343d..258349e6104ffa55200f3fe418d84c96d63eb768 100644 (file)
@@ -506,8 +506,7 @@ void storePwrIndexDiffRateOffset(struct adapter *Adapter, u32 RegAddr, u32 BitMa
                pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][4] = Data;
        if (RegAddr == rTxAGC_A_Mcs15_Mcs12) {
                pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][5] = Data;
-               if (pHalData->rf_type == RF_1T1R)
-                       pHalData->pwrGroupCnt++;
+               pHalData->pwrGroupCnt++;
        }
        if (RegAddr == rTxAGC_B_Rate18_06)
                pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][8] = Data;
@@ -523,11 +522,8 @@ void storePwrIndexDiffRateOffset(struct adapter *Adapter, u32 RegAddr, u32 BitMa
                pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][11] = Data;
        if (RegAddr == rTxAGC_B_Mcs11_Mcs08)
                pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][12] = Data;
-       if (RegAddr == rTxAGC_B_Mcs15_Mcs12) {
+       if (RegAddr == rTxAGC_B_Mcs15_Mcs12)
                pHalData->MCSTxPowerLevelOriginalOffset[pHalData->pwrGroupCnt][13] = Data;
-               if (pHalData->rf_type != RF_1T1R)
-                       pHalData->pwrGroupCnt++;
-       }
 }
 
 static int phy_BB8188E_Config_ParaFile(struct adapter *Adapter)