From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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.subspace.kernel.org (Postfix) with ESMTPS id 6CB0A606A31A for ; Wed, 2 Dec 2026 07:52:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=hZYzf1+Y; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QHZle5qE DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject: From:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Unsubscribe-Post:List-Owner; bh=hc83V2oZ9/G1DSzexLaUay+wL/uqWQhrO1H9YIiOZfI=; b=hZYzf1+YwMdTKxrMBiGNM9QpZQ VCzxWRkCZaVrM31r5fr/XR45gZoPUtifu0Oj38/eSUyNZyEZrpg9F3zl7QM4WJi6sDSGKGadFEnvC //i6kvkSdnm76pclgyMFdd3JA/uYEQ+cZQkSAcIPgSuFPHkRXl4N6gwbGLnrVd/tulbUgluN4Yjv+ e0tVatYqq3EHan5wr5U3yB16FSEwNYnYU6yxwzIzy249xjZTtDjBWpXNViVH4dYPQVo1BEfIl8sci ITUqRNMaQ9vP+o4Daw7Det6j7M80dO7LbQ7rqesdpRY+Kf40kXDSmFpR/gtDq0xmZGMv5SOhGEwJG MGOOAsbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYf8p-0000000AZWX-026w; Wed, 02 Dec 2026 07:52:39 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYf8m-0000000AZW3-40At for linux-mediatek@lists.infradead.org; Wed, 02 Dec 2026 07:52:36 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 55F4943982; Wed, 2 Dec 2026 07:52:36 +0000 (UTC) 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-Archived-By: 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 X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: xvzichao2333@gmail.com Sender: "Linux-mediatek" X-Spam-Status: No, score=-11.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, FREEMAIL_REPLYTO_END_DIGIT,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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