diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-03-18 13:33:56 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-03-18 13:33:56 +0000 |
commit | 48d9f1e388725c3bfe00a151f512708ca04fb70e (patch) | |
tree | 11b16890061f17319d4cef1bc83fcd86ed4fe053 | |
parent | 3255cf434614136f13b51ce22681186ac65b0a3b (diff) |
Convert to if_input(), tested by jsing@.
-rw-r--r-- | sys/arch/armv7/imx/imxenet.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/arch/armv7/imx/imxenet.c b/sys/arch/armv7/imx/imxenet.c index 67e9bca230d..66c442bbe72 100644 --- a/sys/arch/armv7/imx/imxenet.c +++ b/sys/arch/armv7/imx/imxenet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imxenet.c,v 1.10 2015/01/17 02:57:16 jsg Exp $ */ +/* $OpenBSD: imxenet.c,v 1.11 2015/03/18 13:33:55 mpi Exp $ */ /* * Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se> * @@ -859,6 +859,7 @@ void imxenet_recv(struct imxenet_softc *sc) { struct ifnet *ifp = &sc->sc_ac.ac_if; + struct mbuf_list ml = MBUF_LIST_INITIALIZER(); bus_dmamap_sync(sc->rbdma.dma_tag, sc->rbdma.dma_map, 0, sc->rbdma.dma_size, @@ -879,7 +880,6 @@ imxenet_recv(struct imxenet_softc *sc) } ifp->if_ipackets++; - m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = m->m_len = sc->rx_desc_base[sc->cur_rx].data_length; m_adj(m, ETHER_ALIGN); @@ -903,17 +903,14 @@ imxenet_recv(struct imxenet_softc *sc) else sc->cur_rx++; - /* push the packet up */ -#if NBPFILTER > 0 - if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN); -#endif - ether_input_mbuf(ifp, m); + ml_enqueue(&ml, m); } done: /* rx descriptors are ready */ HWRITE4(sc, ENET_RDAR, ENET_RDAR_RDAR); + + if_input(ifp, &ml); } int |