wifi: rtw88: extend the TX report timeout to RTL8822BU
Subsystems (2)
PATCH 1/1 wifi: rtw88: extend the TX report timeout to RTL8822BU
The firmware of RTL8822BU does not always report the TX status of a frame within RTW_TX_PROBE_TIMEOUT (500 ms). The purge timer then drops the tracking skbs and the driver warns
rtw_8822bu 3-1:1.0: failed to get tx report from firmware
every one to three seconds on an access point serving clients that use power save.
The dropped skbs never reach ieee80211_tx_status_irqsafe(), so mac80211 never learns the ACK status of the frames it asked to track. hostapd uses that status to tell whether a polled station is still there, so it can treat a responsive station as inactive and eventually disconnect it.
Commit c80788f7c5ae ("wifi: rtw88: increase TX report timeout to fix race condition") raised the timeout to 2500 ms for RTL8723DU, where the firmware stays off-channel during background scans for longer than the original 500 ms. RTL8822BU needs the same treatment. A similar change was proposed for RTL8822BU in May 2026 but was never resubmitted, see the Link below.
Tested on a TP-Link Archer T4U v3 (RTL8812BU, handled by rtw_8822bu) as a 2.4 GHz AP with six associated clients: the warning appeared about once every 2.3 seconds before the change and not once in 67 minutes with it.
--- drivers/net/wireless/realtek/rtw88/tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw88/tx.c +2 -1
@@ -208,7 +208,8 @@ void rtw_tx_report_enqueue(struct rtw_dev *rtwdev, struct sk_buff *skb, u8 sn)__skb_queue_tail (&tx_report->queue, skb);spin_unlock_irqrestore (&tx_report->q_lock, flags); -if ((rtwdev->chip->id ==RTW_CHIP_TYPE_8723D && +if (((rtwdev->chip->id ==RTW_CHIP_TYPE_8723D || + rtwdev->chip->id ==RTW_CHIP_TYPE_8822B ) && rtwdev->hci.type ==RTW_HCI_TYPE_USB ) ||rtw_is_8723bs (rtwdev)) timeout =msecs_to_jiffies (2500 );
base-commit: 73e3b1c94c7d5b4a113e7cbb42665dc2fe3b9d78
Signature · 1 line
2.54.0 (Apple Git-157)
Ping-Ke Shih
maintainerdrivers/net/wireless/realtek/rtw88/tx.c void rtw_tx_report_enqueue(struct rtw_dev *rtwdev, struct sk_buff *skb, u8 sn) · line 213
Quoted 12 lines · Josef Schlehofer
drivers/net/wireless/realtek/rtw88/tx.c +2
-1@@ -208,7 +208,8 @@ void rtw_tx_report_enqueue(struct rtw_dev *rtwdev, struct sk_buff *skb, u8 sn)__skb_queue_tail (&tx_report->queue, skb);spin_unlock_irqrestore (&tx_report->q_lock, flags); - if ((rtwdev->chip->id == RTW_CHIP_TYPE_8723D && + if (((rtwdev->chip->id == RTW_CHIP_TYPE_8723D || + rtwdev->chip->id == RTW_CHIP_TYPE_8822B) && rtwdev->hci.type == RTW_HCI_TYPE_USB) ||
Hi Bitterblue,
It seems like more and more USB chips need this, let's enlarge timeout time for all USB devices. Do you have any concern? Need your input.
drivers/net/wireless/realtek/rtw88/tx.c void rtw_tx_report_enqueue(struct rtw_dev *rtwdev, struct sk_buff *skb, u8 sn) · line 214
Quoted 1 line
drivers/net/wireless/realtek/rtw88/tx.c +0
-0rtw_is_8723bs(rtwdev))
Also, considering SDIO chips, should we keep original timeout for PCI only?
Quoted 5 lines
drivers/net/wireless/realtek/rtw88/tx.c +0
-0timeout =msecs_to_jiffies (2500 );base-commit:
73e3b1c94c7d5b4a113e7cbb42665dc2fe3b9d78--
2.54.0 (Apple Git-157)
Quoted 16 lines · Ping-Ke Shih
drivers/net/wireless/realtek/rtw88/tx.c void rtw_tx_report_enqueue(struct rtw_dev *rtwdev, struct sk_buff *skb, u8 sn) · line 213
Quoted 12 lines · Josef Schlehofer
drivers/net/wireless/realtek/rtw88/tx.c +2
-1@@ -208,7 +208,8 @@ void rtw_tx_report_enqueue(struct rtw_dev *rtwdev, struct sk_buff *skb, u8 sn)__skb_queue_tail (&tx_report->queue, skb);spin_unlock_irqrestore (&tx_report->q_lock, flags); - if ((rtwdev->chip->id == RTW_CHIP_TYPE_8723D && + if (((rtwdev->chip->id == RTW_CHIP_TYPE_8723D || + rtwdev->chip->id == RTW_CHIP_TYPE_8822B) && rtwdev->hci.type == RTW_HCI_TYPE_USB) ||Hi Bitterblue,
Quoted 3 lines
It seems like more and more USB chips need this, let's enlarge timeout time for all USB devices. Do you have any concern? Need your input.
It seems fine to me.
Quoted 4 lines
drivers/net/wireless/realtek/rtw88/tx.c void rtw_tx_report_enqueue(struct rtw_dev *rtwdev, struct sk_buff *skb, u8 sn) · line 214
Quoted 1 line
drivers/net/wireless/realtek/rtw88/tx.c +0
-0rtw_is_8723bs(rtwdev))Also, considering SDIO chips, should we keep original timeout for PCI only?
This too.
Quoted 6 lines
Quoted 5 lines
drivers/net/wireless/realtek/rtw88/tx.c +0
-0timeout =msecs_to_jiffies (2500 );base-commit:
73e3b1c94c7d5b4a113e7cbb42665dc2fe3b9d78--
2.54.0 (Apple Git-157)
Ping-Ke Shih
maintainerHi Josef,
Quoted 21 lines · Bitterblue Smith
Quoted 16 lines · Ping-Ke Shih
drivers/net/wireless/realtek/rtw88/tx.c void rtw_tx_report_enqueue(struct rtw_dev *rtwdev, struct sk_buff *skb, u8 sn) · line 213
Quoted 12 lines · Josef Schlehofer
drivers/net/wireless/realtek/rtw88/tx.c +2
-1@@ -208,7 +208,8 @@ void rtw_tx_report_enqueue(struct rtw_dev *rtwdev, struct sk_buff *skb, u8 sn)__skb_queue_tail (&tx_report->queue, skb);spin_unlock_irqrestore (&tx_report->q_lock, flags); - if ((rtwdev->chip->id == RTW_CHIP_TYPE_8723D && + if (((rtwdev->chip->id == RTW_CHIP_TYPE_8723D || + rtwdev->chip->id == RTW_CHIP_TYPE_8822B) && rtwdev->hci.type == RTW_HCI_TYPE_USB) ||Hi Bitterblue,
Quoted 3 lines
It seems like more and more USB chips need this, let's enlarge timeout time for all USB devices. Do you have any concern? Need your input.
Quoted 9 lines
It seems fine to me.
Quoted 4 lines
drivers/net/wireless/realtek/rtw88/tx.c void rtw_tx_report_enqueue(struct rtw_dev *rtwdev, struct sk_buff *skb, u8 sn) · line 214
Quoted 1 line
drivers/net/wireless/realtek/rtw88/tx.c +0
-0rtw_is_8723bs(rtwdev))Also, considering SDIO chips, should we keep original timeout for PCI only?
This too.
I sent a patch [1]. Please test if it works to you. If so, I'd take my one, and drop this.
[1] https://lore.kernel.org/linux-wireless/[email protected]/T/#u
Josef Schlehofer
Tested-byQuoted 35 lines · Ping-Ke Shih
Hi Josef,
Quoted 28 lines · Bitterblue Smith
Quoted 16 lines · Ping-Ke Shih
drivers/net/wireless/realtek/rtw88/tx.c void rtw_tx_report_enqueue(struct rtw_dev *rtwdev, struct sk_buff *skb, u8 sn) · line 213
Quoted 12 lines · Josef Schlehofer
drivers/net/wireless/realtek/rtw88/tx.c +2
-1@@ -208,7 +208,8 @@ void rtw_tx_report_enqueue(struct rtw_dev *rtwdev, struct sk_buff *skb, u8 sn)__skb_queue_tail (&tx_report->queue, skb);spin_unlock_irqrestore (&tx_report->q_lock, flags); - if ((rtwdev->chip->id == RTW_CHIP_TYPE_8723D && + if (((rtwdev->chip->id == RTW_CHIP_TYPE_8723D || + rtwdev->chip->id == RTW_CHIP_TYPE_8822B) && rtwdev->hci.type == RTW_HCI_TYPE_USB) ||Hi Bitterblue,
Quoted 3 lines
It seems like more and more USB chips need this, let's enlarge timeout time for all USB devices. Do you have any concern? Need your input.
It seems fine to me.
Quoted 4 lines
drivers/net/wireless/realtek/rtw88/tx.c void rtw_tx_report_enqueue(struct rtw_dev *rtwdev, struct sk_buff *skb, u8 sn) · line 214
Quoted 1 line
drivers/net/wireless/realtek/rtw88/tx.c +0
-0rtw_is_8723bs(rtwdev))Also, considering SDIO chips, should we keep original timeout for PCI only?
Quoted 7 lines
Quoted 2 lines
This too.
I sent a patch [1]. Please test if it works to you. If so, I'd take my one, and drop this.
[1] https://lore.kernel.org/linux-wireless/[email protected]/T/#u
It works for me. I tested it on the same TP-Link Archer T4U v3 (RTL8812BU, rtw_8822bu) , so please drop mine and take yours.
If you would like, you can add:
It would be nice to have it in the stable kernels, too. Thanks!
Josef