diff options
author | sam <sam@FreeBSD.org> | 2003-12-28 07:00:32 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2003-12-28 07:00:32 +0000 |
commit | 3effae1c9990745cc4a2f29dd2963a36d2465cb5 (patch) | |
tree | 9597c9c18309b158f12991a18d85f8920b7b359b /sys/dev/ath/if_ath.c | |
parent | c93326599e9e90c429b74119001b593b342009f1 (diff) | |
download | FreeBSD-src-3effae1c9990745cc4a2f29dd2963a36d2465cb5.zip FreeBSD-src-3effae1c9990745cc4a2f29dd2963a36d2465cb5.tar.gz |
update radiotap support to reflect recent changes:
o move tx taps from ath_start to ath_tx_start so lots more
state is available to tap
o add tx flags
o add tx rate
o add tx power (constant for the moment)
o add tx antenna state
Diffstat (limited to 'sys/dev/ath/if_ath.c')
-rw-r--r-- | sys/dev/ath/if_ath.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 3a7313d..ac940bc 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -773,15 +773,6 @@ ath_start(struct ifnet *ifp) } sc->sc_stats.ast_tx_mgmt++; } - if (ic->ic_rawbpf) - bpf_mtap(ic->ic_rawbpf, m); - - if (sc->sc_drvbpf) { - sc->sc_tx_th.wt_rate = - ni->ni_rates.rs_rates[ni->ni_txrate]; - bpf_mtap2(sc->sc_drvbpf, - &sc->sc_tx_th, sizeof(sc->sc_tx_th), m); - } if (ath_tx_start(sc, ni, bf, m)) { bad: @@ -2039,6 +2030,22 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, struct ath_buf *bf else antenna = an->an_rx_hist[an->an_rx_hist_next].arh_antenna; + if (ic->ic_rawbpf) + bpf_mtap(ic->ic_rawbpf, m0); + if (sc->sc_drvbpf) { + sc->sc_tx_th.wt_flags = 0; + if (shortPreamble) + sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; + if (iswep) + sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP; + sc->sc_tx_th.wt_rate = ni->ni_rates.rs_rates[ni->ni_txrate]; + sc->sc_tx_th.wt_txpower = 60/2; /* XXX */ + sc->sc_tx_th.wt_antenna = antenna; + + bpf_mtap2(sc->sc_drvbpf, + &sc->sc_tx_th, sizeof(sc->sc_tx_th), m0); + } + /* * Formulate first tx descriptor with tx controls. */ |