Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] rtw88: tx: increase TX report timeout for USB devices
@ 2026-05-28 19:51 VolcomIlluminated
  2026-05-29  0:49 ` Ping-Ke Shih
  0 siblings, 1 reply; 2+ messages in thread
From: VolcomIlluminated @ 2026-05-28 19:51 UTC (permalink / raw)
  To: Pkshih; +Cc: Linux Wireless


[-- 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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH] rtw88: tx: increase TX report timeout for USB devices
  2026-05-28 19:51 [PATCH] rtw88: tx: increase TX report timeout for USB devices VolcomIlluminated
@ 2026-05-29  0:49 ` Ping-Ke Shih
  0 siblings, 0 replies; 2+ messages in thread
From: Ping-Ke Shih @ 2026-05-29  0:49 UTC (permalink / raw)
  To: VolcomIlluminated; +Cc: Linux Wireless

Please use plain text mode, and send patch by 'git send-email'.

We have [1] already, but under condition of RTL8723DU. You can extend it
to involve RTL8822BU. Maybe, we can just have longer report time for
all USB devices?

[1] https://lore.kernel.org/linux-wireless/20260518142311.10328-1-luka.gejak@linux.dev/

Ping-Ke


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-29  0:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-28 19:51 [PATCH] rtw88: tx: increase TX report timeout for USB devices VolcomIlluminated
2026-05-29  0:49 ` Ping-Ke Shih

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox