diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-06-26 21:58:49 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2001-06-26 21:58:49 +0000 |
commit | 41e8b7393c45a4dcedd3de6ce2434478ea33d26d (patch) | |
tree | 43b2b22577d60341ffd120f2941fe2b5f729c03d /sys/arch/sparc | |
parent | 416f561c78b0eca90fdb484e72a96080b0825dca (diff) |
trivial ether_input_mbuf() conversions.
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r-- | sys/arch/sparc/dev/be.c | 10 | ||||
-rw-r--r-- | sys/arch/sparc/dev/hme.c | 11 | ||||
-rw-r--r-- | sys/arch/sparc/dev/qe.c | 11 |
3 files changed, 9 insertions, 23 deletions
diff --git a/sys/arch/sparc/dev/be.c b/sys/arch/sparc/dev/be.c index 455e3bb9c92..3ed88aaabc3 100644 --- a/sys/arch/sparc/dev/be.c +++ b/sys/arch/sparc/dev/be.c @@ -1,4 +1,4 @@ -/* $OpenBSD: be.c,v 1.26 2001/04/13 04:32:10 brad Exp $ */ +/* $OpenBSD: be.c,v 1.27 2001/06/26 21:58:47 fgsch Exp $ */ /* * Copyright (c) 1998 Theo de Raadt and Jason L. Wright. @@ -965,7 +965,6 @@ be_read(sc, idx, len) int idx, len; { struct ifnet *ifp = &sc->sc_arpcom.ac_if; - struct ether_header *eh; struct mbuf *m; if (len <= sizeof(struct ether_header) || @@ -988,8 +987,6 @@ be_read(sc, idx, len) } ifp->if_ipackets++; - /* We assume that the header fit entirely in one mbuf. */ - eh = mtod(m, struct ether_header *); #if NBPFILTER > 0 /* @@ -999,9 +996,8 @@ be_read(sc, idx, len) if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m); #endif - /* Pass the packet up, with the ether header sort-of removed. */ - m_adj(m, sizeof(struct ether_header)); - ether_input(ifp, eh, m); + /* Pass the packet up. */ + ether_input_mbuf(ifp, m); } /* diff --git a/sys/arch/sparc/dev/hme.c b/sys/arch/sparc/dev/hme.c index 5e81d2be22a..8392ae63e52 100644 --- a/sys/arch/sparc/dev/hme.c +++ b/sys/arch/sparc/dev/hme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hme.c,v 1.31 2001/02/20 19:39:34 mickey Exp $ */ +/* $OpenBSD: hme.c,v 1.32 2001/06/26 21:58:48 fgsch Exp $ */ /* * Copyright (c) 1998 Jason L. Wright (jason@thought.net) @@ -828,7 +828,6 @@ hme_read(sc, idx, len) int idx, len; { struct ifnet *ifp = &sc->sc_arpcom.ac_if; - struct ether_header *eh; struct mbuf *m; if (len <= sizeof(struct ether_header) || @@ -850,9 +849,6 @@ hme_read(sc, idx, len) ifp->if_ipackets++; - /* We assume that the header fit entirely in one mbuf. */ - eh = mtod(m, struct ether_header *); - #if NBPFILTER > 0 /* * Check if there's a BPF listener on this interface. @@ -861,9 +857,8 @@ hme_read(sc, idx, len) if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m); #endif - /* Pass the packet up, with the ether header sort-of removed. */ - m_adj(m, sizeof(struct ether_header)); - ether_input(ifp, eh, m); + /* Pass the packet up. */ + ether_input_mbuf(ifp, m); } /* diff --git a/sys/arch/sparc/dev/qe.c b/sys/arch/sparc/dev/qe.c index 4ee1d55337e..24d02053d54 100644 --- a/sys/arch/sparc/dev/qe.c +++ b/sys/arch/sparc/dev/qe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qe.c,v 1.15 2001/02/20 19:39:34 mickey Exp $ */ +/* $OpenBSD: qe.c,v 1.16 2001/06/26 21:58:48 fgsch Exp $ */ /* * Copyright (c) 1998, 2000 Jason L. Wright. @@ -779,7 +779,6 @@ qe_read(sc, idx, len) int idx, len; { struct ifnet *ifp = &sc->sc_arpcom.ac_if; - struct ether_header *eh; struct mbuf *m; if (len <= sizeof(struct ether_header) || @@ -802,9 +801,6 @@ qe_read(sc, idx, len) } ifp->if_ipackets++; - /* We assume that the header fit entirely in one mbuf. */ - eh = mtod(m, struct ether_header *); - #if NBPFILTER > 0 /* * Check if there's a BPF listener on this interface. @@ -813,9 +809,8 @@ qe_read(sc, idx, len) if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m); #endif - /* Pass the packet up, with the ether header sort-of removed. */ - m_adj(m, sizeof(struct ether_header)); - ether_input(ifp, eh, m); + /* Pass the packet up. */ + ether_input_mbuf(ifp, m); } /* |