if_athioctl.h (236833) | if_athioctl.h (237522) |
---|---|
1/*- 2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 22 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGES. 28 * | 1/*- 2 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 22 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 * THE POSSIBILITY OF SUCH DAMAGES. 28 * |
29 * $FreeBSD: head/sys/dev/ath/if_athioctl.h 236833 2012-06-10 06:42:18Z adrian $ | 29 * $FreeBSD: head/sys/dev/ath/if_athioctl.h 237522 2012-06-24 07:01:49Z adrian $ |
30 */ 31 32/* 33 * Ioctl-related defintions for the Atheros Wireless LAN controller driver. 34 */ 35#ifndef _DEV_ATH_ATHIOCTL_H 36#define _DEV_ATH_ATHIOCTL_H 37 --- 144 unchanged lines hidden (view full) --- 182 183}; 184#define SIOCGATHDIAG _IOWR('i', 138, struct ath_diag) 185#define SIOCGATHPHYERR _IOWR('i', 140, struct ath_diag) 186 187/* 188 * Radio capture format. 189 */ | 30 */ 31 32/* 33 * Ioctl-related defintions for the Atheros Wireless LAN controller driver. 34 */ 35#ifndef _DEV_ATH_ATHIOCTL_H 36#define _DEV_ATH_ATHIOCTL_H 37 --- 144 unchanged lines hidden (view full) --- 182 183}; 184#define SIOCGATHDIAG _IOWR('i', 138, struct ath_diag) 185#define SIOCGATHPHYERR _IOWR('i', 140, struct ath_diag) 186 187/* 188 * Radio capture format. 189 */ |
190#define ATH_RX_RADIOTAP_PRESENT ( \ | 190#define ATH_RX_RADIOTAP_PRESENT_BASE ( \ |
191 (1 << IEEE80211_RADIOTAP_TSFT) | \ 192 (1 << IEEE80211_RADIOTAP_FLAGS) | \ 193 (1 << IEEE80211_RADIOTAP_RATE) | \ 194 (1 << IEEE80211_RADIOTAP_ANTENNA) | \ 195 (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | \ 196 (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE) | \ 197 (1 << IEEE80211_RADIOTAP_XCHANNEL) | \ 198 0) 199 | 191 (1 << IEEE80211_RADIOTAP_TSFT) | \ 192 (1 << IEEE80211_RADIOTAP_FLAGS) | \ 193 (1 << IEEE80211_RADIOTAP_RATE) | \ 194 (1 << IEEE80211_RADIOTAP_ANTENNA) | \ 195 (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | \ 196 (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE) | \ 197 (1 << IEEE80211_RADIOTAP_XCHANNEL) | \ 198 0) 199 |
200#ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT 201#define ATH_RX_RADIOTAP_PRESENT \ 202 (ATH_RX_RADIOTAP_PRESENT_BASE | \ 203 (1 << IEEE80211_RADIOTAP_VENDOREXT) | \ 204 (1 << IEEE80211_RADIOTAP_EXT) | \ 205 0) 206#else 207#define ATH_RX_RADIOTAP_PRESENT ATH_RX_RADIOTAP_PRESENT_BASE 208#endif /* ATH_ENABLE_RADIOTAP_PRESENT */ 209 210#ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT 211/* 212 * This is higher than the vendor bitmap used inside 213 * the Atheros reference codebase. 214 */ 215 216/* Bit 8 */ 217#define ATH_RADIOTAP_VENDOR_HEADER 8 218 219/* 220 * Using four chains makes all the fields in the 221 * per-chain info header be 4-byte aligned. 222 */ 223#define ATH_RADIOTAP_MAX_CHAINS 4 224 225/* 226 * The vendor radiotap header data needs to be: 227 * 228 * + Aligned to a 4 byte address 229 * + .. so all internal fields are 4 bytes aligned; 230 * + .. and no 64 bit fields are allowed. 231 * 232 * So padding is required to ensure this is the case. 233 * 234 * Note that because of the lack of alignment with the 235 * vendor header (6 bytes), the first field must be 236 * two bytes so it can be accessed by alignment-strict 237 * platform (eg MIPS.) 238 */ 239struct ath_radiotap_vendor_hdr { /* 30 bytes */ 240 uint8_t vh_version; /* 1 */ 241 uint8_t vh_rx_chainmask; /* 1 */ 242 243 /* At this point it should be 4 byte aligned */ 244 uint32_t evm[ATH_RADIOTAP_MAX_CHAINS]; /* 4 * 4 = 16 */ 245 246 uint8_t rssi_ctl[ATH_RADIOTAP_MAX_CHAINS]; /* 4 */ 247 uint8_t rssi_ext[ATH_RADIOTAP_MAX_CHAINS]; /* 4 */ 248 249 uint8_t vh_phyerr_code; /* Phy error code, or 0xff */ 250 uint8_t vh_rs_status; /* RX status */ 251 uint8_t vh_rssi; /* Raw RSSI */ 252 uint8_t vh_pad1[1]; /* Pad to 4 byte boundary */ 253} __packed; 254#endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ 255 |
|
200struct ath_rx_radiotap_header { 201 struct ieee80211_radiotap_header wr_ihdr; | 256struct ath_rx_radiotap_header { 257 struct ieee80211_radiotap_header wr_ihdr; |
258 259#ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT 260 /* Vendor extension header bitmap */ 261 uint32_t wr_ext_bitmap; /* 4 */ 262 263 /* 264 * This padding is needed because: 265 * + the radiotap header is 8 bytes; 266 * + the extension bitmap is 4 bytes; 267 * + the tsf is 8 bytes, so it must start on an 8 byte 268 * boundary. 269 */ 270 uint32_t wr_pad1; 271#endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ 272 273 /* Normal radiotap fields */ |
|
202 u_int64_t wr_tsf; 203 u_int8_t wr_flags; 204 u_int8_t wr_rate; 205 int8_t wr_antsignal; 206 int8_t wr_antnoise; 207 u_int8_t wr_antenna; 208 u_int8_t wr_pad[3]; 209 u_int32_t wr_chan_flags; 210 u_int16_t wr_chan_freq; 211 u_int8_t wr_chan_ieee; 212 int8_t wr_chan_maxpow; | 274 u_int64_t wr_tsf; 275 u_int8_t wr_flags; 276 u_int8_t wr_rate; 277 int8_t wr_antsignal; 278 int8_t wr_antnoise; 279 u_int8_t wr_antenna; 280 u_int8_t wr_pad[3]; 281 u_int32_t wr_chan_flags; 282 u_int16_t wr_chan_freq; 283 u_int8_t wr_chan_ieee; 284 int8_t wr_chan_maxpow; |
285 286#ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT 287 /* 288 * Vendor header section, as required by the 289 * presence of the vendor extension bit and bitmap 290 * entry. 291 * 292 * XXX This must be aligned to a 4 byte address? 293 * XXX or 8 byte address? 294 */ 295 struct ieee80211_radiotap_vendor_header wr_vh; /* 6 bytes */ 296 297 /* 298 * Because of the lack of alignment enforced by the above 299 * header, this vendor section won't be aligned in any 300 * useful way. So, this will include a two-byte version 301 * value which will force the structure to be 4-byte aligned. 302 */ 303 struct ath_radiotap_vendor_hdr wr_v; 304#endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ |
|
213} __packed; 214 215#define ATH_TX_RADIOTAP_PRESENT ( \ 216 (1 << IEEE80211_RADIOTAP_TSFT) | \ 217 (1 << IEEE80211_RADIOTAP_FLAGS) | \ 218 (1 << IEEE80211_RADIOTAP_RATE) | \ 219 (1 << IEEE80211_RADIOTAP_DBM_TX_POWER) | \ 220 (1 << IEEE80211_RADIOTAP_ANTENNA) | \ --- 47 unchanged lines hidden --- | 305} __packed; 306 307#define ATH_TX_RADIOTAP_PRESENT ( \ 308 (1 << IEEE80211_RADIOTAP_TSFT) | \ 309 (1 << IEEE80211_RADIOTAP_FLAGS) | \ 310 (1 << IEEE80211_RADIOTAP_RATE) | \ 311 (1 << IEEE80211_RADIOTAP_DBM_TX_POWER) | \ 312 (1 << IEEE80211_RADIOTAP_ANTENNA) | \ --- 47 unchanged lines hidden --- |