From: Martin Kaiser <martin@kaiser.cx>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Michael Straube <straube.linux@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH 4/5] staging: r8188eu: remove last_tx_complete_time
Date: Sun, 24 Oct 2021 20:04:47 +0200 [thread overview]
Message-ID: <20211024180448.20624-5-martin@kaiser.cx> (raw)
In-Reply-To: <20211024180448.20624-1-martin@kaiser.cx>
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
next prev parent reply other threads:[~2021-10-24 18:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Martin Kaiser [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211024180448.20624-5-martin@kaiser.cx \
--to=martin@kaiser.cx \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=phil@philpotter.co.uk \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®