Date: Thu, 19 Jun 2025 16:32:39 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: be57603c4657 - main - iwx: correct chain number reporting Message-ID: <202506191632.55JGWd9Q047582@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=be57603c46572dea2bdcab11a280973aaec79b0f commit be57603c46572dea2bdcab11a280973aaec79b0f Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2025-06-19 00:55:27 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202506191632.55JGWd9Q047582>