staging: r8188eu: remove dead code from rtl8188e_rf6052.c
In this driver DynamicTxHighPowerLvl is set to TxHighPwrLevel_Normal and never changed. In the file rtl8188e_rf6052.c there are some if statements that check DynamicTxHighPowerLvl for other values than TxHighPwrLevel_Normal. The code in the if blocks is never executed. Remove the dead code. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210921194658.10654-7-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
90602f96f1
Коммит
b6d11bc3ac
|
@ -85,7 +85,6 @@ rtl8188e_PHY_RF6052SetCckTxPower(
|
|||
u8 *pPowerlevel)
|
||||
{
|
||||
struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter);
|
||||
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
||||
struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv;
|
||||
u32 TxAGC[2] = {0, 0}, tmpval = 0, pwrtrac_value;
|
||||
bool TurboScanOff = false;
|
||||
|
@ -111,20 +110,6 @@ rtl8188e_PHY_RF6052SetCckTxPower(
|
|||
TxAGC[idx1] = 0x20;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* Driver dynamic Tx power shall not affect Tx power.
|
||||
* It shall be determined by power training mechanism.
|
||||
i * Currently, we cannot fully disable driver dynamic
|
||||
* tx power mechanism because it is referenced by BT
|
||||
* coexist mechanism.
|
||||
* In the future, two mechanism shall be separated from
|
||||
* each other and maintained independently. */
|
||||
if (pdmpriv->DynamicTxHighPowerLvl == TxHighPwrLevel_Level1) {
|
||||
TxAGC[RF_PATH_A] = 0x10101010;
|
||||
TxAGC[RF_PATH_B] = 0x10101010;
|
||||
} else if (pdmpriv->DynamicTxHighPowerLvl == TxHighPwrLevel_Level2) {
|
||||
TxAGC[RF_PATH_A] = 0x00000000;
|
||||
TxAGC[RF_PATH_B] = 0x00000000;
|
||||
} else {
|
||||
for (idx1 = RF_PATH_A; idx1 <= RF_PATH_B; idx1++) {
|
||||
TxAGC[idx1] =
|
||||
|
@ -141,7 +126,6 @@ i * Currently, we cannot fully disable driver dynamic
|
|||
TxAGC[RF_PATH_B] += tmpval;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (idx1 = RF_PATH_A; idx1 <= RF_PATH_B; idx1++) {
|
||||
ptr = (u8 *)(&TxAGC[idx1]);
|
||||
for (idx2 = 0; idx2 < 4; idx2++) {
|
||||
|
@ -207,7 +191,6 @@ static void get_rx_power_val_by_reg(struct adapter *Adapter, u8 Channel,
|
|||
u32 *pOutWriteVal)
|
||||
{
|
||||
struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter);
|
||||
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
||||
u8 i, chnlGroup = 0, pwr_diff_limit[4], customer_pwr_limit;
|
||||
s8 pwr_diff = 0;
|
||||
u32 writeVal, customer_limit, rf;
|
||||
|
@ -283,19 +266,7 @@ static void get_rx_power_val_by_reg(struct adapter *Adapter, u8 Channel,
|
|||
((index < 2) ? powerBase0[rf] : powerBase1[rf]);
|
||||
break;
|
||||
}
|
||||
/* 20100427 Joseph: Driver dynamic Tx power shall not affect Tx power. It shall be determined by power training mechanism. */
|
||||
/* Currently, we cannot fully disable driver dynamic tx power mechanism because it is referenced by BT coexist mechanism. */
|
||||
/* In the future, two mechanism shall be separated from each other and maintained independently. Thanks for Lanhsin's reminder. */
|
||||
/* 92d do not need this */
|
||||
if (pdmpriv->DynamicTxHighPowerLvl == TxHighPwrLevel_Level1)
|
||||
writeVal = 0x14141414;
|
||||
else if (pdmpriv->DynamicTxHighPowerLvl == TxHighPwrLevel_Level2)
|
||||
writeVal = 0x00000000;
|
||||
|
||||
/* 20100628 Joseph: High power mode for BT-Coexist mechanism. */
|
||||
/* This mechanism is only applied when Driver-Highpower-Mechanism is OFF. */
|
||||
if (pdmpriv->DynamicTxHighPowerLvl == TxHighPwrLevel_BT1)
|
||||
writeVal = writeVal - 0x06060606;
|
||||
*(pOutWriteVal + rf) = writeVal;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче