diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-03-11 16:07:23 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-03-11 16:07:23 +0000 |
commit | 359198db15b4bf24205a89fb720cf1307ddeb758 (patch) | |
tree | b346da7fa5965cfb7e9cc0408afbb4f96daefc7d /sys/dev/usb | |
parent | 70b72dacea04582027924212687f2118e9dbc858 (diff) |
Convert to if_input().
Tested and ok armani@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/if_urndis.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/sys/dev/usb/if_urndis.c b/sys/dev/usb/if_urndis.c index d81f6487239..2c6c30ea6ed 100644 --- a/sys/dev/usb/if_urndis.c +++ b/sys/dev/usb/if_urndis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_urndis.c,v 1.52 2015/01/09 20:45:40 kettenis Exp $ */ +/* $OpenBSD: if_urndis.c,v 1.53 2015/03/11 16:07:22 mpi Exp $ */ /* * Copyright (c) 2010 Jonathan Armani <armani@openbsd.org> @@ -779,6 +779,7 @@ void urndis_decap(struct urndis_softc *sc, struct urndis_chain *c, u_int32_t len) { struct mbuf *m; + struct mbuf_list ml = MBUF_LIST_INITIALIZER(); struct urndis_packet_msg *msg; struct ifnet *ifp; int s; @@ -869,27 +870,20 @@ urndis_decap(struct urndis_softc *sc, struct urndis_chain *c, u_int32_t len) m->m_pkthdr.len = m->m_len = letoh32(msg->rm_datalen); ifp->if_ipackets++; - m->m_pkthdr.rcvif = ifp; - - s = splnet(); if (urndis_newbuf(sc, c) == ENOBUFS) { ifp->if_ierrors++; } else { - -#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); } - splx(s); offset += letoh32(msg->rm_len); len -= letoh32(msg->rm_len); } + + s = splnet(); + if_input(ifp, &ml); + splx(s); } int |