All of lore.kernel.org
 help / color / mirror / Atom feed
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 0/3] wifi: mt76: mt7996: fix TX stalls of MLO clients that switch links
Date: Wed, 02 Dec 2026 16:52:33 +0900	[thread overview]
Message-ID: <20261202-rfc-v1-0-eff86f0bf9e6@gmail.com> (raw)

Hi,

On a Banana Pi BPI-R4 with the tri-band MT7996 NIC, running a single AP MLD
(2.4 + 5 + 6 GHz links), MLO clients regularly stop receiving anything while
they keep sending: the backlog of the station in mac80211 grows to hundreds
of frames, the head fid of its AC queue in the PLE (hw-queues debugfs) does
not move, and only a disassociation recovers. While the station is stuck,
its backlog can also fill the UDP send buffer of dnsmasq, which breaks DNS
for the whole LAN, as reported in openwrt/mt76 #1195.

Base: openwrt/mt76 master 10be1829 (2026-11-27), firmware build 20260721
(WM/WA/DSP), clients: two phones with 2.4 + 5 GHz MLO links, one of them an
iPhone using eMLSR. Without these patches (and with earlier attempts that
only looked at the PS state) a station got stuck 12 times in 7 days,
detected and recovered by a userspace watchdog that disassociates the
station once its TX counter stops moving with a backlog.

I found two ways for frames to get stuck on a link the client does not
receive on:

1. The data frames of an MLO peer are mapped to a link by TID parity, so
   some of them go to a link the client is not active on (patch 2).
2. When the client moves to another link, frames already queued for the old
   link stay there (patch 3).

In both cases the stuck frames count against MT_MAX_NON_AQL_PKT, which is
shared by all links of the peer, so TX to the peer stops on every link.

The per-link PS state reported through PS_SYNC does not tell which link the
client is on: for these clients it toggles on both links together, also on
the link the client never sends anything on. (mac80211 does not see the PS
state of MLD peers at all, see openwrt/mt76 #1196.) So patch 2 uses the
link of the last unicast RX instead.

Testing so far: with patches 1 and 2 the board ran 21 hours with one stall,
the case fixed by patch 3. Patch 3 has only been running since today, hence
RFC. I will follow up with results after a few days.

Questions for MediaTek:

- Is the firmware expected to keep holding the frames of a link while an
  eMLSR client dozes there but is active on another link? Is there a
  firmware mechanism to move such frames to another link, or to flush the
  queue of one link, that the driver should use instead of patch 3?
- Is the PS state that PS_SYNC reports for an MLD peer meant to be per
  link?
- Is STA_REC_PS_LEAVE valid for any peer on MT7996 firmware, or only for the
  4-address case it is used for today?

---
Zichao-xu (3):
      wifi: mt76: limit non-AQL frames queued for a sleeping station
      wifi: mt76: mt7996: steer MLO data frames to the link the peer is active on
      wifi: mt76: mt7996: wake a link that an MLO peer left with frames queued

 drivers/net/wireless/mediatek/mt76/mt76.h          |   1 +
 drivers/net/wireless/mediatek/mt76/mt7996/mac.c    | 111 +++++++++++++++++++++
 drivers/net/wireless/mediatek/mt76/mt7996/mcu.c    |  68 ++++++++++++-
 drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h |  18 ++++
 drivers/net/wireless/mediatek/mt76/tx.c            |   9 ++
 5 files changed, 204 insertions(+), 3 deletions(-)
---
base: openwrt/mt76 10be1829783cff271f5e81111258387a72b5192b (master, 2026-11-27)
change-id: 20261202-rfc-1e223d88d444

Best regards,
-- 
Zichao-xu <xvzichao2333@gmail.com>



WARNING: multiple messages have this Message-ID (diff)
From: Zichao-xu <xvzichao2333@gmail.com>
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 0/3] wifi: mt76: mt7996: fix TX stalls of MLO clients that switch links
Date: Wed, 02 Dec 2026 16:52:33 +0900	[thread overview]
Message-ID: <20261202-rfc-v1-0-eff86f0bf9e6@gmail.com> (raw)

