summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2016-04-27 15:44:28 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2016-04-27 15:44:28 +0000
commita0cb11995f203ce8dae35306b487d1577ced558a (patch)
tree0607990ae4350d9391e768881019b6528031f2e8
parentf8b57958a9fd94914e7953afb9c15b44af34876b (diff)
Expand and remove macro OCTEON_ETH_TAP.
-rw-r--r--sys/arch/octeon/dev/if_cnmac.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/sys/arch/octeon/dev/if_cnmac.c b/sys/arch/octeon/dev/if_cnmac.c
index 03d07466486..dfb346e7243 100644
--- a/sys/arch/octeon/dev/if_cnmac.c
+++ b/sys/arch/octeon/dev/if_cnmac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_cnmac.c,v 1.40 2016/04/26 11:22:05 visa Exp $ */
+/* $OpenBSD: if_cnmac.c,v 1.41 2016/04/27 15:44:27 visa Exp $ */
/*
* Copyright (c) 2007 Internet Initiative Japan, Inc.
@@ -108,17 +108,6 @@
(((uint32_t)OCTEON_POOL_SIZE_CMD / sizeof(uint64_t)) - 1)
#define FPA_COMMAND_BUFFER_POOL_NWORDS OCTEON_POOL_NWORDS_CMD /* XXX */
-#if NBPFILTER > 0
-#define OCTEON_ETH_TAP(ifp, m, dir) \
- do { \
- /* Pass this up to any BPF listeners. */ \
- if ((ifp)->if_bpf) \
- bpf_mtap((ifp)->if_bpf, (m), (dir)); \
- } while (0/* CONSTCOND */)
-#else
-#define OCTEON_ETH_TAP(ifp, m, dir)
-#endif /* NBPFILTER > 0 */
-
void octeon_eth_buf_init(struct octeon_eth_softc *);
int octeon_eth_match(struct device *, void *, void *);
@@ -988,7 +977,10 @@ octeon_eth_start(struct ifnet *ifp)
if (m == NULL)
return;
- OCTEON_ETH_TAP(ifp, m, BPF_DIRECTION_OUT);
+#if NBPFILTER > 0
+ if (ifp->if_bpf != NULL)
+ bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT);
+#endif
/* XXX */
if (ml_len(&sc->sc_sendq) > sc->sc_soft_req_thresh)