diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-03-10 15:28:49 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-03-10 15:28:49 +0000 |
commit | 3057de029e6233fed234363823a74eccfcdcbe67 (patch) | |
tree | 1630146f80ad9986327fc922c8dd234496abd457 /sys/dev | |
parent | 648291fbd159104120b968b3719fe9580e45965f (diff) |
Convert to if_input().
Tested and ok sthen@, ok dlg@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_bnx.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c index 476d34e6c06..8774cfcf988 100644 --- a/sys/dev/pci/if_bnx.c +++ b/sys/dev/pci/if_bnx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bnx.c,v 1.109 2015/01/27 03:17:36 dlg Exp $ */ +/* $OpenBSD: if_bnx.c,v 1.110 2015/03/10 15:28:48 mpi Exp $ */ /*- * Copyright (c) 2006 Broadcom Corporation @@ -4274,6 +4274,7 @@ bnx_rx_intr(struct bnx_softc *sc) { struct status_block *sblk = sc->status_block; struct ifnet *ifp = &sc->arpcom.ac_if; + struct mbuf_list ml = MBUF_LIST_INITIALIZER(); u_int16_t hw_cons, sw_cons, sw_chain_cons; u_int16_t sw_prod, sw_chain_prod; u_int32_t sw_prod_bseq; @@ -4412,9 +4413,6 @@ bnx_rx_intr(struct bnx_softc *sc) /* Adjust the pckt length to match the received data. */ m->m_pkthdr.len = m->m_len = len; - /* Send the packet to the appropriate interface. */ - m->m_pkthdr.rcvif = ifp; - DBRUN(BNX_VERBOSE_RECV, struct ether_header *eh; eh = mtod(m, struct ether_header *); @@ -4493,19 +4491,9 @@ bnx_rx_int_next_rx: if (m) { sc->rx_cons = sw_cons; -#if NBPFILTER > 0 - /* - * Handle BPF listeners. Let the BPF - * user see the packet. - */ - if (ifp->if_bpf) - bpf_mtap_ether(ifp->if_bpf, m, - BPF_DIRECTION_IN); -#endif - DBPRINT(sc, BNX_VERBOSE_RECV, "%s(): Passing received frame up.\n", __FUNCTION__); - ether_input_mbuf(ifp, m); + ml_enqueue(&ml, m); DBRUNIF(1, sc->rx_mbuf_alloc--); sw_cons = sc->rx_cons; @@ -4538,6 +4526,8 @@ bnx_rx_int_next_rx: sc->rx_bd_chain_map[i]->dm_mapsize, BUS_DMASYNC_PREWRITE); + if_input(ifp, &ml); + DBPRINT(sc, BNX_INFO_RECV, "%s(exit): rx_prod = 0x%04X, " "rx_cons = 0x%04X, rx_prod_bseq = 0x%08X\n", __FUNCTION__, sc->rx_prod, sc->rx_cons, sc->rx_prod_bseq); |