svn commit: r330194 - stable/11/sys/dev/iwm
Eitan Adler
eadler at FreeBSD.org
Thu Mar 1 06:25:04 UTC 2018
Author: eadler
Date: Thu Mar 1 06:25:03 2018
New Revision: 330194
URL: https://svnweb.freebsd.org/changeset/base/330194
Log:
MFC r315778:
[iwm] Move mbuf hacks after sanity checks in iwm_mvm_rx_rx_mpdu().
* This avoids leaving the mbuf in a weird state, when dropping a packet.
Modified:
stable/11/sys/dev/iwm/if_iwm.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/iwm/if_iwm.c
==============================================================================
--- stable/11/sys/dev/iwm/if_iwm.c Thu Mar 1 06:24:03 2018 (r330193)
+++ stable/11/sys/dev/iwm/if_iwm.c Thu Mar 1 06:25:03 2018 (r330194)
@@ -3179,9 +3179,6 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf *
len = le16toh(rx_res->byte_count);
rx_pkt_status = le32toh(*(uint32_t *)(pkt->data + sizeof(*rx_res) + len));
- m->m_data = pkt->data + sizeof(*rx_res);
- m->m_pkthdr.len = m->m_len = len;
-
if (__predict_false(phy_info->cfg_phy_cnt > 20)) {
device_printf(sc->sc_dev,
"dsp size out of range [0,20]: %d\n",
@@ -3217,6 +3214,9 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, struct mbuf *
__func__);
goto fail;
}
+
+ m->m_data = pkt->data + sizeof(*rx_res);
+ m->m_pkthdr.len = m->m_len = len;
IWM_DPRINTF(sc, IWM_DEBUG_RECV,
"%s: rssi=%d, noise=%d\n", __func__, rssi, sc->sc_noise);
More information about the svn-src-stable-11
mailing list