summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_sk.c
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>1999-10-04 12:21:40 +0000
committerJason Wright <jason@cvs.openbsd.org>1999-10-04 12:21:40 +0000
commit21808fec30f437321a2582c0839a8eb16a3782e8 (patch)
tree84596aa8b0d01855ec976467a86a9275e1c7eb64 /sys/dev/pci/if_sk.c
parent20cfc030c42ad413445aa792d69d43d1d2e5f094 (diff)
m_new is the new mbuf, not m
fix calculation of buffer slot number
Diffstat (limited to 'sys/dev/pci/if_sk.c')
-rw-r--r--sys/dev/pci/if_sk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c
index 1ba91c4030b..0f9554752ba 100644
--- a/sys/dev/pci/if_sk.c
+++ b/sys/dev/pci/if_sk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sk.c,v 1.2 1999/10/03 13:06:30 jason Exp $ */
+/* $OpenBSD: if_sk.c,v 1.3 1999/10/04 12:21:39 jason Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -598,7 +598,7 @@ int sk_newbuf(sc_if, c, m)
m_new->m_len = m_new->m_pkthdr.len = SK_MCLBYTES;
m_new->m_data = m_new->m_ext.ext_buf;
}
- m->m_ext.ext_handle = sc_if;
+ m_new->m_ext.ext_handle = sc_if;
/*
* Adjust alignment so packet payload begins on a
@@ -759,7 +759,7 @@ sk_jfree(m)
/* calculate the slot this buffer belongs to */
- i = ((vaddr_t)aptr - (vaddr_t)sc_if->sk_cdata.sk_jumbo_buf) / SK_JLEN;
+ i = ((vaddr_t)buf - (vaddr_t)sc_if->sk_cdata.sk_jumbo_buf) / SK_JLEN;
if ((i < 0) || (i >= SK_JSLOTS))
panic("sk_jfree: asked to free buffer that we don't manage!");