diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-04-07 14:59:07 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-04-07 14:59:07 +0000 |
commit | 31334fc7df06a24a483d10d4cc9b83ec90bb29f1 (patch) | |
tree | 8343e59b03ce6927c0d4ed8dcf78fa12f1e249e5 /sys/dev | |
parent | f4de3c1ed2cb9f4d979d70304112128a738aa423 (diff) |
Keep in sync with the sparc version: convert to if_input().
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/sbus/be.c | 17 | ||||
-rw-r--r-- | sys/dev/sbus/qe.c | 17 |
2 files changed, 8 insertions, 26 deletions
diff --git a/sys/dev/sbus/be.c b/sys/dev/sbus/be.c index 7e1de9faeeb..3beb83baf55 100644 --- a/sys/dev/sbus/be.c +++ b/sys/dev/sbus/be.c @@ -1,4 +1,4 @@ -/* $OpenBSD: be.c,v 1.28 2014/12/22 02:28:52 tedu Exp $ */ +/* $OpenBSD: be.c,v 1.29 2015/04/07 14:59:06 mpi Exp $ */ /* $NetBSD: be.c,v 1.26 2001/03/20 15:39:20 pk Exp $ */ /*- @@ -478,7 +478,6 @@ be_put(struct be_softc *sc, int idx, struct mbuf *m) static __inline__ struct mbuf * be_get(struct be_softc *sc, int idx, int totlen) { - struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct mbuf *m; struct mbuf *top, **mp; int len, pad, boff = 0; @@ -489,7 +488,6 @@ be_get(struct be_softc *sc, int idx, int totlen) MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) return (NULL); - m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = totlen; pad = ALIGN(sizeof(struct ether_header)) - sizeof(struct ether_header); @@ -530,6 +528,7 @@ static __inline__ void be_read(struct be_softc *sc, int idx, int len) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; + struct mbuf_list ml = MBUF_LIST_INITIALIZER(); struct mbuf *m; if (len <= sizeof(struct ether_header) || @@ -552,16 +551,8 @@ be_read(struct be_softc *sc, int idx, int len) } ifp->if_ipackets++; -#if NBPFILTER > 0 - /* - * Check if there's a BPF listener on this interface. - * If so, hand off the raw packet to BPF. - */ - if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN); -#endif - /* Pass the packet up. */ - ether_input_mbuf(ifp, m); + ml_enqueue(&ml, m); + if_input(ifp, &ml); } /* diff --git a/sys/dev/sbus/qe.c b/sys/dev/sbus/qe.c index ce51ab3535f..481e0749269 100644 --- a/sys/dev/sbus/qe.c +++ b/sys/dev/sbus/qe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qe.c,v 1.27 2014/12/22 02:28:52 tedu Exp $ */ +/* $OpenBSD: qe.c,v 1.28 2015/04/07 14:59:06 mpi Exp $ */ /* $NetBSD: qe.c,v 1.16 2001/03/30 17:30:18 christos Exp $ */ /*- @@ -318,7 +318,6 @@ qe_get(sc, idx, totlen) struct qe_softc *sc; int idx, totlen; { - struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct mbuf *m; struct mbuf *top, **mp; int len, pad, boff = 0; @@ -329,7 +328,6 @@ qe_get(sc, idx, totlen) MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) return (NULL); - m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = totlen; pad = ALIGN(sizeof(struct ether_header)) - sizeof(struct ether_header); m->m_data += pad; @@ -401,6 +399,7 @@ qe_read(sc, idx, len) int idx, len; { struct ifnet *ifp = &sc->sc_arpcom.ac_if; + struct mbuf_list ml = MBUF_LIST_INITIALIZER(); struct mbuf *m; if (len <= sizeof(struct ether_header) || @@ -423,16 +422,8 @@ qe_read(sc, idx, len) } ifp->if_ipackets++; -#if NBPFILTER > 0 - /* - * Check if there's a BPF listener on this interface. - * If so, hand off the raw packet to BPF. - */ - if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN); -#endif - /* Pass the packet up. */ - ether_input_mbuf(ifp, m); + ml_enqueue(&ml, m); + if_input(ifp, &ml); } /* |