summaryrefslogtreecommitdiff
path: root/sys/pci/if_mx.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pci/if_mx.c')
-rw-r--r--sys/pci/if_mx.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/pci/if_mx.c b/sys/pci/if_mx.c
index 739ff3bd1d43..95e383b85b46 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);