summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordamien <damien@FreeBSD.org>2005-11-24 21:40:24 +0000
committerdamien <damien@FreeBSD.org>2005-11-24 21:40:24 +0000
commit282657ca13ce99be3b7cc8747524b580f1d9b109 (patch)
treedac64c2f308ab30d9970b4f02808e1dc2c26c269 /sys
parent3f8ead2fdf54ffaba29f0b1c6599cebf46191ba5 (diff)
downloadFreeBSD-src-282657ca13ce99be3b7cc8747524b580f1d9b109.zip
FreeBSD-src-282657ca13ce99be3b7cc8747524b580f1d9b109.tar.gz
Send the packet to BPF after setting the duration field of the frame.
MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/if_ural.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/sys/dev/usb/if_ural.c b/sys/dev/usb/if_ural.c
index 1623de2..9685e8b 100644
--- a/sys/dev/usb/if_ural.c
+++ b/sys/dev/usb/if_ural.c
@@ -1143,18 +1143,6 @@ ural_tx_mgt(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
rate = IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? 12 : 4;
- if (sc->sc_drvbpf != NULL) {
- struct ural_tx_radiotap_header *tap = &sc->sc_txtap;
-
- tap->wt_flags = 0;
- tap->wt_rate = rate;
- tap->wt_chan_freq = htole16(ic->ic_ibss_chan->ic_freq);
- tap->wt_chan_flags = htole16(ic->ic_ibss_chan->ic_flags);
- tap->wt_antenna = sc->tx_ant;
-
- bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_txtap_len, m0);
- }
-
data->m = m0;
data->ni = ni;
@@ -1174,6 +1162,18 @@ ural_tx_mgt(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
flags |= RAL_TX_TIMESTAMP;
}
+ if (sc->sc_drvbpf != NULL) {
+ struct ural_tx_radiotap_header *tap = &sc->sc_txtap;
+
+ tap->wt_flags = 0;
+ tap->wt_rate = rate;
+ tap->wt_chan_freq = htole16(ic->ic_ibss_chan->ic_freq);
+ tap->wt_chan_flags = htole16(ic->ic_ibss_chan->ic_flags);
+ tap->wt_antenna = sc->tx_ant;
+
+ bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_txtap_len, m0);
+ }
+
m_copydata(m0, 0, m0->m_pkthdr.len, data->buf + RAL_TX_DESC_SIZE);
ural_setup_tx_desc(sc, desc, flags, m0->m_pkthdr.len, rate);
@@ -1236,18 +1236,6 @@ ural_tx_data(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
wh = mtod(m0, struct ieee80211_frame *);
}
- if (sc->sc_drvbpf != NULL) {
- struct ural_tx_radiotap_header *tap = &sc->sc_txtap;
-
- tap->wt_flags = 0;
- tap->wt_rate = rate;
- tap->wt_chan_freq = htole16(ic->ic_ibss_chan->ic_freq);
- tap->wt_chan_flags = htole16(ic->ic_ibss_chan->ic_flags);
- tap->wt_antenna = sc->tx_ant;
-
- bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_txtap_len, m0);
- }
-
data = &sc->tx_data[0];
desc = (struct ural_tx_desc *)data->buf;
@@ -1263,6 +1251,18 @@ ural_tx_data(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
*(uint16_t *)wh->i_dur = htole16(dur);
}
+ if (sc->sc_drvbpf != NULL) {
+ struct ural_tx_radiotap_header *tap = &sc->sc_txtap;
+
+ tap->wt_flags = 0;
+ tap->wt_rate = rate;
+ tap->wt_chan_freq = htole16(ic->ic_ibss_chan->ic_freq);
+ tap->wt_chan_flags = htole16(ic->ic_ibss_chan->ic_flags);
+ tap->wt_antenna = sc->tx_ant;
+
+ bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_txtap_len, m0);
+ }
+
m_copydata(m0, 0, m0->m_pkthdr.len, data->buf + RAL_TX_DESC_SIZE);
ural_setup_tx_desc(sc, desc, flags, m0->m_pkthdr.len, rate);
OpenPOWER on IntegriCloud