Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Use MEXTADD() rather than open-coding it.



details:   https://anonhg.NetBSD.org/src/rev/497ab1549d1f
branches:  trunk
changeset: 526211:497ab1549d1f
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Apr 28 01:00:26 2002 +0000

description:
Use MEXTADD() rather than open-coding it.

diffstat:

 sys/dev/pci/if_ti.c |  14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diffs (35 lines):

diff -r b7c5d3e14f8e -r 497ab1549d1f sys/dev/pci/if_ti.c
--- a/sys/dev/pci/if_ti.c       Sun Apr 28 00:54:41 2002 +0000
+++ b/sys/dev/pci/if_ti.c       Sun Apr 28 01:00:26 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ti.c,v 1.45 2002/03/20 17:32:23 eeh Exp $ */
+/* $NetBSD: if_ti.c,v 1.46 2002/04/28 01:00:26 thorpej Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -81,7 +81,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.45 2002/03/20 17:32:23 eeh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ti.c,v 1.46 2002/04/28 01:00:26 thorpej Exp $");
 
 #include "bpfilter.h"
 #include "opt_inet.h"
@@ -895,13 +895,9 @@
                }
 
                /* Attach the buffer to the mbuf. */
-               m_new->m_data = m_new->m_ext.ext_buf = (void *)buf;
-               m_new->m_flags |= M_EXT;
-               m_new->m_len = m_new->m_pkthdr.len =
-                   m_new->m_ext.ext_size = ETHER_MAX_LEN_JUMBO;
-               m_new->m_ext.ext_free = ti_jfree;
-               m_new->m_ext.ext_arg = sc;
-               MCLINITREFERENCE(m_new);
+               MEXTADD(m_new, (void *)buf, ETHER_MAX_LEN_JUMBO,
+                   M_DEVBUF, ti_jfree, sc);
+               m_new->m_len = m_new->m_pkthdr.len = ETHER_MAX_LEN_JUMBO;
        } else {
                m_new = m;
                m_new->m_data = m_new->m_ext.ext_buf;



Home | Main Index | Thread Index | Old Index