From nobody Sun Nov 22 19:56:33 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jXfwL2kKxz6w0Xj for ; Sun, 22 Nov 2026 19:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXfwL0ZYdz4dZ2 for ; Sun, 22 Nov 2026 19:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795377394; 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; bh=20mXDCqawNam2bT2da9siXDEz5UKgA3riJYJYjjgd9I=; b=bE/tZHSHlJOyT2PWk+mpRSrZ1Pube2f4IyO3r/lt/hV2B7q9w829P23wuwF2xeG5m2wULb bSSkyTWoCT2hKUP3jTjoCze1J6gZXcICemiE7UzdaLhOycDptLc+x1wnds3VqZw+ziNujd +XgNgGrt02zc/Tz+FRvk8Juirbw2DAhIeWgaPzuIn5M8BfhxpYWZ8jpOjg9SAgpsOGGHUA a1KY4mhz3OZp6Le9Nz/Llt2gHBBjQUr7SedSvkK6w+1gR32T7ctsh5yfRaFPB03AtGNIcG ahv+/BU4UuCj2ubsUnKP0VlKPooGkYNkBqXaVh4tB6k6aTbqbk6N8ftU82T4kA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795377394; b=vIchkIOvGTFlZWxUfsNyefItbJ+Al4Tl4SEAU648mD3NzNF923Yg+8EGfHLMuyCNRo1+6h 9UV1zEjUXXZvhSG+ASSUuGBSHOvhZSU2H79DTrEovhW/ATG1LBWb80YnnJlNdXD9om8gmC Zfhmojb5TWps4DO0WW7/rbOpMc2jf8BQynQUyeecyMOQxGNQjA48YLVzLmp0Rk3SgonzO7 zvT34v8XpflfRnf0rWGsH3eGEbcXZXwyVXgQKv/Z21MnA3l+yf7WNc1sx3Zv7W94YWNe2C RpZ2ADPu5c+6zvqQzW9aXocpm9092/lhTXqiH6swpTNEnajqsQ6mZNW0AI1diA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795377394; 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; bh=20mXDCqawNam2bT2da9siXDEz5UKgA3riJYJYjjgd9I=; b=rx45CeZu/KueAla0oLb2i+MyWBh6w/bsuDqD1GZPAGvlXoo4XQPfD2kENEZ9EHqZtSR3vm YCzlpJ0HRQO1fu5mflxaKpwoVyWxgD31d+aIZx2JJs+EGUnT+kLKDpyq/KcF6GeLvAs2CY mMcxpbHXwP9QeVjkoPDFExoFPA+XX4OFI4O8q9wObbGFEGXrEDX2KUf1xGrJ5kGGbum58w dvzjxjKkBRc9glPAZPjSPovXBI5b1hpXNF9U9ICxrhfNVF12zNZoN6ajOMYzmi6tvzj1rs 9RxQVYLwsbZl9kGpNHzjjtame72KiL5PzsWfo9vCUxfKdD5BoCmv7xWLWBOd+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXfwK6FhrzHYP for ; Sun, 22 Nov 2026 19:56:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20f5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 22 Nov 2026 19:56:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Andriy Voskoboinyk From: Adrian Chadd Subject: git: b28bab975e2e - main - iwx: unbreak monitor mode support List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository 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: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b28bab975e2e378b43321ae0671bf15f1d8b7606 Auto-Submitted: auto-generated Date: Sun, 22 Nov 2026 19:56:33 +0000 Message-Id: <6b0348f1.20f5.54ae88cc@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=b28bab975e2e378b43321ae0671bf15f1d8b7606 commit b28bab975e2e378b43321ae0671bf15f1d8b7606 Author: Andriy Voskoboinyk AuthorDate: 2026-11-22 19:43:33 +0000 Commit: Adrian Chadd CommitDate: 2026-11-22 19:56:05 +0000 iwx: unbreak monitor mode support A bunch of changes that turns it into a working mode (at least for me) 1) Call iwx_auth instead of iwx_run on -> RUN transition in monitor mode. That's how it is intended to work because we never transition to the AUTH state in this mode and current implementation of iwx_run just results in endless 'firmware error' -> 'restart' loop. 2) Use ic_curchan instead of ic_bsschan while initializing NIC state; the last one contains ANYC channel in monitor mode. 3) Do not print 'input_all returned -1' message - ieee80211_input_mimo_all always returns -1 in monitor mode. 4) Always set IEEE80211_RADIOTAP_F_FCS in radiotap flags while in monitor mode. While header documentation states it is controlled by IWX_MAC_FILTER_IN_CRC32 flag in practice IWX_MAC_FILTER_IN_PROMISC appends it as well - and it is required since this is the only flag that allows to receive data and control frames. While it alone is enough I left other flags in place for smaller diff with other drivers. And drop duplicate call to ieee80211_add_rx_params, it is already called few lines above. Reviewed by: adrian Tested by: Idwer Differential Revision: https://reviews.freebsd.org/D61123 --- sys/dev/iwx/if_iwx.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c index 48413c8448ad..9034baec09a3 100644 --- a/sys/dev/iwx/if_iwx.c +++ b/sys/dev/iwx/if_iwx.c @@ -4471,6 +4471,9 @@ iwx_rx_frame(struct iwx_softc *sc, struct mbuf *m, int chanidx, uint8_t mcs, rate; tap->wr_flags = 0; + /* Enabled automatically in promiscuous mode. */ + if (vap->iv_opmode == IEEE80211_M_MONITOR) + tap->wr_flags |= IEEE80211_RADIOTAP_F_FCS; if (is_shortpre) tap->wr_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; tap->wr_chan_freq = @@ -4547,7 +4550,8 @@ iwx_rx_frame(struct iwx_softc *sc, struct mbuf *m, int chanidx, IWX_UNLOCK(sc); if (ni == NULL) { - if (ieee80211_input_mimo_all(ic, m) == -1) + if (ieee80211_input_mimo_all(ic, m) == -1 && + vap->iv_opmode != IEEE80211_M_MONITOR) printf("%s:%d input_all returned -1\n", __func__, __LINE__); } else { @@ -4755,8 +4759,6 @@ iwx_rx_mpdu_mq(struct iwx_softc *sc, struct mbuf *m, void *pktdata, return; } - ieee80211_add_rx_params(m, &rxs); - #if 0 if (iwx_rx_reorder(sc, m, chanidx, desc, (phy_info & IWX_RX_MPDU_PHY_SHORT_PREAMBLE), @@ -7614,7 +7616,7 @@ iwx_auth(struct ieee80211vap *vap, struct iwx_softc *sc) if (ic->ic_opmode == IEEE80211_M_MONITOR) { err = iwx_phy_ctxt_update(sc, &sc->sc_phyctxt[0], - ic->ic_bsschan, 1, 1, 0, IEEE80211_HTOP0_SCO_SCN, + ic->ic_curchan, 1, 1, 0, IEEE80211_HTOP0_SCO_SCN, IEEE80211_VHTOP0_CHAN_WIDTH_HT); if (err) return err; @@ -8124,7 +8126,11 @@ iwx_newstate_sub(struct ieee80211vap *vap, enum ieee80211_state nstate) break; case IEEE80211_S_RUN: - err = iwx_run(vap, sc); + if (ic->ic_opmode == IEEE80211_M_MONITOR) { + err = iwx_auth(vap, sc); + } else { + err = iwx_run(vap, sc); + } break; default: break;