summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev/qe.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sparc/dev/qe.c')
-rw-r--r--sys/arch/sparc/dev/qe.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/sparc/dev/qe.c b/sys/arch/sparc/dev/qe.c
index 0fcd475b159..ec78dd83ea9 100644
--- a/sys/arch/sparc/dev/qe.c
+++ b/sys/arch/sparc/dev/qe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qe.c,v 1.7 1999/02/24 06:57:45 jason Exp $ */
+/* $OpenBSD: qe.c,v 1.8 1999/12/08 22:46:10 jason Exp $ */
/*
* Copyright (c) 1998 Jason L. Wright.
@@ -858,8 +858,14 @@ qe_get(sc, idx, totlen)
m->m_pkthdr.rcvif = ifp;
m->m_pkthdr.len = totlen;
pad = ALIGN(sizeof(struct ether_header)) - sizeof(struct ether_header);
+ len = MHLEN;
+ if (totlen >= MINCLSIZE) {
+ MCLGET(m, M_DONTWAIT);
+ if (m->m_flags & M_EXT)
+ len = MCLBYTES;
+ }
m->m_data += pad;
- len = MHLEN - pad;
+ len -= pad;
top = NULL;
mp = ⊤