summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorMartin Kaiser <martin@kaiser.cx>2022-07-09 19:10:00 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-07-11 10:06:45 +0200
commitd4090520cde1f96ad66956ce1b24aa91e5210fa5 (patch)
tree5217905de6c2d35e639fb09f29f3e3a34a2e3392 /drivers/staging
parentc337bf6256316be5d74a27f6449363e10fda49a3 (diff)
downloadlinux-stable-d4090520cde1f96ad66956ce1b24aa91e5210fa5.tar.gz
linux-stable-d4090520cde1f96ad66956ce1b24aa91e5210fa5.tar.bz2
linux-stable-d4090520cde1f96ad66956ce1b24aa91e5210fa5.zip
staging: r8188eu: the bcnhead parameter is always 0
The only caller of efuse_read_phymap_from_txpktbuf sets bcnhead to 0. Remove this function parameter and simplify the function body. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220709171000.180481-15-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.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
index ddda3f994fa7..fe477438899e 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
@@ -193,13 +193,11 @@ exit:
/* FIXME: add error handling in callers */
static int efuse_read_phymap_from_txpktbuf(
struct adapter *adapter,
- int bcnhead, /* beacon head, where FW store len(2-byte) and efuse physical map. */
u8 *content, /* buffer to store efuse physical map */
u16 *size /* for efuse content: the max byte to read. will update to byte read */
)
{
unsigned long timeout;
- u16 dbg_addr = 0;
__le32 lo32 = 0, hi32 = 0;
u16 len = 0, count = 0;
int i = 0, res;
@@ -208,20 +206,10 @@ static int efuse_read_phymap_from_txpktbuf(
u8 *pos = content;
u32 reg32;
- if (bcnhead < 0) { /* if not valid */
- res = rtw_read8(adapter, REG_TDECTRL + 1, &reg);
- if (res)
- return res;
-
- bcnhead = reg;
- }
-
rtw_write8(adapter, REG_PKT_BUFF_ACCESS_CTRL, TXPKT_BUF_SELECT);
- dbg_addr = bcnhead * 128 / 8; /* 8-bytes addressing */
-
while (1) {
- rtw_write16(adapter, REG_PKTBUF_DBG_ADDR, dbg_addr + i);
+ rtw_write16(adapter, REG_PKTBUF_DBG_ADDR, i);
rtw_write8(adapter, REG_TXPKTBUF_DBG, 0);
timeout = jiffies + msecs_to_jiffies(1000);
@@ -300,7 +288,7 @@ static s32 iol_read_efuse(struct adapter *padapter, u16 size_byte, u8 *logical_m
rtw_write8(padapter, REG_PKT_BUFF_ACCESS_CTRL, TXPKT_BUF_SELECT);
status = iol_execute(padapter, CMD_READ_EFUSE_MAP);
if (status == _SUCCESS)
- efuse_read_phymap_from_txpktbuf(padapter, 0, physical_map, &size);
+ efuse_read_phymap_from_txpktbuf(padapter, physical_map, &size);
efuse_phymap_to_logical(physical_map, size_byte, logical_map);
return status;
}