From 231bdb704d715500b7a76e1e9196090594d91eb1 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Wed, 8 Dec 1999 22:46:11 +0000 Subject: fix mbuf chain allocation to comply with m_devget() way. --- sys/arch/sparc/dev/qe.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sys/arch/sparc/dev') 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 = ⊤ -- cgit v1.2.3