summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>1999-12-08 22:46:11 +0000
committerJason Wright <jason@cvs.openbsd.org>1999-12-08 22:46:11 +0000
commit231bdb704d715500b7a76e1e9196090594d91eb1 (patch)
tree687168f349f5470cf2981426a6a629ca224716f8 /sys/arch/sparc/dev
parent27fbd6657926d9b0812927176ed9fd03f99615c1 (diff)
fix mbuf chain allocation to comply with m_devget() way.
Diffstat (limited to 'sys/arch/sparc/dev')
-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 = &top;