PERFORCE change 119878 for review
Hans Petter Selasky
hselasky at freebsd.org
Thu May 17 09:27:56 UTC 2007
Hi,
1) Maybe you should bump __FreeBSD_version when this is introduced into HEAD.
2) Are you sure that you want to do this?
If you look at the implementation of "m_adj()" for a negative number it is not
too efficient. With regard to "if_ural.c" it is faster to remove those bytes
at an earlier point. And then just never set M_HASFCS at all.
--HPS
>
> ==== //depot/projects/wifi/sys/dev/usb/if_ural.c#25 (text+ko) ====
>
> @@ -939,7 +939,6 @@
> /* finalize mbuf */
> m->m_pkthdr.rcvif = ifp;
> m->m_pkthdr.len = m->m_len = (le32toh(desc->flags) >> 16) & 0xfff;
> - m->m_flags |= M_HASFCS; /* h/w leaves FCS */
>
> if (bpf_peers_present(sc->sc_drvbpf)) {
> struct ural_rx_radiotap_header *tap = &sc->sc_rxtap;
> @@ -954,6 +953,9 @@
> bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_rxtap_len, m);
> }
>
> + /* Strip trailing 802.11 MAC FCS. */
> + m_adj(m, -IEEE80211_CRC_LEN);
> +
> wh = mtod(m, struct ieee80211_frame *);
> ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh);
>
>
--HPS
More information about the p4-projects
mailing list