From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f178.google.com (mail-dy1-f178.google.com [74.125.82.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7AAA4255F3F for ; Fri, 16 Jan 2026 01:05:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768525526; cv=none; b=hucgVYgiqV/S5X51xmIIl+elHDAsq5Ckx5dVyfl31LwW4YvCEfg0c3Epvw11i1EFB0QmL56LuerrdBKrrdAKTJC/poSQudOE1qZ1ZOFXizTILkiQiz2Dos3lRMURbqiNOUsKKv6PM5laNxXyD2F1dXQOw4Vzz9jeVQx17GxpYyQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768525526; c=relaxed/simple; bh=2I+gSwcNT17uKARtf6tmJ6JUyn7v0fEHFQUfEK0DQvA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WVrWSPI6AdixRjhL0s4c7jedC14OhuZtZsWqRaujbJzcHKyQTGYl1BnQxIQhxkK27d4dt/l0+QCQrKlrvJLVR8SykAX7UWhRKBCbioPcSsxP17wTnQBq9v3bj8vlQLxcNTOCVNQeHjXLylG6MTOkJfB7bLPCXpRZ9IFwQQVs904= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=zacbowling.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eFi41JCE; arc=none smtp.client-ip=74.125.82.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=zacbowling.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eFi41JCE" Received: by mail-dy1-f178.google.com with SMTP id 5a478bee46e88-2b04fcfc0daso1838296eec.0 for ; Thu, 15 Jan 2026 17:05:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768525523; x=1769130323; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=xfMaFn/QyfxelRT8jKmLj/I9JzM5jNepmQsNTMuHcRU=; b=eFi41JCEr8yVwoqKhQbZbCoSpK2LphsXGr6VD+2HNjL/UI4D0CrLfIhUK5SmXPhpxr 9QyZcm3wVrOZWbCdwd//uGaof3ove7RLNsSEHjT2CsUu+r8YZLAxBRspwLW3yPek+3K9 aOvTsa7io89rrXtD1SuYywR25BhJv01ei+gl0MpyzGBgbwJAITYSogd4lQAYabSVJAyP ZxIlaQZfSp/W8cp/SbVw+kqxnVm6K5Q9y9FMWcTjFpOKIjBwXCA4sTrX1ijJgL4rahVN b4AmzPj7AFI17QY7HYp88OmHdGjSAcWHul1SCk+zvIj6zMaGGDKSTTteS7PA/5gF63yS Kddg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768525523; x=1769130323; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xfMaFn/QyfxelRT8jKmLj/I9JzM5jNepmQsNTMuHcRU=; b=TZnrA3vBGZfKeoUPALCpsG6g8hVeq7TKcGhBJPfgMrLNNRTcUZo74bSeZBFAC2yVvb 9TKLzARSawmVliiiAsa9TEaxPpmlRTKLOPZjTKOFOL//NBCnVjdunoVx1OVHvi2YmeaO oh5TcIsZy0BHbAozyzBjW146UpejWWbPLoCcOyw5xc+bOXJXTURrQBjY03y7FFKVrY4W 5TrSIuh1L86Z1A4zWYTmRfx4PCuDiym+en/fZn7DQQswxEXHc4yG06/dbyLbLk9x8lS1 DhjAvSvKIg4Q+tCQ8syHGeJbGttZaIwssP4H354cRahqTaDGk1Iqc7ELE9gfBHv7TaFI mdSA== X-Forwarded-Encrypted: i=1; AJvYcCUQI/AC7rBWmeDiIbs7ulB0qGl4RFNlwfoUVMj3zyxN+QG+EboFOYYylCL/F/jyP7CyJISkp/ZgdF7C2AY=@vger.kernel.org X-Gm-Message-State: AOJu0YxxR8b7Td78IrdTqjVdXOvfkv1VftZ8fHRU7Jm59tZVGtBwV2r6 8yGZJWpd3omHE+grs77Oqui5XcLd2pnW6adzQEEGY3vroJJjcsBoESEH X-Gm-Gg: AY/fxX58vlvJuquIgpHv6m7NvnMXZJioYdZ4gBT0Uo0ng28cXj1AAfZBriDt3kTNoku u4L8XSzHgJ4gYEn3i2yMvAGV83D959B0TeWIY0tdExFIjzpwqnLJwCe4i+lzwgnQnxaZTRsLUxq clpzEwzdblRKtFHDnyweLVJAQzlXZg4ibIqQk5XDA5pW3pQ3u2q0gPKulLfKpbAEvF5xy6dWUv6 YT5K8KWXk08dEPV3WZw+ja8o6UtXjQDJbLnuumIn6wJq5LE/SAWrT98BZr5yHubBUGZWJvje3Pq dpwWqHPNe0ImQJIMbWtVEpL9F+tXzlyBjWs12FOoLkrOOB4TyTj+KtgmBMZQUs17LKMYioCWm8w 1DGK2LaAgRKh+p4bdveeZbYo4EHY0CYdnSO1/siwmldPCaFuVy8IWSGx2GUsZPtNcvbvDb2Wfum E3ghEfQEQUq58m4K2mFzqqhpPaprt0/gndPl8c5/AEfkPMiA3dLA16QdUlcoheg7gVpRq3BzVG X-Received: by 2002:a05:7300:dc85:b0:2ac:816:f31e with SMTP id 5a478bee46e88-2b6b410af48mr1251750eec.29.1768525523160; Thu, 15 Jan 2026 17:05:23 -0800 (PST) Received: from zcache.home.zacbowling.com ([2001:5a8:60d:bc9:f1d2:502c:a6ff:5556]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b6b367cbc9sm1019884eec.32.2026.01.15.17.05.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jan 2026 17:05:22 -0800 (PST) Sender: Zac Bowling From: Zac To: sean.wang@kernel.org Cc: deren.wu@mediatek.com, kvalo@kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-wireless@vger.kernel.org, lorenzo@kernel.org, nbd@nbd.name, linux@frame.work, ryder.lee@mediatek.com, sean.wang@mediatek.com, Zac Subject: [PATCH v4 00/21] wifi: mt76: mt7925/mt7921: stability and MLO fixes Date: Thu, 15 Jan 2026 17:04:58 -0800 Message-ID: <20260116010519.37001-1-zac@zacbowling.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series addresses stability issues in the mt7925 (WiFi 7) and mt7921 drivers, focusing on NULL pointer dereferences, mutex protection, and MLO (Multi-Link Operation) handling. Changes since v3: - Added mt7921 driver fixes (patches 18-19) to address mutex handling issues that also affected the older driver - Fixed mutex deadlocks in mt7921 suspend paths - the mutex was being acquired inside functions that were already called with mutex held - Added mt76 core fix for list corruption in mt76_wcid_cleanup (patch 20) that caused crashes during suspend/resume cycles - Added fix for BA session teardown during beacon loss (patch 21) which was causing mac80211 WARN in __ieee80211_stop_tx_ba_session - reported by Sean Wang The mt7921 mutex fixes (patches 18-19) correct improper mutex nesting where mt7921_roc_abort_sync() and mt7921_set_runtime_pm() were acquiring the mutex internally, but were called from paths that already held it (e.g., mt7921_mac_sta_remove via mt76_sta_remove, suspend handlers). The list corruption fix (patch 20) addresses a bug where mt76_wcid_cleanup() wasn't removing wcid entries from sta_poll_list before mt76_reset_device() reinitialized the master list, leaving stale pointers. The BA session fix (patch 21) makes the ieee80211_stop_tx_ba_cb_irqsafe() callback unconditional in IEEE80211_AMPDU_TX_STOP_CONT handling - the MCU command may fail during beacon loss but mac80211 must still be notified to complete the session teardown. More notes in https://github.com/zbowling/mt7925 Tested on MT7925 (RZ616) with kernel 6.18.5. Zac Bowling (21): wifi: mt76: mt7921: fix missing mutex protection in multiple paths wifi: mt76: mt7921: fix mutex deadlocks in multiple paths wifi: mt76: fix list corruption in mt76_wcid_cleanup wifi: mt76: mt7925: fix BA session teardown during beacon loss wifi: mt76: mt7925: fix NULL pointer dereference in vif iteration wifi: mt76: mt7925: fix missing mutex protection in reset and ROC abort wifi: mt76: mt7925: fix missing mutex protection in runtime PM and MLO PM wifi: mt76: mt7925: add NULL checks in MCU STA TLV functions wifi: mt76: mt7925: add NULL checks for link_conf and mlink in main.c wifi: mt76: mt7925: add error handling for AMPDU MCU commands wifi: mt76: mt7925: add error handling for BSS info MCU command in sta_add wifi: mt76: mt7925: add error handling for BSS info in key setup wifi: mt76: mt7925: add NULL checks in MLO link and chanctx functions wifi: mt76: mt792x: fix NULL pointer dereference in TX path wifi: mt76: mt7925: add lockdep assertions for mutex verification wifi: mt76: mt7925: fix key removal failure during MLO roaming wifi: mt76: mt7925: fix kernel warning in MLO ROC setup wifi: mt76: mt7925: add NULL checks for MLO link pointers in MCU functions wifi: mt76: mt792x: fix firmware reload failure after previous load crash wifi: mt76: mt7925: add mutex protection in resume path wifi: mt76: mt7925: add NULL checks in link station and TX queue setup drivers/net/wireless/mediatek/mt76/mac80211.c | 10 ++ .../net/wireless/mediatek/mt76/mt7921/mac.c | 2 + .../net/wireless/mediatek/mt76/mt7921/main.c | 8 ++ .../net/wireless/mediatek/mt76/mt7921/pci.c | 2 + .../net/wireless/mediatek/mt76/mt7921/sdio.c | 2 + .../net/wireless/mediatek/mt76/mt7925/mac.c | 8 ++ .../net/wireless/mediatek/mt76/mt7925/main.c | 125 ++++++++++++++---- .../net/wireless/mediatek/mt76/mt7925/mcu.c | 48 +++++-- .../net/wireless/mediatek/mt76/mt7925/pci.c | 4 + .../net/wireless/mediatek/mt76/mt792x_core.c | 27 +++- 10 files changed, 203 insertions(+), 33 deletions(-) -- 2.52.0