Tomato 1.28
[tomato-rt-n10.git] / release / src / include / wlioctl.h
blobf8b98ac8ad54fa42a4a4a5262a7b5b51e809c838
1 /*
2 * Custom OID/ioctl definitions for
3 * Broadcom 802.11abg Networking Device Driver
5 * Definitions subject to change without notice.
7 * Copyright 2005, Broadcom Corporation
8 * All Rights Reserved.
9 *
10 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
11 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
12 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
13 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
15 * $Id: wlioctl.h,v 1.1.1.14 2005/03/07 07:31:12 kanki Exp $
18 #ifndef _wlioctl_h_
19 #define _wlioctl_h_
21 #include <typedefs.h>
22 #include <proto/ethernet.h>
23 #include <proto/802.11.h>
25 /* require default structure packing */
26 #if !defined(__GNUC__)
27 #pragma pack(push,8)
28 #endif
30 #define WL_NUMRATES 255 /* max # of rates in a rateset */
32 typedef struct wl_rateset {
33 uint32 count; /* # rates in this set */
34 uint8 rates[WL_NUMRATES]; /* rates in 500kbps units w/hi bit set if basic */
35 } wl_rateset_t;
37 #define WL_CHANSPEC_CHAN_MASK 0x0fff
38 #define WL_CHANSPEC_BAND_MASK 0xf000
39 #define WL_CHANSPEC_BAND_SHIFT 12
40 #define WL_CHANSPEC_BAND_A 0x1000
41 #define WL_CHANSPEC_BAND_B 0x2000
44 * Per-bss information structure.
47 #define WL_BSS_INFO_VERSION 107 /* current version of wl_bss_info struct */
49 typedef struct wl_bss_info {
50 uint32 version; /* version field */
51 uint32 length; /* byte length of data in this record, starting at version and including IEs */
52 struct ether_addr BSSID;
53 uint16 beacon_period; /* units are Kusec */
54 uint16 capability; /* Capability information */
55 uint8 SSID_len;
56 uint8 SSID[32];
57 struct {
58 uint count; /* # rates in this set */
59 uint8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */
60 } rateset; /* supported rates */
61 uint8 channel; /* Channel no. */
62 uint16 atim_window; /* units are Kusec */
63 uint8 dtim_period; /* DTIM period */
64 int16 RSSI; /* receive signal strength (in dBm) */
65 int8 phy_noise; /* noise (in dBm) */
66 uint32 ie_length; /* byte length of Information Elements */
67 /* variable length Information Elements */
68 } wl_bss_info_t;
70 typedef struct wlc_ssid {
71 uint32 SSID_len;
72 uchar SSID[32];
73 } wlc_ssid_t;
75 typedef struct wl_scan_params {
76 wlc_ssid_t ssid; /* default is {0, ""} */
77 struct ether_addr bssid;/* default is bcast */
78 int8 bss_type; /* default is any, DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT */
79 int8 scan_type; /* -1 use default, DOT11_SCANTYPE_ACTIVE/PASSIVE */
80 int32 nprobes; /* -1 use default, number of probes per channel */
81 int32 active_time; /* -1 use default, dwell time per channel for active scanning */
82 int32 passive_time; /* -1 use default, dwell time per channel for passive scanning */
83 int32 home_time; /* -1 use default, dwell time for the home channel between channel scans */
84 int32 channel_num; /* 0 use default (all available channels), count of channels in channel_list */
85 uint16 channel_list[1]; /* list of chanspecs */
86 } wl_scan_params_t;
87 /* size of wl_scan_params not including variable length array */
88 #define WL_SCAN_PARAMS_FIXED_SIZE 64
90 typedef struct wl_scan_results {
91 uint32 buflen;
92 uint32 version;
93 uint32 count;
94 wl_bss_info_t bss_info[1];
95 } wl_scan_results_t;
96 /* size of wl_scan_results not including variable length array */
97 #define WL_SCAN_RESULTS_FIXED_SIZE 12
99 /* uint32 list */
100 typedef struct wl_uint32_list {
101 /* in - # of elements, out - # of entries */
102 uint32 count;
103 /* variable length uint32 list */
104 uint32 element[1];
105 } wl_uint32_list_t;
107 #define WLC_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NULL */
109 typedef struct wl_channels_in_country {
110 uint32 buflen;
111 uint32 band;
112 char country_abbrev[WLC_CNTRY_BUF_SZ];
113 uint32 count;
114 uint32 channel[1];
115 } wl_channels_in_country_t;
117 typedef struct wl_country_list {
118 uint32 buflen;
119 uint32 band_set;
120 uint32 band;
121 uint32 count;
122 char country_abbrev[1];
123 } wl_country_list_t;
125 #define WL_RM_TYPE_BASIC 1
126 #define WL_RM_TYPE_CCA 2
127 #define WL_RM_TYPE_RPI 3
129 #define WL_RM_FLAG_PARALLEL (1<<0)
131 #define WL_RM_FLAG_LATE (1<<1)
132 #define WL_RM_FLAG_INCAPABLE (1<<2)
133 #define WL_RM_FLAG_REFUSED (1<<3)
135 typedef struct wl_rm_req_elt {
136 int8 type;
137 int8 flags;
138 uint16 chanspec;
139 uint32 token; /* token for this measurement */
140 uint32 tsf_h; /* TSF high 32-bits of Measurement start time */
141 uint32 tsf_l; /* TSF low 32-bits */
142 uint32 dur; /* TUs */
143 } wl_rm_req_elt_t;
145 typedef struct wl_rm_req {
146 uint32 token; /* overall measurement set token */
147 uint32 count; /* number of measurement reqests */
148 wl_rm_req_elt_t req[1]; /* variable length block of requests */
149 } wl_rm_req_t;
150 #define WL_RM_REQ_FIXED_LEN 8
152 typedef struct wl_rm_rep_elt {
153 int8 type;
154 int8 flags;
155 uint16 chanspec;
156 uint32 token; /* token for this measurement */
157 uint32 tsf_h; /* TSF high 32-bits of Measurement start time */
158 uint32 tsf_l; /* TSF low 32-bits */
159 uint32 dur; /* TUs */
160 uint32 len; /* byte length of data block */
161 uint8 data[1]; /* variable length data block */
162 } wl_rm_rep_elt_t;
163 #define WL_RM_REP_ELT_FIXED_LEN 24 /* length excluding data block */
165 #define WL_RPI_REP_BIN_NUM 8
166 typedef struct wl_rm_rpi_rep {
167 uint8 rpi[WL_RPI_REP_BIN_NUM];
168 int8 rpi_max[WL_RPI_REP_BIN_NUM];
169 } wl_rm_rpi_rep_t;
171 typedef struct wl_rm_rep {
172 uint32 token; /* overall measurement set token */
173 uint32 len; /* length of measurement report block */
174 wl_rm_rep_elt_t rep[1]; /* variable length block of reports */
175 } wl_rm_rep_t;
176 #define WL_RM_REP_FIXED_LEN 8
179 #if defined(BCMSUP_PSK)
180 typedef enum sup_auth_status {
181 WLC_SUP_DISCONNECTED = 0,
182 WLC_SUP_CONNECTING,
183 WLC_SUP_IDREQUIRED,
184 WLC_SUP_AUTHENTICATING,
185 WLC_SUP_AUTHENTICATED,
186 WLC_SUP_KEYXCHANGE,
187 WLC_SUP_KEYED
188 } sup_auth_status_t;
189 #endif /* BCMCCX | BCMSUP_PSK */
191 /* Enumerate crypto algorithms */
192 #define CRYPTO_ALGO_OFF 0
193 #define CRYPTO_ALGO_WEP1 1
194 #define CRYPTO_ALGO_TKIP 2
195 #define CRYPTO_ALGO_WEP128 3
196 #define CRYPTO_ALGO_AES_CCM 4
197 #define CRYPTO_ALGO_AES_OCB_MSDU 5
198 #define CRYPTO_ALGO_AES_OCB_MPDU 6
199 #define CRYPTO_ALGO_NALG 7
201 #define WSEC_GEN_MIC_ERROR 0x0001
202 #define WSEC_GEN_REPLAY 0x0002
204 #define WL_SOFT_KEY (1 << 0) /* Indicates this key is using soft encrypt */
205 #define WL_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */
206 #define WL_KF_RES_4 (1 << 4) /* Reserved for backward compat */
207 #define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */
209 typedef struct wl_wsec_key {
210 uint32 index; /* key index */
211 uint32 len; /* key length */
212 uint8 data[DOT11_MAX_KEY_SIZE]; /* key data */
213 uint32 pad_1[18];
214 uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
215 uint32 flags; /* misc flags */
216 uint32 pad_2[2];
217 int pad_3;
218 int iv_initialized; /* has IV been initialized already? */
219 int pad_4;
220 /* Rx IV */
221 struct {
222 uint32 hi; /* upper 32 bits of IV */
223 uint16 lo; /* lower 16 bits of IV */
224 } rxiv;
225 uint32 pad_5[2];
226 struct ether_addr ea; /* per station */
227 } wl_wsec_key_t;
230 #define WSEC_MIN_PSK_LEN 8
231 #define WSEC_MAX_PSK_LEN 64
233 /* Flag for key material needing passhash'ing */
234 #define WSEC_PASSPHRASE (1<<0)
236 /* recepticle for WLC_SET_WSEC_PMK parameter */
237 typedef struct {
238 ushort key_len; /* octets in key material */
239 ushort flags; /* key handling qualification */
240 uint8 key[WSEC_MAX_PSK_LEN]; /* PMK material */
241 } wsec_pmk_t;
243 /* wireless security bitvec */
244 #define WEP_ENABLED 1
245 #define TKIP_ENABLED 2
246 #define AES_ENABLED 4
247 #define WSEC_SWFLAG 8
248 #define SES_OW_ENABLED 0x0040 /* to go into transition mode without setting wep */
250 /* WPA authentication mode bitvec */
251 #define WPA_AUTH_DISABLED 0x0000 /* Legacy (i.e., non-WPA) */
252 #define WPA_AUTH_NONE 0x0001 /* none (IBSS) */
253 #define WPA_AUTH_UNSPECIFIED 0x0002 /* over 802.1x */
254 #define WPA_AUTH_PSK 0x0004 /* Pre-shared key */
255 /*#define WPA_AUTH_8021X 0x0020*/ /* 802.1x, reserved */
256 #define WPA2_AUTH_UNSPECIFIED 0x0040 /* over 802.1x */
257 #define WPA2_AUTH_PSK 0x0080 /* Pre-shared key */
259 typedef struct wl_led_info {
260 uint32 index; /* led index */
261 uint32 behavior;
262 bool activehi;
263 } wl_led_info_t;
266 * definitions for driver messages passed from WL to NAS.
268 /* Use this to recognize wpa and 802.1x driver messages. */
269 static const uint8 wl_wpa_snap_template[] =
270 { 0xaa, 0xaa, 0x03, 0x00, 0x90, 0x4c };
272 #define WL_WPA_MSG_IFNAME_MAX 16
274 /* WPA driver message */
275 typedef struct wl_wpa_header {
276 struct ether_header eth;
277 struct dot11_llc_snap_header snap;
278 uint8 version;
279 uint8 type;
280 /* version 2 additions */
281 char ifname[WL_WPA_MSG_IFNAME_MAX];
282 /* version specific data */
283 /* uint8 data[1]; */
284 } wl_wpa_header_t;
286 #define WL_WPA_HEADER_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN + 2 + WL_WPA_MSG_IFNAME_MAX)
288 /* WPA driver message ethertype - private between wlc and nas */
289 #define WL_WPA_ETHER_TYPE 0x9999
291 /* WPA driver message current version */
292 #define WL_WPA_MSG_VERSION 2
294 /* Type field values for the 802.2 driver messages for WPA. */
295 #define WLC_ASSOC_MSG 1
296 #define WLC_DISASSOC_MSG 2
297 #define WLC_PTK_MIC_MSG 3
298 #define WLC_GTK_MIC_MSG 4
300 /* 802.1x driver message */
301 typedef struct wl_eapol_header {
302 struct ether_header eth;
303 struct dot11_llc_snap_header snap;
304 uint8 version;
305 uint8 reserved;
306 char ifname[WL_WPA_MSG_IFNAME_MAX];
307 /* version specific data */
308 /* uint8 802_1x_msg[1]; */
309 } wl_eapol_header_t;
311 #define WL_EAPOL_HEADER_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN + 2 + WL_WPA_MSG_IFNAME_MAX)
313 /* 802.1x driver message ethertype - private between wlc and nas */
314 #define WL_EAPOL_ETHER_TYPE 0x999A
316 /* 802.1x driver message current version */
317 #define WL_EAPOL_MSG_VERSION 1
319 #define WL_SECPVT_DATA_LEN (ETHER_HDR_LEN + 4 + WL_WPA_MSG_IFNAME_MAX)
321 /* message header for the private data exchange between nas and wl*/
322 typedef struct wl_secpvt_data {
323 struct ether_header eth; /* use the Type field in the eth header with the private type*/
324 uint8 version;
325 uint8 sub_type;
326 uint16 data_len;
327 char ifname[WL_WPA_MSG_IFNAME_MAX];
328 /* version specific data */
329 /* uint8 802_1x_msg[1]; */
330 }wl_secpvt_data_t;
333 /* srom read/write struct passed through ioctl */
334 typedef struct {
335 uint byteoff; /* byte offset */
336 uint nbytes; /* number of bytes */
337 uint16 buf[1];
338 } srom_rw_t;
340 /* R_REG and W_REG struct passed through ioctl */
341 typedef struct {
342 uint32 byteoff; /* byte offset of the field in d11regs_t */
343 uint32 val; /* read/write value of the field */
344 uint32 size; /* sizeof the field */
345 } rw_reg_t;
347 /* Structure used by GET/SET_ATTEN ioctls */
348 typedef struct {
349 uint16 auto_ctrl; /* 1: Automatic control, 0: overriden */
350 uint16 bb; /* Baseband attenuation */
351 uint16 radio; /* Radio attenuation */
352 uint16 txctl1; /* Radio TX_CTL1 value */
353 } atten_t;
355 /* Used to get specific STA parameters */
356 typedef struct {
357 uint32 val;
358 struct ether_addr ea;
359 } scb_val_t;
361 /* Event data type */
362 typedef struct {
363 uint msg; /* Message (see below) */
364 struct ether_addr *addr; /* Station address (if applicable) */
365 uint status; /* Status code (see below) */
366 uint reason; /* Reason code (if applicable) */
367 uint auth_type; /* WLC_E_AUTH */
368 bool link; /* WLC_E_LINK */
369 bool group; /* WLC_E_MIC_ERROR */
370 bool flush_txq; /* WLC_E_MIC_ERROR */
371 } wlc_event_t;
373 typedef struct {
374 uint16 ver; /* version of this struct */
375 uint16 len; /* length in bytes of this structure */
376 uint16 cap; /* sta's advertized capabilities */
377 uint32 flags; /* flags defined below */
378 uint32 idle; /* time since data pkt rx'd from sta */
379 struct ether_addr ea; /* Station address */
380 wl_rateset_t rateset; /* rateset in use */
381 uint32 in; /* seconds elapsed since associated */
382 uint32 listen_interval_inms; /* Min Listen interval in ms for this STA*/
383 } sta_info_t;
385 #define WL_STA_VER 2
387 /* flags fields */
388 #define WL_STA_BRCM 0x01
389 #define WL_STA_WME 0x02
390 #define WL_STA_ABCAP 0x04
391 #define WL_STA_AUTHE 0x08
392 #define WL_STA_ASSOC 0x10
393 #define WL_STA_AUTHO 0x20
394 #define WL_STA_WDS 0x40
395 #define WL_WDS_LINKUP 0x80
397 /* Event messages */
398 #define WLC_E_SET_SSID 1
399 #define WLC_E_JOIN 2
400 #define WLC_E_START 3
401 #define WLC_E_AUTH 4
402 #define WLC_E_AUTH_IND 5
403 #define WLC_E_DEAUTH 6
404 #define WLC_E_DEAUTH_IND 7
405 #define WLC_E_ASSOC 8
406 #define WLC_E_ASSOC_IND 9
407 #define WLC_E_REASSOC 10
408 #define WLC_E_REASSOC_IND 11
409 #define WLC_E_DISASSOC 12
410 #define WLC_E_DISASSOC_IND 13
411 #define WLC_E_QUIET_START 14 /* 802.11h Quiet period started */
412 #define WLC_E_QUIET_END 15 /* 802.11h Quiet period ended */
413 #define WLC_E_GOT_BEACONS 16
414 #define WLC_E_LINK 17 /* Link indication */
415 #define WLC_E_MIC_ERROR 18 /* TKIP MIC error occurred */
416 #define WLC_E_NDIS_LINK 19 /* NDIS style link indication */
417 #define WLC_E_ROAM 20
418 #define WLC_E_TXFAIL 21 /* dot11FailedCount (txfail) */
419 #define WLC_E_LAST 22
421 /* Event status codes */
422 #define WLC_E_STATUS_SUCCESS 0
423 #define WLC_E_STATUS_FAIL 1
424 #define WLC_E_STATUS_TIMEOUT 2
425 #define WLC_E_STATUS_NO_NETWORKS 3
426 #define WLC_E_STATUS_ABORT 4
428 typedef struct wlc_event_cb {
429 uint msg; /* Event message or 0 for all */
430 void (*fn)(void *, wlc_event_t *); /* Callback function */
431 void *context; /* Passed to callback function */
432 struct wlc_event_cb *next; /* Next in the chain */
433 } wlc_event_cb_t;
436 * Country locale determines which channels are available to us.
438 typedef enum _wlc_locale {
439 WLC_WW = 0, /* Worldwide */
440 WLC_THA, /* Thailand */
441 WLC_ISR, /* Israel */
442 WLC_JDN, /* Jordan */
443 WLC_PRC, /* China */
444 WLC_JPN, /* Japan */
445 WLC_FCC, /* USA */
446 WLC_EUR, /* Europe */
447 WLC_USL, /* US Low Band only */
448 WLC_JPH, /* Japan High Band only */
449 WLC_ALL, /* All the channels in this band */
450 WLC_11D, /* Represents locale recieved by 11d beacons */
451 WLC_LAST_LOCALE,
452 WLC_UNDEFINED_LOCALE = 0xf
453 } wlc_locale_t;
455 /* channel encoding */
456 typedef struct channel_info {
457 int hw_channel;
458 int target_channel;
459 int scan_channel;
460 } channel_info_t;
462 /* For ioctls that take a list of MAC addresses */
463 struct maclist {
464 uint count; /* number of MAC addresses */
465 struct ether_addr ea[1]; /* variable length array of MAC addresses */
468 /* get pkt count struct passed through ioctl */
469 typedef struct get_pktcnt {
470 uint rx_good_pkt;
471 uint rx_bad_pkt;
472 uint tx_good_pkt;
473 uint tx_bad_pkt;
474 } get_pktcnt_t;
476 /* Linux network driver ioctl encoding */
477 typedef struct wl_ioctl {
478 uint cmd; /* common ioctl definition */
479 void *buf; /* pointer to user buffer */
480 uint len; /* length of user buffer */
481 bool set; /* get or set request (optional) */
482 uint used; /* bytes read or written (optional) */
483 uint needed; /* bytes needed (optional) */
484 } wl_ioctl_t;
487 * Structure for passing hardware and software
488 * revision info up from the driver.
490 typedef struct wlc_rev_info {
491 uint vendorid; /* PCI vendor id */
492 uint deviceid; /* device id of chip */
493 uint radiorev; /* radio revision */
494 uint chiprev; /* chip revision */
495 uint corerev; /* core revision */
496 uint boardid; /* board identifier (usu. PCI sub-device id) */
497 uint boardvendor; /* board vendor (usu. PCI sub-vendor id) */
498 uint boardrev; /* board revision */
499 uint driverrev; /* driver version */
500 uint ucoderev; /* microcode version */
501 uint bus; /* bus type */
502 uint chipnum; /* chip number */
503 } wlc_rev_info_t;
505 /* check this magic number */
506 #define WLC_IOCTL_MAGIC 0x14e46c77
508 /* bump this number if you change the ioctl interface */
509 #define WLC_IOCTL_VERSION 1
511 #define WLC_IOCTL_MAXLEN 8192 /* max length ioctl buffer required */
512 #define WLC_IOCTL_SMLEN 256 /* "small" length ioctl buffer required */
514 /* common ioctl definitions */
515 #define WLC_GET_MAGIC 0
516 #define WLC_GET_VERSION 1
517 #define WLC_UP 2
518 #define WLC_DOWN 3
519 #define WLC_DUMP 6
520 #define WLC_GET_MSGLEVEL 7
521 #define WLC_SET_MSGLEVEL 8
522 #define WLC_GET_PROMISC 9
523 #define WLC_SET_PROMISC 10
524 #define WLC_GET_RATE 12
525 #define WLC_SET_RATE 13
526 #define WLC_GET_INSTANCE 14
527 #define WLC_GET_FRAG 15
528 #define WLC_SET_FRAG 16
529 #define WLC_GET_RTS 17
530 #define WLC_SET_RTS 18
531 #define WLC_GET_INFRA 19
532 #define WLC_SET_INFRA 20
533 #define WLC_GET_AUTH 21
534 #define WLC_SET_AUTH 22
535 #define WLC_GET_BSSID 23
536 #define WLC_SET_BSSID 24
537 #define WLC_GET_SSID 25
538 #define WLC_SET_SSID 26
539 #define WLC_RESTART 27
540 #define WLC_GET_CHANNEL 29
541 #define WLC_SET_CHANNEL 30
542 #define WLC_GET_SRL 31
543 #define WLC_SET_SRL 32
544 #define WLC_GET_LRL 33
545 #define WLC_SET_LRL 34
546 #define WLC_GET_PLCPHDR 35
547 #define WLC_SET_PLCPHDR 36
548 #define WLC_GET_RADIO 37
549 #define WLC_SET_RADIO 38
550 #define WLC_GET_PHYTYPE 39
551 #define WLC_GET_WEP 42
552 #define WLC_SET_WEP 43
553 #define WLC_GET_KEY 44
554 #define WLC_SET_KEY 45
555 #define WLC_SCAN 50
556 #define WLC_SCAN_RESULTS 51
557 #define WLC_DISASSOC 52
558 #define WLC_REASSOC 53
559 #define WLC_GET_ROAM_TRIGGER 54
560 #define WLC_SET_ROAM_TRIGGER 55
561 #define WLC_GET_TXANT 61
562 #define WLC_SET_TXANT 62
563 #define WLC_GET_ANTDIV 63
564 #define WLC_SET_ANTDIV 64
565 #define WLC_GET_TXPWR 65
566 #define WLC_SET_TXPWR 66
567 #define WLC_GET_CLOSED 67
568 #define WLC_SET_CLOSED 68
569 #define WLC_GET_MACLIST 69
570 #define WLC_SET_MACLIST 70
571 #define WLC_GET_RATESET 71
572 #define WLC_SET_RATESET 72
573 #define WLC_GET_LOCALE 73
574 #define WLC_LONGTRAIN 74
575 #define WLC_GET_BCNPRD 75
576 #define WLC_SET_BCNPRD 76
577 #define WLC_GET_DTIMPRD 77
578 #define WLC_SET_DTIMPRD 78
579 #define WLC_GET_SROM 79
580 #define WLC_SET_SROM 80
581 #define WLC_GET_WEP_RESTRICT 81
582 #define WLC_SET_WEP_RESTRICT 82
583 #define WLC_GET_COUNTRY 83
584 #define WLC_SET_COUNTRY 84
585 #define WLC_GET_REVINFO 98
586 #define WLC_GET_MACMODE 105
587 #define WLC_SET_MACMODE 106
588 #define WLC_GET_GMODE 109
589 #define WLC_SET_GMODE 110
590 #define WLC_GET_CURR_RATESET 114 /* current rateset */
591 #define WLC_GET_SCANSUPPRESS 115
592 #define WLC_SET_SCANSUPPRESS 116
593 #define WLC_GET_AP 117
594 #define WLC_SET_AP 118
595 #define WLC_GET_EAP_RESTRICT 119
596 #define WLC_SET_EAP_RESTRICT 120
597 #define WLC_GET_WDSLIST 123
598 #define WLC_SET_WDSLIST 124
599 #define WLC_GET_RSSI 127
600 #define WLC_GET_WSEC 133
601 #define WLC_SET_WSEC 134
602 #define WLC_GET_BSS_INFO 136
603 #define WLC_GET_LAZYWDS 138
604 #define WLC_SET_LAZYWDS 139
605 #define WLC_GET_BANDLIST 140
606 #define WLC_GET_BAND 141
607 #define WLC_SET_BAND 142
608 #define WLC_GET_SHORTSLOT 144
609 #define WLC_GET_SHORTSLOT_OVERRIDE 145
610 #define WLC_SET_SHORTSLOT_OVERRIDE 146
611 #define WLC_GET_SHORTSLOT_RESTRICT 147
612 #define WLC_SET_SHORTSLOT_RESTRICT 148
613 #define WLC_GET_GMODE_PROTECTION 149
614 #define WLC_GET_GMODE_PROTECTION_OVERRIDE 150
615 #define WLC_SET_GMODE_PROTECTION_OVERRIDE 151
616 #define WLC_UPGRADE 152
617 #define WLC_GET_MRATE 153
618 #define WLC_SET_MRATE 154
619 #define WLC_GET_ASSOCLIST 159
620 #define WLC_GET_CLK 160
621 #define WLC_SET_CLK 161
622 #define WLC_GET_UP 162
623 #define WLC_OUT 163
624 #define WLC_GET_WPA_AUTH 164
625 #define WLC_SET_WPA_AUTH 165
626 #define WLC_GET_GMODE_PROTECTION_CONTROL 178
627 #define WLC_SET_GMODE_PROTECTION_CONTROL 179
628 #define WLC_GET_PHYLIST 180
629 #define WLC_GET_KEY_SEQ 183
630 #define WLC_GET_GMODE_PROTECTION_CTS 198
631 #define WLC_SET_GMODE_PROTECTION_CTS 199
632 #define WLC_GET_PIOMODE 203
633 #define WLC_SET_PIOMODE 204
634 #define WLC_SET_LED 209
635 #define WLC_GET_LED 210
636 #define WLC_GET_CHANNEL_SEL 215
637 #define WLC_START_CHANNEL_SEL 216
638 #define WLC_GET_VALID_CHANNELS 217
639 #define WLC_GET_FAKEFRAG 218
640 #define WLC_SET_FAKEFRAG 219
641 #define WLC_GET_WET 230
642 #define WLC_SET_WET 231
643 #define WLC_GET_KEY_PRIMARY 235
644 #define WLC_SET_KEY_PRIMARY 236
645 #define WLC_WDS_GET_REMOTE_HWADDR 246 /* currently handled in wl_linux.c/wl_vx.c */
646 #define WLC_SET_CS_SCAN_TIMER 248
647 #define WLC_GET_CS_SCAN_TIMER 249
648 #define WLC_CURRENT_PWR 256
649 #define WLC_GET_CHANNELS_IN_COUNTRY 260
650 #define WLC_GET_COUNTRY_LIST 261
651 #define WLC_GET_VAR 262 /* get value of named variable */
652 #define WLC_SET_VAR 263 /* set named variable to value */
653 #define WLC_NVRAM_GET 264
654 #define WLC_NVRAM_SET 265
655 #define WLC_SET_WSEC_PMK 268
656 #define WLC_GET_AUTH_MODE 269
657 #define WLC_SET_AUTH_MODE 270
658 #define WLC_SET_LOCALE 273
659 #define WLC_LAST 274 /* do not change - use get_var/set_var */
662 * Minor kludge alert:
663 * Duplicate a few definitions that irelay requires from epiioctl.h here
664 * so caller doesn't have to include this file and epiioctl.h .
665 * If this grows any more, it would be time to move these irelay-specific
666 * definitions out of the epiioctl.h and into a separate driver common file.
668 #ifndef EPICTRL_COOKIE
669 #define EPICTRL_COOKIE 0xABADCEDE
670 #endif
672 /* vx wlc ioctl's offset */
673 #define CMN_IOCTL_OFF 0x180
676 * custom OID support
678 * 0xFF - implementation specific OID
679 * 0xE4 - first byte of Broadcom PCI vendor ID
680 * 0x14 - second byte of Broadcom PCI vendor ID
681 * 0xXX - the custom OID number
684 /* begin 0x1f values beyond the start of the ET driver range. */
685 #define WL_OID_BASE 0xFFE41420
687 /* NDIS overrides */
688 #define OID_WL_GETINSTANCE (WL_OID_BASE + WLC_GET_INSTANCE)
690 #define WL_DECRYPT_STATUS_SUCCESS 1
691 #define WL_DECRYPT_STATUS_FAILURE 2
692 #define WL_DECRYPT_STATUS_UNKNOWN 3
694 /* allows user-mode app to poll the status of USB image upgrade */
695 #define WLC_UPGRADE_SUCCESS 0
696 #define WLC_UPGRADE_PENDING 1
698 /* Bit masks for radio disabled status - returned by WL_GET_RADIO */
699 #define WL_RADIO_SW_DISABLE (1<<0)
700 #define WL_RADIO_HW_DISABLE (1<<1)
701 #define WL_RADIO_UNASSOC_DISABLE (1<<2)
703 /* Override bit for WLC_SET_TXPWR. if set, ignore other level limits */
704 #define WL_TXPWR_OVERRIDE (1<<31)
707 /* Bus types */
708 #define WL_SB_BUS 0 /* Silicon Backplane */
709 #define WL_PCI_BUS 1 /* PCI target */
710 #define WL_PCMCIA_BUS 2 /* PCMCIA target */
712 /* band types */
713 #define WLC_BAND_AUTO 0 /* auto-select */
714 #define WLC_BAND_A 1 /* "a" band (5 Ghz) */
715 #define WLC_BAND_B 2 /* "b" band (2.4 Ghz) */
717 /* MAC list modes */
718 #define WLC_MACMODE_DISABLED 0 /* MAC list disabled */
719 #define WLC_MACMODE_DENY 1 /* Deny specified (i.e. allow unspecified) */
720 #define WLC_MACMODE_ALLOW 2 /* Allow specified (i.e. deny unspecified) */
725 #define GMODE_LEGACY_B 0
726 #define GMODE_AUTO 1
727 #define GMODE_ONLY 2
728 #define GMODE_B_DEFERRED 3
729 #define GMODE_PERFORMANCE 4
730 #define GMODE_LRS 5
731 #define GMODE_MAX 6
733 /* values for PLCPHdr_override */
734 #define WLC_PLCP_AUTO -1
735 #define WLC_PLCP_SHORT 0
736 #define WLC_PLCP_LONG 1
738 /* values for g_protection_override */
739 #define WLC_G_PROTECTION_AUTO -1
740 #define WLC_G_PROTECTION_OFF 0
741 #define WLC_G_PROTECTION_ON 1
743 /* values for g_protection_control */
744 #define WLC_G_PROTECTION_CTL_OFF 0
745 #define WLC_G_PROTECTION_CTL_LOCAL 1
746 #define WLC_G_PROTECTION_CTL_OVERLAP 2
748 /* Values for PM */
749 #define PM_OFF 0
750 #define PM_MAX 1
751 #define PM_FAST 2
757 /* 802.11h enforcement levels */
758 #define SPECT_MNGMT_OFF 0 /* 11h disabled */
759 #define SPECT_MNGMT_LOOSE 1 /* qllow scan lists to contain non-11h AP */
760 #define SPECT_MNGMT_STRICT 2 /* prune out non-11h APs from scan list */
763 #define WL_CHAN_VALID_HW (1 << 0) /* valid with current HW */
764 #define WL_CHAN_VALID_SW (1 << 1) /* valid with current country setting */
765 #define WL_CHAN_BAND_A (1 << 2) /* A-band channel */
766 #define WL_CHAN_RADAR (1 << 3) /* radar sensitive channel */
767 #define WL_CHAN_INACTIVE (1 << 4) /* temporarily out of service due to radar */
768 #define WL_CHAN_RADAR_PASSIVE (1 << 5) /* radar channel is in passive mode */
771 /* max # of leds supported by GPIO (gpio pin# == led index#) */
772 #define WL_LED_NUMGPIO 16 /* gpio 0-15 */
774 /* led per-pin behaviors */
775 #define WL_LED_OFF 0 /* always off */
776 #define WL_LED_ON 1 /* always on */
777 #define WL_LED_ACTIVITY 2 /* activity */
778 #define WL_LED_RADIO 3 /* radio enabled */
779 #define WL_LED_ARADIO 4 /* 5 Ghz radio enabled */
780 #define WL_LED_BRADIO 5 /* 2.4Ghz radio enabled */
781 #define WL_LED_BGMODE 6 /* on if gmode, off if bmode */
782 #define WL_LED_WI1 7
783 #define WL_LED_WI2 8
784 #define WL_LED_WI3 9
785 #define WL_LED_ASSOC 10 /* associated state indicator */
786 #define WL_LED_INACTIVE 11 /* null behavior (clears default behavior) */
787 #define WL_LED_NUMBEHAVIOR 12
789 /* led behavior numeric value format */
790 #define WL_LED_BEH_MASK 0x7f /* behavior mask */
791 #define WL_LED_AL_MASK 0x80 /* activelow (polarity) bit */
794 /* WDS link local endpoint WPA role */
795 #define WL_WDS_WPA_ROLE_AUTH 0 /* authenticator */
796 #define WL_WDS_WPA_ROLE_SUP 1 /* supplicant */
797 #define WL_WDS_WPA_ROLE_AUTO 255 /* auto, based on mac addr value */
799 /* Structures and constants used for "vndr_ie" IOVar interface */
800 #define VNDR_IE_CMD_LEN 4 /* length of the set command string: "add", "del" (+ NULL) */
802 /* 802.11 Mgmt Packet flags */
803 #define VNDR_IE_BEACON_FLAG 0x1
804 #define VNDR_IE_PRBRSP_FLAG 0x2
805 #define VNDR_IE_ASSOCRSP_FLAG 0x4
806 #define VNDR_IE_AUTHRSP_FLAG 0x8
808 typedef struct vndr_ie_info {
809 uint32 pktflag; /* bitmask indicating which packet(s) contain this IE */
810 vndr_ie_t vndr_ie_data; /* vendor IE data */
811 } vndr_ie_info_t;
813 typedef struct vndr_ie_buf {
814 int iecount; /* number of entries in the vndr_ie_list[] array */
815 vndr_ie_info_t vndr_ie_list[1]; /* variable size list of vndr_ie_info_t structs */
816 } vndr_ie_buf_t;
818 typedef struct vndr_ie_setbuf {
819 char cmd[VNDR_IE_CMD_LEN]; /* vndr_ie IOVar set command : "add", "del" + NULL */
820 vndr_ie_buf_t vndr_ie_buffer; /* buffer containing Vendor IE list information */
821 } vndr_ie_setbuf_t;
823 #if !defined(__GNUC__)
824 #pragma pack(pop)
825 #endif
827 #endif /* _wlioctl_h_ */