* [PATCH 0/5] staging: r8188eu: remove struct sreset_priv
@ 2021-10-24 18:04 Martin Kaiser
2021-10-24 18:04 ` [PATCH 1/5] staging: r8188eu: silent_reset_inprogress is never read Martin Kaiser
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Martin Kaiser @ 2021-10-24 18:04 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
linux-kernel, Martin Kaiser
The sreset_priv structure is not used by the r8188eu driver. This patchset
removes sreset_priv step by step.
Martin Kaiser (5):
staging: r8188eu: silent_reset_inprogress is never read
staging: r8188eu: wifi_error_status is write-only
staging: r8188eu: silentreset_mutex is unused
staging: r8188eu: remove last_tx_complete_time
staging: r8188eu: remove the sreset_priv structure
drivers/staging/r8188eu/Makefile | 1 -
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 ++
drivers/staging/r8188eu/core/rtw_sreset.c | 32 -------------------
drivers/staging/r8188eu/hal/rtl8188e_sreset.c | 15 ---------
drivers/staging/r8188eu/hal/usb_ops_linux.c | 10 ------
.../staging/r8188eu/include/rtl8188e_hal.h | 1 -
.../staging/r8188eu/include/rtl8188e_sreset.h | 1 -
drivers/staging/r8188eu/include/rtw_sreset.h | 29 -----------------
drivers/staging/r8188eu/os_dep/os_intfs.c | 4 ---
.../staging/r8188eu/os_dep/usb_ops_linux.c | 18 +++--------
10 files changed, 6 insertions(+), 107 deletions(-)
delete mode 100644 drivers/staging/r8188eu/core/rtw_sreset.c
delete mode 100644 drivers/staging/r8188eu/include/rtw_sreset.h
--
2.20.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/5] staging: r8188eu: silent_reset_inprogress is never read
2021-10-24 18:04 [PATCH 0/5] staging: r8188eu: remove struct sreset_priv Martin Kaiser
@ 2021-10-24 18:04 ` Martin Kaiser
2021-10-24 18:04 ` [PATCH 2/5] staging: r8188eu: wifi_error_status is write-only Martin Kaiser
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Martin Kaiser @ 2021-10-24 18:04 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
linux-kernel, Martin Kaiser
silent_reset_inprogress in struct sreset_priv is only written
but never read. Remove it.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/core/rtw_sreset.c | 2 --
drivers/staging/r8188eu/include/rtw_sreset.h | 1 -
2 files changed, 3 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_sreset.c b/drivers/staging/r8188eu/core/rtw_sreset.c
index baa2a080a46e..60596a3a3aad 100644
--- a/drivers/staging/r8188eu/core/rtw_sreset.c
+++ b/drivers/staging/r8188eu/core/rtw_sreset.c
@@ -9,7 +9,6 @@ void sreset_init_value(struct adapter *padapter)
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
mutex_init(&psrtpriv->silentreset_mutex);
- psrtpriv->silent_reset_inprogress = false;
psrtpriv->wifi_error_status = WIFI_STATUS_SUCCESS;
psrtpriv->last_tx_time = 0;
psrtpriv->last_tx_complete_time = 0;
@@ -19,7 +18,6 @@ void sreset_reset_value(struct adapter *padapter)
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
- psrtpriv->silent_reset_inprogress = false;
psrtpriv->wifi_error_status = WIFI_STATUS_SUCCESS;
psrtpriv->last_tx_time = 0;
psrtpriv->last_tx_complete_time = 0;
diff --git a/drivers/staging/r8188eu/include/rtw_sreset.h b/drivers/staging/r8188eu/include/rtw_sreset.h
index 45bc227d088a..2489f55d0594 100644
--- a/drivers/staging/r8188eu/include/rtw_sreset.h
+++ b/drivers/staging/r8188eu/include/rtw_sreset.h
@@ -9,7 +9,6 @@
struct sreset_priv {
struct mutex silentreset_mutex;
- u8 silent_reset_inprogress;
u8 wifi_error_status;
unsigned long last_tx_time;
unsigned long last_tx_complete_time;
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] staging: r8188eu: wifi_error_status is write-only
2021-10-24 18:04 [PATCH 0/5] staging: r8188eu: remove struct sreset_priv Martin Kaiser
2021-10-24 18:04 ` [PATCH 1/5] staging: r8188eu: silent_reset_inprogress is never read Martin Kaiser
@ 2021-10-24 18:04 ` Martin Kaiser
2021-10-24 18:04 ` [PATCH 3/5] staging: r8188eu: silentreset_mutex is unused Martin Kaiser
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Martin Kaiser @ 2021-10-24 18:04 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
linux-kernel, Martin Kaiser
wifi_error_status in struct sreset_priv is set in a couple of places,
its value is never used.
Remove wifi_error_status itself, the defines for the possible values and
the sreset_set_wifi_error_status function.
Rewrite the if statement in usb_write_port_complete. For purb->status ==
-EPIPE or -EPROTO, nothing should be done.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/core/rtw_sreset.c | 8 --------
drivers/staging/r8188eu/hal/usb_ops_linux.c | 10 ----------
drivers/staging/r8188eu/include/rtw_sreset.h | 7 -------
drivers/staging/r8188eu/os_dep/usb_ops_linux.c | 6 ++----
4 files changed, 2 insertions(+), 29 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_sreset.c b/drivers/staging/r8188eu/core/rtw_sreset.c
index 60596a3a3aad..08e5b1b00bd1 100644
--- a/drivers/staging/r8188eu/core/rtw_sreset.c
+++ b/drivers/staging/r8188eu/core/rtw_sreset.c
@@ -9,7 +9,6 @@ void sreset_init_value(struct adapter *padapter)
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
mutex_init(&psrtpriv->silentreset_mutex);
- psrtpriv->wifi_error_status = WIFI_STATUS_SUCCESS;
psrtpriv->last_tx_time = 0;
psrtpriv->last_tx_complete_time = 0;
}
@@ -18,13 +17,6 @@ void sreset_reset_value(struct adapter *padapter)
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
- psrtpriv->wifi_error_status = WIFI_STATUS_SUCCESS;
psrtpriv->last_tx_time = 0;
psrtpriv->last_tx_complete_time = 0;
}
-
-void sreset_set_wifi_error_status(struct adapter *padapter, u32 status)
-{
- struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
- pHalData->srestpriv.wifi_error_status = status;
-}
diff --git a/drivers/staging/r8188eu/hal/usb_ops_linux.c b/drivers/staging/r8188eu/hal/usb_ops_linux.c
index 4c1974cc9a16..cb825aa29e85 100644
--- a/drivers/staging/r8188eu/hal/usb_ops_linux.c
+++ b/drivers/staging/r8188eu/hal/usb_ops_linux.c
@@ -39,9 +39,6 @@ static int usb_read(struct intf_hdl *intf, u16 value, void *data, u8 size)
}
if (status < 0) {
- GET_HAL_DATA(adapt)->srestpriv.wifi_error_status =
- USB_VEN_REQ_CMD_FAIL;
-
if (rtw_inc_and_chk_continual_urb_error(dvobjpriv))
adapt->bSurpriseRemoved = true;
@@ -86,9 +83,6 @@ static int usb_write(struct intf_hdl *intf, u16 value, void *data, u8 size)
}
if (status < 0) {
- GET_HAL_DATA(adapt)->srestpriv.wifi_error_status =
- USB_VEN_REQ_CMD_FAIL;
-
if (rtw_inc_and_chk_continual_urb_error(dvobjpriv))
adapt->bSurpriseRemoved = true;
@@ -441,10 +435,6 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
break;
case -EPROTO:
case -EOVERFLOW:
- {
- struct hal_data_8188e *haldata = GET_HAL_DATA(adapt);
- haldata->srestpriv.wifi_error_status = USB_READ_PORT_FAIL;
- }
precvbuf->reuse = true;
rtw_read_port(adapt, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
break;
diff --git a/drivers/staging/r8188eu/include/rtw_sreset.h b/drivers/staging/r8188eu/include/rtw_sreset.h
index 2489f55d0594..1a3745dabfb6 100644
--- a/drivers/staging/r8188eu/include/rtw_sreset.h
+++ b/drivers/staging/r8188eu/include/rtw_sreset.h
@@ -9,20 +9,13 @@
struct sreset_priv {
struct mutex silentreset_mutex;
- u8 wifi_error_status;
unsigned long last_tx_time;
unsigned long last_tx_complete_time;
};
#include "rtl8188e_hal.h"
-#define WIFI_STATUS_SUCCESS 0
-#define USB_VEN_REQ_CMD_FAIL BIT(0)
-#define USB_READ_PORT_FAIL BIT(1)
-#define USB_WRITE_PORT_FAIL BIT(2)
-
void sreset_init_value(struct adapter *padapter);
void sreset_reset_value(struct adapter *padapter);
-void sreset_set_wifi_error_status(struct adapter *padapter, u32 status);
#endif
diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c
index 4085f3e6067d..966fba50f73d 100644
--- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c
+++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c
@@ -87,9 +87,7 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs)
if (purb->status) {
DBG_88E("###=> urb_write_port_complete status(%d)\n", purb->status);
- if ((purb->status == -EPIPE) || (purb->status == -EPROTO)) {
- sreset_set_wifi_error_status(padapter, USB_WRITE_PORT_FAIL);
- } else if (purb->status == -EINPROGRESS) {
+ if (purb->status == -EINPROGRESS) {
goto check_completion;
} else if (purb->status == -ENOENT) {
DBG_88E("%s: -ENOENT\n", __func__);
@@ -100,7 +98,7 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs)
} else if (purb->status == -ESHUTDOWN) {
padapter->bDriverStopped = true;
goto check_completion;
- } else {
+ } else if ((purb->status != -EPIPE) && (purb->status != -EPROTO)) {
padapter->bSurpriseRemoved = true;
DBG_88E("bSurpriseRemoved = true\n");
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] staging: r8188eu: silentreset_mutex is unused
2021-10-24 18:04 [PATCH 0/5] staging: r8188eu: remove struct sreset_priv Martin Kaiser
2021-10-24 18:04 ` [PATCH 1/5] staging: r8188eu: silent_reset_inprogress is never read Martin Kaiser
2021-10-24 18:04 ` [PATCH 2/5] staging: r8188eu: wifi_error_status is write-only Martin Kaiser
@ 2021-10-24 18:04 ` Martin Kaiser
2021-10-24 18:04 ` [PATCH 4/5] staging: r8188eu: remove last_tx_complete_time Martin Kaiser
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Martin Kaiser @ 2021-10-24 18:04 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
linux-kernel, Martin Kaiser
silentreset_mutex from struct sreset_priv is not used. Remove it.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/core/rtw_sreset.c | 1 -
drivers/staging/r8188eu/include/rtw_sreset.h | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_sreset.c b/drivers/staging/r8188eu/core/rtw_sreset.c
index 08e5b1b00bd1..bf436a653c71 100644
--- a/drivers/staging/r8188eu/core/rtw_sreset.c
+++ b/drivers/staging/r8188eu/core/rtw_sreset.c
@@ -8,7 +8,6 @@ void sreset_init_value(struct adapter *padapter)
struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
- mutex_init(&psrtpriv->silentreset_mutex);
psrtpriv->last_tx_time = 0;
psrtpriv->last_tx_complete_time = 0;
}
diff --git a/drivers/staging/r8188eu/include/rtw_sreset.h b/drivers/staging/r8188eu/include/rtw_sreset.h
index 1a3745dabfb6..f404cbd54f9f 100644
--- a/drivers/staging/r8188eu/include/rtw_sreset.h
+++ b/drivers/staging/r8188eu/include/rtw_sreset.h
@@ -8,7 +8,6 @@
#include "drv_types.h"
struct sreset_priv {
- struct mutex silentreset_mutex;
unsigned long last_tx_time;
unsigned long last_tx_complete_time;
};
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] staging: r8188eu: remove last_tx_complete_time
2021-10-24 18:04 [PATCH 0/5] staging: r8188eu: remove struct sreset_priv Martin Kaiser
` (2 preceding siblings ...)
2021-10-24 18:04 ` [PATCH 3/5] staging: r8188eu: silentreset_mutex is unused Martin Kaiser
@ 2021-10-24 18:04 ` Martin Kaiser
2021-10-24 18:04 ` [PATCH 5/5] staging: r8188eu: remove the sreset_priv structure Martin Kaiser
2021-10-25 7:09 ` [PATCH 0/5] staging: r8188eu: remove struct sreset_priv Greg Kroah-Hartman
5 siblings, 0 replies; 7+ messages in thread
From: Martin Kaiser @ 2021-10-24 18:04 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
linux-kernel, Martin Kaiser
last_tx_complete_time from struct sreset_priv is set / calculated when a
packet is sent out. Like other sreset_priv components, it is not read and
can be removed.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/core/rtw_sreset.c | 2 --
drivers/staging/r8188eu/hal/rtl8188e_sreset.c | 15 ---------------
drivers/staging/r8188eu/include/rtw_sreset.h | 1 -
drivers/staging/r8188eu/os_dep/usb_ops_linux.c | 4 ----
4 files changed, 22 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_sreset.c b/drivers/staging/r8188eu/core/rtw_sreset.c
index bf436a653c71..1df46673bddd 100644
--- a/drivers/staging/r8188eu/core/rtw_sreset.c
+++ b/drivers/staging/r8188eu/core/rtw_sreset.c
@@ -9,7 +9,6 @@ void sreset_init_value(struct adapter *padapter)
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
psrtpriv->last_tx_time = 0;
- psrtpriv->last_tx_complete_time = 0;
}
void sreset_reset_value(struct adapter *padapter)
{
@@ -17,5 +16,4 @@ void sreset_reset_value(struct adapter *padapter)
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
psrtpriv->last_tx_time = 0;
- psrtpriv->last_tx_complete_time = 0;
}
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_sreset.c b/drivers/staging/r8188eu/hal/rtl8188e_sreset.c
index ea793fef6f10..7b3ac6e306ce 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_sreset.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_sreset.c
@@ -8,12 +8,6 @@
void rtl8188e_sreset_xmit_status_check(struct adapter *padapter)
{
- struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
- struct sreset_priv *psrtpriv = &pHalData->srestpriv;
-
- unsigned long current_time;
- struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
- unsigned int diff_time;
u32 txdma_status;
txdma_status = rtw_read32(padapter, REG_TXDMA_STATUS);
@@ -22,15 +16,6 @@ void rtl8188e_sreset_xmit_status_check(struct adapter *padapter)
rtw_write32(padapter, REG_TXDMA_STATUS, txdma_status);
}
/* total xmit irp = 4 */
- current_time = jiffies;
- if (0 == pxmitpriv->free_xmitbuf_cnt) {
- diff_time = jiffies_to_msecs(current_time - psrtpriv->last_tx_time);
-
- if (diff_time > 2000) {
- if (psrtpriv->last_tx_complete_time == 0)
- psrtpriv->last_tx_complete_time = current_time;
- }
- }
}
void rtl8188e_sreset_linked_status_check(struct adapter *padapter)
diff --git a/drivers/staging/r8188eu/include/rtw_sreset.h b/drivers/staging/r8188eu/include/rtw_sreset.h
index f404cbd54f9f..ff84cdc02c2c 100644
--- a/drivers/staging/r8188eu/include/rtw_sreset.h
+++ b/drivers/staging/r8188eu/include/rtw_sreset.h
@@ -9,7 +9,6 @@
struct sreset_priv {
unsigned long last_tx_time;
- unsigned long last_tx_complete_time;
};
#include "rtl8188e_hal.h"
diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c
index 966fba50f73d..57a435138bf0 100644
--- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c
+++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c
@@ -53,7 +53,6 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs)
struct xmit_buf *pxmitbuf = (struct xmit_buf *)purb->context;
struct adapter *padapter = pxmitbuf->padapter;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
- struct hal_data_8188e *haldata;
switch (pxmitbuf->flags) {
case VO_QUEUE_INX:
@@ -106,9 +105,6 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs)
}
}
- haldata = GET_HAL_DATA(padapter);
- haldata->srestpriv.last_tx_complete_time = jiffies;
-
check_completion:
rtw_sctx_done_err(&pxmitbuf->sctx,
purb->status ? RTW_SCTX_DONE_WRITE_PORT_ERR :
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] staging: r8188eu: remove the sreset_priv structure
2021-10-24 18:04 [PATCH 0/5] staging: r8188eu: remove struct sreset_priv Martin Kaiser
` (3 preceding siblings ...)
2021-10-24 18:04 ` [PATCH 4/5] staging: r8188eu: remove last_tx_complete_time Martin Kaiser
@ 2021-10-24 18:04 ` Martin Kaiser
2021-10-25 7:09 ` [PATCH 0/5] staging: r8188eu: remove struct sreset_priv Greg Kroah-Hartman
5 siblings, 0 replies; 7+ messages in thread
From: Martin Kaiser @ 2021-10-24 18:04 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
linux-kernel, Martin Kaiser
last_tx_time from struct sreset_priv is no longer used now that
last_tx_complete_time is gone.
This patch removes last_tx_time. This was the last remaining component of
struct sreset_priv, we can now remove the structure itself.
After removing include/rtw_sreset.h, it turned out that some definitions
in .c files were pulled in via rtw_sreset.h. Add the required include
files directly to make compilation succeed without rtw_sreset.h.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/Makefile | 1 -
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 ++
drivers/staging/r8188eu/core/rtw_sreset.c | 19 -------------------
.../staging/r8188eu/include/rtl8188e_hal.h | 1 -
.../staging/r8188eu/include/rtl8188e_sreset.h | 1 -
drivers/staging/r8188eu/include/rtw_sreset.h | 19 -------------------
drivers/staging/r8188eu/os_dep/os_intfs.c | 4 ----
.../staging/r8188eu/os_dep/usb_ops_linux.c | 8 ++------
8 files changed, 4 insertions(+), 51 deletions(-)
delete mode 100644 drivers/staging/r8188eu/core/rtw_sreset.c
delete mode 100644 drivers/staging/r8188eu/include/rtw_sreset.h
diff --git a/drivers/staging/r8188eu/Makefile b/drivers/staging/r8188eu/Makefile
index a0a8e150da3f..62933b0f29b5 100644
--- a/drivers/staging/r8188eu/Makefile
+++ b/drivers/staging/r8188eu/Makefile
@@ -51,7 +51,6 @@ r8188eu-y = \
core/rtw_recv.o \
core/rtw_rf.o \
core/rtw_security.o \
- core/rtw_sreset.o \
core/rtw_sta_mgt.o \
core/rtw_wlan_util.o \
core/rtw_xmit.o
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 7b372374e638..55c3d4a6faeb 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -11,6 +11,8 @@
#include "../include/mlme_osdep.h"
#include "../include/recv_osdep.h"
#include "../include/rtl8188e_sreset.h"
+#include "../include/rtl8188e_xmit.h"
+#include "../include/rtl8188e_dm.h"
static struct mlme_handler mlme_sta_tbl[] = {
{WIFI_ASSOCREQ, "OnAssocReq", &OnAssocReq},
diff --git a/drivers/staging/r8188eu/core/rtw_sreset.c b/drivers/staging/r8188eu/core/rtw_sreset.c
deleted file mode 100644
index 1df46673bddd..000000000000
--- a/drivers/staging/r8188eu/core/rtw_sreset.c
+++ /dev/null
@@ -1,19 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/* Copyright(c) 2007 - 2012 Realtek Corporation. */
-
-#include "../include/rtw_sreset.h"
-
-void sreset_init_value(struct adapter *padapter)
-{
- struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
- struct sreset_priv *psrtpriv = &pHalData->srestpriv;
-
- psrtpriv->last_tx_time = 0;
-}
-void sreset_reset_value(struct adapter *padapter)
-{
- struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
- struct sreset_priv *psrtpriv = &pHalData->srestpriv;
-
- psrtpriv->last_tx_time = 0;
-}
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index ced7e12d9013..d7db1dfc39d0 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -256,7 +256,6 @@ struct hal_data_8188e {
struct dm_priv dmpriv;
struct odm_dm_struct odmpriv;
- struct sreset_priv srestpriv;
u8 CurAntenna;
u8 AntDivCfg;
diff --git a/drivers/staging/r8188eu/include/rtl8188e_sreset.h b/drivers/staging/r8188eu/include/rtl8188e_sreset.h
index 5d7fec78a27b..bb8b0048fbf9 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_sreset.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_sreset.h
@@ -6,7 +6,6 @@
#include "osdep_service.h"
#include "drv_types.h"
-#include "rtw_sreset.h"
void rtl8188e_sreset_xmit_status_check(struct adapter *padapter);
void rtl8188e_sreset_linked_status_check(struct adapter *padapter);
diff --git a/drivers/staging/r8188eu/include/rtw_sreset.h b/drivers/staging/r8188eu/include/rtw_sreset.h
deleted file mode 100644
index ff84cdc02c2c..000000000000
--- a/drivers/staging/r8188eu/include/rtw_sreset.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
-/* Copyright(c) 2007 - 2012 Realtek Corporation. */
-
-#ifndef _RTW_SRESET_C_
-#define _RTW_SRESET_C_
-
-#include "osdep_service.h"
-#include "drv_types.h"
-
-struct sreset_priv {
- unsigned long last_tx_time;
-};
-
-#include "rtl8188e_hal.h"
-
-void sreset_init_value(struct adapter *padapter);
-void sreset_reset_value(struct adapter *padapter);
-
-#endif
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index 96e9897085fe..10059240bf54 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -13,7 +13,6 @@
#include "../include/rtw_br_ext.h"
#include "../include/rtl8188e_led.h"
#include "../include/rtl8188e_dm.h"
-#include "../include/rtw_sreset.h"
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Realtek Wireless Lan Driver");
@@ -467,7 +466,6 @@ u8 rtw_reset_drv_sw(struct adapter *padapter)
_clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING);
- sreset_reset_value(padapter);
pwrctrlpriv->pwr_state_check_cnts = 0;
/* mlmeextpriv */
@@ -537,8 +535,6 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
rtl8188e_init_dm_priv(padapter);
rtl8188eu_InitSwLeds(padapter);
- sreset_init_value(padapter);
-
spin_lock_init(&padapter->br_ext_lock);
exit:
diff --git a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c
index 57a435138bf0..ef2ea68ae873 100644
--- a/drivers/staging/r8188eu/os_dep/usb_ops_linux.c
+++ b/drivers/staging/r8188eu/os_dep/usb_ops_linux.c
@@ -5,7 +5,7 @@
#include "../include/drv_types.h"
#include "../include/usb_ops_linux.h"
-#include "../include/rtw_sreset.h"
+#include "../include/rtl8188e_recv.h"
unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 addr)
{
@@ -176,11 +176,7 @@ u32 rtw_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem)
pxmitbuf);/* context is pxmitbuf */
status = usb_submit_urb(purb, GFP_ATOMIC);
- if (!status) {
- struct hal_data_8188e *haldata = GET_HAL_DATA(padapter);
-
- haldata->srestpriv.last_tx_time = jiffies;
- } else {
+ if (status) {
rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_WRITE_PORT_ERR);
DBG_88E("usb_write_port, status =%d\n", status);
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] staging: r8188eu: remove struct sreset_priv
2021-10-24 18:04 [PATCH 0/5] staging: r8188eu: remove struct sreset_priv Martin Kaiser
` (4 preceding siblings ...)
2021-10-24 18:04 ` [PATCH 5/5] staging: r8188eu: remove the sreset_priv structure Martin Kaiser
@ 2021-10-25 7:09 ` Greg Kroah-Hartman
5 siblings, 0 replies; 7+ messages in thread
From: Greg Kroah-Hartman @ 2021-10-25 7:09 UTC (permalink / raw)
To: Martin Kaiser
Cc: Larry Finger, Phillip Potter, Michael Straube, linux-staging,
linux-kernel
On Sun, Oct 24, 2021 at 08:04:43PM +0200, Martin Kaiser wrote:
> The sreset_priv structure is not used by the r8188eu driver. This patchset
> removes sreset_priv step by step.
Nice cleanup, thanks!
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-10-25 7:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-24 18:04 [PATCH 0/5] staging: r8188eu: remove struct sreset_priv Martin Kaiser
2021-10-24 18:04 ` [PATCH 1/5] staging: r8188eu: silent_reset_inprogress is never read Martin Kaiser
2021-10-24 18:04 ` [PATCH 2/5] staging: r8188eu: wifi_error_status is write-only Martin Kaiser
2021-10-24 18:04 ` [PATCH 3/5] staging: r8188eu: silentreset_mutex is unused Martin Kaiser
2021-10-24 18:04 ` [PATCH 4/5] staging: r8188eu: remove last_tx_complete_time Martin Kaiser
2021-10-24 18:04 ` [PATCH 5/5] staging: r8188eu: remove the sreset_priv structure Martin Kaiser
2021-10-25 7:09 ` [PATCH 0/5] staging: r8188eu: remove struct sreset_priv Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).