[PATCH 03/12] staging: rtl8192e: Join constants RadioA_ArrayLength with ..LengthPciE

From: Philipp Hortmann
Date: Tue Mar 14 2023 - 14:43:40 EST


Join constants RadioA_ArrayLength with RadioA_ArrayLengthPciE to
RTL8192E_RADIO_A_ARR_LEN to improve readability.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@xxxxxxxxx>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 2 +-
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h | 1 -
drivers/staging/rtl8192e/rtl8192e/table.c | 2 +-
drivers/staging/rtl8192e/rtl8192e/table.h | 4 ++--
4 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index 29918a529f77..e4d1b7ad64ac 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -542,7 +542,7 @@ u8 rtl92e_config_rf_path(struct net_device *dev, enum rf90_radio_path eRFPath)

switch (eRFPath) {
case RF90_PATH_A:
- for (i = 0; i < RadioA_ArrayLength; i += 2) {
+ for (i = 0; i < RTL8192E_RADIO_A_ARR_LEN; i += 2) {
if (Rtl819XRadioA_Array[i] == 0xfe) {
msleep(100);
continue;
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h
index 611756517ce6..8f9200bed456 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h
@@ -9,7 +9,6 @@

#define MAX_DOZE_WAITING_TIMES_9x 64

-#define RadioA_ArrayLength RadioA_ArrayLengthPciE
#define RadioB_ArrayLength RadioB_ArrayLengthPciE
#define MACPHY_Array_PGLength MACPHY_Array_PGLengthPciE
#define PHY_REG_1T2RArrayLength PHY_REG_1T2RArrayLengthPciE
diff --git a/drivers/staging/rtl8192e/rtl8192e/table.c b/drivers/staging/rtl8192e/rtl8192e/table.c
index be6c4b7c0e0e..5820c47f4e14 100644
--- a/drivers/staging/rtl8192e/rtl8192e/table.c
+++ b/drivers/staging/rtl8192e/rtl8192e/table.c
@@ -157,7 +157,7 @@ u32 Rtl8192PciEPHY_REG_1T2RArray[PHY_REG_1T2RArrayLengthPciE] = {
0xe1c, 0x12121416,
};

-u32 Rtl8192PciERadioA_Array[RadioA_ArrayLengthPciE] = {
+u32 Rtl8192PciERadioA_Array[RTL8192E_RADIO_A_ARR_LEN] = {
0x019, 0x00000003,
0x000, 0x000000bf,
0x001, 0x00000ee0,
diff --git a/drivers/staging/rtl8192e/rtl8192e/table.h b/drivers/staging/rtl8192e/rtl8192e/table.h
index cb424c8fbee0..d177b7b17b19 100644
--- a/drivers/staging/rtl8192e/rtl8192e/table.h
+++ b/drivers/staging/rtl8192e/rtl8192e/table.h
@@ -13,8 +13,8 @@

#define PHY_REG_1T2RArrayLengthPciE 296
extern u32 Rtl8192PciEPHY_REG_1T2RArray[PHY_REG_1T2RArrayLengthPciE];
-#define RadioA_ArrayLengthPciE 246
-extern u32 Rtl8192PciERadioA_Array[RadioA_ArrayLengthPciE];
+#define RTL8192E_RADIO_A_ARR_LEN 246
+extern u32 Rtl8192PciERadioA_Array[RTL8192E_RADIO_A_ARR_LEN];
#define RadioB_ArrayLengthPciE 78
extern u32 Rtl8192PciERadioB_Array[RadioB_ArrayLengthPciE];
#define RTL8192E_MACPHY_ARR_LEN 18
--
2.39.2