Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Dec 2005 04:33:21 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 87680 for review
Message-ID:  <200512030433.jB34XLKC008271@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=87680

Change 87680 by sam@sam_ebb on 2005/12/03 04:32:58

	add tsf to radiotap on the tx side

Affected files ...

.. //depot/projects/wifi/sys/dev/ath/if_ath.c#121 edit
.. //depot/projects/wifi/sys/dev/ath/if_athioctl.h#13 edit

Differences ...

==== //depot/projects/wifi/sys/dev/ath/if_ath.c#121 (text+ko) ====

@@ -4169,6 +4169,9 @@
 	if (ic->ic_rawbpf)
 		bpf_mtap(ic->ic_rawbpf, m0);
 	if (sc->sc_drvbpf) {
+		u_int64_t tsf = ath_hal_gettsf64(ah);
+
+		sc->sc_tx_th.wt_tsf = htole64(tsf);
 		sc->sc_tx_th.wt_flags = sc->sc_hwmap[txrate].txflags;
 		if (iswep)
 			sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP;

==== //depot/projects/wifi/sys/dev/ath/if_athioctl.h#13 (text+ko) ====

@@ -148,7 +148,7 @@
 struct ath_rx_radiotap_header {
 	struct ieee80211_radiotap_header wr_ihdr;
 	u_int64_t	wr_tsf;
-	u_int8_t	wr_flags;		/* XXX for padding */
+	u_int8_t	wr_flags;
 	u_int8_t	wr_rate;
 	u_int16_t	wr_chan_freq;
 	u_int16_t	wr_chan_flags;
@@ -158,6 +158,7 @@
 };
 
 #define ATH_TX_RADIOTAP_PRESENT (		\
+	(1 << IEEE80211_RADIOTAP_TSFT)		| \
 	(1 << IEEE80211_RADIOTAP_FLAGS)		| \
 	(1 << IEEE80211_RADIOTAP_RATE)		| \
 	(1 << IEEE80211_RADIOTAP_CHANNEL)	| \
@@ -167,7 +168,8 @@
 
 struct ath_tx_radiotap_header {
 	struct ieee80211_radiotap_header wt_ihdr;
-	u_int8_t	wt_flags;		/* XXX for padding */
+	u_int64_t	wt_tsf;
+	u_int8_t	wt_flags;
 	u_int8_t	wt_rate;
 	u_int16_t	wt_chan_freq;
 	u_int16_t	wt_chan_flags;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512030433.jB34XLKC008271>