diff options
Diffstat (limited to 'include/net/ieee80211_radiotap.h')
-rw-r--r-- | include/net/ieee80211_radiotap.h | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index c6e0d81ea785..f3bc00ee628b 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h | |||
@@ -66,7 +66,9 @@ | |||
66 | */ | 66 | */ |
67 | #define IEEE80211_RADIOTAP_HDRLEN 64 | 67 | #define IEEE80211_RADIOTAP_HDRLEN 64 |
68 | 68 | ||
69 | /* The radio capture header precedes the 802.11 header. */ | 69 | /* The radio capture header precedes the 802.11 header. |
70 | * All data in the header is little endian on all platforms. | ||
71 | */ | ||
70 | struct ieee80211_radiotap_header { | 72 | struct ieee80211_radiotap_header { |
71 | u8 it_version; /* Version 0. Only increases | 73 | u8 it_version; /* Version 0. Only increases |
72 | * for drastic changes, | 74 | * for drastic changes, |
@@ -74,12 +76,12 @@ struct ieee80211_radiotap_header { | |||
74 | * new fields does not count. | 76 | * new fields does not count. |
75 | */ | 77 | */ |
76 | u8 it_pad; | 78 | u8 it_pad; |
77 | u16 it_len; /* length of the whole | 79 | __le16 it_len; /* length of the whole |
78 | * header in bytes, including | 80 | * header in bytes, including |
79 | * it_version, it_pad, | 81 | * it_version, it_pad, |
80 | * it_len, and data fields. | 82 | * it_len, and data fields. |
81 | */ | 83 | */ |
82 | u32 it_present; /* A bitmap telling which | 84 | __le32 it_present; /* A bitmap telling which |
83 | * fields are present. Set bit 31 | 85 | * fields are present. Set bit 31 |
84 | * (0x80000000) to extend the | 86 | * (0x80000000) to extend the |
85 | * bitmap by another 32 bits. | 87 | * bitmap by another 32 bits. |
@@ -88,104 +90,103 @@ struct ieee80211_radiotap_header { | |||
88 | */ | 90 | */ |
89 | }; | 91 | }; |
90 | 92 | ||
91 | /* Name Data type Units | 93 | /* Name Data type Units |
92 | * ---- --------- ----- | 94 | * ---- --------- ----- |
93 | * | 95 | * |
94 | * IEEE80211_RADIOTAP_TSFT u64 microseconds | 96 | * IEEE80211_RADIOTAP_TSFT __le64 microseconds |
95 | * | 97 | * |
96 | * Value in microseconds of the MAC's 64-bit 802.11 Time | 98 | * Value in microseconds of the MAC's 64-bit 802.11 Time |
97 | * Synchronization Function timer when the first bit of the | 99 | * Synchronization Function timer when the first bit of the |
98 | * MPDU arrived at the MAC. For received frames, only. | 100 | * MPDU arrived at the MAC. For received frames, only. |
99 | * | 101 | * |
100 | * IEEE80211_RADIOTAP_CHANNEL 2 x u16 MHz, bitmap | 102 | * IEEE80211_RADIOTAP_CHANNEL 2 x __le16 MHz, bitmap |
101 | * | 103 | * |
102 | * Tx/Rx frequency in MHz, followed by flags (see below). | 104 | * Tx/Rx frequency in MHz, followed by flags (see below). |
103 | * | 105 | * |
104 | * IEEE80211_RADIOTAP_FHSS u16 see below | 106 | * IEEE80211_RADIOTAP_FHSS __le16 see below |
105 | * | 107 | * |
106 | * For frequency-hopping radios, the hop set (first byte) | 108 | * For frequency-hopping radios, the hop set (first byte) |
107 | * and pattern (second byte). | 109 | * and pattern (second byte). |
108 | * | 110 | * |
109 | * IEEE80211_RADIOTAP_RATE u8 500kb/s | 111 | * IEEE80211_RADIOTAP_RATE u8 500kb/s |
110 | * | 112 | * |
111 | * Tx/Rx data rate | 113 | * Tx/Rx data rate |
112 | * | 114 | * |
113 | * IEEE80211_RADIOTAP_DBM_ANTSIGNAL int8_t decibels from | 115 | * IEEE80211_RADIOTAP_DBM_ANTSIGNAL s8 decibels from |
114 | * one milliwatt (dBm) | 116 | * one milliwatt (dBm) |
115 | * | 117 | * |
116 | * RF signal power at the antenna, decibel difference from | 118 | * RF signal power at the antenna, decibel difference from |
117 | * one milliwatt. | 119 | * one milliwatt. |
118 | * | 120 | * |
119 | * IEEE80211_RADIOTAP_DBM_ANTNOISE int8_t decibels from | 121 | * IEEE80211_RADIOTAP_DBM_ANTNOISE s8 decibels from |
120 | * one milliwatt (dBm) | 122 | * one milliwatt (dBm) |
121 | * | 123 | * |
122 | * RF noise power at the antenna, decibel difference from one | 124 | * RF noise power at the antenna, decibel difference from one |
123 | * milliwatt. | 125 | * milliwatt. |
124 | * | 126 | * |
125 | * IEEE80211_RADIOTAP_DB_ANTSIGNAL u8 decibel (dB) | 127 | * IEEE80211_RADIOTAP_DB_ANTSIGNAL u8 decibel (dB) |
126 | * | 128 | * |
127 | * RF signal power at the antenna, decibel difference from an | 129 | * RF signal power at the antenna, decibel difference from an |
128 | * arbitrary, fixed reference. | 130 | * arbitrary, fixed reference. |
129 | * | 131 | * |
130 | * IEEE80211_RADIOTAP_DB_ANTNOISE u8 decibel (dB) | 132 | * IEEE80211_RADIOTAP_DB_ANTNOISE u8 decibel (dB) |
131 | * | 133 | * |
132 | * RF noise power at the antenna, decibel difference from an | 134 | * RF noise power at the antenna, decibel difference from an |
133 | * arbitrary, fixed reference point. | 135 | * arbitrary, fixed reference point. |
134 | * | 136 | * |
135 | * IEEE80211_RADIOTAP_LOCK_QUALITY u16 unitless | 137 | * IEEE80211_RADIOTAP_LOCK_QUALITY __le16 unitless |
136 | * | 138 | * |
137 | * Quality of Barker code lock. Unitless. Monotonically | 139 | * Quality of Barker code lock. Unitless. Monotonically |
138 | * nondecreasing with "better" lock strength. Called "Signal | 140 | * nondecreasing with "better" lock strength. Called "Signal |
139 | * Quality" in datasheets. (Is there a standard way to measure | 141 | * Quality" in datasheets. (Is there a standard way to measure |
140 | * this?) | 142 | * this?) |
141 | * | 143 | * |
142 | * IEEE80211_RADIOTAP_TX_ATTENUATION u16 unitless | 144 | * IEEE80211_RADIOTAP_TX_ATTENUATION __le16 unitless |
143 | * | 145 | * |
144 | * Transmit power expressed as unitless distance from max | 146 | * Transmit power expressed as unitless distance from max |
145 | * power set at factory calibration. 0 is max power. | 147 | * power set at factory calibration. 0 is max power. |
146 | * Monotonically nondecreasing with lower power levels. | 148 | * Monotonically nondecreasing with lower power levels. |
147 | * | 149 | * |
148 | * IEEE80211_RADIOTAP_DB_TX_ATTENUATION u16 decibels (dB) | 150 | * IEEE80211_RADIOTAP_DB_TX_ATTENUATION __le16 decibels (dB) |
149 | * | 151 | * |
150 | * Transmit power expressed as decibel distance from max power | 152 | * Transmit power expressed as decibel distance from max power |
151 | * set at factory calibration. 0 is max power. Monotonically | 153 | * set at factory calibration. 0 is max power. Monotonically |
152 | * nondecreasing with lower power levels. | 154 | * nondecreasing with lower power levels. |
153 | * | 155 | * |
154 | * IEEE80211_RADIOTAP_DBM_TX_POWER int8_t decibels from | 156 | * IEEE80211_RADIOTAP_DBM_TX_POWER s8 decibels from |
155 | * one milliwatt (dBm) | 157 | * one milliwatt (dBm) |
156 | * | 158 | * |
157 | * Transmit power expressed as dBm (decibels from a 1 milliwatt | 159 | * Transmit power expressed as dBm (decibels from a 1 milliwatt |
158 | * reference). This is the absolute power level measured at | 160 | * reference). This is the absolute power level measured at |
159 | * the antenna port. | 161 | * the antenna port. |
160 | * | 162 | * |
161 | * IEEE80211_RADIOTAP_FLAGS u8 bitmap | 163 | * IEEE80211_RADIOTAP_FLAGS u8 bitmap |
162 | * | 164 | * |
163 | * Properties of transmitted and received frames. See flags | 165 | * Properties of transmitted and received frames. See flags |
164 | * defined below. | 166 | * defined below. |
165 | * | 167 | * |
166 | * IEEE80211_RADIOTAP_ANTENNA u8 antenna index | 168 | * IEEE80211_RADIOTAP_ANTENNA u8 antenna index |
167 | * | 169 | * |
168 | * Unitless indication of the Rx/Tx antenna for this packet. | 170 | * Unitless indication of the Rx/Tx antenna for this packet. |
169 | * The first antenna is antenna 0. | 171 | * The first antenna is antenna 0. |
170 | * | 172 | * |
171 | * IEEE80211_RADIOTAP_RX_FLAGS u_int16_t bitmap | 173 | * IEEE80211_RADIOTAP_RX_FLAGS __le16 bitmap |
172 | * | 174 | * |
173 | * Properties of received frames. See flags defined below. | 175 | * Properties of received frames. See flags defined below. |
174 | * | 176 | * |
175 | * IEEE80211_RADIOTAP_TX_FLAGS u_int16_t bitmap | 177 | * IEEE80211_RADIOTAP_TX_FLAGS __le16 bitmap |
176 | * | 178 | * |
177 | * Properties of transmitted frames. See flags defined below. | 179 | * Properties of transmitted frames. See flags defined below. |
178 | * | 180 | * |
179 | * IEEE80211_RADIOTAP_RTS_RETRIES u_int8_t data | 181 | * IEEE80211_RADIOTAP_RTS_RETRIES u8 data |
180 | * | 182 | * |
181 | * Number of rts retries a transmitted frame used. | 183 | * Number of rts retries a transmitted frame used. |
182 | * | 184 | * |
183 | * IEEE80211_RADIOTAP_DATA_RETRIES u_int8_t data | 185 | * IEEE80211_RADIOTAP_DATA_RETRIES u8 data |
184 | * | 186 | * |
185 | * Number of unicast retries a transmitted frame used. | 187 | * Number of unicast retries a transmitted frame used. |
186 | * | 188 | * |
187 | * | 189 | * IEEE80211_RADIOTAP_FCS __le32 data |
188 | * IEEE80211_RADIOTAP_FCS u32 data | ||
189 | * | 190 | * |
190 | * FCS from frame in network byte order. | 191 | * FCS from frame in network byte order. |
191 | */ | 192 | */ |