summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhillip Potter <phil@philpotter.co.uk>2021-07-20 23:58:26 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-21 10:31:22 +0200
commit552fd002bdb520af3a8bedf1ee36185cf5e2c52f (patch)
tree88c449f510632a5c2287d5514a9aba6a643a1666
parent8655e695ac648287c432e2048a73decc552b019c (diff)
downloadlinux-stable-552fd002bdb520af3a8bedf1ee36185cf5e2c52f.tar.gz
linux-stable-552fd002bdb520af3a8bedf1ee36185cf5e2c52f.tar.bz2
linux-stable-552fd002bdb520af3a8bedf1ee36185cf5e2c52f.zip
staging: rtl8188eu: move hal/mac_cfg.c and rename function and array
Move source file hal/mac_cfg.c to the 'core' driver directory, and also rename its array from array_MAC_REG_8188E to array_MAC_REG, as well as renaming the function rtl88eu_phy_mac_config to phy_mac_config. Also modify single call-site for this function to reflect new name. This file contains no code which touches the adapter's HalData structure, and is a good candidate for therefore moving out of 'hal'. Also, no need for these signatures to include the model number as this driver only supports RTL8188eu. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210720225826.454516-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8188eu/Makefile2
-rw-r--r--drivers/staging/rtl8188eu/core/mac_cfg.c (renamed from drivers/staging/rtl8188eu/hal/mac_cfg.c)8
-rw-r--r--drivers/staging/rtl8188eu/hal/usb_halinit.c2
-rw-r--r--drivers/staging/rtl8188eu/include/phy.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/rtl8188eu/Makefile b/drivers/staging/rtl8188eu/Makefile
index 28b936e8be0a..2799ec5a7fda 100644
--- a/drivers/staging/rtl8188eu/Makefile
+++ b/drivers/staging/rtl8188eu/Makefile
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
r8188eu-y := \
+ core/mac_cfg.o \
core/rtw_ap.o \
core/rtw_cmd.o \
core/rtw_efuse.o \
@@ -18,7 +19,6 @@ r8188eu-y := \
core/rtw_wlan_util.o \
core/rtw_xmit.o \
hal/fw.o \
- hal/mac_cfg.o \
hal/bb_cfg.o \
hal/rf_cfg.o \
hal/pwrseqcmd.o \
diff --git a/drivers/staging/rtl8188eu/hal/mac_cfg.c b/drivers/staging/rtl8188eu/core/mac_cfg.c
index 370aa5cc55a7..a94c6ad472c5 100644
--- a/drivers/staging/rtl8188eu/hal/mac_cfg.c
+++ b/drivers/staging/rtl8188eu/core/mac_cfg.c
@@ -10,7 +10,7 @@
/* MAC_REG.TXT */
-static u32 array_MAC_REG_8188E[] = {
+static u32 array_MAC_REG[] = {
0x026, 0x00000041,
0x027, 0x00000035,
0x428, 0x0000000A,
@@ -103,14 +103,14 @@ static u32 array_MAC_REG_8188E[] = {
0x70B, 0x00000087,
};
-bool rtl88eu_phy_mac_config(struct adapter *adapt)
+bool phy_mac_config(struct adapter *adapt)
{
u32 i;
u32 arraylength;
u32 *ptrarray;
- arraylength = ARRAY_SIZE(array_MAC_REG_8188E);
- ptrarray = array_MAC_REG_8188E;
+ arraylength = ARRAY_SIZE(array_MAC_REG);
+ ptrarray = array_MAC_REG;
for (i = 0; i < arraylength; i += 2)
usb_write8(adapt, ptrarray[i], (u8)ptrarray[i + 1]);
diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c
index 05c67e7d23ad..2a47e9b444d5 100644
--- a/drivers/staging/rtl8188eu/hal/usb_halinit.c
+++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c
@@ -684,7 +684,7 @@ u32 rtl8188eu_hal_init(struct adapter *Adapter)
}
rtl8188e_InitializeFirmwareVars(Adapter);
- rtl88eu_phy_mac_config(Adapter);
+ phy_mac_config(Adapter);
rtl88eu_phy_bb_config(Adapter);
diff --git a/drivers/staging/rtl8188eu/include/phy.h b/drivers/staging/rtl8188eu/include/phy.h
index 40901d6dcaf5..8ee13eb68a5a 100644
--- a/drivers/staging/rtl8188eu/include/phy.h
+++ b/drivers/staging/rtl8188eu/include/phy.h
@@ -5,7 +5,7 @@
#define index_mapping_NUM_88E 15
#define AVG_THERMAL_NUM_88E 4
-bool rtl88eu_phy_mac_config(struct adapter *adapt);
+bool phy_mac_config(struct adapter *adapt);
bool rtl88eu_phy_rf_config(struct adapter *adapt);
bool rtl88eu_phy_bb_config(struct adapter *adapt);