From: Zichao-xu via B4 Relay <devnull+xvzichao2333.gmail.com@kernel.org>
To: linux-wireless@vger.kernel.org
Cc: Felix Fietkau <nbd@nbd.name>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Ryder Lee <ryder.lee@mediatek.com>,
Shayne Chen <shayne.chen@mediatek.com>,
Sean Wang <sean.wang@mediatek.com>,
linux-mediatek@lists.infradead.org,
Zichao-xu <xvzichao2333@gmail.com>
Subject: [PATCH RFC 1/3] wifi: mt76: limit non-AQL frames queued for a sleeping station
Date: Wed, 02 Dec 2026 16:52:34 +0900 [thread overview]
Message-ID: <20261202-rfc-v1-1-eff86f0bf9e6@gmail.com> (raw)
In-Reply-To: <20261202-rfc-v1-0-eff86f0bf9e6@gmail.com>
From: Zichao-xu <xvzichao2333@gmail.com>
Frames without an airtime estimate, such as those of an MLO station, get
past the AQL check in mt76_txq_send_burst() while the station is in power
save. They stay in the firmware until the station wakes up and count
against MT_MAX_NON_AQL_PKT meanwhile. That limit is shared by all links of
an MLO station, so frames parked on a link the station dozes on can use it
up and stop TX to the station on its other links as well.
Only queue up to MT_MAX_PS_NON_AQL_PKT (4) such frames while the station
is in power save.
Signed-off-by: Zichao-xu <xvzichao2333@gmail.com>
---
drivers/net/wireless/mediatek/mt76/mt76.h | 1 +
drivers/net/wireless/mediatek/mt76/tx.c | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index 21a04b8..455f0f1 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -30,6 +30,7 @@
#define MT_SKB_HEAD_LEN 256
#define MT_MAX_NON_AQL_PKT 16
+#define MT_MAX_PS_NON_AQL_PKT 4
#define MT_TXQ_FREE_THR 32
#define MT76_TOKEN_FREE_THR 64
diff --git a/drivers/net/wireless/mediatek/mt76/tx.c b/drivers/net/wireless/mediatek/mt76/tx.c
index bd5ad68..7446cdb 100644
--- a/drivers/net/wireless/mediatek/mt76/tx.c
+++ b/drivers/net/wireless/mediatek/mt76/tx.c
@@ -550,6 +550,15 @@ mt76_txq_send_burst(struct mt76_phy *phy, struct mt76_queue *q,
return 0;
if (ieee80211_txq_aql_pending(phy->hw, txq))
return 0;
+ /*
+ * Frames without an airtime estimate (e.g. those of an MLO
+ * peer) get past the AQL check above. They stay in the
+ * firmware until the peer wakes up and count against the
+ * non-AQL limit of the peer meanwhile, so only park a few.
+ */
+ if (atomic_read(&mt76_wcid_primary(wcid)->non_aql_packets) >=
+ MT_MAX_PS_NON_AQL_PKT)
+ return 0;
}
if (atomic_read(&mt76_wcid_primary(wcid)->non_aql_packets) >=
--
Git-157)
next prev parent reply other threads:[~2026-12-02 7:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 7:52 [PATCH RFC 0/3] wifi: mt76: mt7996: fix TX stalls of MLO clients that switch links Zichao-xu via B4 Relay
2026-12-02 7:52 ` Zichao-xu via B4 Relay [this message]
2026-12-02 7:52 ` [PATCH RFC 2/3] wifi: mt76: mt7996: steer MLO data frames to the link the peer is active on Zichao-xu via B4 Relay
2026-12-02 7:52 ` [PATCH RFC 3/3] wifi: mt76: mt7996: wake a link that an MLO peer left with frames queued Zichao-xu via B4 Relay
2026-12-02 7:58 ` [PATCH RFC 0/3] wifi: mt76: mt7996: fix TX stalls of MLO clients that switch links Zichao-xu
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=20261202-rfc-v1-1-eff86f0bf9e6@gmail.com \
--to=devnull+xvzichao2333.gmail.com@kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
--cc=ryder.lee@mediatek.com \
--cc=sean.wang@mediatek.com \
--cc=shayne.chen@mediatek.com \
--cc=xvzichao2333@gmail.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