diff options
author | wpaul <wpaul@FreeBSD.org> | 1999-09-23 03:32:57 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1999-09-23 03:32:57 +0000 |
commit | 165d81879ead70b028b140d76d9143aefee5ce16 (patch) | |
tree | 6bbbef5ef1ef94b97c53f10e98f93f50d12e1be5 /sys/pci | |
parent | 9e89242d36c564123e515222eb0c9174c38c469c (diff) | |
download | FreeBSD-src-165d81879ead70b028b140d76d9143aefee5ce16.zip FreeBSD-src-165d81879ead70b028b140d76d9143aefee5ce16.tar.gz |
As suggested by phk, unconditionalize BPF support in these drivers. Since
there are stubs compiled into the kernel if BPF support is not enabled,
there aren't any problems with unresolved symbols. The modules in /modules
are compiled with BPF support enabled anyway, so the most this will do is
bloat GENERIC a little.
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/if_al.c | 12 | ||||
-rw-r--r-- | sys/pci/if_ax.c | 13 | ||||
-rw-r--r-- | sys/pci/if_dm.c | 12 | ||||
-rw-r--r-- | sys/pci/if_mx.c | 12 | ||||
-rw-r--r-- | sys/pci/if_pn.c | 12 | ||||
-rw-r--r-- | sys/pci/if_rl.c | 12 | ||||
-rw-r--r-- | sys/pci/if_sf.c | 11 | ||||
-rw-r--r-- | sys/pci/if_sis.c | 13 | ||||
-rw-r--r-- | sys/pci/if_sk.c | 11 | ||||
-rw-r--r-- | sys/pci/if_ste.c | 13 | ||||
-rw-r--r-- | sys/pci/if_ti.c | 9 | ||||
-rw-r--r-- | sys/pci/if_tl.c | 11 | ||||
-rw-r--r-- | sys/pci/if_vr.c | 12 | ||||
-rw-r--r-- | sys/pci/if_wb.c | 10 | ||||
-rw-r--r-- | sys/pci/if_xl.c | 14 |
15 files changed, 22 insertions, 155 deletions
diff --git a/sys/pci/if_al.c b/sys/pci/if_al.c index a430e21..91046e0 100644 --- a/sys/pci/if_al.c +++ b/sys/pci/if_al.c @@ -60,8 +60,6 @@ * (bits 16, 17, 18 and 19 in the serial I/O register control the MII). */ -#include "bpf.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/sockio.h> @@ -76,9 +74,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 */ @@ -972,9 +968,7 @@ static int al_attach(dev) if_attach(ifp); ether_ifattach(ifp); -#if NBPF > 0 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif fail: splx(s); @@ -1182,7 +1176,7 @@ static void al_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 @@ -1199,7 +1193,7 @@ static void al_rxeof(sc) continue; } } -#endif + /* Remove header from mbuf and pass it on. */ m_adj(m, sizeof(struct ether_header)); ether_input(ifp, eh, m); @@ -1473,14 +1467,12 @@ static void al_start(ifp) break; } -#if NBPF > 0 /* * If there's a BPF listener, bounce a copy of this frame * to him. */ if (ifp->if_bpf) bpf_mtap(ifp, m_head); -#endif } /* Transmit */ diff --git a/sys/pci/if_ax.c b/sys/pci/if_ax.c index 0cb2daf..e380a2b 100644 --- a/sys/pci/if_ax.c +++ b/sys/pci/if_ax.c @@ -49,8 +49,6 @@ * the registers. */ -#include "bpf.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/sockio.h> @@ -65,9 +63,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 */ @@ -1344,9 +1340,7 @@ static int ax_attach(dev) if_attach(ifp); ether_ifattach(ifp); -#if NBPF > 0 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif fail: splx(s); @@ -1547,7 +1541,7 @@ static void ax_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 @@ -1564,7 +1558,7 @@ static void ax_rxeof(sc) continue; } } -#endif + /* Remove header from mbuf and pass it on. */ m_adj(m, sizeof(struct ether_header)); ether_input(ifp, eh, m); @@ -1871,14 +1865,13 @@ static void ax_start(ifp) if (cur_tx != start_tx) AX_TXOWN(cur_tx) = AX_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->ax_mbuf); -#endif + AX_TXOWN(cur_tx) = AX_TXSTAT_OWN; CSR_WRITE_4(sc, AX_TXSTART, 0xFFFFFFFF); } diff --git a/sys/pci/if_dm.c b/sys/pci/if_dm.c index 1bbcae6..13a9e7f 100644 --- a/sys/pci/if_dm.c +++ b/sys/pci/if_dm.c @@ -51,8 +51,6 @@ * overruns. */ -#include "bpf.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/sockio.h> @@ -67,9 +65,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 */ @@ -896,9 +892,7 @@ static int dm_attach(dev) if_attach(ifp); ether_ifattach(ifp); -#if NBPF > 0 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif fail: splx(s); @@ -1109,7 +1103,7 @@ static void dm_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 @@ -1126,7 +1120,7 @@ static void dm_rxeof(sc) continue; } } -#endif + /* Remove header from mbuf and pass it on. */ m_adj(m, sizeof(struct ether_header)); ether_input(ifp, eh, m); @@ -1413,14 +1407,12 @@ static void dm_start(ifp) break; } -#if NBPF > 0 /* * If there's a BPF listener, bounce a copy of this frame * to him. */ if (ifp->if_bpf) bpf_mtap(ifp, m_head); -#endif } sc->dm_cdata.dm_tx_prod = idx; diff --git a/sys/pci/if_mx.c b/sys/pci/if_mx.c index 739ff3b..95e383b 100644 --- a/sys/pci/if_mx.c +++ b/sys/pci/if_mx.c @@ -56,8 +56,6 @@ * the NWAY support. */ -#include "bpf.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/sockio.h> @@ -72,9 +70,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 */ @@ -1605,9 +1601,7 @@ int mx_attach(dev) if_attach(ifp); ether_ifattach(ifp); -#if NBPF > 0 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif fail: splx(s); @@ -1818,7 +1812,6 @@ static void mx_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 @@ -1835,7 +1828,7 @@ static void mx_rxeof(sc) continue; } } -#endif + /* Remove header from mbuf and pass it on. */ m_adj(m, sizeof(struct ether_header)); ether_input(ifp, eh, m); @@ -2159,14 +2152,13 @@ static void mx_start(ifp) if (cur_tx != start_tx) MX_TXOWN(cur_tx) = MX_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->mx_mbuf); -#endif + MX_TXOWN(cur_tx) = MX_TXSTAT_OWN; CSR_WRITE_4(sc, MX_TXSTART, 0xFFFFFFFF); diff --git a/sys/pci/if_pn.c b/sys/pci/if_pn.c index 8483cc9..166afba 100644 --- a/sys/pci/if_pn.c +++ b/sys/pci/if_pn.c @@ -57,8 +57,6 @@ * 100BaseTX PHY. */ -#include "bpf.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/sockio.h> @@ -73,9 +71,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 @@ -1265,9 +1261,7 @@ static int pn_attach(dev) if_attach(ifp); ether_ifattach(ifp); -#if NBPF > 0 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif fail: splx(s); @@ -1631,7 +1625,6 @@ static void pn_rxeof(sc) } #endif -#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 @@ -1648,7 +1641,7 @@ static void pn_rxeof(sc) continue; } } -#endif + /* Remove header from mbuf and pass it on. */ m_adj(m, sizeof(struct ether_header)); ether_input(ifp, eh, m); @@ -1962,14 +1955,13 @@ static void pn_start(ifp) if (cur_tx != start_tx) PN_TXOWN(cur_tx) = PN_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->pn_mbuf); -#endif + PN_TXOWN(cur_tx) = PN_TXSTAT_OWN; CSR_WRITE_4(sc, PN_TXSTART, 0xFFFFFFFF); } diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c index 6b48b49..41483c0 100644 --- a/sys/pci/if_rl.c +++ b/sys/pci/if_rl.c @@ -83,8 +83,6 @@ * to select which interface to use depending on the chip type. */ -#include "bpf.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/sockio.h> @@ -99,9 +97,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 */ @@ -963,9 +959,7 @@ static int rl_attach(dev) if_attach(ifp); ether_ifattach(ifp); -#if NBPF > 0 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif fail: splx(s); @@ -1163,7 +1157,6 @@ static void rl_rxeof(sc) eh = mtod(m, struct ether_header *); ifp->if_ipackets++; -#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 @@ -1180,7 +1173,7 @@ static void rl_rxeof(sc) continue; } } -#endif + /* Remove header from mbuf and pass it on. */ m_adj(m, sizeof(struct ether_header)); ether_input(ifp, eh, m); @@ -1371,14 +1364,13 @@ static void rl_start(ifp) rl_encap(sc, m_head); -#if NBPF > 0 /* * If there's a BPF listener, bounce a copy of this frame * to him. */ if (ifp->if_bpf) bpf_mtap(ifp, RL_CUR_TXMBUF(sc)); -#endif + /* * Transmit the frame. */ diff --git a/sys/pci/if_sf.c b/sys/pci/if_sf.c index 5f02606..f9e9d3a 100644 --- a/sys/pci/if_sf.c +++ b/sys/pci/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/pci/if_sis.c b/sys/pci/if_sis.c index fe3f50c..fbe57ed 100644 --- a/sys/pci/if_sis.c +++ b/sys/pci/if_sis.c @@ -54,8 +54,6 @@ * longword aligned. */ -#include "bpf.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/sockio.h> @@ -70,9 +68,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 */ @@ -705,9 +701,7 @@ static int sis_attach(dev) ether_ifattach(ifp); callout_handle_init(&sc->sis_stat_ch); -#if NBPF > 0 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif fail: splx(s); @@ -911,7 +905,7 @@ static void sis_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 @@ -927,7 +921,7 @@ static void sis_rxeof(sc) continue; } } -#endif + /* Remove header from mbuf and pass it on. */ m_adj(m, sizeof(struct ether_header)); ether_input(ifp, eh, m); @@ -1164,14 +1158,13 @@ static void sis_start(ifp) break; } -#if NBPF > 0 /* * If there's a BPF listener, bounce a copy of this frame * to him. */ if (ifp->if_bpf) bpf_mtap(ifp, m_head); -#endif + } /* Transmit */ diff --git a/sys/pci/if_sk.c b/sys/pci/if_sk.c index fdea86f..95bf540 100644 --- a/sys/pci/if_sk.c +++ b/sys/pci/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/pci/if_ste.c b/sys/pci/if_ste.c index aea212e..6be1d83 100644 --- a/sys/pci/if_ste.c +++ b/sys/pci/if_ste.c @@ -32,9 +32,6 @@ * $FreeBSD$ */ - -#include "bpf.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/sockio.h> @@ -49,9 +46,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 @@ -726,11 +721,9 @@ again: m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = m->m_len = total_len; -#if NBPF > 0 /* Handle BPF listeners. Let the BPF user see the packet. */ if (ifp->if_bpf) bpf_mtap(ifp, m); -#endif #ifdef BRIDGE if (do_bridge) { @@ -746,7 +739,6 @@ again: } #endif -#if NBPF > 0 /* * Don't pass packet up to the ether_input() layer unless it's * a broadcast packet, multicast packet, matches our ethernet @@ -760,7 +752,6 @@ again: continue; } } -#endif /* Remove header from mbuf and pass it on. */ m_adj(m, sizeof(struct ether_header)); @@ -1107,9 +1098,7 @@ static int ste_attach(dev) if_attach(ifp); ether_ifattach(ifp); -#if NBPF > 0 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif fail: splx(s); @@ -1566,14 +1555,12 @@ static void ste_start(ifp) } prev = cur_tx; -#if NBPF > 0 /* * If there's a BPF listener, bounce a copt of this frame * to him. */ if (ifp->if_bpf) bpf_mtap(ifp, cur_tx->ste_mbuf); -#endif } if (cur_tx == NULL) diff --git a/sys/pci/if_ti.c b/sys/pci/if_ti.c index 947f6c1..8748f26 100644 --- a/sys/pci/if_ti.c +++ b/sys/pci/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/pci/if_tl.c b/sys/pci/if_tl.c index 48df6f5..9c5ca1e 100644 --- a/sys/pci/if_tl.c +++ b/sys/pci/if_tl.c @@ -178,8 +178,6 @@ * itself thereby reducing the load on the host CPU. */ -#include "bpf.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/sockio.h> @@ -194,9 +192,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 */ @@ -1342,9 +1338,7 @@ static int tl_attach(dev) if_attach(ifp); ether_ifattach(ifp); -#if NBPF > 0 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif fail: splx(s); @@ -1551,7 +1545,6 @@ static int tl_intvec_rxeof(xsc, type) continue; } -#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 @@ -1571,7 +1564,7 @@ static int tl_intvec_rxeof(xsc, type) continue; } } -#endif + /* Remove header from mbuf and pass it on. */ m->m_pkthdr.len = m->m_len = total_len - sizeof(struct ether_header); @@ -2011,10 +2004,8 @@ static void tl_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, cur_tx->tl_mbuf); -#endif } /* diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c index af3ae7e..18e7bdf 100644 --- a/sys/pci/if_vr.c +++ b/sys/pci/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/pci/if_wb.c b/sys/pci/if_wb.c index 5e8f68d..06043e0 100644 --- a/sys/pci/if_wb.c +++ b/sys/pci/if_wb.c @@ -83,7 +83,6 @@ * three of my test boards seems fine. */ -#include "bpf.h" #include "opt_bdg.h" #include <sys/param.h> @@ -101,9 +100,7 @@ #include <net/if_dl.h> #include <net/if_media.h> -#if NBPF > 0 #include <net/bpf.h> -#endif #ifdef BRIDGE #include <net/bridge.h> @@ -977,9 +974,7 @@ static int wb_attach(dev) if_attach(ifp); ether_ifattach(ifp); -#if NBPF > 0 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif fail: if (error) @@ -1220,7 +1215,6 @@ static void wb_rxeof(sc) } #endif -#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 @@ -1237,7 +1231,7 @@ static void wb_rxeof(sc) break; } } -#endif + /* Remove header from mbuf and pass it on. */ m_adj(m, sizeof(struct ether_header)); ether_input(ifp, eh, m); @@ -1583,14 +1577,12 @@ static void wb_start(ifp) if (cur_tx != start_tx) WB_TXOWN(cur_tx) = WB_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->wb_mbuf); -#endif } /* diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c index dc45073..855f7cf 100644 --- a/sys/pci/if_xl.c +++ b/sys/pci/if_xl.c @@ -91,8 +91,6 @@ * PCI-based NICs. */ -#include "bpf.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/sockio.h> @@ -107,9 +105,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 @@ -1496,9 +1492,7 @@ done: if_attach(ifp); ether_ifattach(ifp); -#if NBPF > 0 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header)); -#endif fail: splx(s); @@ -1745,11 +1739,9 @@ again: m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = m->m_len = total_len; -#if NBPF > 0 /* Handle BPF listeners. Let the BPF user see the packet. */ if (ifp->if_bpf) bpf_mtap(ifp, m); -#endif #ifdef BRIDGE if (do_bridge) { @@ -1765,7 +1757,6 @@ again: } #endif -#if NBPF > 0 /* * Don't pass packet up to the ether_input() layer unless it's * a broadcast packet, multicast packet, matches our ethernet @@ -1779,7 +1770,6 @@ again: continue; } } -#endif /* Remove header from mbuf and pass it on. */ m_adj(m, sizeof(struct ether_header)); @@ -2198,14 +2188,12 @@ static void xl_start(ifp) } prev = cur_tx; -#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->xl_mbuf); -#endif } /* @@ -2347,14 +2335,12 @@ static void xl_start_90xB(ifp) prev->xl_ptr->xl_next = cur_tx->xl_phys; prev = cur_tx; -#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->xl_mbuf); -#endif XL_INC(idx, XL_TX_LIST_CNT); sc->xl_cdata.xl_tx_cnt++; |