From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796197956; b=sE7Ztu6F9W4rQ0kyPaPZxJx4O7mCoHZnYteHPLocHcEpEJqMcM224T6Vm7kRpgihdNpH IgYlCY77m/Dj210K2q05TQ2klJc3BfVjYue1T7tQ7xpgXVdiv3kGWu2k4LWbGmMxSjN1L HmWMEiM7UwIEJH+Cw0oxjpSYJySolg0P0kUtbw3Ryn5A1sy3e+IlcePboS0lUxb9shhLC LNDriY4GCcECRTwJxG6K+P02O/qAcnJ9ZkqEGeg47CfLihwpAVy3+xr0lukNQGobiJseO d9ZPLVkHCpwR+4kgo9Fd1crcAG761xUP49WIpH3IxeRk4WYSa+5j2SZ9Mg5idIWKp+A== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796197956; h=Received:DKIM-Signature:Received:From:Subject:Date:Message-Id: MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking: X-Change-ID:To:Cc:X-Mailer:X-Developer-Signature:X-Developer-Key: X-Endpoint-Received:X-Original-From:Reply-To; bh=hc83V2oZ9/G1DSzexLaUay+wL/uqWQhrO1H9YIiOZfI=; b=U7xykzQrNj7U2mwYKkt+ySoQ7SaWN/qe415hk41SPw00hJGkqo9ZNU9y/+4gkqJPCzVJ gDcsTePmJy4JRAaW7rVLXcWI8fCTIocuDQbHNEFbrfADMX3v3Ua4FkHeO3xMqIddlFkRd aa1qqms6rMwi5cmnbZTYMszPjkpIKKsIRaCIC4juBCVRkxhKCyvNNPFcSviu6qsa1sxeC TmLykYVD29xtklC0YpxqXfHHhWAFNbM0DCXm/DjwoR75csK4DOf37SB29tU9lHlXjpGHS 1nTeMC2F3mn5/Fpuh4b5LwVbNqWfp3d78er1RLvXL6BoRhAp2O7xZW6A93HfgEa2qDw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QHZle5qE; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E512606A31A for ; Wed, 2 Dec 2026 07:52:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QHZle5qE Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796197956; b=IqDHWlkNJLe7FpAT8TUxU6hhBuLbanohgmoOLc7YIQjskBBsLHizSSytBDJXC8b28fHQ XYv8e7Q9Nf+PNasOi1QLxz1aPV/gq9mLqvia3H/b2skEBfPzk2CK6VC421qNe/4Ub+jsT LWVhJbEQnYp6yfXxBGBYIiAzbWsN/jws7n8CWjf8/Ipbv9TRmN+y5vIQTqeU3+MeNlZw2 ohnS4nuvE2rdQCRN4o3X6p5YuzxyyBwK43OpwjAFfN8MuPKiIRTsx6uXZrP7k7iNzf2y/ 3wtTCn4AZ1AEIHIwm6BgAoDyjiTVqmlZwHaYUq6B8vWWwmCK1ySeUXcoz7C6mnkaM3w== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796197956; h=DKIM-Signature:Received:From:Subject:Date:Message-Id:MIME-Version: Content-Type:Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To: Cc:X-Mailer:X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To; bh=hc83V2oZ9/G1DSzexLaUay+wL/uqWQhrO1H9YIiOZfI=; b=k/1PmUSn2J0xvYydy67Y1NfF29QvVAlXyWHHhvOzKPcc0Kvtp4rXpVxIDvS9X37pdSpP H1zRmdjB1vOLbmf2pc3FFSR+qubWTSC4z6ZzrsjTsTgqJpwYIOyFIGY41aKMtUG7xLvmt +PrKp2YOrb7t8HjseNG1fbrxShaGMIfksMTFFxOMr3iuQY9vRTxUt+uYm5syBWe2wgAXW otIImbUyVcxWnCzc4xDB1FAP5HjnYcIMvh9xpvv3ff9QZ7gvelMTLwXLQLCLSphRodUWC b6OcMMW8SY7FfTZ04gTMSKoyIFXEAFX3S/apD6PGJEjOs4nuVY/PzvRKTuwQhwymORg== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 9FBAB1F00919; Wed, 2 Dec 2026 07:52:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796197956; bh=hc83V2oZ9/G1DSzexLaUay+wL/uqWQhrO1H9YIiOZfI=; h=From:Subject:Date:To:Cc:Reply-To; b=QHZle5qEq3Hz9jtk4zYkruIsF5euSsJkmOURMxbqtG0EOv5N+zaoPzSww7eSZbVqj xHoRFEQd42XnnhGQtT51ef+cGu7UnxcUKGL0yb0cNuT13acmx8V8N078C+cVwx/K+D xQx/oGF5+nGy3BCSHmZ3/fPAL4mMGeCdIuU9uR6Utm1emyE6wjQeG/hqwwZKqRQP0E oDYHjEo4QzRvZx0kyc/O/rIxAI6cnk7hRhdoY5iw2fnwT/N/Z+n0g4yGucCxMHl61V uedL2aMXsEKMMtjKWUK3yPfT6/4SEsdSVLPnQDCn3SIsG9Dy+iTHfPFKizUA4QLaYy 9rmucBnDJX9bg== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 2C1394F2E7; Wed, 2 Dec 2026 07:52:35 +0000 (UTC) From: Zichao-xu via B4 Relay 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 Message-Id: <20261202-rfc-v1-0-eff86f0bf9e6@gmail.com> X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAEHOD2sC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIzNDIKFblJasa5hqZGScYmGRYmJiogRUWVCUmpZZATYlWinIzVkpFiJYXJq UlZpcAtKvVFsLAJrEZ2hsAAAA X-Change-ID: 20261202-rfc-1e223d88d444 To: linux-wireless@vger.kernel.org Cc: Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Sean Wang , linux-mediatek@lists.infradead.org, Zichao-xu X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796197954; l=3342; i=xvzichao2333@gmail.com; s=20261202; h=from:subject:message-id; bh=wR1Az5BxzweA6gGPaecVR3HX7i4kdCrJep0k/XTmHT0=; b=64/Xt70ckD20ROyhgFh9Qw15t/zZobhrY8+ISDuMCD0vRSsct2npmuww2BpPtyYpsNtNKl0SP kjV4+bIWVy0AA6Jh9eVovMRtmMza+yBCor8G4STxXop9KROckjY+pv1 X-Developer-Key: i=xvzichao2333@gmail.com; a=ed25519; pk=4y2PCqVVaZTmU/wzky/gd6WColWnjFznkFN8fXd+GMI= X-Endpoint-Received: by B4 Relay for xvzichao2333@gmail.com/20261202 with auth_id=1717 X-Original-From: Zichao-xu Reply-To: xvzichao2333@gmail.com 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zichao-xu 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 Message-Id: <20261202-rfc-v1-0-eff86f0bf9e6@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAEHOD2sC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIzNDIKFblJasa5hqZGScYmGRYmJiogRUWVCUmpZZATYlWinIzVkpFiJYXJq UlZpcAtKvVFsLAJrEZ2hsAAAA X-Change-ID: 20261202-rfc-1e223d88d444 To: linux-wireless@vger.kernel.org Cc: Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Sean Wang , linux-mediatek@lists.infradead.org, Zichao-xu X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796197954; l=3342; i=xvzichao2333@gmail.com; s=20261202; h=from:subject:message-id; bh=wR1Az5BxzweA6gGPaecVR3HX7i4kdCrJep0k/XTmHT0=; b=64/Xt70ckD20ROyhgFh9Qw15t/zZobhrY8+ISDuMCD0vRSsct2npmuww2BpPtyYpsNtNKl0SP kjV4+bIWVy0AA6Jh9eVovMRtmMza+yBCor8G4STxXop9KROckjY+pv1 X-Developer-Key: i=xvzichao2333@gmail.com; a=ed25519; pk=4y2PCqVVaZTmU/wzky/gd6WColWnjFznkFN8fXd+GMI= X-Endpoint-Received: by B4 Relay for xvzichao2333@gmail.com/20261202 with auth_id=1717 List-Id: B4 Relay Submissions 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