Hi,

On a Banana Pi BPI-R4 with the tri-band MT7996 NIC, running a single AP MLD
(2.4 + 5 + 6 GHz links), MLO clients regularly stop receiving anything while
they keep sending: the backlog of the station in mac80211 grows to hundreds
of frames, the head fid of its AC queue in the PLE (hw-queues debugfs) does
not move, and only a disassociation recovers. While the station is stuck,
its backlog can also fill the UDP send buffer of dnsmasq, which breaks DNS
for the whole LAN, as reported in openwrt/mt76 #1195.

Base: openwrt/mt76 master 10be1829 (2026-11-27), firmware build 20260721
(WM/WA/DSP), clients: two phones with 2.4 + 5 GHz MLO links, one of them an
iPhone using eMLSR. Without these patches (and with earlier attempts that
only looked at the PS state) a station got stuck 12 times in 7 days,
detected and recovered by a userspace watchdog that disassociates the
station once its TX counter stops moving with a backlog.

I found two ways for frames to get stuck on a link the client does not
receive on:

1. The data frames of an MLO peer are mapped to a link by TID parity, so
   some of them go to a link the client is not active on (patch 2).
2. When the client moves to another link, frames already queued for the old
   link stay there (patch 3).

In both cases the stuck frames count against MT_MAX_NON_AQL_PKT, which is
shared by all links of the peer, so TX to the peer stops on every link.

The per-link PS state reported through PS_SYNC does not tell which link the
client is on: for these clients it toggles on both links together, also on
the link the client never sends anything on. (mac80211 does not see the PS
state of MLD peers at all, see openwrt/mt76 #1196.) So patch 2 uses the
link of the last unicast RX instead.

Testing so far: with patches 1 and 2 the board ran 21 hours with one stall,
the case fixed by patch 3. Patch 3 has only been running since today, hence
RFC. I will follow up with results after a few days.

Questions for MediaTek:

- Is the firmware expected to keep holding the frames of a link while an
  eMLSR client dozes there but is active on another link? Is there a
  firmware mechanism to move such frames to another link, or to flush the
  queue of one link, that the driver should use instead of patch 3?
- Is the PS state that PS_SYNC reports for an MLD peer meant to be per
  link?
- Is STA_REC_PS_LEAVE valid for any peer on MT7996 firmware, or only for the
  4-address case it is used for today?

---
Zichao-xu (3):
      wifi: mt76: limit non-AQL frames queued for a sleeping station
      wifi: mt76: mt7996: steer MLO data frames to the link the peer is active on
      wifi: mt76: mt7996: wake a link that an MLO peer left with frames queued

 drivers/net/wireless/mediatek/mt76/mt76.h          |   1 +
 drivers/net/wireless/mediatek/mt76/mt7996/mac.c    | 111 +++++++++++++++++++++
 drivers/net/wireless/mediatek/mt76/mt7996/mcu.c    |  68 ++++++++++++-
 drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h |  18 ++++
 drivers/net/wireless/mediatek/mt76/tx.c            |   9 ++
 5 files changed, 204 insertions(+), 3 deletions(-)
---
base: openwrt/mt76 10be1829783cff271f5e81111258387a72b5192b (master, 2026-11-27)
change-id: 20261202-rfc-1e223d88d444

Best regards,
-- 
Zichao-xu <xvzichao2333@gmail.com>


             reply	other threads:[~2026-12-02  7:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02  7:52 Zichao-xu via B4 Relay [this message]
2026-12-02  7:52 ` [PATCH RFC 0/3] wifi: mt76: mt7996: fix TX stalls of MLO clients that switch links Zichao-xu
2026-12-02  7:52 ` [PATCH RFC 1/3] wifi: mt76: limit non-AQL frames queued for a sleeping station Zichao-xu via B4 Relay
2026-12-02  7:52   ` Zichao-xu
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   ` Zichao-xu
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:52   ` Zichao-xu
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-0-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.