staging: r8188eu: CurrentCckTxPwrIdx is set but not used
authorMartin Kaiser <martin@kaiser.cx>
Sat, 8 Jan 2022 12:49:56 +0000 (13:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jan 2022 15:18:15 +0000 (16:18 +0100)
CurrentCckTxPwrIdx in struct hal_data_8188e is set but not used.
It can be removed.

The phy_PowerIndexCheck88E function is now empty. Remove it as well.

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

index a80f40f..c1639df 100644 (file)
@@ -581,14 +581,6 @@ static void getTxPowerIndex88E(struct adapter *Adapter, u8 channel, u8 *cckPower
        BW40PowerLevel[RF_PATH_A] = pHalData->Index24G_BW40_Base[index];
 }
 
-static void phy_PowerIndexCheck88E(struct adapter *Adapter, u8 channel, u8 *cckPowerLevel,
-                                  u8 *ofdmPowerLevel, u8 *BW20PowerLevel, u8 *BW40PowerLevel)
-{
-       struct hal_data_8188e *pHalData = &Adapter->haldata;
-
-       pHalData->CurrentCckTxPwrIdx = cckPowerLevel[0];
-}
-
 /*-----------------------------------------------------------------------------
  * Function:    SetTxPowerLevel8190()
  *
@@ -619,8 +611,6 @@ PHY_SetTxPowerLevel8188E(
 
        getTxPowerIndex88E(Adapter, channel, &cckPowerLevel[0], &ofdmPowerLevel[0], &BW20PowerLevel[0], &BW40PowerLevel[0]);
 
-       phy_PowerIndexCheck88E(Adapter, channel, &cckPowerLevel[0], &ofdmPowerLevel[0], &BW20PowerLevel[0], &BW40PowerLevel[0]);
-
        rtl8188e_PHY_RF6052SetCckTxPower(Adapter, &cckPowerLevel[0]);
        rtl8188e_PHY_RF6052SetOFDMTxPower(Adapter, &ofdmPowerLevel[0], &BW20PowerLevel[0], &BW40PowerLevel[0], channel);
 }
index fd2ee17..a24cdbf 100644 (file)
@@ -176,9 +176,6 @@ struct hal_data_8188e {
        u8      PwrGroupHT20[RF_PATH_MAX][CHANNEL_MAX_NUMBER];
        u8      PwrGroupHT40[RF_PATH_MAX][CHANNEL_MAX_NUMBER];
 
-       /*  The current Tx Power Level */
-       u8      CurrentCckTxPwrIdx;
-
        /*  Read/write are allow for following hardware information variables */
        u8      pwrGroupCnt;
        u32     MCSTxPowerLevelOriginalOffset[MAX_PG_GROUP][16];