summaryrefslogtreecommitdiff
path: root/sys/arch/vax
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/vax
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/vax')
-rw-r--r--sys/arch/vax/if/if_de.c20
-rw-r--r--sys/arch/vax/if/if_qe.c10
-rw-r--r--sys/arch/vax/if/sgec.c6
3 files changed, 18 insertions, 18 deletions
diff --git a/sys/arch/vax/if/if_de.c b/sys/arch/vax/if/if_de.c
index bfbd73839ca..9071bb95413 100644
--- a/sys/arch/vax/if/if_de.c
+++ b/sys/arch/vax/if/if_de.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_de.c,v 1.18 2005/12/10 11:45:43 miod Exp $ */
+/* $OpenBSD: if_de.c,v 1.19 2006/04/16 00:46:32 pascoe Exp $ */
/* $NetBSD: if_de.c,v 1.27 1997/04/19 15:02:29 ragge Exp $ */
/*
@@ -542,11 +542,6 @@ deread(ds, ifrw, len)
struct ether_header *eh;
struct mbuf *m;
- /*
- * Deal with trailer protocol: if type is trailer type
- * get true type from first 16-bit word past data.
- * Remember that type was trailer by setting off.
- */
eh = (struct ether_header *)ifrw->ifrw_addr;
if (len == 0)
return;
@@ -557,8 +552,17 @@ deread(ds, ifrw, len)
* information to be at the front.
*/
m = if_ubaget(&ds->ds_deuba, ifrw, len, &ds->ds_if);
- if (m)
- ether_input(&ds->ds_if, eh, m);
+ if (m) {
+ /*
+ * XXX not exactly sure what if_ubaget does. Manually
+ * add the ethernet header to the start of the mbuf chain.
+ */
+ M_PREPEND(m, sizeof(*eh), M_DONTWAIT);
+ if (m) {
+ *mtod(m, struct ether_header *) = *eh;
+ ether_input_mbuf(&ds->ds_if, m);
+ }
+ }
}
/*
* Process an ioctl request.
diff --git a/sys/arch/vax/if/if_qe.c b/sys/arch/vax/if/if_qe.c
index 37214187496..dc9027a8c15 100644
--- a/sys/arch/vax/if/if_qe.c
+++ b/sys/arch/vax/if/if_qe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_qe.c,v 1.19 2006/03/25 22:41:42 djm Exp $ */
+/* $OpenBSD: if_qe.c,v 1.20 2006/04/16 00:46:32 pascoe Exp $ */
/* $NetBSD: if_qe.c,v 1.51 2002/06/08 12:28:37 ragge Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -581,11 +581,9 @@ qeintr(void *arg)
continue;
}
- if ((status1 & QE_ESETUP) == 0) {
- /* m_adj() the ethernet header out of the way and pass up */
- m_adj(m, sizeof(struct ether_header));
- ether_input(ifp, eh, m);
- } else
+ if ((status1 & QE_ESETUP) == 0)
+ ether_input_mbuf(ifp, m);
+ else
m_freem(m);
}
diff --git a/sys/arch/vax/if/sgec.c b/sys/arch/vax/if/sgec.c
index e47923cc0fd..3cea80f7648 100644
--- a/sys/arch/vax/if/sgec.c
+++ b/sys/arch/vax/if/sgec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sgec.c,v 1.10 2006/03/25 22:41:42 djm Exp $ */
+/* $OpenBSD: sgec.c,v 1.11 2006/04/16 00:46:32 pascoe Exp $ */
/* $NetBSD: sgec.c,v 1.5 2000/06/04 02:14:14 matt Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -449,9 +449,7 @@ sgec_intr(sc)
continue;
}
- /* m_adj() the ethernet header out of the way and pass up */
- m_adj(m, sizeof(struct ether_header));
- ether_input(ifp, eh, m);
+ ether_input_mbuf(ifp, m);
}
if (csr & ZE_NICSR5_TI) {