diff options
author | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2006-04-16 00:46:33 +0000 |
---|---|---|
committer | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2006-04-16 00:46:33 +0000 |
commit | 3cefa904cb30201736ca7b139bb5ec896e966c4f (patch) | |
tree | 0e92c7858ea26163fa38391622cf979f9eac5633 /sys/dev/isa/if_hp.c | |
parent | bc46925c7b72513db44862add8b48c8812e0f00f (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/dev/isa/if_hp.c')
-rw-r--r-- | sys/dev/isa/if_hp.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/sys/dev/isa/if_hp.c b/sys/dev/isa/if_hp.c index 30487d2e7d6..8b01470c392 100644 --- a/sys/dev/isa/if_hp.c +++ b/sys/dev/isa/if_hp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_hp.c,v 1.16 2006/03/25 22:41:44 djm Exp $ */ +/* $OpenBSD: if_hp.c,v 1.17 2006/04/16 00:46:32 pascoe Exp $ */ /* $NetBSD: if_hp.c,v 1.21 1995/12/24 02:31:31 mycroft Exp $ */ /* XXX THIS DRIVER IS BROKEN. IT WILL NOT EVEN COMPILE. */ @@ -800,16 +800,24 @@ hpread(ns, buf, len) BPF_DIRECTION_IN); #endif /* - * Pull packet off interface. Off is nonzero if packet - * has trailing header; hpget will then force this header - * information to be at the front, but we still have to drop - * the type and length which are at the front of any trailer data. - */ + * Pull packet off interface. Off is nonzero if packet + * has trailing header; hpget will then force this header + * information to be at the front, but we still have to drop + * the type and length which are at the front of any trailer data. + */ m = hpget(buf, len, off, &ns->ns_if); if (m == 0) return; - ether_input(&ns->ns_if, eh, m); + /* + * XXX I don't understand the implications of ETHERTYPE_TRAIL. + * Just prepend the "fixed" ethernet header to the mbuf chain. + */ + M_PREPEND(m, sizeof(*eh), M_DONTWAIT); + if (m == 0) + return; + *mtod(m, struct ether_header *) = *eh; + ether_input_mbuf(&ns->ns_if, m); } /* * Supporting routines |