Date: Thu, 23 Mar 2017 04:34:25 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315778 - head/sys/dev/iwm Message-ID: <201703230434.v2N4YPlf001674@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Thu Mar 23 04:34:25 2017 New Revision: 315778 URL: https://svnweb.freebsd.org/changeset/base/315778 Log: [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. Obtained from: dragonflybsd.git 96eaecf93d9f731459a0df8efc72cfad034320bd Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Thu Mar 23 04:33:15 2017 (r315777) +++ head/sys/dev/iwm/if_iwm.c Thu Mar 23 04:34:25 2017 (r315778) @@ -3179,9 +3179,6 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, 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", @@ -3218,6 +3215,9 @@ iwm_mvm_rx_rx_mpdu(struct iwm_softc *sc, 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703230434.v2N4YPlf001674>