diff options
author | Martin Kaiser <martin@kaiser.cx> | 2021-10-24 20:04:47 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-25 09:09:44 +0200 |
commit | 562f1bf39ad79782d3a9091baf9e8a83f242f1ca (patch) | |
tree | 8b7a0c02c8df8df95a03fc950c0b5bd7d2ab1bf1 /drivers/staging/r8188eu | |
parent | 4d911d4ea49d9926b985e9864d842b4373a4d95b (diff) |
staging: r8188eu: remove last_tx_complete_time
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>
Link: https://lore.kernel.org/r/20211024180448.20624-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/r8188eu')
-rw-r--r-- | drivers/staging/r8188eu/core/rtw_sreset.c | 2 | ||||
-rw-r--r-- | drivers/staging/r8188eu/hal/rtl8188e_sreset.c | 15 | ||||
-rw-r--r-- | drivers/staging/r8188eu/include/rtw_sreset.h | 1 | ||||
-rw-r--r-- | drivers/staging/r8188eu/os_dep/usb_ops_linux.c | 4 |
4 files changed, 0 insertions, 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 : |