summaryrefslogtreecommitdiff
path: root/sys/dev/ic/rtw.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2006-03-25 22:41:49 +0000
committerDamien Miller <djm@cvs.openbsd.org>2006-03-25 22:41:49 +0000
commit24436414aab60dc84348ec54f23b324b4ae862a3 (patch)
treeee35283622a78eeac5656cb5661954771faf6520 /sys/dev/ic/rtw.c
parentd1265a1a72755bd0209950654a6df47287781241 (diff)
allow bpf(4) to ignore packets based on their direction (inbound or
outbound), using a new BIOCSDIRFILT ioctl; guidance, feedback and ok canacar@
Diffstat (limited to 'sys/dev/ic/rtw.c')
-rw-r--r--sys/dev/ic/rtw.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c
index 785187fd13e..5e91dfa13ce 100644
--- a/sys/dev/ic/rtw.c
+++ b/sys/dev/ic/rtw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtw.c,v 1.53 2006/02/05 23:47:47 jsg Exp $ */
+/* $OpenBSD: rtw.c,v 1.54 2006/03/25 22:41:43 djm Exp $ */
/* $NetBSD: rtw.c,v 1.29 2004/12/27 19:49:16 dyoung Exp $ */
/*-
@@ -1334,7 +1334,7 @@ rtw_intr_rx(struct rtw_softc *sc, u_int16_t isr)
mb.m_len = sizeof(sc->sc_rxtapu);
mb.m_next = m;
mb.m_pkthdr.len += mb.m_len;
- bpf_mtap(sc->sc_radiobpf, &mb);
+ bpf_mtap(sc->sc_radiobpf, &mb, BPF_DIRECTION_IN);
}
#endif /* NPBFILTER > 0 */
@@ -2826,7 +2826,7 @@ rtw_dequeue(struct ifnet *ifp, struct rtw_txsoft_blk **tsbp,
ifp->if_opackets++;
#if NBPFILTER > 0
if (ifp->if_bpf)
- bpf_mtap(ifp->if_bpf, m0);
+ bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT);
#endif
if ((m0 = ieee80211_encap(ifp, m0, nip)) == NULL) {
DPRINTF(sc, RTW_DEBUG_XMIT,
@@ -3065,7 +3065,8 @@ rtw_start(struct ifnet *ifp)
#if NBPFILTER > 0
if (ic->ic_rawbpf != NULL)
- bpf_mtap((caddr_t)ic->ic_rawbpf, m0);
+ bpf_mtap((caddr_t)ic->ic_rawbpf, m0,
+ BPF_DIRECTION_OUT);
if (sc->sc_radiobpf != NULL) {
struct mbuf mb;
@@ -3083,7 +3084,7 @@ rtw_start(struct ifnet *ifp)
mb.m_len = sizeof(sc->sc_txtapu);
mb.m_next = m0;
mb.m_pkthdr.len += mb.m_len;
- bpf_mtap(sc->sc_radiobpf, &mb);
+ bpf_mtap(sc->sc_radiobpf, &mb, BPF_DIRECTION_OUT);
}
#endif /* NPBFILTER > 0 */