From nobody Mon May 25 08:13:46 2026 Received: from out-173.mta0.migadu.com (out-173.mta0.migadu.com [91.218.175.173]) (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 847B2340260 for ; Fri, 15 May 2026 18:39:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778870383; cv=none; b=lcQwqZseqrAIMY81GwlpR2Xy2Y+uphLSKJC+othMixW+2S2PrwYPE64Pj02zmf5au+bzmzwm6dlzK9OLBYxLLJ/FZG69G4FMnOB/ZNF/T8uEImZHZkDcG/mS4TUeHPi8v//tcQ5UO4rWjRHxP8If3AE/IsjOghecWQMzLcLr0Kk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778870383; c=relaxed/simple; bh=EKxsl5E2M8E7QMXwaS5Z8b0/PEJ1bez4Bgf7i4lbFpg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZZs0LiYA8AQvSHag8Mo5oozEi9EXvYkGj1tAskyMdoBoAAUPDFfnJh/Xxj75V18Lo47y6ZYnnN+5j6qSGlcHMOg+kv/Cr+D4uMeuJJudqoBMf6qH4oJ0ve8LKdVD8diTISdYkJf7GTtjmGdecVFB5cFx+wMGz3OfuGrzlAwjCO4= 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=dnaC/HaX; arc=none smtp.client-ip=91.218.175.173 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="dnaC/HaX" 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=1778870367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=U/jjmpLvObTvHV9hKFKnoUw9o9V/WxOQQ1aWJYolflY=; b=dnaC/HaXTrd1HN65qJlPNvodOGgPnHpnIbq9bzDw81zwAz1zH+NGN5gmwyBSeZRcMsy9Zj MhPGbLHqPDKi7mCObKhZo1Vm911TPoreaxJYuMB3fOm4IwGsHrnj5bHB/e7UUSMEM29aqy GnA1iUzT+nwlunVnEOq0CpDvbL7OHRsd8l7M31Evn1s5tTU9QWGS8hR5638rfxMc9DZx8y WNFZycEzjsfFT6EkifMG5efww8+Fg/hKjLbQ59zW9VVgNPBlRQVew3weDdvnvEdIz/8ufs irgwAn4CR88QCoV4FZOE0poXnrEsMH0ul99FGlhXB7dwrGZo1gExJu2iAsewug== From: Devin Wittmayer To: linux-wireless@vger.kernel.org Cc: Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Sean Wang , Deren Wu , Nick Morrow , linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] wifi: mt76: mt7921: assert sniffer on chanctx change Date: Fri, 15 May 2026 11:39:21 -0700 Message-ID: <20260515183921.23484-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-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" mt7921_change_chanctx() configures the channel for monitor vifs but does not re-assert sniffer mode. mt7925_change_chanctx() does. Match mt7925 by adding the missing mt7921_mcu_set_sniffer(true) call, completing the architectural pattern from commit 914189af23b8 ("wifi: mt76: mt7921: fix channel switch fail in monitor mode"). The user-visible regression this asymmetry produced on v6.17 and v6.18 was addressed by commit cdb2941a516c ("Revert "wifi: mt76: mt792x: improve monitor interface handling"") in v6.19 and backported to the 6.17.y and 6.18.y stable trees. This patch is defense in depth in case the NO_VIRTUAL_MONITOR change is reintroduced in a future series. Tested-by: Nick Morrow Tested-on: RasPi4B, RasPiOS 64 bit, Alfa AWUS036AXML mt7921u Tested-on: RasPi4B, RasPiOS 64 bit, Netgear A9000 mt7925u Signed-off-by: Devin Wittmayer diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c b/drivers/net= /wireless/mediatek/mt76/mt7921/main.c index 3d74fabe7408..fec9ab577dd1 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c @@ -1405,10 +1405,12 @@ mt7921_change_chanctx(struct ieee80211_hw *hw, vif =3D container_of((void *)mvif, struct ieee80211_vif, drv_priv); =20 mt792x_mutex_acquire(phy->dev); - if (vif->type =3D=3D NL80211_IFTYPE_MONITOR) + if (vif->type =3D=3D NL80211_IFTYPE_MONITOR) { + mt7921_mcu_set_sniffer(mvif->phy->dev, vif, true); mt7921_mcu_config_sniffer(mvif, ctx); - else + } else { mt76_connac_mcu_uni_set_chctx(mvif->phy->mt76, &mvif->bss_conf.mt76, ctx= ); + } mt792x_mutex_release(phy->dev); } =20 --=20 2.54.0