Linux wireless drivers development
 help / color / mirror / Atom feed
From: VolcomIlluminated <volcomilluminated@tuta.com>
To: Pkshih <pkshih@realtek.com>
Cc: Linux Wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] rtw88: tx: increase TX report timeout for USB devices
Date: Thu, 28 May 2026 21:51:39 +0200 (CEST)	[thread overview]
Message-ID: <Otk4rgS--F-9@tuta.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 15 bytes --]

patch attached!

[-- Attachment #1.2: Type: text/html, Size: 162 bytes --]

[-- Attachment #2: 0001-rtw88-tx-increase-USB-TX-report-timeout.txt --]
[-- Type: text/plain, Size: 1742 bytes --]

USB devices have higher latency than PCIe devices. The current 500ms
timeout for TX report purging causes "failed to get tx report from
firmware" errors on boot with USB WiFi adapters.

Introduce RTW_TX_PROBE_TIMEOUT_USB at 1000ms and select it based on
the HCI type. PCIe devices retain the original 500ms timeout.

Tested on RTL8822BU (Edimax EW-7822ULC) with zero TX report errors
across 24+ hour operation and 17,706 packets with zero drops.

Signed-off-by: VolcomIlluminated <volcomilluminated@tuta.com>
---
--- /tmp/linux-6.18/drivers/net/wireless/realtek/rtw88/tx.c	2025-11-30 17:42:10.000000000 -0500
+++ /home/ptpx86mm1/kernelbuild/linux-6.18/drivers/net/wireless/realtek/rtw88/tx.c	2026-05-24 16:28:06.013490121 -0400
@@ -197,6 +197,7 @@
 {
 	struct rtw_tx_report *tx_report = &rtwdev->tx_report;
 	unsigned long flags;
+	unsigned long timeout;
 	u8 *drv_data;
 
 	/* pass sn to tx report handler through driver data */
@@ -207,7 +208,9 @@
 	__skb_queue_tail(&tx_report->queue, skb);
 	spin_unlock_irqrestore(&tx_report->q_lock, flags);
 
-	mod_timer(&tx_report->purge_timer, jiffies + RTW_TX_PROBE_TIMEOUT);
+	timeout = rtwdev->hci.type == RTW_HCI_TYPE_USB ?
+		RTW_TX_PROBE_TIMEOUT_USB : RTW_TX_PROBE_TIMEOUT;
+	mod_timer(&tx_report->purge_timer, jiffies + timeout);
 }
 EXPORT_SYMBOL(rtw_tx_report_enqueue);
 
--- /tmp/linux-6.18/drivers/net/wireless/realtek/rtw88/tx.h	2025-11-30 17:42:10.000000000 -0500
+++ /home/ptpx86mm1/kernelbuild/linux-6.18/drivers/net/wireless/realtek/rtw88/tx.h	2026-05-24 16:23:26.012668469 -0400
@@ -8,6 +8,7 @@
 #define RTK_TX_MAX_AGG_NUM_MASK		0x1f
 
 #define RTW_TX_PROBE_TIMEOUT		msecs_to_jiffies(500)
+#define RTW_TX_PROBE_TIMEOUT_USB	msecs_to_jiffies(1000)
 
 struct rtw_tx_desc {
 	__le32 w0;

             reply	other threads:[~2026-05-28 20:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-28 19:51 VolcomIlluminated [this message]
2026-05-29  0:49 ` [PATCH] rtw88: tx: increase TX report timeout for USB devices Ping-Ke Shih

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=Otk4rgS--F-9@tuta.com \
    --to=volcomilluminated@tuta.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.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