summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorChristopher Pascoe <pascoe@cvs.openbsd.org>2006-04-16 00:46:33 +0000
committerChristopher Pascoe <pascoe@cvs.openbsd.org>2006-04-16 00:46:33 +0000
commit3cefa904cb30201736ca7b139bb5ec896e966c4f (patch)
tree0e92c7858ea26163fa38391622cf979f9eac5633 /sys/arch/sparc
parentbc46925c7b72513db44862add8b48c8812e0f00f (diff)
Convert the last remaining net-driver users of ether_input to ether_input_mbuf.
sgec ok martin@ if_ie ok miod@ if_de, if_hp not in GENERIC ok brad@
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/dev/if_ie.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/sys/arch/sparc/dev/if_ie.c b/sys/arch/sparc/dev/if_ie.c
index 8e254a13a70..b0472a0cde1 100644
--- a/sys/arch/sparc/dev/if_ie.c
+++ b/sys/arch/sparc/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.34 2006/03/25 22:41:41 djm Exp $ */
+/* $OpenBSD: if_ie.c,v 1.35 2006/04/16 00:46:32 pascoe Exp $ */
/* $NetBSD: if_ie.c,v 1.33 1997/07/29 17:55:38 fair Exp $ */
/*-
@@ -1114,7 +1114,7 @@ ieget(sc, mp, ehp, to_bpf)
{
struct mbuf *m, *top, **mymp;
int i;
- int offset;
+ int offset = 0;
int totlen, resid;
int thismboff;
int head;
@@ -1142,7 +1142,6 @@ ieget(sc, mp, ehp, to_bpf)
sc->sc_arpcom.ac_if.if_ierrors--; /* just this case, it's not an error */
return -1;
}
- totlen -= (offset = sizeof *ehp);
MGETHDR(*mp, M_DONTWAIT, MT_DATA);
if (!*mp) {
@@ -1329,19 +1328,10 @@ ie_readframe(sc, num)
}
#if NBPFILTER > 0
- /*
- * Check for a BPF filter; if so, hand it up.
- * Note that we have to stick an extra mbuf up front, because bpf_mtap
- * expects to have the ether header at the front.
- * It doesn't matter that this results in an ill-formatted mbuf chain,
- * since BPF just looks at the data. (It doesn't try to free the mbuf,
- * tho' it will make a copy for tcpdump.)
- */
- if (bpf_gets_it) {
- /* Pass it up. */
- bpf_mtap_hdr(sc->sc_arpcom.ac_if.if_bpf, (caddr_t)&eh,
- sizeof(eh), m, BPF_DIRECTION_IN);
- }
+ /* Check for a BPF filter; if so, hand it up. */
+ if (bpf_gets_it)
+ bpf_mtap(sc->sc_arpcom.ac_if.if_bpf, m, BPF_DIRECTION_IN);
+
/*
* A signal passed up from the filtering code indicating that the
* packet is intended for BPF but not for the protocol machinery.
@@ -1364,7 +1354,7 @@ ie_readframe(sc, num)
/*
* Finally pass this packet up to higher layers.
*/
- ether_input(&sc->sc_arpcom.ac_if, &eh, m);
+ ether_input_mbuf(&sc->sc_arpcom.ac_if, m);
}
static void