Source-Changes-HG archive

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

[src/trunk]: src/sys Push the bpf_ops usage back into bpf.h. Push the common ...



details:   https://anonhg.NetBSD.org/src/rev/9eb3bd085894
branches:  trunk
changeset: 753633:9eb3bd085894
user:      joerg <joerg%NetBSD.org@localhost>
date:      Mon Apr 05 07:19:28 2010 +0000

description:
Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.

diffstat:

 sys/arch/acorn32/podulebus/if_ie.c       |  11 +--
 sys/arch/alpha/a12/if_xb.c               |   8 +-
 sys/arch/amiga/dev/if_ed.c               |  14 +----
 sys/arch/amiga/dev/if_es.c               |  10 +--
 sys/arch/amiga/dev/if_qn.c               |  12 ++--
 sys/arch/arm/at91/at91emac.c             |  12 ++--
 sys/arch/arm/ep93xx/epe.c                |  10 +--
 sys/arch/arm/gemini/gemini_gmac.c        |  10 +--
 sys/arch/arm/gemini/if_gpn.c             |  10 +--
 sys/arch/arm/xscale/ixp425_if_npe.c      |  10 +--
 sys/arch/evbppc/virtex/dev/if_temac.c    |   7 +-
 sys/arch/mac68k/dev/if_mc.c              |  10 +--
 sys/arch/mac68k/nubus/if_netdock_nubus.c |  10 +--
 sys/arch/macppc/dev/am79c950.c           |  10 +--
 sys/arch/macppc/dev/if_bm.c              |  10 +--
 sys/arch/macppc/dev/if_gm.c              |  10 +--
 sys/arch/mips/adm5120/dev/if_admsw.c     |  10 +--
 sys/arch/mips/alchemy/dev/if_aumac.c     |  10 +--
 sys/arch/mips/atheros/dev/if_ae.c        |  10 +--
 sys/arch/mips/sibyte/dev/sbmac.c         |  10 +--
 sys/arch/newsmips/apbus/if_sn.c          |  10 +--
 sys/arch/next68k/dev/mb8795.c            |  18 ++----
 sys/arch/powerpc/ibm4xx/dev/if_emac.c    |  10 +--
 sys/arch/sgimips/hpc/if_sq.c             |  10 +--
 sys/arch/sgimips/mace/if_mec.c           |  10 +--
 sys/arch/sun2/dev/if_ec.c                |  10 +--
 sys/arch/sun3/dev/if_ie.c                |  15 ++---
 sys/arch/xen/xen/if_xennet_xenbus.c      |  11 +--
 sys/arch/xen/xen/xennetback_xenbus.c     |  11 +--
 sys/dev/bi/if_ni.c                       |  10 +--
 sys/dev/ic/aic6915.c                     |  10 +--
 sys/dev/ic/am7990.c                      |   7 +-
 sys/dev/ic/am79900.c                     |   7 +-
 sys/dev/ic/an.c                          |  16 ++---
 sys/dev/ic/ath.c                         |  21 +++----
 sys/dev/ic/atw.c                         |  20 +++----
 sys/dev/ic/awi.c                         |  10 +--
 sys/dev/ic/bwi.c                         |  18 +++----
 sys/dev/ic/cs89x0.c                      |  10 +--
 sys/dev/ic/dp8390.c                      |  10 +--
 sys/dev/ic/dp83932.c                     |  10 +--
 sys/dev/ic/elink3.c                      |  10 +--
 sys/dev/ic/elinkxl.c                     |  11 +--
 sys/dev/ic/gem.c                         |  10 +--
 sys/dev/ic/hd64570.c                     |  13 ++---
 sys/dev/ic/hme.c                         |  10 +--
 sys/dev/ic/i82557.c                      |  10 +--
 sys/dev/ic/i82586.c                      |  13 ++---
 sys/dev/ic/i82596.c                      |  10 +--
 sys/dev/ic/lan9118.c                     |  10 +--
 sys/dev/ic/lance.c                       |   7 +-
 sys/dev/ic/lemac.c                       |   9 +--
 sys/dev/ic/mb86950.c                     |  10 +--
 sys/dev/ic/mb86960.c                     |  10 +--
 sys/dev/ic/midway.c                      |  14 +----
 sys/dev/ic/mtd803.c                      |  10 +--
 sys/dev/ic/pdqvar.h                      |   6 +-
 sys/dev/ic/rrunner.c                     |  15 +----
 sys/dev/ic/rt2560.c                      |  25 ++++------
 sys/dev/ic/rt2661.c                      |  22 +++-----
 sys/dev/ic/rtl8169.c                     |  10 +--
 sys/dev/ic/rtl81x9.c                     |  10 +--
 sys/dev/ic/rtw.c                         |  18 +++----
 sys/dev/ic/seeq8005.c                    |  10 +--
 sys/dev/ic/sgec.c                        |  10 +--
 sys/dev/ic/smc83c170.c                   |  10 +--
 sys/dev/ic/smc90cx6.c                    |  10 +--
 sys/dev/ic/smc91cxx.c                    |  10 +--
 sys/dev/ic/tropic.c                      |  13 ++---
 sys/dev/ic/tulip.c                       |  10 +--
 sys/dev/ic/wi.c                          |  17 ++----
 sys/dev/if_ndis/if_ndis.c                |  10 +--
 sys/dev/isa/if_eg.c                      |  10 +--
 sys/dev/isa/if_el.c                      |  10 +--
 sys/dev/isa/if_iy.c                      |  10 +--
 sys/dev/marvell/if_gfe.c                 |  13 ++---
 sys/dev/ofw/ofnet.c                      |  10 +--
 sys/dev/pci/if_age.c                     |  10 +--
 sys/dev/pci/if_ale.c                     |  10 +--
 sys/dev/pci/if_bce.c                     |  10 +--
 sys/dev/pci/if_bge.c                     |  10 +--
 sys/dev/pci/if_bnx.c                     |  10 +--
 sys/dev/pci/if_cas.c                     |  13 ++---
 sys/dev/pci/if_de.c                      |  10 ++--
 sys/dev/pci/if_devar.h                   |  15 +-----
 sys/dev/pci/if_dge.c                     |  10 +--
 sys/dev/pci/if_ipw.c                     |  18 +++----
 sys/dev/pci/if_iwi.c                     |  16 ++---
 sys/dev/pci/if_iwn.c                     |  18 +++----
 sys/dev/pci/if_jme.c                     |  10 +--
 sys/dev/pci/if_kse.c                     |  10 +--
 sys/dev/pci/if_lii.c                     |  10 +--
 sys/dev/pci/if_lmc.h                     |   8 +-
 sys/dev/pci/if_msk.c                     |  10 +--
 sys/dev/pci/if_nfe.c                     |  10 +--
 sys/dev/pci/if_pcn.c                     |  10 +--
 sys/dev/pci/if_sip.c                     |  13 ++---
 sys/dev/pci/if_sk.c                      |  10 +--
 sys/dev/pci/if_ste.c                     |  10 +--
 sys/dev/pci/if_stge.c                    |  10 +--
 sys/dev/pci/if_ti.c                      |  10 +--
 sys/dev/pci/if_tl.c                      |  10 +--
 sys/dev/pci/if_txp.c                     |  10 +--
 sys/dev/pci/if_vge.c                     |  10 +--
 sys/dev/pci/if_vr.c                      |  10 +--
 sys/dev/pci/if_wm.c                      |  10 +--
 sys/dev/pci/if_wpi.c                     |  21 +++----
 sys/dev/pci/if_xge.c                     |  10 +--
 sys/dev/pcmcia/if_cnw.c                  |  10 +--
 sys/dev/pcmcia/if_ray.c                  |   9 +--
 sys/dev/pcmcia/if_xi.c                   |  10 +--
 sys/dev/ppbus/if_plip.c                  |   8 +-
 sys/dev/qbus/if_de.c                     |  10 +--
 sys/dev/qbus/if_qe.c                     |  10 +--
 sys/dev/qbus/if_qt.c                     |  10 +--
 sys/dev/sbus/be.c                        |  10 +--
 sys/dev/sbus/qe.c                        |  10 +--
 sys/dev/scsipi/if_se.c                   |  10 +--
 sys/dev/usb/if_atu.c                     |  10 +--
 sys/dev/usb/if_aue.c                     |  10 +--
 sys/dev/usb/if_axe.c                     |  10 +--
 sys/dev/usb/if_cdce.c                    |  10 +--
 sys/dev/usb/if_cue.c                     |  10 +--
 sys/dev/usb/if_kue.c                     |  10 +--
 sys/dev/usb/if_rum.c                     |  23 ++++-----
 sys/dev/usb/if_udav.c                    |  10 +--
 sys/dev/usb/if_upl.c                     |  15 ++---
 sys/dev/usb/if_ural.c                    |  23 ++++-----
 sys/dev/usb/if_url.c                     |  10 +--
 sys/dev/usb/if_zyd.c                     |  23 ++++-----
 sys/dev/usb/uhso.c                       |  14 ++---
 sys/dist/pf/net/if_pflog.c               |  10 ++--
 sys/dist/pf/net/if_pfsync.c              |  15 ++---
 sys/net/agr/if_agr.c                     |  13 +---
 sys/net/bpf.c                            |  65 +++++++++-----------------
 sys/net/bpf.h                            |  78 +++++++++++++++++++++++++++++++-
 sys/net/bpf_stub.c                       |   5 +-
 sys/net/if_arcsubr.c                     |   6 +-
 sys/net/if_atmsubr.c                     |   7 +-
 sys/net/if_ecosubr.c                     |   6 +-
 sys/net/if_etherip.c                     |   7 +-
 sys/net/if_ethersubr.c                   |   9 +--
 sys/net/if_faith.c                       |  11 ++--
 sys/net/if_fddisubr.c                    |   7 +-
 sys/net/if_gif.c                         |  15 ++---
 sys/net/if_gre.c                         |  15 ++---
 sys/net/if_hippisubr.c                   |   7 +-
 sys/net/if_ieee1394subr.c                |  14 ++--
 sys/net/if_loop.c                        |  12 ++--
 sys/net/if_ppp.c                         |  14 ++---
 sys/net/if_pppoe.c                       |  15 ++---
 sys/net/if_sl.c                          |  15 ++---
 sys/net/if_srt.c                         |   8 +-
 sys/net/if_stf.c                         |  15 ++---
 sys/net/if_strip.c                       |  15 ++---
 sys/net/if_tap.c                         |  16 ++----
 sys/net/if_tokensubr.c                   |   9 +--
 sys/net/if_tun.c                         |  14 ++---
 sys/net/if_vlan.c                        |  10 +--
 sys/net/ppp_tty.c                        |   8 +-
 sys/net80211/ieee80211.c                 |   8 +-
 sys/net80211/ieee80211_input.c           |  19 ++----
 sys/netinet/ip_carp.c                    |   9 +--
 sys/netinet/ip_etherip.c                 |   7 +-
 sys/netinet6/ip6_etherip.c               |   7 +-
 sys/netisdn/i4b_ipr.c                    |  14 +----
 sys/netisdn/i4b_isppp.c                  |  12 ++--
 sys/rump/net/lib/libsockin/sockin.c      |  12 ++--
 sys/rump/net/lib/libvirtif/if_virt.c     |  12 +---
 169 files changed, 868 insertions(+), 1174 deletions(-)

diffs (truncated from 7463 to 300 lines):

diff -r c728c81d2ac4 -r 9eb3bd085894 sys/arch/acorn32/podulebus/if_ie.c
--- a/sys/arch/acorn32/podulebus/if_ie.c        Mon Apr 05 07:16:12 2010 +0000
+++ b/sys/arch/acorn32/podulebus/if_ie.c        Mon Apr 05 07:19:28 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ie.c,v 1.28 2010/01/19 22:06:18 pooka Exp $ */
+/* $NetBSD: if_ie.c,v 1.29 2010/04/05 07:19:28 joerg Exp $ */
 
 /*
  * Copyright (c) 1995 Melvin Tang-Richardson.
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.28 2010/01/19 22:06:18 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ie.c,v 1.29 2010/04/05 07:19:28 joerg Exp $");
 
 #define IGNORE_ETHER1_IDROM_CHECKSUM
 
@@ -1284,9 +1284,7 @@
 
     ifp->if_ipackets++;
 
-    if ( ifp->if_bpf ) {
-       bpf_ops->bpf_mtap(ifp->if_bpf, m);
-    };
+    bpf_mtap(ifp, m);
 
     (*ifp->if_input)(ifp, m);
 }
@@ -1493,8 +1491,7 @@
                        len += m->m_len;
                }
 
-               if ( ifp->if_bpf )
-                   bpf_ops->bpf_mtap(ifp->if_bpf, m0);
+               bpf_mtap(ifp, m0);
 
                m_freem(m0);
                if (len < ETHER_MIN_LEN - ETHER_CRC_LEN) {
diff -r c728c81d2ac4 -r 9eb3bd085894 sys/arch/alpha/a12/if_xb.c
--- a/sys/arch/alpha/a12/if_xb.c        Mon Apr 05 07:16:12 2010 +0000
+++ b/sys/arch/alpha/a12/if_xb.c        Mon Apr 05 07:19:28 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_xb.c,v 1.25 2010/01/19 22:06:18 pooka Exp $ */
+/* $NetBSD: if_xb.c,v 1.26 2010/04/05 07:19:28 joerg Exp $ */
 
 /* [Notice revision 2.2]
  * Copyright (c) 1997, 1998 Avalon Computer Systems, Inc.
@@ -74,7 +74,7 @@
 #include "opt_avalon_a12.h"            /* Config options headers */
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: if_xb.c,v 1.25 2010/01/19 22:06:18 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xb.c,v 1.26 2010/04/05 07:19:28 joerg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -226,7 +226,7 @@
        xbfound = 1;
        ccp = &xb_configuration;
        xb_init_config(ccp, 1);
-       printf(": driver %s mtu %lu\n", "$Revision: 1.25 $", xbi.if_mtu);
+       printf(": driver %s mtu %lu\n", "$Revision: 1.26 $", xbi.if_mtu);
 }
 
 static void
@@ -746,5 +746,5 @@
        if_attach(&xbi);
        if_alloc_sadl(&xbi);
 
-       bpf_ops->bpf_attach(&xbi, DLT_NULL, 0, &xbi.if_bpf);
+       bpf_attach(&xbi, DLT_NULL, 0);
 }
diff -r c728c81d2ac4 -r 9eb3bd085894 sys/arch/amiga/dev/if_ed.c
--- a/sys/arch/amiga/dev/if_ed.c        Mon Apr 05 07:16:12 2010 +0000
+++ b/sys/arch/amiga/dev/if_ed.c        Mon Apr 05 07:19:28 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ed.c,v 1.61 2010/01/19 22:06:19 pooka Exp $ */
+/*     $NetBSD: if_ed.c,v 1.62 2010/04/05 07:19:29 joerg Exp $ */
 
 /*
  * Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@@ -19,7 +19,7 @@
 #include "opt_ns.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ed.c,v 1.61 2010/01/19 22:06:19 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ed.c,v 1.62 2010/04/05 07:19:29 joerg Exp $");
 
 
 #include <sys/param.h>
@@ -547,8 +547,7 @@
                ed_xmit(sc);
 
        /* Tap off here if there is a BPF listener. */
-       if (ifp->if_bpf)
-               bpf_ops->bpf_mtap(ifp->if_bpf, m0);
+       bpf_mtap(ifp, m0);
 
        m_freem(m0);
 
@@ -992,12 +991,7 @@
                return;
        }
 
-       /*
-        * Check if there's a BPF listener on this interface.  If so, hand off
-        * the raw packet to bpf.
-        */
-       if (ifp->if_bpf)
-               bpf_ops->bpf_mtap(ifp->if_bpf, m);
+       bpf_mtap(ifp, m);
 
        (*ifp->if_input)(ifp, m);
 }
diff -r c728c81d2ac4 -r 9eb3bd085894 sys/arch/amiga/dev/if_es.c
--- a/sys/arch/amiga/dev/if_es.c        Mon Apr 05 07:16:12 2010 +0000
+++ b/sys/arch/amiga/dev/if_es.c        Mon Apr 05 07:19:28 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_es.c,v 1.49 2010/01/19 22:06:19 pooka Exp $ */
+/*     $NetBSD: if_es.c,v 1.50 2010/04/05 07:19:29 joerg Exp $ */
 
 /*
  * Copyright (c) 1995 Michael L. Hitch
@@ -33,7 +33,7 @@
 #include "opt_ns.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_es.c,v 1.49 2010/01/19 22:06:19 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_es.c,v 1.50 2010/04/05 07:19:29 joerg Exp $");
 
 
 #include <sys/param.h>
@@ -723,8 +723,7 @@
         * Check if there's a BPF listener on this interface.  If so, hand off
         * the raw packet to bpf.
         */
-       if (ifp->if_bpf)
-               bpf_ops->bpf_mtap(ifp->if_bpf, top);
+       bpf_mtap(ifp, top);
        (*ifp->if_input)(ifp, top);
 #ifdef ESDEBUG
        if (--sc->sc_smcbusy) {
@@ -926,8 +925,7 @@
                if (smc->b2.pnr != active_pnr)
                        printf("%s: esstart - PNR changed %x->%x\n",
                            sc->sc_dev.dv_xname, active_pnr, smc->b2.pnr);
-               if (sc->sc_ethercom.ec_if.if_bpf)
-                       bpf_ops->bpf_mtap(sc->sc_ethercom.ec_if.if_bpf, m0);
+               bpf_mtap(&sc->sc_ethercom.ec_if, m0);
                m_freem(m0);
                sc->sc_ethercom.ec_if.if_opackets++;    /* move to interrupt? */
                sc->sc_intctl |= MSK_TX_EMPTY | MSK_TX;
diff -r c728c81d2ac4 -r 9eb3bd085894 sys/arch/amiga/dev/if_qn.c
--- a/sys/arch/amiga/dev/if_qn.c        Mon Apr 05 07:16:12 2010 +0000
+++ b/sys/arch/amiga/dev/if_qn.c        Mon Apr 05 07:19:28 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_qn.c,v 1.37 2010/01/19 22:06:19 pooka Exp $ */
+/*     $NetBSD: if_qn.c,v 1.38 2010/04/05 07:19:29 joerg Exp $ */
 
 /*
  * Copyright (c) 1995 Mika Kortelainen
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.37 2010/01/19 22:06:19 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_qn.c,v 1.38 2010/04/05 07:19:29 joerg Exp $");
 
 #include "qn.h"
 #if NQN > 0
@@ -405,10 +405,8 @@
         *
         * (can't give the copy in QuickNet card RAM to bpf, because
         * that RAM is not visible to the host but is read from FIFO)
-        *
         */
-       if (ifp->if_bpf)
-               bpf_ops->bpf_mtap(ifp->if_bpf, m);
+       bpf_mtap(ifp, m);
        len = qn_put(sc->nic_fifo, m);
        m_freem(m);
 
@@ -589,8 +587,8 @@
                len -= len1;
        }
 
-       if (ifp->if_bpf)
-               bpf_ops->bpf_mtap(ifp->if_bpf, head);
+       /* Tap off BPF listeners */
+       bpf_mtap(ifp, head);
 
        (*ifp->if_input)(ifp, head);
        return;
diff -r c728c81d2ac4 -r 9eb3bd085894 sys/arch/arm/at91/at91emac.c
--- a/sys/arch/arm/at91/at91emac.c      Mon Apr 05 07:16:12 2010 +0000
+++ b/sys/arch/arm/at91/at91emac.c      Mon Apr 05 07:19:28 2010 +0000
@@ -1,5 +1,5 @@
-/*     $Id: at91emac.c,v 1.8 2010/01/22 08:56:04 martin Exp $  */
-/*     $NetBSD: at91emac.c,v 1.8 2010/01/22 08:56:04 martin Exp $      */
+/*     $Id: at91emac.c,v 1.9 2010/04/05 07:19:29 joerg Exp $   */
+/*     $NetBSD: at91emac.c,v 1.9 2010/04/05 07:19:29 joerg Exp $       */
 
 /*
  * Copyright (c) 2007 Embedtronics Oy
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at91emac.c,v 1.8 2010/01/22 08:56:04 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91emac.c,v 1.9 2010/04/05 07:19:29 joerg Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -284,8 +284,7 @@
                                sc->rxq[bi].m->m_pkthdr.rcvif = ifp;
                                sc->rxq[bi].m->m_pkthdr.len = 
                                        sc->rxq[bi].m->m_len = fl;
-                               if (ifp->if_bpf) 
-                                       bpf_ops->bpf_mtap(ifp->if_bpf, sc->rxq[bi].m);
+                               bpf_mtap(ifp, sc->rxq[bi].m);
                                DPRINTFN(2,("received %u bytes packet\n", fl));
                                 (*ifp->if_input)(ifp, sc->rxq[bi].m);
                                if (mtod(m, intptr_t) & 3) {
@@ -676,8 +675,7 @@
                IFQ_DEQUEUE(&ifp->if_snd, m);
        }
 
-       if (ifp->if_bpf) 
-               bpf_ops->bpf_mtap(ifp->if_bpf, m);
+       bpf_mtap(ifp, m);
 
        nsegs = sc->txq[bi].m_dmamap->dm_nsegs;
        segs = sc->txq[bi].m_dmamap->dm_segs;
diff -r c728c81d2ac4 -r 9eb3bd085894 sys/arch/arm/ep93xx/epe.c
--- a/sys/arch/arm/ep93xx/epe.c Mon Apr 05 07:16:12 2010 +0000
+++ b/sys/arch/arm/ep93xx/epe.c Mon Apr 05 07:19:28 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: epe.c,v 1.24 2010/01/22 08:56:04 martin Exp $  */
+/*     $NetBSD: epe.c,v 1.25 2010/04/05 07:19:29 joerg Exp $   */
 
 /*
  * Copyright (c) 2004 Jesse Off
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.24 2010/01/22 08:56:04 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: epe.c,v 1.25 2010/04/05 07:19:29 joerg Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -235,8 +235,7 @@
                                sc->rxq[bi].m->m_pkthdr.rcvif = ifp;
                                sc->rxq[bi].m->m_pkthdr.len = 
                                        sc->rxq[bi].m->m_len = fl;
-                               if (ifp->if_bpf) 
-                                       bpf_ops->bpf_mtap(ifp->if_bpf, sc->rxq[bi].m);
+                               bpf_mtap(ifp, sc->rxq[bi].m);
                                 (*ifp->if_input)(ifp, sc->rxq[bi].m);
                                sc->rxq[bi].m = m;
                                bus_dmamap_load(sc->sc_dmat, 
@@ -609,8 +608,7 @@
                IFQ_DEQUEUE(&ifp->if_snd, m);
        }
 
-       if (ifp->if_bpf) 
-               bpf_ops->bpf_mtap(ifp->if_bpf, m);
+       bpf_mtap(ifp, m);
 
        nsegs = sc->txq[bi].m_dmamap->dm_nsegs;
        segs = sc->txq[bi].m_dmamap->dm_segs;
diff -r c728c81d2ac4 -r 9eb3bd085894 sys/arch/arm/gemini/gemini_gmac.c
--- a/sys/arch/arm/gemini/gemini_gmac.c Mon Apr 05 07:16:12 2010 +0000
+++ b/sys/arch/arm/gemini/gemini_gmac.c Mon Apr 05 07:19:28 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gemini_gmac.c,v 1.5 2010/01/19 22:06:19 pooka Exp $ */
+/* $NetBSD: gemini_gmac.c,v 1.6 2010/04/05 07:19:29 joerg Exp $ */
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -49,7 +49,7 @@
 
 #include <sys/gpio.h>
 
-__KERNEL_RCSID(0, "$NetBSD: gemini_gmac.c,v 1.5 2010/01/19 22:06:19 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gemini_gmac.c,v 1.6 2010/04/05 07:19:29 joerg Exp $");
 
 #define        SWFREEQ_DESCS   256     /* one page worth */
 #define        HWFREEQ_DESCS   256     /* one page worth */
@@ -548,8 +548,7 @@
        aprint_debug("gmac_hwqueue_txconsume(%p): %zu@%p: %s m=%p\n",
            hwq, d - hwq->hwq_base, d, ifp->if_xname, m);
 
-       if (ifp->if_bpf)
-               bpf_ops->bpf_mtap(ifp->if_bpf, m);
+       bpf_mtap(ifp, m);
        m_freem(m);
 }
 



Home | Main Index | Thread Index | Old Index