Subject: [PATCH] rtw88: tx: increase TX report timeout for USB devices

From: VolcomIlluminated <[email-masked]>
Date: Thu, 28 May 2026 21:51:39 +0200 (CEST)

patch attached!

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 <[email-masked]>
---
--- /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;