From nobody Mon May 25 05:56:13 2026 Received: from out-183.mta1.migadu.com (out-183.mta1.migadu.com [95.215.58.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 715C42ED84A for ; Mon, 18 May 2026 06:40:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.183 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779086453; cv=none; b=Neo8lMyXXoCw955alQRXj20FuxnnNglz47o4HC58j3sZ4p2eQFkDcYLzpWnCqqrjROfFgsHj0TE8AlRC2U/B0qN3aMCqa2oRj3asbifmFJ5U837qYsJw77TCRXQl59pYujm+sL2T5m97jH6xrDFxgoaWnl8O+HOVoQARkCZgwyE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779086453; c=relaxed/simple; bh=YHRq+gi0pffDdIfST7DIUPvZU9ThdMH7EpDObUpfKGc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FEahAIcVpM8TiO432Zc4Do9SeFXyRXFnfrWhwYzSa08NO6QxSZvWQqmEOmtegNttLUOM++rjxVlm1vl6FsEzvCALWGOaFqu2C1/yZsbLJ77451Q/J4lLW3n4nwzHQjigQYwzFW9LeSBiVSyEsMmVUEuF3ALDLoeO3SiF5NXfR0U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=justthetip.ca; spf=pass smtp.mailfrom=justthetip.ca; dkim=pass (2048-bit key) header.d=justthetip.ca header.i=@justthetip.ca header.b=g7p1W7id; arc=none smtp.client-ip=95.215.58.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=justthetip.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=justthetip.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=justthetip.ca header.i=@justthetip.ca header.b="g7p1W7id" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=justthetip.ca; s=key1; t=1779086447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kdvIk0fZuJ839TqU7mVfww9i4xSZEiHt4UabatdeTQQ=; b=g7p1W7idaRLqiE+ZCoaNNYXrmQ1TznsDL1BTGhWobx0dbsr+7CnyToFZJl2wjAJAeV8Wrt AKEhTc1Z/yPNNXM3CtaXXEro//yxYw+8Qm5b5PjJwe7S/Is/mk+/rC4GcRZLksmbYco0Ul gkiQW4VDCLvAcubODEij+54mBzDqpabnPqPI6HhbQ09rYopPlSb3gBg37MNEXYGgfAFlaj aZKEpE5WMpOV9c0KOPyWa5OFZvKEj6UhtJYUf7cTZwVRsNRdeY9G2nFeRcTSg5fNmjWrj5 /YZxJ6Wvh0MhRjN8mPGaqwF/CvpM7XJ8N4Ac+uJs9W7Q/K0UbX34EwNzc7iHvg== From: Devin Wittmayer To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Felix Fietkau , Lorenzo Bianconi , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Oscar Alfonso Diaz , fjhhz1997@gmail.com, Devin Wittmayer Subject: [PATCH v2 1/1] wifi: mac80211: fix monitor mode frame capture for real chanctx drivers Date: Sun, 17 May 2026 23:40:25 -0700 Message-ID: <20260518064025.96792-1-lucid_duck@justthetip.ca> In-Reply-To: <20260518063853.96384-1-lucid_duck@justthetip.ca> References: <20260518063853.96384-1-lucid_duck@justthetip.ca> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT From: =E5=82=85=E7=BB=A7=E6=99=97 Commit d594cc6f2c58 ("wifi: mac80211: restore non-chanctx injection behaviour") restored the monitor injection fallback for drivers using chanctx emulation but explicitly deferred the harder case of drivers that transitioned to real chanctx ops. mt76 falls in that category and still drops every injected frame when monitor coexists with another interface. When the monitor has no chanctx of its own and exactly one chanctx is in flight, fall back to that one. Otherwise refuse: picking arbitrarily across multiple chanctxs would inject onto an unrelated channel. Reran the airgeddon evil-twin flow (hostapd AP + coexisting monitor VIF on the same phy + aireplay-ng deauth from the monitor) against this patch on mt7921e PCIe and mt7921u USB, across both 2.4 GHz and 5 GHz, and again on a Kali Linux VM with MT7921U USB-passthrough as the closest match to the original reporter's setup. None of those reproduced the hang reported against the earlier attempt at the same fix (<20251216111909.25076-2-johannes@sipsolutions.net>) or against v1 on lore in March 2026. Cc: stable@vger.kernel.org # 6.9+ Reported-by: Oscar Alfonso Diaz Tested-by: Devin Wittmayer Fixes: 0a44dfc07074 ("wifi: mac80211: simplify non-chanctx drivers") Link: https://github.com/morrownr/USB-WiFi/issues/682 Signed-off-by: =E5=82=85=E7=BB=A7=E6=99=97 Signed-off-by: Devin Wittmayer --- net/mac80211/tx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -2402,6 +2402,10 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_b= uff *skb, chandef =3D &chanctx_conf->def; else if (local->emulate_chanctx) chandef =3D &local->hw.conf.chandef; + else if (list_is_singular(&local->chanctx_list)) + chandef =3D &list_first_entry(&local->chanctx_list, + struct ieee80211_chanctx, + list)->conf.def; else goto fail_rcu; =20 --=20 2.54.0