From: Luka Gejak <luka.gejak@linux.dev>
To: Ping-Ke Shih <pkshih@realtek.com>
Cc: linux-wireless@vger.kernel.org, Luka Gejak <luka.gejak@linux.dev>
Subject: [PATCH rtw-next v2 2/2] wifi: rtw88: sdio: limit the high queue to DTIM delivery
Date: Wed, 21 Oct 2026 12:43:18 +0000 [thread overview]
Message-ID: <20261021124318.15993-2-luka.gejak@linux.dev> (raw)
In-Reply-To: <20261021124318.15993-1-luka.gejak@linux.dev>
In AP mode every broadcast and multicast (bmc) frame is sent through the
high queue, which the hardware only drains after a DTIM beacon. Only a
few frames leave per DTIM, so steady multicast traffic builds a backlog
that holds the TX pages the other queues need. Unicast traffic then
stalls for seconds and clients can no longer renew their DHCP lease.
USB had the same problem and was fixed by commit c710c7c2e038 ("wifi:
rtw88: usb: route bmc frames via the high queue only for DTIM delivery")
and the two commits that followed it. Use the same rule for SDIO. A bmc
frame goes to the high queue only when mac80211 asks for DTIM delivery
because a station is dozing, the frame is ARP, EAPOL or DHCP, and the
budget allows it. All other bmc frames go out on their access category
queue.
Tested on RTL8723BS with an ath9k client.
Signed-off-by: Luka Gejak <luka.gejak@linux.dev>
---
drivers/net/wireless/realtek/rtw88/sdio.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw88/sdio.c b/drivers/net/wireless/realtek/rtw88/sdio.c
index dc2fd0f8f9ff..83e9b301ae9b 100644
--- a/drivers/net/wireless/realtek/rtw88/sdio.c
+++ b/drivers/net/wireless/realtek/rtw88/sdio.c
@@ -1308,6 +1308,9 @@ static int rtw_sdio_tx_write(struct rtw_dev *rtwdev,
u16 q_map = skb_get_queue_mapping(skb);
struct rtw_sdio_tx_data *tx_data;
+ if (queue == RTW_TX_QUEUE_HI0 && !rtw_tx_bmc_use_hiq(rtwdev, skb))
+ queue = rtw_tx_ac_to_hwq(q_map);
+
rtw_sdio_tx_skb_prepare(rtwdev, pkt_info, skb, queue);
tx_data = rtw_sdio_get_tx_data(skb);
--
2.53.0
next prev parent reply other threads:[~2026-10-21 12:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 12:43 [PATCH rtw-next v2 1/2] wifi: rtw88: move the bmc high queue decision to tx.c Luka Gejak
2026-10-21 12:43 ` Luka Gejak [this message]
2026-10-22 2:24 ` [PATCH rtw-next v2 2/2] wifi: rtw88: sdio: limit the high queue to DTIM delivery Ping-Ke Shih
2026-10-22 4:30 ` Luka Gejak
2026-10-22 4:33 ` Ping-Ke Shih
2026-10-22 2:20 ` [PATCH rtw-next v2 1/2] wifi: rtw88: move the bmc high queue decision to tx.c Ping-Ke Shih
2026-10-22 5:11 ` Luka Gejak
2026-10-23 21:34 ` Luka Gejak
2026-10-25 2:49 ` Ping-Ke Shih
2026-10-25 8:26 ` Luka Gejak
2026-10-27 1:19 ` 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=20261021124318.15993-2-luka.gejak@linux.dev \
--to=luka.gejak@linux.dev \
--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