From nobody Thu Jun 19 16:32:39 2025 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 4bNR3W69CVz5yslp; Thu, 19 Jun 2025 16:32:39 +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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bNR3W5hgPz3Kt8; Thu, 19 Jun 2025 16:32:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750350759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0L9GwqAJiWbqoIjoVqKnkIOh3Dlqaqrp7I6zhj6XnE=; b=J4AIq81pGab8D3t9mJ6PrULD/f27f0Vw0MfjB86aCb0odXrGGYF6zoLtapotjBM4+wB/ad +rAoxPH9BoTHCQYZaq8aCWYM7zL7ybKQJJsPOdo0vfsTZ6IMHSpW0mzLR6Ef9kLgjJ1AcB ZFwlY1jYe7DZ1I/iH0XPOlSoASq31tBlOoLJTsdCG9l+MVd1dTCovtoa+k7ir2sBzbIfDI GGF9wz29Xs5vdXrXvOQwERXSttCFNS4DIqKAmImaRTqgbn5LC4+94YsMq2V24SmvYIekci 6PBzYr723H/0c5EEgGrWyRTBs9dqPqEEJTzo+EtLk/+M1NHoxevezoEEznqDIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750350759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j0L9GwqAJiWbqoIjoVqKnkIOh3Dlqaqrp7I6zhj6XnE=; b=nwPUdU6E0NoXOBDainbIstbHd6iMy8Ia45qucPGy6Xg7MvKoW6JL1/zy1JVDGSrzCQWCuA YkAR86VA1XjrhVm8IahjEwCNoE+BxexBtaaD4iSEBwUZRpo7qjlLuru4aS9NxLLAO0TDyn Vztq0Fvsnva1Nc1X5vYiKyUWR9a3lBQ2PASs4Fgv0JY1U5BF6Rj6QCc33OnXsQUwVBia9R VPtN0/lTMDRgLMDCA7HCZoo5wU1VGF9d/daRP6okI/JU1mExD3wSXwWMwuOgHYZ4PKkjaE SSe5/+C7RXpO69GrYPeVRPQTlwQekxRGXZHurnO87k8xH55pFtHl/dSjP8i1mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1750350759; a=rsa-sha256; cv=none; b=ocE6+rN2I6070pEeGk2f+6jswhWHN0sAr/x0XwDGhtB10q7ZBpT87q1BEI7ZxkN+LDzeiD opg6G1mvFfOMxIf0btrnXGZp9J7p9VMWiCMmcvYtTEzvZRqiZPy2W5T/6xoCeMKAJ2UTqX Mb3QZg6mEn8pqcpTMQ6Y3WxsANcEEa8JRxcM7j+Vc5aF6/RWuPgfivWqJY/Y8YHH/rmabz SoB5XuPcA6XXmXs5LKHofwxAW2rcqM5TZZtVwbyPpigMrrrI/YwJ8/kj1ZhgQ1uyn0TmIq IK18q/T2+j5nKzeamCT9MrCCafPsEtm2dFISAw+I98yLsiW5xVu22UV9khKfrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bNR3W5GxJz1LXt; Thu, 19 Jun 2025 16:32:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 55JGWdCZ047585; Thu, 19 Jun 2025 16:32:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55JGWd9Q047582; Thu, 19 Jun 2025 16:32:39 GMT (envelope-from git) Date: Thu, 19 Jun 2025 16:32:39 GMT Message-Id: <202506191632.55JGWd9Q047582@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: be57603c4657 - main - iwx: correct chain number reporting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be57603c46572dea2bdcab11a280973aaec79b0f Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=be57603c46572dea2bdcab11a280973aaec79b0f commit be57603c46572dea2bdcab11a280973aaec79b0f Author: Bjoern A. Zeeb AuthorDate: 2025-06-19 00:55:27 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-06-19 16:32:28 +0000 iwx: correct chain number reporting There is no point in assigning the channel index to the number of chains for the RX status reporting. The value was not tagged as being used. Rather than simply removing it try to fix it and set the flag if we get a value. Sposnored by: The FreeBSD Foundation Reviewed by: thj Differential Revision: https://reviews.freebsd.org/D50926 --- sys/dev/iwx/if_iwx.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c index a0e4bf8a53f6..5a320f3855e3 100644 --- a/sys/dev/iwx/if_iwx.c +++ b/sys/dev/iwx/if_iwx.c @@ -4194,6 +4194,19 @@ iwx_rxmq_get_signal_strength(struct iwx_softc *sc, return MAX(energy_a, energy_b); } +static int +iwx_rxmq_get_chains(struct iwx_softc *sc, + struct iwx_rx_mpdu_desc *desc) +{ + + if (sc->sc_device_family >= IWX_DEVICE_FAMILY_AX210) + return ((desc->v3.rate_n_flags & IWX_RATE_MCS_ANT_AB_MSK) >> + IWX_RATE_MCS_ANT_POS); + else + return ((desc->v1.rate_n_flags & IWX_RATE_MCS_ANT_AB_MSK) >> + IWX_RATE_MCS_ANT_POS); +} + static void iwx_rx_rx_phy_cmd(struct iwx_softc *sc, struct iwx_rx_packet *pkt, struct iwx_rx_data *data) @@ -4637,7 +4650,9 @@ iwx_rx_mpdu_mq(struct iwx_softc *sc, struct mbuf *m, void *pktdata, chanidx <= 14 ? IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ); rxs.c_band = chanidx <= 14 ? IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ; rxs.c_rx_tsf = device_timestamp; - rxs.c_chain = chanidx; + rxs.c_chain = iwx_rxmq_get_chains(sc, desc); + if (rxs.c_chain != 0) + rxs.r_flags |= IEEE80211_R_C_CHAIN; /* rssi is in 1/2db units */ rxs.c_rssi = rssi * 2;