2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by Bill Paul.
16 * 4. Neither the name of the author nor the names of any co-contributors
17 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
32 * $FreeBSD: src/sys/dev/wi/if_wavelan_ieee.h,v 1.18 2003/06/27 00:49:04 sam Exp $
33 * $DragonFly: src/sys/netproto/802_11/if_wavelan_ieee.h,v 1.1 2004/07/26 16:30:17 joerg Exp $
36 #ifndef _NETPROTO_802_11_IF_WAVELAN_IEEE_H
37 #define _NETPROTO_802_11_IF_WAVELAN_IEEE_H
39 #include <sys/ioccom.h>
42 * This header defines a simple command interface to the FreeBSD
43 * WaveLAN/IEEE driver (wi) driver, which is used to set certain
44 * device-specific parameters which can't be easily managed through
45 * ifconfig(8). No, sysctl(2) is not the answer. I said a _simple_
46 * interface, didn't I.
50 #define SIOCSWAVELAN SIOCSIFGENERIC
54 #define SIOCGWAVELAN SIOCGIFGENERIC
58 * Technically I don't think there's a limit to a record
59 * length. The largest record is the one that contains the CIS
60 * data, which is 240 words long, so 256 should be a safe
63 #define WI_MAX_DATALEN 512
68 uint16_t wi_val
[WI_MAX_DATALEN
];
72 * Private LTV records (interpreted only by the driver). This is
73 * a minor kludge to allow reading the interface statistics from
76 #define WI_RID_IFACE_STATS 0x0100
77 #define WI_RID_MGMT_XMIT 0x0200
78 #define WI_RID_ZERO_CACHE 0x0300
79 #define WI_RID_READ_CACHE 0x0400
80 #define WI_RID_FWDOWNLOAD 0x0500
81 #define WI_RID_MONITOR_MODE 0x0600
82 #define WI_RID_MIF 0x0700
83 #define WI_RID_SCAN_APS 0x0800
84 #define WI_RID_READ_APS 0x0900
96 #define WI_FCTL_VERS 0x0002
97 #define WI_FCTL_FTYPE 0x000C
98 #define WI_FCTL_STYPE 0x00F0
99 #define WI_FCTL_TODS 0x0100
100 #define WI_FCTL_FROMDS 0x0200
101 #define WI_FCTL_MOREFRAGS 0x0400
102 #define WI_FCTL_RETRY 0x0800
103 #define WI_FCTL_PM 0x1000
104 #define WI_FCTL_MOREDATA 0x2000
105 #define WI_FCTL_WEP 0x4000
106 #define WI_FCTL_ORDER 0x8000
108 #define WI_FTYPE_MGMT 0x0000
109 #define WI_FTYPE_CTL 0x0004
110 #define WI_FTYPE_DATA 0x0008
112 #define WI_STYPE_MGMT_ASREQ 0x0000 /* association request */
113 #define WI_STYPE_MGMT_ASRESP 0x0010 /* association response */
114 #define WI_STYPE_MGMT_REASREQ 0x0020 /* reassociation request */
115 #define WI_STYPE_MGMT_REASRESP 0x0030 /* reassociation response */
116 #define WI_STYPE_MGMT_PROBEREQ 0x0040 /* probe request */
117 #define WI_STYPE_MGMT_PROBERESP 0x0050 /* probe response */
118 #define WI_STYPE_MGMT_BEACON 0x0080 /* beacon */
119 #define WI_STYPE_MGMT_ATIM 0x0090 /* announcement traffic ind msg */
120 #define WI_STYPE_MGMT_DISAS 0x00A0 /* disassociation */
121 #define WI_STYPE_MGMT_AUTH 0x00B0 /* authentication */
122 #define WI_STYPE_MGMT_DEAUTH 0x00C0 /* deauthentication */
124 #define WI_STYPE_CTL_PSPOLL 0x00A0
125 #define WI_STYPE_CTL_RTS 0x00B0
126 #define WI_STYPE_CTL_CTS 0x00C0
127 #define WI_STYPE_CTL_ACK 0x00D0
128 #define WI_STYPE_CTL_CFEND 0x00E0
129 #define WI_STYPE_CTL_CFENDACK 0x00F0
141 * Lucent/wavelan IEEE signal strength cache
143 * driver keeps cache of last
144 * MAXWICACHE packets to arrive including signal strength info.
145 * daemons may read this via ioctl
147 * Each entry in the wi_sigcache has a unique macsrc.
150 char macsrc
[6]; /* unique MAC address for entry */
151 int ipsrc
; /* ip address associated with packet */
152 int signal
; /* signal strength of the packet */
153 int noise
; /* noise value */
154 int quality
; /* quality of the packet */
158 * Firmware downloading API. We support downloading into RAM and into
159 * flash. We copy the entire .hex file for both the primary and secondary
160 * firmware into the kernel, which is minorly gross, but matches the
161 * format of the compiled in firmware.
163 struct wi_fwdownload
{
164 int type
; /* What type of download. */
166 #define WI_FW_FLASH 2
167 size_t pri_len
; /* Primary firmware length */
168 size_t sec_len
; /* Secondary firmware length */
169 caddr_t pri_data
; /* Pointer (user) to primary data */
170 caddr_t sec_data
; /* Pointer (user) to secondary data */
174 uint32_t wi_tx_unicast_frames
;
175 uint32_t wi_tx_multicast_frames
;
176 uint32_t wi_tx_fragments
;
177 uint32_t wi_tx_unicast_octets
;
178 uint32_t wi_tx_multicast_octets
;
179 uint32_t wi_tx_deferred_xmits
;
180 uint32_t wi_tx_single_retries
;
181 uint32_t wi_tx_multi_retries
;
182 uint32_t wi_tx_retry_limit
;
183 uint32_t wi_tx_discards
;
184 uint32_t wi_rx_unicast_frames
;
185 uint32_t wi_rx_multicast_frames
;
186 uint32_t wi_rx_fragments
;
187 uint32_t wi_rx_unicast_octets
;
188 uint32_t wi_rx_multicast_octets
;
189 uint32_t wi_rx_fcs_errors
;
190 uint32_t wi_rx_discards_nobuf
;
191 uint32_t wi_tx_discards_wrong_sa
;
192 uint32_t wi_rx_WEP_cant_decrypt
;
193 uint32_t wi_rx_msg_in_msg_frags
;
194 uint32_t wi_rx_msg_in_bad_msg_frags
;
198 * Network parameters, static configuration entities.
200 #define WI_RID_PORTTYPE 0xFC00 /* Connection control characteristics */
201 #define WI_RID_MAC_NODE 0xFC01 /* MAC address of this station */
202 #define WI_RID_DESIRED_SSID 0xFC02 /* Service Set ID for connection */
203 #define WI_RID_OWN_CHNL 0xFC03 /* Comm channel for BSS creation */
204 #define WI_RID_OWN_SSID 0xFC04 /* IBSS creation ID */
205 #define WI_RID_OWN_ATIM_WIN 0xFC05 /* ATIM window time for IBSS creation */
206 #define WI_RID_SYSTEM_SCALE 0xFC06 /* scale that specifies AP density */
207 #define WI_RID_MAX_DATALEN 0xFC07 /* Max len of MAC frame body data */
208 #define WI_RID_MAC_WDS 0xFC08 /* MAC addr of corresponding WDS node */
209 #define WI_RID_PM_ENABLED 0xFC09 /* ESS power management enable */
210 #define WI_RID_PM_EPS 0xFC0A /* PM EPS/PS mode */
211 #define WI_RID_MCAST_RX 0xFC0B /* ESS PM mcast reception */
212 #define WI_RID_MAX_SLEEP 0xFC0C /* max sleep time for ESS PM */
213 #define WI_RID_HOLDOVER 0xFC0D /* holdover time for ESS PM */
214 #define WI_RID_NODENAME 0xFC0E /* ID name of this node for diag */
215 #define WI_RID_DTIM_PERIOD 0xFC10 /* beacon interval between DTIMs */
216 #define WI_RID_WDS_ADDR1 0xFC11 /* port 1 MAC of WDS link node */
217 #define WI_RID_WDS_ADDR2 0xFC12 /* port 1 MAC of WDS link node */
218 #define WI_RID_WDS_ADDR3 0xFC13 /* port 1 MAC of WDS link node */
219 #define WI_RID_WDS_ADDR4 0xFC14 /* port 1 MAC of WDS link node */
220 #define WI_RID_WDS_ADDR5 0xFC15 /* port 1 MAC of WDS link node */
221 #define WI_RID_WDS_ADDR6 0xFC16 /* port 1 MAC of WDS link node */
222 #define WI_RID_MCAST_PM_BUF 0xFC17 /* PM buffering of mcast */
223 #define WI_RID_ENCRYPTION 0xFC20 /* enable/disable WEP */
224 #define WI_RID_AUTHTYPE 0xFC21 /* specify authentication type */
225 #define WI_RID_P2_TX_CRYPT_KEY 0xFC23
226 #define WI_RID_P2_CRYPT_KEY0 0xFC24
227 #define WI_RID_P2_CRYPT_KEY1 0xFC25
228 #define WI_RID_MICROWAVE_OVEN 0xFC25
229 #define WI_RID_P2_CRYPT_KEY2 0xFC26
230 #define WI_RID_P2_CRYPT_KEY3 0xFC27
231 #define WI_RID_P2_ENCRYPTION 0xFC28
232 #define PRIVACY_INVOKED 0x01
233 #define EXCLUDE_UNENCRYPTED 0x02
234 #define HOST_ENCRYPT 0x10
235 #define IV_EVERY_FRAME 0x00 /* IV = Initialization Vector */
236 #define IV_EVERY10_FRAME 0x20 /* every 10 frame IV reuse */
237 #define IV_EVERY50_FRAME 0x40 /* every 50 frame IV reuse */
238 #define IV_EVERY100_FRAME 0x60 /* every 100 frame IV reuse */
239 #define HOST_DECRYPT 0x80
240 #define WI_RID_WEP_MAPTABLE 0xFC29
241 #define WI_RID_CNFAUTHMODE 0xFC2A
242 #define WI_RID_ROAMING_MODE 0xFC2D
243 #define WI_RID_OWN_BEACON_INT 0xFC33 /* beacon xmit time for BSS creation */
244 #define WI_RID_CNF_DBM_ADJUST 0xFC46
245 #define WI_RID_DBM_ADJUST 0xFC46 /* RSSI - WI_RID_DBM_ADJUST ~ dBm */
246 #define WI_RID_BASIC_RATE 0xFCB3
247 #define WI_RID_SUPPORT_RATE 0xFCB4
250 * Network parameters, dynamic configuration entities
252 #define WI_RID_MCAST_LIST 0xFC80 /* list of multicast addrs */
253 #define WI_RID_CREATE_IBSS 0xFC81 /* create IBSS */
254 #define WI_RID_FRAG_THRESH 0xFC82 /* frag len, unicast msg xmit */
255 #define WI_RID_RTS_THRESH 0xFC83 /* frame len for RTS/CTS handshake */
256 #define WI_RID_TX_RATE 0xFC84 /* data rate for message xmit
261 #define WI_RID_PROMISC 0xFC85 /* enable promisc mode */
262 #define WI_RID_FRAG_THRESH0 0xFC90
263 #define WI_RID_FRAG_THRESH1 0xFC91
264 #define WI_RID_FRAG_THRESH2 0xFC92
265 #define WI_RID_FRAG_THRESH3 0xFC93
266 #define WI_RID_FRAG_THRESH4 0xFC94
267 #define WI_RID_FRAG_THRESH5 0xFC95
268 #define WI_RID_FRAG_THRESH6 0xFC96
269 #define WI_RID_RTS_THRESH0 0xFC97
270 #define WI_RID_RTS_THRESH1 0xFC98
271 #define WI_RID_RTS_THRESH2 0xFC99
272 #define WI_RID_RTS_THRESH3 0xFC9A
273 #define WI_RID_RTS_THRESH4 0xFC9B
274 #define WI_RID_RTS_THRESH5 0xFC9C
275 #define WI_RID_RTS_THRESH6 0xFC9D
276 #define WI_RID_TX_RATE0 0xFC9E
277 #define WI_RID_TX_RATE1 0xFC9F
278 #define WI_RID_TX_RATE2 0xFCA0
279 #define WI_RID_TX_RATE3 0xFCA1
280 #define WI_RID_TX_RATE4 0xFCA2
281 #define WI_RID_TX_RATE5 0xFCA3
282 #define WI_RID_TX_RATE6 0xFCA4
283 #define WI_RID_DEFLT_CRYPT_KEYS 0xFCB0
284 #define WI_RID_TX_CRYPT_KEY 0xFCB1
285 #define WI_RID_TICK_TIME 0xFCE0
289 uint8_t wi_keydat
[14];
292 #define WI_NLTV_KEYS 4
296 struct wi_key wi_keys
[WI_NLTV_KEYS
];
302 #define WI_RID_DNLD_BUF 0xFD01
303 #define WI_RID_MEMSZ 0xFD02 /* memory size info (XXX Lucent) */
304 /* Looks like on lucnet pri firm too */
305 #define WI_RID_PRI_IDENTITY 0xFD02 /* primary funcs firmware ident (PRISM2) */
306 #define WI_RID_PRI_SUP_RANGE 0xFD03 /* primary supplier compatibility */
307 #define WI_RID_CIF_ACT_RANGE 0xFD04 /* controller sup. compatibility */
308 #define WI_RID_SERIALNO 0xFD0A /* card serial number */
309 #define WI_RID_CARD_ID 0xFD0B /* card identification */
310 #define WI_RID_MFI_SUP_RANGE 0xFD0C /* modem supplier compatibility */
311 #define WI_RID_CFI_SUP_RANGE 0xFD0D /* controller sup. compatibility */
312 #define WI_RID_CHANNEL_LIST 0xFD10 /* allowd comm. frequencies. */
313 #define WI_RID_REG_DOMAINS 0xFD11 /* list of intendted regulatory doms */
314 #define WI_RID_TEMP_TYPE 0xFD12 /* hw temp range code */
315 #define WI_RID_CIS 0xFD13 /* PC card info struct */
316 #define WI_RID_STA_IDENTITY 0xFD20 /* station funcs firmware ident */
317 #define WI_RID_STA_SUP_RANGE 0xFD21 /* station supplier compat */
318 #define WI_RID_MFI_ACT_RANGE 0xFD22
319 #define WI_RID_SYMBOL_IDENTITY 0xFD24
320 #define WI_RID_CFI_ACT_RANGE 0xFD33
321 #define WI_RID_COMMQUAL 0xFD43
322 #define WI_RID_SCALETHRESH 0xFD46
323 #define WI_RID_PCF 0xFD87
328 #define WI_RID_PORT_STAT 0xFD40 /* actual MAC port con control stat */
329 #define WI_RID_CURRENT_SSID 0xFD41 /* ID of actually connected SS */
330 #define WI_RID_CURRENT_BSSID 0xFD42 /* ID of actually connected BSS */
331 #define WI_RID_COMMS_QUALITY 0xFD43 /* quality of BSS connection */
332 #define WI_RID_CUR_TX_RATE 0xFD44 /* current TX rate */
333 #define WI_RID_CUR_BEACON_INT 0xFD45 /* current beacon interval */
334 #define WI_RID_CUR_SCALE_THRESH 0xFD46 /* actual system scane thresh setting */
335 #define WI_RID_PROT_RESP_TIME 0xFD47 /* time to wait for resp to req msg */
336 #define WI_RID_SHORT_RTR_LIM 0xFD48 /* max tx attempts for short frames */
337 #define WI_RID_LONG_RTS_LIM 0xFD49 /* max tx attempts for long frames */
338 #define WI_RID_MAX_TX_LIFE 0xFD4A /* max tx frame handling duration */
339 #define WI_RID_MAX_RX_LIFE 0xFD4B /* max rx frame handling duration */
340 #define WI_RID_CF_POLL 0xFD4C /* contention free pollable ind */
341 #define WI_RID_AUTH_ALGS 0xFD4D /* auth algorithms available */
342 #define WI_RID_AUTH_TYPE 0xFD4E /* availanle auth types */
343 #define WI_RID_WEP_AVAIL 0xFD4F /* WEP privacy option available */
344 #define WI_RID_DBM_COMMS_QUAL 0xFD51 /* CommQuality normalized to dBm */
345 #define WI_RID_CUR_TX_RATE1 0xFD80
346 #define WI_RID_CUR_TX_RATE2 0xFD81
347 #define WI_RID_CUR_TX_RATE3 0xFD82
348 #define WI_RID_CUR_TX_RATE4 0xFD83
349 #define WI_RID_CUR_TX_RATE5 0xFD84
350 #define WI_RID_CUR_TX_RATE6 0xFD85
351 #define WI_RID_OWN_MAC 0xFD86 /* unique local MAC addr */
352 #define WI_RID_PCI_INFO 0xFD87 /* point coordination func cap */
357 #define WI_RID_BCAST_SCAN_REQ 0xFCAB /* Broadcast Scan request (Symbol) */
358 #define BSCAN_5SEC 0x01
359 #define BSCAN_ONETIME 0x02
360 #define BSCAN_PASSIVE 0x40
361 #define BSCAN_BCAST 0x80
362 #define WI_RID_SCAN_REQ 0xFCE1 /* Scan request (STA only) */
363 #define WI_RID_JOIN_REQ 0xFCE2 /* Join request (STA only) */
364 #define WI_RID_AUTH_STATION 0xFCE3 /* Authenticates Station (AP) */
365 #define WI_RID_CHANNEL_REQ 0xFCE4 /* Channel Information Request (AP) */
366 #define WI_RID_SCAN_RESULTS 0xFD88 /* Scan Results Table */
369 int scanreason
; /* ScanReason */
370 char bssid
[6]; /* BSSID (mac address) */
371 int channel
; /* Channel */
372 int signal
; /* Signal level */
373 int noise
; /* Average Noise Level*/
374 int quality
; /* Quality */
375 int namelen
; /* Length of SSID string */
376 char name
[32]; /* SSID string */
377 int capinfo
; /* Capability info. */
378 int interval
; /* BSS Beacon Interval */
379 int rate
; /* Data Rate */
385 #define WI_RID_PHY_TYPE 0xFDC0 /* phys layer type indication */
386 #define WI_RID_CURRENT_CHAN 0xFDC1 /* current frequency */
387 #define WI_RID_PWR_STATE 0xFDC2 /* pwr consumption status */
388 #define WI_RID_CCA_MODE 0xFDC3 /* clear chan assess mode indication */
389 #define WI_RID_CCA_TIME 0xFDC4 /* clear chan assess time */
390 #define WI_RID_MAC_PROC_DELAY 0xFDC5 /* MAC processing delay time */
391 #define WI_RID_DATA_RATES 0xFDC6 /* supported data rates */
394 * bsd-airtools v0.2 - source-mods v0.2 [common.h]
395 * by h1kari - (c) Dachb0den Labs 2001
399 * Copyright (c) 2001 Dachb0den Labs.
400 * David Hulton <h1kari@dachb0den.com>. All rights reserved.
402 * Redistribution and use in source and binary forms, with or without
403 * modification, are permitted provided that the following conditions
405 * 1. Redistributions of source code must retain the above copyright
406 * notice, this list of conditions and the following disclaimer.
407 * 2. Redistributions in binary form must reproduce the above copyright
408 * notice, this list of conditions and the following disclaimer in the
409 * documentation and/or other materials provided with the distribution.
410 * 3. All advertising materials mentioning features or use of this software
411 * must display the following acknowledgement:
412 * This product includes software developed by David Hulton.
413 * 4. Neither the name of the author nor the names of any co-contributors
414 * may be used to endorse or promote products derived from this software
415 * without specific prior written permission.
417 * THIS SOFTWARE IS PROVIDED BY David Hulton AND CONTRIBUTORS ``AS IS'' AND
418 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
419 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
420 * ARE DISCLAIMED. IN NO EVENT SHALL David Hulton OR THE VOICES IN HIS HEAD
421 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
422 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
423 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
424 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
425 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
426 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
427 * THE POSSIBILITY OF SUCH DAMAGE.
431 * standard hermes recieve frame used by wavelan/prism2 cards
435 * hermes prefix header. supplies information on the current status of
436 * the network and various other statistics gathered from the
437 * management/control frames as used internally.
449 * standard 80211 frame header. all packets have to use this header as
450 * per the AN9900 from intersil, even management/control. for
451 * management packets, they just threw the header into the data field,
452 * but for control packets the headers are lost in translation and
453 * therefore not all control packet info can be displayed.
455 uint16_t wi_frame_ctl
;
464 * another wierdity with the drivers. they append a 802.3 header which
465 * is somewhat redundant, since all the same data is provided in the
468 uint8_t wi_dst_addr
[6];
469 uint8_t wi_src_addr
[6];
472 #define WI_DATA_HDRLEN 0x44
473 #define WI_MGMT_HDRLEN 0x3C
474 #define WI_CTL_HDRLEN 0x3C
478 * all data packets have a snap (sub-network access protocol) header that
479 * isn't entirely definied, but added for ethernet compatibility.
481 struct wi_snap_frame
{
488 * management frame headers
489 * note: all management frames consist of a static header and variable length
494 * variable length field structure
496 struct wi_mgmt_var_hdr
{
499 uint8_t wi_data
[256];
503 * management beacon frame prefix
505 struct wi_mgmt_beacon_hdr
{
508 uint16_t wi_interval
;
513 * ibss announcement traffic indication message (atim) frame
514 * note: no parameters
518 * management disassociation frame
520 struct wi_mgmt_disas_hdr
{
525 * management association request frame prefix
527 struct wi_mgmt_asreq_hdr
{
529 uint16_t wi_interval
;
533 * management association response frame prefix
535 struct wi_mgmt_asresp_hdr
{
542 * management reassociation request frame prefix
544 struct wi_mgmt_reasreq_hdr
{
546 uint16_t wi_interval
;
547 uint8_t wi_currap
[6];
551 * management reassociation response frame prefix
553 struct wi_mgmt_reasresp_hdr
{
560 * management probe request frame prefix
561 * note: no static parameters, only variable length
565 * management probe response frame prefix
567 struct wi_mgmt_proberesp_hdr
{
570 uint16_t wi_interval
;
575 * management authentication frame prefix
577 struct wi_mgmt_auth_hdr
{
584 * management deauthentication frame
586 struct wi_mgmt_deauth_hdr
{
592 * rid configuration register definitions
594 #define WI_RID_SCAN_REQ 0xFCE1 /* scan request information */
595 #define WI_RID_SCAN_RES 0xFD88 /* scan result information */
597 #define WI_RID_PROCFRAME 0x3137 /* Return full frame information */
598 #define WI_RID_PRISM2 0x3138 /* tell if we're a prism2 card or not */
604 #define WI_STAT_BADCRC 0x0001
605 #define WI_STAT_UNDECRYPTABLE 0x0002
606 #define WI_STAT_ERRSTAT 0x0003
607 #define WI_STAT_MAC_PORT 0x0700
608 #define WI_STAT_1042 0x2000
609 #define WI_STAT_TUNNEL 0x4000
610 #define WI_STAT_WMP_MSG 0x6000
611 #define WI_RXSTAT_MSG_TYPE 0xE000
613 #define WI_FCTL_OPT_MASK 0xFF00
614 #define WI_AID_SET 0xC000
615 #define WI_AID_MASK 0x3FFF
616 #define WI_SCTL_FRAGNUM_MASK 0x000F
617 #define WI_SCTL_SEQNUM_MASK 0xFFF0
619 #define WI_STAT_UNSPEC_FAIL 1
620 #define WI_STAT_CAPINFO_FAIL 10
621 #define WI_STAT_REAS_DENY 11
622 #define WI_STAT_ASSOC_DENY 12
623 #define WI_STAT_ALGO_FAIL 13
624 #define WI_STAT_SEQ_FAIL 14
625 #define WI_STAT_CHAL_FAIL 15
626 #define WI_STAT_TOUT_FAIL 16
627 #define WI_STAT_OVERL_DENY 17
628 #define WI_STAT_RATE_DENY 18
630 #define WI_FTYPE_MGMT 0x0000
631 #define WI_FTYPE_CTL 0x0004
632 #define WI_FTYPE_DATA 0x0008
634 #define WI_FCTL_VERS 0x0002
635 #define WI_FCTL_FTYPE 0x000C
636 #define WI_FCTL_STYPE 0x00F0
637 #define WI_FCTL_TODS 0x0100
638 #define WI_FCTL_FROMDS 0x0200
639 #define WI_FCTL_MOREFRAGS 0x0400
640 #define WI_FCTL_RETRY 0x0800
641 #define WI_FCTL_PM 0x1000
642 #define WI_FCTL_MOREDATA 0x2000
643 #define WI_FCTL_WEP 0x4000
644 #define WI_FCTL_ORDER 0x8000
646 #define WI_FCS_LEN 0x4 /* checksum length */
650 * management definitions
652 #define WI_STYPE_MGMT_ASREQ 0x0000
653 #define WI_STYPE_MGMT_ASRESP 0x0010
654 #define WI_STYPE_MGMT_REASREQ 0x0020
655 #define WI_STYPE_MGMT_REASRESP 0x0030
656 #define WI_STYPE_MGMT_PROBEREQ 0x0040
657 #define WI_STYPE_MGMT_PROBERESP 0x0050
658 #define WI_STYPE_MGMT_BEACON 0x0080
659 #define WI_STYPE_MGMT_ATIM 0x0090
660 #define WI_STYPE_MGMT_DISAS 0x00A0
661 #define WI_STYPE_MGMT_AUTH 0x00B0
662 #define WI_STYPE_MGMT_DEAUTH 0x00C0
664 #define WI_CAPINFO_ESS 0x01
665 #define WI_CAPINFO_IBSS 0x02
666 #define WI_CAPINFO_CFPOLL 0x04
667 #define WI_CAPINFO_CFPOLLREQ 0x08
668 #define WI_CAPINFO_PRIV 0x10
670 #define WI_REASON_UNSPEC 1
671 #define WI_REASON_AUTH_INVALID 2
672 #define WI_REASON_DEAUTH_LEAVE 3
673 #define WI_REASON_DISAS_INACT 4
674 #define WI_REASON_DISAS_OVERL 5
675 #define WI_REASON_CLASS2 6
676 #define WI_REASON_CLASS3 7
677 #define WI_REASON_DISAS_LEAVE 8
678 #define WI_REASON_NOAUTH 9
680 #define WI_VAR_SSID 0
681 #define WI_VAR_SRATES 1
686 #define WI_VAR_IBSS 6
687 #define WI_VAR_CHAL 16
689 #define WI_VAR_SRATES_MASK 0x7F
693 * control definitions
695 #define WI_STYPE_CTL_PSPOLL 0x00A0
696 #define WI_STYPE_CTL_RTS 0x00B0
697 #define WI_STYPE_CTL_CTS 0x00C0
698 #define WI_STYPE_CTL_ACK 0x00D0
699 #define WI_STYPE_CTL_CFEND 0x00E0
700 #define WI_STYPE_CTL_CFENDCFACK 0x00F0
704 * ap scanning structures
711 uint16_t wi_interval
;
713 uint16_t wi_ssid_len
;
715 uint8_t wi_srates
[10];
719 #define WI_WAVELAN_RES_SIZE 50
721 struct wi_scan_p2_hdr
{
725 #define WI_PRISM2_RES_SIZE 62
729 * prism2 debug mode definitions
731 #define SIOCSPRISM2DEBUG _IOW('i', 137, struct ifreq)
732 #define SIOCGPRISM2DEBUG _IOWR('i', 138, struct ifreq)
734 #define WI_DEBUG_RESET 0x00
735 #define WI_DEBUG_INIT 0x01
736 #define WI_DEBUG_SLEEP 0x02
737 #define WI_DEBUG_WAKE 0x03
738 #define WI_DEBUG_CHAN 0x08
739 #define WI_DEBUG_DELAYSUPP 0x09
740 #define WI_DEBUG_TXSUPP 0x0A
741 #define WI_DEBUG_MONITOR 0x0B
742 #define WI_DEBUG_LEDTEST 0x0C
743 #define WI_DEBUG_CONTTX 0x0E
744 #define WI_DEBUG_STOPTEST 0x0F
745 #define WI_DEBUG_CONTRX 0x10
746 #define WI_DEBUG_SIGSTATE 0x11
747 #define WI_DEBUG_CALENABLE 0x13
748 #define WI_DEBUG_CONFBITS 0x15
750 #endif /* _NETPROTO_802_11_IF_WAVELAN_IEEE_H */