summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_aue.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-03-24 10:02:19 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-03-24 10:02:19 +0000
commita7a5ea034ba41dd582c5c2e4febd54f323dd614d (patch)
tree58081c857b43f420f19366626eaed95baa2079b3 /sys/dev/usb/if_aue.c
parent689eea7b074a8115472023acbaa4389b7673a5f3 (diff)
Convert to if_input(). Tested by jsg@ who found that at least one his
(newer) machine can't set the device in a configurated state. But this is a USB-related problem.
Diffstat (limited to 'sys/dev/usb/if_aue.c')
-rw-r--r--sys/dev/usb/if_aue.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c
index 3de28788c02..9ae414f18b5 100644
--- a/sys/dev/usb/if_aue.c
+++ b/sys/dev/usb/if_aue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_aue.c,v 1.97 2015/03/14 03:38:49 jsg Exp $ */
+/* $OpenBSD: if_aue.c,v 1.98 2015/03/24 10:02:18 mpi Exp $ */
/* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -1017,6 +1017,7 @@ aue_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
struct aue_softc *sc = c->aue_sc;
struct ifnet *ifp = GET_IFP(sc);
struct mbuf *m;
+ struct mbuf_list ml = MBUF_LIST_INITIALIZER();
u_int32_t total_len;
struct aue_rxpkt r;
int s;
@@ -1067,32 +1068,15 @@ aue_rxeof(struct usbd_xfer *xfer, void *priv, usbd_status status)
total_len -= ETHER_CRC_LEN + 4;
m->m_pkthdr.len = m->m_len = total_len;
ifp->if_ipackets++;
+ ml_enqueue(&ml, m);
- m->m_pkthdr.rcvif = ifp;
-
- s = splnet();
-
- /* XXX ugly */
if (aue_newbuf(sc, c, NULL) == ENOBUFS) {
ifp->if_ierrors++;
- goto done1;
+ goto done;
}
-#if NBPFILTER > 0
- /*
- * Handle BPF listeners. Let the BPF user see the packet, but
- * don't pass it up to the ether_input() layer unless it's
- * a broadcast packet, multicast packet, matches our ethernet
- * address or the interface is in promiscuous mode.
- */
- if (ifp->if_bpf)
- bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN);
-#endif
-
- DPRINTFN(10,("%s: %s: deliver %d\n", sc->aue_dev.dv_xname,
- __func__, m->m_len));
- ether_input_mbuf(ifp, m);
- done1:
+ s = splnet();
+ if_input(ifp, &ml);
splx(s);
done: