aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>1999-09-23 03:32:57 +0000
committerBill Paul <wpaul@FreeBSD.org>1999-09-23 03:32:57 +0000
commit98a229f65ec2facdae1bd4377ace7ee991f74980 (patch)
treeda561a7a22c6b6534362666c4aa27f7211663f3f /sys/dev
parent62e93e1c86164dd9e1542757f1148d9b321a072c (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/sf/if_sf.c11
-rw-r--r--sys/dev/sk/if_sk.c11
-rw-r--r--sys/dev/ti/if_ti.c9
-rw-r--r--sys/dev/vr/if_vr.c12
-rw-r--r--sys/dev/wi/if_wi.c9
5 files changed, 4 insertions, 48 deletions
diff --git a/sys/dev/sf/if_sf.c b/sys/dev/sf/if_sf.c
index 5f02606004d74..f9e9d3afccfbf 100644
--- a/sys/dev/sf/if_sf.c
+++ b/sys/dev/sf/if_sf.c
@@ -78,8 +78,6 @@
* registers inside the 256-byte I/O window.
*/
-#include "bpf.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sockio.h>
@@ -94,9 +92,7 @@
#include <net/if_dl.h>
#include <net/if_media.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include <vm/vm.h> /* for vtophys */
#include <vm/pmap.h> /* for vtophys */
@@ -815,9 +811,7 @@ static int sf_attach(dev)
if_attach(ifp);
ether_ifattach(ifp);
-#if NBPF > 0
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
-#endif
fail:
splx(s);
@@ -1002,7 +996,6 @@ static void sf_rxeof(sc)
eh = mtod(m, struct ether_header *);
ifp->if_ipackets++;
-#if NBPF > 0
if (ifp->if_bpf) {
bpf_mtap(ifp, m);
if (ifp->if_flags & IFF_PROMISC &&
@@ -1012,7 +1005,6 @@ static void sf_rxeof(sc)
continue;
}
}
-#endif
/* Remove header from mbuf and pass it on. */
m_adj(m, sizeof(struct ether_header));
@@ -1333,10 +1325,9 @@ static void sf_start(ifp)
* If there's a BPF listener, bounce a copy of this frame
* to him.
*/
-#if NBPF > 0
if (ifp->if_bpf)
bpf_mtap(ifp, m_head);
-#endif
+
SF_INC(i, SF_TX_DLIST_CNT);
sc->sf_tx_cnt++;
if (sc->sf_tx_cnt == (SF_TX_DLIST_CNT - 2))
diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c
index fdea86fcdf1e5..95bf5403d67e1 100644
--- a/sys/dev/sk/if_sk.c
+++ b/sys/dev/sk/if_sk.c
@@ -61,8 +61,6 @@
* both XMACs to operate as independent interfaces.
*/
-#include "bpf.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sockio.h>
@@ -78,9 +76,7 @@
#include <net/if_dl.h>
#include <net/if_media.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include <vm/vm.h> /* for vtophys */
#include <vm/pmap.h> /* for vtophys */
@@ -1150,9 +1146,7 @@ static int sk_attach_xmac(sc, port)
if_attach(ifp);
ether_ifattach(ifp);
-#if NBPF > 0
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
-#endif
return(0);
}
@@ -1455,10 +1449,8 @@ static void sk_start(ifp)
* If there's a BPF listener, bounce a copy of this frame
* to him.
*/
-#if NBPF > 0
if (ifp->if_bpf)
bpf_mtap(ifp, m_head);
-#endif
}
/* Transmit */
@@ -1563,7 +1555,6 @@ static void sk_rxeof(sc_if)
ifp->if_ipackets++;
eh = mtod(m, struct ether_header *);
-#if NBPF > 0
if (ifp->if_bpf) {
bpf_mtap(ifp, m);
if (ifp->if_flags & IFF_PROMISC &&
@@ -1573,7 +1564,7 @@ static void sk_rxeof(sc_if)
continue;
}
}
-#endif
+
/* Remove header from mbuf and pass it on. */
m_adj(m, sizeof(struct ether_header));
ether_input(ifp, eh, m);
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index 947f6c1c26ee2..8748f26ec0bb9 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -78,7 +78,6 @@
* - Andrew Gallatin for providing FreeBSD/Alpha support.
*/
-#include "bpf.h"
#include "vlan.h"
#include <sys/param.h>
@@ -96,9 +95,7 @@
#include <net/if_dl.h>
#include <net/if_media.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#if NVLAN > 0
#include <net/if_types.h>
@@ -1728,9 +1725,7 @@ static int ti_attach(dev)
if_attach(ifp);
ether_ifattach(ifp);
-#if NBPF > 0
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
-#endif
fail:
splx(s);
@@ -1859,7 +1854,6 @@ static void ti_rxeof(sc)
eh = mtod(m, struct ether_header *);
m->m_pkthdr.rcvif = ifp;
-#if NBPF > 0
/*
* Handle BPF listeners. Let the BPF user see the packet, but
* don't pass it up to the ether_input() layer unless it's
@@ -1876,7 +1870,6 @@ static void ti_rxeof(sc)
continue;
}
}
-#endif
/* Remove header from mbuf and pass it on. */
m_adj(m, sizeof(struct ether_header));
@@ -2144,10 +2137,8 @@ static void ti_start(ifp)
* If there's a BPF listener, bounce a copy of this frame
* to him.
*/
-#if NBPF > 0
if (ifp->if_bpf)
bpf_mtap(ifp, m_head);
-#endif
}
/* Transmit */
diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c
index af3ae7ef85b48..18e7bdff147ca 100644
--- a/sys/dev/vr/if_vr.c
+++ b/sys/dev/vr/if_vr.c
@@ -59,8 +59,6 @@
* transmission.
*/
-#include "bpf.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sockio.h>
@@ -75,9 +73,7 @@
#include <net/if_dl.h>
#include <net/if_media.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include "opt_bdg.h"
#ifdef BRIDGE
@@ -810,9 +806,7 @@ static int vr_attach(dev)
if_attach(ifp);
ether_ifattach(ifp);
-#if NBPF > 0
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
-#endif
fail:
splx(s);
@@ -1049,7 +1043,6 @@ static void vr_rxeof(sc)
ifp->if_ipackets++;
eh = mtod(m, struct ether_header *);
-#if NBPF > 0
/*
* Handle BPF listeners. Let the BPF user see the packet, but
* don't pass it up to the ether_input() layer unless it's
@@ -1066,7 +1059,7 @@ static void vr_rxeof(sc)
continue;
}
}
-#endif /* NBPF>0 */
+
#ifdef BRIDGE
if (do_bridge) {
struct ifnet *bdg_ifp;
@@ -1385,14 +1378,13 @@ static void vr_start(ifp)
if (cur_tx != start_tx)
VR_TXOWN(cur_tx) = VR_TXSTAT_OWN;
-#if NBPF > 0
/*
* If there's a BPF listener, bounce a copy of this frame
* to him.
*/
if (ifp->if_bpf)
bpf_mtap(ifp, cur_tx->vr_mbuf);
-#endif
+
VR_TXOWN(cur_tx) = VR_TXSTAT_OWN;
VR_SETBIT16(sc, VR_COMMAND, /*VR_CMD_TX_ON|*/VR_CMD_TX_GO);
}
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c
index 73e56d7295b63..7d5432a269115 100644
--- a/sys/dev/wi/if_wi.c
+++ b/sys/dev/wi/if_wi.c
@@ -67,7 +67,6 @@
#define WI_HERMES_AUTOINC_WAR /* Work around data write autoinc bug. */
#define WI_HERMES_STATS_WAR /* Work around stats counter bug. */
-#include "bpf.h"
#include "card.h"
#include "wi.h"
@@ -95,9 +94,7 @@
#include <netinet/if_ether.h>
#endif
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include <machine/clock.h>
#include <machine/md_var.h>
@@ -364,9 +361,7 @@ static int wi_attach(isa_dev)
if_attach(ifp);
ether_ifattach(ifp);
-#if NBPF > 0
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
-#endif
EVENTHANDLER_REGISTER(shutdown_post_sync, wi_shutdown, sc,
SHUTDOWN_PRI_DEFAULT);
@@ -465,7 +460,6 @@ static void wi_rxeof(sc)
ifp->if_ipackets++;
-#if NBPF > 0
/* Handle BPF listeners. */
if (ifp->if_bpf) {
bpf_mtap(ifp, m);
@@ -476,7 +470,6 @@ static void wi_rxeof(sc)
return;
}
}
-#endif
/* Receive packet. */
m_adj(m, sizeof(struct ether_header));
@@ -1241,14 +1234,12 @@ static void wi_start(ifp)
m0->m_pkthdr.len + 2);
}
-#if NBPF > 0
/*
* If there's a BPF listner, bounce a copy of
* this frame to him.
*/
if (ifp->if_bpf)
bpf_mtap(ifp, m0);
-#endif
m_freem(m0);