summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorMartin Kaiser <martin@kaiser.cx>2022-01-05 09:34:22 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-06 15:04:55 +0100
commiteeb35e4a2742e2a977d3d540873c25bd50dd2fbc (patch)
tree009cda8f8621be3722f0b9915c39199d0721c535 /drivers/staging
parente9a14094c724ab4d519882d6f67ba3e6b9cc38be (diff)
staging: r8188eu: make Index24G_BW40_Base a 1-D array
Make Index24G_BW40_Base a one-dimensional array. This driver uses only Index24G_BW40_Base[0]. Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220105083426.177128-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/r8188eu/hal/rtl8188e_hal_init.c6
-rw-r--r--drivers/staging/r8188eu/hal/rtl8188e_phycfg.c6
-rw-r--r--drivers/staging/r8188eu/include/rtl8188e_hal.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index c706e7a411a1..5efee672116a 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -1123,13 +1123,13 @@ void Hal_ReadTxPowerInfo88E(struct adapter *padapter, u8 *PROMContent, bool Auto
pHalData->Index24G_CCK_Base[ch] = pwrInfo24G.IndexCCK_Base[0][group];
if (ch == 14)
- pHalData->Index24G_BW40_Base[0][ch] = pwrInfo24G.IndexBW40_Base[0][4];
+ pHalData->Index24G_BW40_Base[ch] = pwrInfo24G.IndexBW40_Base[0][4];
else
- pHalData->Index24G_BW40_Base[0][ch] = pwrInfo24G.IndexBW40_Base[0][group];
+ pHalData->Index24G_BW40_Base[ch] = pwrInfo24G.IndexBW40_Base[0][group];
DBG_88E("======= Path 0, Channel %d =======\n", ch);
DBG_88E("Index24G_CCK_Base[%d] = 0x%x\n", ch, pHalData->Index24G_CCK_Base[ch]);
- DBG_88E("Index24G_BW40_Base[0][%d] = 0x%x\n", ch, pHalData->Index24G_BW40_Base[0][ch]);
+ DBG_88E("Index24G_BW40_Base[%d] = 0x%x\n", ch, pHalData->Index24G_BW40_Base[ch]);
}
for (TxCount = 0; TxCount < MAX_TX_COUNT; TxCount++) {
pHalData->CCK_24G_Diff[0][TxCount] = pwrInfo24G.CCK_Diff[0][TxCount];
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
index de7a2f5caf48..650de81b7ed3 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_phycfg.c
@@ -591,13 +591,13 @@ static void getTxPowerIndex88E(struct adapter *Adapter, u8 channel, u8 *cckPower
/* 1. CCK */
cckPowerLevel[RF_PATH_A] = pHalData->Index24G_CCK_Base[index];
/* 2. OFDM */
- ofdmPowerLevel[RF_PATH_A] = pHalData->Index24G_BW40_Base[RF_PATH_A][index] +
+ ofdmPowerLevel[RF_PATH_A] = pHalData->Index24G_BW40_Base[index] +
pHalData->OFDM_24G_Diff[RF_PATH_A][RF_PATH_A];
/* 1. BW20 */
- BW20PowerLevel[RF_PATH_A] = pHalData->Index24G_BW40_Base[RF_PATH_A][index] +
+ BW20PowerLevel[RF_PATH_A] = pHalData->Index24G_BW40_Base[index] +
pHalData->BW20_24G_Diff[RF_PATH_A][RF_PATH_A];
/* 2. BW40 */
- BW40PowerLevel[RF_PATH_A] = pHalData->Index24G_BW40_Base[RF_PATH_A][index];
+ BW40PowerLevel[RF_PATH_A] = pHalData->Index24G_BW40_Base[index];
}
static void phy_PowerIndexCheck88E(struct adapter *Adapter, u8 channel, u8 *cckPowerLevel,
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index 66b525ca3510..3420830396dc 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -179,7 +179,7 @@ struct hal_data_8188e {
u8 EEPROMThermalMeter;
u8 Index24G_CCK_Base[CHANNEL_MAX_NUMBER];
- u8 Index24G_BW40_Base[RF_PATH_MAX][CHANNEL_MAX_NUMBER];
+ u8 Index24G_BW40_Base[CHANNEL_MAX_NUMBER];
/* If only one tx, only BW20 and OFDM are used. */
s8 CCK_24G_Diff[RF_PATH_MAX][MAX_TX_COUNT];
s8 OFDM_24G_Diff[RF_PATH_MAX][MAX_TX_COUNT];