Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH rtw-next] wifi: rtw88: extend the TX report timeout to RTL8822BU
@ 2026-09-21 16:53 Josef Schlehofer
  2026-09-22  2:03 ` Ping-Ke Shih
  0 siblings, 1 reply; 5+ messages in thread
From: Josef Schlehofer @ 2026-09-21 16:53 UTC (permalink / raw)
  To: Ping-Ke Shih; +Cc: Bitterblue Smith, linux-wireless, Josef Schlehofer, stable

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.

Fixes: a82dfd33d123 ("wifi: rtw88: Add common USB chip support")
Cc: stable@vger.kernel.org
Link: https://lists.openwall.net/linux-kernel/2026/05/31/713
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
---
 drivers/net/wireless/realtek/rtw88/tx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtw88/tx.c b/drivers/net/wireless/realtek/rtw88/tx.c
index 4e110a457..55d7923e1 100644
--- a/drivers/net/wireless/realtek/rtw88/tx.c
+++ b/drivers/net/wireless/realtek/rtw88/tx.c
@@ -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
-- 
2.54.0 (Apple Git-157)


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

* RE: [PATCH rtw-next] wifi: rtw88: extend the TX report timeout to RTL8822BU
  2026-09-21 16:53 [PATCH rtw-next] wifi: rtw88: extend the TX report timeout to RTL8822BU Josef Schlehofer
@ 2026-09-22  2:03 ` Ping-Ke Shih
  2026-09-23 15:03   ` Bitterblue Smith
  0 siblings, 1 reply; 5+ messages in thread
From: Ping-Ke Shih @ 2026-09-22  2:03 UTC (permalink / raw)
  To: Josef Schlehofer, Bitterblue Smith
  Cc: linux-wireless@vger.kernel.org, stable@vger.kernel.org

Josef Schlehofer <pepe.schlehofer@gmail.com> wrote:
> diff --git a/drivers/net/wireless/realtek/rtw88/tx.c b/drivers/net/wireless/realtek/rtw88/tx.c
> index 4e110a457..55d7923e1 100644
> --- a/drivers/net/wireless/realtek/rtw88/tx.c
> +++ b/drivers/net/wireless/realtek/rtw88/tx.c
> @@ -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.

>             rtw_is_8723bs(rtwdev))

Also, considering SDIO chips, should we keep original timeout for PCI only?

>                 timeout = msecs_to_jiffies(2500);
> 
> base-commit: 73e3b1c94c7d5b4a113e7cbb42665dc2fe3b9d78
> --
> 2.54.0 (Apple Git-157)


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

* Re: [PATCH rtw-next] wifi: rtw88: extend the TX report timeout to RTL8822BU
  2026-09-22  2:03 ` Ping-Ke Shih
@ 2026-09-23 15:03   ` Bitterblue Smith
  2026-09-24  0:49     ` Ping-Ke Shih
  0 siblings, 1 reply; 5+ messages in thread
From: Bitterblue Smith @ 2026-09-23 15:03 UTC (permalink / raw)
  To: Ping-Ke Shih, Josef Schlehofer
  Cc: linux-wireless@vger.kernel.org, stable@vger.kernel.org

On 22/09/2026 05:03, Ping-Ke Shih wrote:
> Josef Schlehofer <pepe.schlehofer@gmail.com> wrote:
>> diff --git a/drivers/net/wireless/realtek/rtw88/tx.c b/drivers/net/wireless/realtek/rtw88/tx.c
>> index 4e110a457..55d7923e1 100644
>> --- a/drivers/net/wireless/realtek/rtw88/tx.c
>> +++ b/drivers/net/wireless/realtek/rtw88/tx.c
>> @@ -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.
> 

It seems fine to me.

>>             rtw_is_8723bs(rtwdev))
> 
> Also, considering SDIO chips, should we keep original timeout for PCI only?
> 

This too.

>>                 timeout = msecs_to_jiffies(2500);
>>
>> base-commit: 73e3b1c94c7d5b4a113e7cbb42665dc2fe3b9d78
>> --
>> 2.54.0 (Apple Git-157)
> 


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

* RE: [PATCH rtw-next] wifi: rtw88: extend the TX report timeout to RTL8822BU
  2026-09-23 15:03   ` Bitterblue Smith
@ 2026-09-24  0:49     ` Ping-Ke Shih
  2026-09-27  4:38       ` Josef Schlehofer
  0 siblings, 1 reply; 5+ messages in thread
From: Ping-Ke Shih @ 2026-09-24  0:49 UTC (permalink / raw)
  To: Bitterblue Smith, Josef Schlehofer
  Cc: linux-wireless@vger.kernel.org, stable@vger.kernel.org

Hi Josef,

Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
> On 22/09/2026 05:03, Ping-Ke Shih wrote:
> > Josef Schlehofer <pepe.schlehofer@gmail.com> wrote:
> >> diff --git a/drivers/net/wireless/realtek/rtw88/tx.c b/drivers/net/wireless/realtek/rtw88/tx.c
> >> index 4e110a457..55d7923e1 100644
> >> --- a/drivers/net/wireless/realtek/rtw88/tx.c
> >> +++ b/drivers/net/wireless/realtek/rtw88/tx.c
> >> @@ -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.
> >
> 
> It seems fine to me.
> 
> >>             rtw_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/20260924004637.9958-1-pkshih@realtek.com/T/#u




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

* Re: [PATCH rtw-next] wifi: rtw88: extend the TX report timeout to RTL8822BU
  2026-09-24  0:49     ` Ping-Ke Shih
@ 2026-09-27  4:38       ` Josef Schlehofer
  0 siblings, 0 replies; 5+ messages in thread
From: Josef Schlehofer @ 2026-09-27  4:38 UTC (permalink / raw)
  To: linux-wireless@vger.kernel.org; +Cc: stable@vger.kernel.org



> On 24. 9. 2026, at 02:49, Ping-Ke Shih <pkshih@realtek.com> wrote:
> 
> Hi Josef,
> 
> Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
>> On 22/09/2026 05:03, Ping-Ke Shih wrote:
>>> Josef Schlehofer <pepe.schlehofer@gmail.com> wrote:
>>>> diff --git a/drivers/net/wireless/realtek/rtw88/tx.c b/drivers/net/wireless/realtek/rtw88/tx.c
>>>> index 4e110a457..55d7923e1 100644
>>>> --- a/drivers/net/wireless/realtek/rtw88/tx.c
>>>> +++ b/drivers/net/wireless/realtek/rtw88/tx.c
>>>> @@ -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.
>>> 
>> 
>> It seems fine to me.
>> 
>>>>            rtw_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/20260924004637.9958-1-pkshih@realtek.com/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:
Tested-by: Josef Schlehofer <pepe.schlehofer@gmail.com>

It would be nice to have it in the stable kernels, too.
Thanks!

Josef

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

end of thread, other threads:[~2026-09-27  4:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-21 16:53 [PATCH rtw-next] wifi: rtw88: extend the TX report timeout to RTL8822BU Josef Schlehofer
2026-09-22  2:03 ` Ping-Ke Shih
2026-09-23 15:03   ` Bitterblue Smith
2026-09-24  0:49     ` Ping-Ke Shih
2026-09-27  4:38       ` Josef Schlehofer

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