PERFORCE change 43169 for review
Sam Leffler
sam at FreeBSD.org
Sat Nov 29 22:39:57 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=43169
Change 43169 by sam at sam_ebb on 2003/11/29 22:39:44
more radiotap shuffling based on exchanges with dyoung:
o updated radiotap.h to be committed w/ tcpdump changes
o drop rx timestamp (simplifies wi driver)
Affected files ...
.. //depot/projects/netperf/sys/dev/ath/if_ath.c#44 edit
.. //depot/projects/netperf/sys/dev/wi/if_wi.c#18 edit
.. //depot/projects/netperf/sys/dev/wi/if_wireg.h#6 edit
.. //depot/projects/netperf/sys/net80211/ieee80211_radiotap.h#6 edit
Differences ...
==== //depot/projects/netperf/sys/dev/ath/if_ath.c#44 (text+ko) ====
==== //depot/projects/netperf/sys/dev/wi/if_wi.c#18 (text+ko) ====
@@ -487,8 +487,7 @@
sc->sc_tx_th.wt_ihdr.it_present = WI_TX_RADIOTAP_PRESENT;
sc->sc_rx_th.wr_ihdr.it_len = sizeof(sc->sc_rx_th);
- sc->sc_rx_th.wr_ihdr.it_present = WI_RX_RADIOTAP_PRESENT0;
- sc->sc_rx_th.wr_present1 = WI_RX_RADIOTAP_PRESENT1;
+ sc->sc_rx_th.wr_ihdr.it_present = WI_RX_RADIOTAP_PRESENT;
#endif
return (0);
}
@@ -1530,9 +1529,6 @@
WI_RSSI_TO_DBM(sc, frmhdr.wi_rx_signal);
sc->sc_rx_th.wr_antnoise =
WI_RSSI_TO_DBM(sc, frmhdr.wi_rx_silence);
- sc->sc_rx_th.wr_time =
- htole32((frmhdr.wi_rx_tstamp1 << 16) |
- frmhdr.wi_rx_tstamp0);
sc->sc_rx_th.wr_flags = 0;
if (frmhdr.wi_status & WI_STAT_PCF)
sc->sc_rx_th.wr_flags |= IEEE80211_RADIOTAP_F_CFP;
==== //depot/projects/netperf/sys/dev/wi/if_wireg.h#6 (text+ko) ====
@@ -684,26 +684,21 @@
/*
* Radio capture format for Prism.
*/
-#define WI_RX_RADIOTAP_PRESENT0 \
+#define WI_RX_RADIOTAP_PRESENT \
((1 << IEEE80211_RADIOTAP_FLAGS) | \
(1 << IEEE80211_RADIOTAP_RATE) | \
(1 << IEEE80211_RADIOTAP_CHANNEL) | \
(1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL) | \
- (1 << IEEE80211_RADIOTAP_DB_ANTNOISE) | \
- (1 << IEEE80211_RADIOTAP_EXT))
+ (1 << IEEE80211_RADIOTAP_DB_ANTNOISE))
-#define WI_RX_RADIOTAP_PRESENT1 (1 << (IEEE80211_RADIOTAP_TIME - 32))
-
struct wi_rx_radiotap_header {
struct ieee80211_radiotap_header wr_ihdr;
- u_int32_t wr_present1;
u_int8_t wr_flags;
u_int8_t wr_rate;
u_int16_t wr_chan_freq;
u_int16_t wr_chan_flags;
u_int8_t wr_antsignal;
u_int8_t wr_antnoise;
- u_int32_t wr_time;
};
#define WI_TX_RADIOTAP_PRESENT \
==== //depot/projects/netperf/sys/net80211/ieee80211_radiotap.h#6 (text+ko) ====
@@ -1,5 +1,5 @@
/* $FreeBSD: src/sys/net80211/ieee80211_radiotap.h,v 1.1 2003/09/05 22:19:32 sam Exp $ */
-/* $NetBSD: ieee80211_radiotap.h,v 1.2 2003/09/14 01:14:55 dyoung Exp $ */
+/* $NetBSD: ieee80211_radiotap.h,v 1.3 2003/11/16 09:02:42 dyoung Exp $ */
/*-
* Copyright (c) 2003, 2004 David Young. All rights reserved.
@@ -46,9 +46,11 @@
* function of...") that I cannot set false expectations for lawyerly
* readers.
*/
+#ifdef _KERNEL
#ifndef DLT_IEEE802_11_RADIO
#define DLT_IEEE802_11_RADIO 127 /* 802.11 plus WLAN header */
#endif
+#endif /* _KERNEL */
/* The radio capture header precedes the 802.11 header. */
struct ieee80211_radiotap_header {
@@ -94,15 +96,27 @@
*
* Tx/Rx data rate
*
- * IEEE80211_RADIOTAP_DB_ANTSIGNAL int8_t decibel (dB)
+ * IEEE80211_RADIOTAP_DBM_ANTSIGNAL int8_t decibels from
+ * one milliwatt (dBm)
+ *
+ * RF signal power at the antenna, decibel difference from
+ * one milliwatt.
+ *
+ * IEEE80211_RADIOTAP_DBM_ANTNOISE int8_t decibels from
+ * one milliwatt (dBm)
+ *
+ * RF noise power at the antenna, decibel difference from one
+ * milliwatt.
+ *
+ * IEEE80211_RADIOTAP_DB_ANTSIGNAL u_int8_t decibel (dB)
*
- * RF signal power at the antenna, measured from a fixed,
- * arbitrary reference point.
+ * RF signal power at the antenna, decibel difference from an
+ * arbitrary, fixed reference.
*
- * IEEE80211_RADIOTAP_DB_ANTNOISE int8_t decibel (dB)
+ * IEEE80211_RADIOTAP_DB_ANTNOISE u_int8_t decibel (dB)
*
- * RF noise power at the antenna in decibels from an arbitrary,
- * fixed reference point.
+ * RF noise power at the antenna, decibel difference from an
+ * arbitrary, fixed reference point.
*
* IEEE80211_RADIOTAP_BARKER_CODE_LOCK u_int16_t unitless
*
@@ -123,8 +137,8 @@
* set at factory calibration. 0 is max power. Monotonically
* nondecreasing with lower power levels.
*
- * IEEE80211_RADIOTAP_DBM_TX_POWER u_int16_t decibels from
- * milliwatt (dBm)
+ * IEEE80211_RADIOTAP_DBM_TX_POWER int8_t decibels from
+ * one milliwatt (dBm)
*
* Transmit power expressed as dBm (decibels from a 1 milliwatt
* reference). This is the absolute power level measured at
@@ -135,14 +149,6 @@
* Properties of transmitted and received frames. See flags
* defined below.
*
- * IEEE80211_RADIOTAP_TIME u_int32_t microseconds
- *
- * For radios that provide it: packet arrival time in
- * microseconds. Prism hardware will provide this, but it is
- * not known whether it marks the first or the last bit of
- * the frame. Nor is it known where that bit has arrived
- * (antenna, modem, MAC?) when the time is measured.
- *
* IEEE80211_RADIOTAP_ANTENNA u_int8_t antenna index
*
* Unitless indication of the Rx/Tx antenna for this packet.
@@ -154,17 +160,30 @@
IEEE80211_RADIOTAP_RATE = 2,
IEEE80211_RADIOTAP_CHANNEL = 3,
IEEE80211_RADIOTAP_FHSS = 4,
- IEEE80211_RADIOTAP_DB_ANTSIGNAL = 5,
- IEEE80211_RADIOTAP_DB_ANTNOISE = 6,
+ IEEE80211_RADIOTAP_DBM_ANTSIGNAL = 5,
+ IEEE80211_RADIOTAP_DBM_ANTNOISE = 6,
IEEE80211_RADIOTAP_LOCK_QUALITY = 7,
IEEE80211_RADIOTAP_TX_ATTENUATION = 8,
IEEE80211_RADIOTAP_DB_TX_ATTENUATION = 9,
IEEE80211_RADIOTAP_DBM_TX_POWER = 10,
IEEE80211_RADIOTAP_ANTENNA = 11,
+ IEEE80211_RADIOTAP_DB_ANTSIGNAL = 12,
+ IEEE80211_RADIOTAP_DB_ANTNOISE = 13,
IEEE80211_RADIOTAP_EXT = 31,
- IEEE80211_RADIOTAP_TIME = 32
};
+#ifndef _KERNEL
+/* Channel flags. */
+#define IEEE80211_CHAN_TURBO 0x0010 /* Turbo channel */
+#define IEEE80211_CHAN_CCK 0x0020 /* CCK channel */
+#define IEEE80211_CHAN_OFDM 0x0040 /* OFDM channel */
+#define IEEE80211_CHAN_2GHZ 0x0080 /* 2 GHz spectrum channel. */
+#define IEEE80211_CHAN_5GHZ 0x0100 /* 5 GHz spectrum channel */
+#define IEEE80211_CHAN_PASSIVE 0x0200 /* Only passive scan allowed */
+#define IEEE80211_CHAN_DYN 0x0400 /* Dynamic CCK-OFDM channel */
+#define IEEE80211_CHAN_GFSK 0x0800 /* GFSK channel (FHSS PHY) */
+#endif /* !_KERNEL */
+
/* For IEEE80211_RADIOTAP_FLAGS */
#define IEEE80211_RADIOTAP_F_CFP 0x01 /* sent/received
* during CFP
More information about the p4-projects
mailing list