summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-02-12 09:08:48 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-02-12 09:08:48 +0000
commitadceaad04f6fd5872996207d9bc5e69aa07f9584 (patch)
tree381dfaa90a95b215f3d09fd3eaea96b8ca7c69a8 /sys/dev
parent7467958c4a88e5dd558a5dad07fc43086dec54d7 (diff)
Convert to if_input().
ok dlg@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/fxp.c17
-rw-r--r--sys/dev/usb/if_url.c12
2 files changed, 11 insertions, 18 deletions
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c
index d636a4d4d7a..681773a1323 100644
--- a/sys/dev/ic/fxp.c
+++ b/sys/dev/ic/fxp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxp.c,v 1.118 2014/12/22 02:28:51 tedu Exp $ */
+/* $OpenBSD: fxp.c,v 1.119 2015/02/12 09:08:00 mpi Exp $ */
/* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */
/*
@@ -785,6 +785,7 @@ fxp_intr(void *arg)
{
struct fxp_softc *sc = arg;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
+ struct mbuf_list ml = MBUF_LIST_INITIALIZER();
u_int16_t statack;
bus_dmamap_t rxmap;
int claimed = 0;
@@ -911,15 +912,8 @@ rcvloop:
goto rcvloop;
}
- m->m_pkthdr.rcvif = ifp;
- m->m_pkthdr.len = m->m_len =
- total_len;
-#if NBPFILTER > 0
- if (ifp->if_bpf)
- bpf_mtap(ifp->if_bpf, m,
- BPF_DIRECTION_IN);
-#endif /* NBPFILTER > 0 */
- ether_input_mbuf(ifp, m);
+ m->m_pkthdr.len = m->m_len = total_len;
+ ml_enqueue(&ml, m);
}
goto rcvloop;
}
@@ -935,6 +929,9 @@ rcvloop:
}
}
+
+ if_input(ifp, &ml);
+
return (claimed);
}
diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c
index 90f3154febd..eb8941ed441 100644
--- a/sys/dev/usb/if_url.c
+++ b/sys/dev/usb/if_url.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_url.c,v 1.71 2014/12/22 02:28:52 tedu Exp $ */
+/* $OpenBSD: if_url.c,v 1.72 2015/02/12 09:08:47 mpi Exp $ */
/* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */
/*
* Copyright (c) 2001, 2002
@@ -912,6 +912,7 @@ url_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
struct url_chain *c = priv;
struct url_softc *sc = c->url_sc;
struct ifnet *ifp = GET_IFP(sc);
+ struct mbuf_list ml = MBUF_LIST_INITIALIZER();
struct mbuf *m;
u_int32_t total_len;
url_rxhdr_t rxhdr;
@@ -970,7 +971,7 @@ url_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
m = c->url_mbuf;
m->m_pkthdr.len = m->m_len = total_len;
- m->m_pkthdr.rcvif = ifp;
+ ml_enqueue(&ml, m);
s = splnet();
@@ -979,14 +980,9 @@ url_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
goto done1;
}
-#if NBPFILTER > 0
- if (ifp->if_bpf)
- bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN);
-#endif
-
DPRINTF(("%s: %s: deliver %d\n", sc->sc_dev.dv_xname,
__func__, m->m_len));
- ether_input_mbuf(ifp, m);
+ if_input(ifp, &ml);
done1:
splx(s);