diff options
author | John Baldwin <jhb@FreeBSD.org> | 2006-12-29 13:59:50 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2006-12-29 13:59:50 +0000 |
commit | 0dea849ae93133a4a02f0d5fd58340d3df92668b (patch) | |
tree | 5677cbe8565b075c609dc8ea0a6087d8251a7bca /sys/dev/en | |
parent | 240589a9fec34f1cd809cc429f2c56147a0383bd (diff) | |
download | src-0dea849ae93133a4a02f0d5fd58340d3df92668b.tar.gz src-0dea849ae93133a4a02f0d5fd58340d3df92668b.zip |
Various bpf(4) related fixes to catch places up to the new bpf(4)
semantics.
- Stop testing bpf pointers for NULL. In some cases use
bpf_peers_present() and then call the function directly inside the
conditional block instead of the macro.
- For places where the entire conditional block is the macro, remove the
test and make the macro unconditional.
- Use BPF_MTAP() in if_pfsync on FreeBSD instead of an expanded version of
the old semantics.
Reviewed by: csjp (older version)
Notes
Notes:
svn path=/head/; revision=165632
Diffstat (limited to 'sys/dev/en')
-rw-r--r-- | sys/dev/en/midway.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/en/midway.c b/sys/dev/en/midway.c index cfd8fd6fa18e..673219031f63 100644 --- a/sys/dev/en/midway.c +++ b/sys/dev/en/midway.c @@ -776,7 +776,7 @@ en_txdma(struct en_softc *sc, struct en_txslot *slot) sc->vccs[tx.vci]->obytes += tx.datalen; #ifdef ENABLE_BPF - if (sc->ifp->if_bpf != NULL) { + if (bpf_peers_present(sc->ifp->if_bpf)) { /* * adjust the top of the mbuf to skip the TBD if present * before passing the packet to bpf. @@ -794,7 +794,7 @@ en_txdma(struct en_softc *sc, struct en_txslot *slot) tx.m->m_pkthdr.len = tx.datalen; } - BPF_MTAP(sc->ifp, tx.m); + bpf_mtap(sc->ifp, tx.m); } #endif |