mirror of
https://github.com/opnsense/src.git
synced 2026-06-12 10:10:24 -04:00
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
This commit is contained in:
parent
c7fe7912a6
commit
be57603c46
1 changed files with 16 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue