From 60ec8c52146714cb0b302a322253c985aa1ec8be Mon Sep 17 00:00:00 2001 From: jsing Date: Sat, 11 Apr 2015 14:40:42 +0000 Subject: [PATCH] Convert lii(4) to if_input(). ok mpi@ --- sys/dev/pci/if_lii.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sys/dev/pci/if_lii.c b/sys/dev/pci/if_lii.c index 121fa26f6fb..519d9e80806 100644 --- a/sys/dev/pci/if_lii.c +++ b/sys/dev/pci/if_lii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lii.c,v 1.35 2015/03/14 03:38:48 jsg Exp $ */ +/* $OpenBSD: if_lii.c,v 1.36 2015/04/11 14:40:42 jsing Exp $ */ /* * Copyright (c) 2007 The NetBSD Foundation. @@ -893,6 +893,7 @@ lii_intr(void *v) void lii_rxintr(struct lii_softc *sc) { + struct mbuf_list ml = MBUF_LIST_INITIALIZER(); struct ifnet *ifp = &sc->sc_ac.ac_if; struct rx_pkt *rxp; struct mbuf *m; @@ -929,20 +930,16 @@ lii_rxintr(struct lii_softc *sc) } } - m->m_pkthdr.rcvif = ifp; /* Copy the packet withhout the FCS */ m->m_pkthdr.len = m->m_len = size; memcpy(mtod(m, void *), &rxp->rxp_data[0], size); ++ifp->if_ipackets; -#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); } + if_input(ifp, &ml); + LII_WRITE_4(sc, LII_MB_RXD_RD_IDX, sc->sc_rxcur); } -- 2.20.1