staging: r8188eu: remove rf_type from writeOFDMPowerReg88E()
authorMichael Straube <straube.linux@gmail.com>
Sun, 28 Nov 2021 17:09:20 +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 from
writeOFDMPowerReg88E().

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

index 946a1b9..813dd93 100644 (file)
@@ -272,7 +272,6 @@ static void get_rx_power_val_by_reg(struct adapter *Adapter, u8 Channel,
 }
 static void writeOFDMPowerReg88E(struct adapter *Adapter, u8 index, u32 *pValue)
 {
-       struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter);
        u16 regoffset_a[6] = {
                rTxAGC_A_Rate18_06, rTxAGC_A_Rate54_24,
                rTxAGC_A_Mcs03_Mcs00, rTxAGC_A_Mcs07_Mcs04,
@@ -302,10 +301,7 @@ static void writeOFDMPowerReg88E(struct adapter *Adapter, u8 index, u32 *pValue)
                PHY_SetBBReg(Adapter, regoffset, bMaskDWord, writeVal);
 
                /*  201005115 Joseph: Set Tx Power diff for Tx power training mechanism. */
-               if (((pHalData->rf_type == RF_2T2R) &&
-                    (regoffset == rTxAGC_A_Mcs15_Mcs12 || regoffset == rTxAGC_B_Mcs15_Mcs12)) ||
-                   ((pHalData->rf_type != RF_2T2R) &&
-                    (regoffset == rTxAGC_A_Mcs07_Mcs04 || regoffset == rTxAGC_B_Mcs07_Mcs04))) {
+               if (regoffset == rTxAGC_A_Mcs07_Mcs04 || regoffset == rTxAGC_B_Mcs07_Mcs04) {
                        writeVal = pwr_val[3];
                        if (regoffset == rTxAGC_A_Mcs15_Mcs12 || regoffset == rTxAGC_A_Mcs07_Mcs04)
                                regoffset = 0xc90;