Commit 562f1bf3 authored by Martin Kaiser's avatar Martin Kaiser Committed by Greg Kroah-Hartman
Browse files

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: default avatarMartin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211024180448.20624-5-martin@kaiser.cx


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4d911d4e
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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;
}
+0 −15
Original line number Diff line number Diff line
@@ -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)
+0 −1
Original line number Diff line number Diff line
@@ -9,7 +9,6 @@

struct sreset_priv {
	unsigned long last_tx_time;
	unsigned long last_tx_complete_time;
};

#include "rtl8188e_hal.h"
+0 −4
Original line number Diff line number Diff line
@@ -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 :