[PATCH 1/9] staging: r8188eu: ExternalPA is read-only

From: Michael Straube
Date: Tue Feb 01 2022 - 03:43:25 EST


The variable ExternalPA in struct hal_data_8188e is never set.
It stays at the default value 0. Remove it and remove related
dead code.

Signed-off-by: Michael Straube <straube.linux@xxxxxxxxx>
---
drivers/staging/r8188eu/hal/rtl8188e_rf6052.c | 3 ---
drivers/staging/r8188eu/include/rtl8188e_hal.h | 1 -
2 files changed, 4 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/rtl8188e_rf6052.c b/drivers/staging/r8188eu/hal/rtl8188e_rf6052.c
index d10a6cc2d4ab..9b06a23df2ac 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_rf6052.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_rf6052.c
@@ -99,9 +99,6 @@ rtl8188e_PHY_RF6052SetCckTxPower(
TxAGC[idx1] =
pPowerlevel[idx1] | (pPowerlevel[idx1] << 8) |
(pPowerlevel[idx1] << 16) | (pPowerlevel[idx1] << 24);
- /* 2010/10/18 MH For external PA module. We need to limit power index to be less than 0x20. */
- if (TxAGC[idx1] > 0x20 && pHalData->ExternalPA)
- TxAGC[idx1] = 0x20;
}
} else {
for (idx1 = RF_PATH_A; idx1 <= RF_PATH_B; idx1++) {
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index a24cdbfa83de..2de7c0464411 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -181,7 +181,6 @@ struct hal_data_8188e {
u32 MCSTxPowerLevelOriginalOffset[MAX_PG_GROUP][16];

u8 CrystalCap;
- u8 ExternalPA;

u32 AcParam_BE; /* Original parameter for BE, use for EDCA turbo. */

--
2.34.1