Uniformize package Makefile,
[openwrt.git] / package / openwrt / include / wlioctl.h
1 /*
2 * Custom OID/ioctl definitions for
3 * Broadcom 802.11abg Networking Device Driver
4 *
5 * Definitions subject to change without notice.
6 *
7 * Copyright 2004, 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.
14 *
15 * $Id$
16 */
17
18 #ifndef _wlioctl_h_
19 #define _wlioctl_h_
20
21 #include <typedefs.h>
22 #include <proto/ethernet.h>
23 #include <proto/802.11.h>
24
25 #if defined(__GNUC__)
26 #define PACKED __attribute__((packed))
27 #else
28 #define PACKED
29 #endif
30
31 #define WLC_ESSID_MAX_SIZE 32
32
33 #define WL_NUMRATES 255 /* max # of rates in a rateset */
34
35 typedef struct wl_rateset {
36 uint32 count; /* # rates in this set */
37 uint8 rates[WL_NUMRATES]; /* rates in 500kbps units w/hi bit set if basic */
38 } wl_rateset_t;
39
40 #define WL_CHANSPEC_CHAN_MASK 0x0fff
41 #define WL_CHANSPEC_BAND_MASK 0xf000
42 #define WL_CHANSPEC_BAND_SHIFT 12
43 #define WL_CHANSPEC_BAND_A 0x1000
44 #define WL_CHANSPEC_BAND_B 0x2000
45
46 /*
47 * Per-bss information structure.
48 */
49
50 #define WL_LEGACY_BSS_INFO_VERSION 106 /* an older supported version of wl_bss_info struct */
51 #define WL_BSS_INFO_VERSION 107 /* current version of wl_bss_info struct */
52
53 typedef struct wl_bss_info106 {
54 uint version; /* version field */
55 struct ether_addr BSSID;
56 uint8 SSID_len;
57 uint8 SSID[32];
58 uint8 Privacy; /* 0=No WEP, 1=Use WEP */
59 int16 RSSI; /* receive signal strength (in dBm) */
60 uint16 beacon_period; /* units are Kusec */
61 uint16 atim_window; /* units are Kusec */
62 uint8 channel; /* Channel no. */
63 int8 infra; /* 0=IBSS, 1=infrastructure, 2=unknown */
64 struct {
65 uint count; /* # rates in this set */
66 uint8 rates[12]; /* rates in 500kbps units w/hi bit set if basic */
67 } rateset; /* supported rates */
68 uint8 dtim_period; /* DTIM period */
69 int8 phy_noise; /* noise right after tx (in dBm) */
70 uint16 capability; /* Capability information */
71 struct dot11_bcn_prb *prb; /* probe response frame (ioctl na) */
72 uint16 prb_len; /* probe response frame length (ioctl na) */
73 struct {
74 uint8 supported; /* wpa supported */
75 uint8 multicast; /* multicast cipher */
76 uint8 ucount; /* count of unicast ciphers */
77 uint8 unicast[4]; /* unicast ciphers */
78 uint8 acount; /* count of auth modes */
79 uint8 auth[4]; /* Authentication modes */
80 } wpa;
81 } wl_bss_info106_t;
82
83 typedef struct wl_bss_info {
84 uint32 version; /* version field */
85 uint32 length; /* byte length of data in this record, starting at version and including IEs */
86 struct ether_addr BSSID;
87 uint16 beacon_period; /* units are Kusec */
88 uint16 capability; /* Capability information */
89 uint8 SSID_len;
90 uint8 SSID[32];
91 struct {
92 uint count; /* # rates in this set */
93 uint8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */
94 } rateset; /* supported rates */
95 uint8 channel; /* Channel no. */
96 uint16 atim_window; /* units are Kusec */
97 uint8 dtim_period; /* DTIM period */
98 int16 RSSI; /* receive signal strength (in dBm) */
99 int8 phy_noise; /* noise (in dBm) */
100 uint32 ie_length; /* byte length of Information Elements */
101 /* variable length Information Elements */
102 } wl_bss_info_t;
103
104 typedef struct wlc_ssid {
105 uint32 SSID_len;
106 uchar SSID[32];
107 } wlc_ssid_t;
108
109 typedef struct wl_scan_params {
110 wlc_ssid_t ssid; /* default is {0, ""} */
111 struct ether_addr bssid;/* default is bcast */
112 int8 bss_type; /* default is any, DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT */
113 int8 scan_type; /* -1 use default, DOT11_SCANTYPE_ACTIVE/PASSIVE */
114 int32 nprobes; /* -1 use default, number of probes per channel */
115 int32 active_time; /* -1 use default, dwell time per channel for active scanning */
116 int32 passive_time; /* -1 use default, dwell time per channel for passive scanning */
117 int32 home_time; /* -1 use default, dwell time for the home channel between channel scans */
118 int32 channel_num; /* 0 use default (all available channels), count of channels in channel_list */
119 uint16 channel_list[1]; /* list of chanspecs */
120 } wl_scan_params_t;
121 /* size of wl_scan_params not including variable length array */
122 #define WL_SCAN_PARAMS_FIXED_SIZE 64
123
124 typedef struct wl_scan_results {
125 uint32 buflen;
126 uint32 version;
127 uint32 count;
128 wl_bss_info_t bss_info[1];
129 } wl_scan_results_t;
130 /* size of wl_scan_results not including variable length array */
131 #define WL_SCAN_RESULTS_FIXED_SIZE 12
132
133 /* uint32 list */
134 typedef struct wl_uint32_list {
135 /* in - # of elements, out - # of entries */
136 uint32 count;
137 /* variable length uint32 list */
138 uint32 element[1];
139 } wl_uint32_list_t;
140
141 #define WLC_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NULL */
142
143 typedef struct wl_channels_in_country {
144 uint32 buflen;
145 uint32 band;
146 char country_abbrev[WLC_CNTRY_BUF_SZ];
147 uint32 count;
148 uint32 channel[1];
149 } wl_channels_in_country_t;
150
151 typedef struct wl_country_list {
152 uint32 buflen;
153 uint32 band_set;
154 uint32 band;
155 uint32 count;
156 char country_abbrev[1];
157 } wl_country_list_t;
158
159 #define WL_RM_TYPE_BASIC 1
160 #define WL_RM_TYPE_CCA 2
161 #define WL_RM_TYPE_RPI 3
162
163 #define WL_RM_FLAG_PARALLEL (1<<0)
164
165 #define WL_RM_FLAG_LATE (1<<1)
166 #define WL_RM_FLAG_INCAPABLE (1<<2)
167 #define WL_RM_FLAG_REFUSED (1<<3)
168
169 typedef struct wl_rm_req_elt {
170 int8 type;
171 int8 flags;
172 uint16 chanspec;
173 uint32 token; /* token for this measurement */
174 uint32 tsf_h; /* TSF high 32-bits of Measurement start time */
175 uint32 tsf_l; /* TSF low 32-bits */
176 uint32 dur; /* TUs */
177 } wl_rm_req_elt_t;
178
179 typedef struct wl_rm_req {
180 uint32 token; /* overall measurement set token */
181 uint32 count; /* number of measurement reqests */
182 wl_rm_req_elt_t req[1]; /* variable length block of requests */
183 } wl_rm_req_t;
184 #define WL_RM_REQ_FIXED_LEN 8
185
186 typedef struct wl_rm_rep_elt {
187 int8 type;
188 int8 flags;
189 uint16 chanspec;
190 uint32 token; /* token for this measurement */
191 uint32 tsf_h; /* TSF high 32-bits of Measurement start time */
192 uint32 tsf_l; /* TSF low 32-bits */
193 uint32 dur; /* TUs */
194 uint32 len; /* byte length of data block */
195 uint8 data[1]; /* variable length data block */
196 } wl_rm_rep_elt_t;
197 #define WL_RM_REP_ELT_FIXED_LEN 24 /* length excluding data block */
198
199 #define WL_RPI_REP_BIN_NUM 8
200 typedef struct wl_rm_rpi_rep {
201 uint8 rpi[WL_RPI_REP_BIN_NUM];
202 int8 rpi_max[WL_RPI_REP_BIN_NUM];
203 } wl_rm_rpi_rep_t;
204
205 typedef struct wl_rm_rep {
206 uint32 token; /* overall measurement set token */
207 uint32 len; /* length of measurement report block */
208 wl_rm_rep_elt_t rep[1]; /* variable length block of reports */
209 } wl_rm_rep_t;
210 #define WL_RM_REP_FIXED_LEN 8
211
212
213 #define WLC_MAX_KEY_SIZE 32 /* max size of any key */
214 #define WLC_MAX_IV_SIZE 16 /* max size of any IV */
215 #define WLC_EXT_IV_FLAG (1<<5) /* flag to indicate IV is > 4 bytes */
216 #define WLC_MAX_DEFAULT_KEYS 4 /* # of default WEP keys */
217 #define WLC_MAX_KEYS 54 /* Max # of WEP keys */
218 #define WLC_WEP1_KEY_SIZE 5 /* max size of any WEP key */
219 #define WLC_WEP1_KEY_HEX_SIZE 10 /* size of WEP key in hex. */
220 #define WLC_WEP128_KEY_SIZE 13 /* max size of any WEP key */
221 #define WLC_WEP128_KEY_HEX_SIZE 26 /* size of WEP key in hex. */
222 #define WLC_TKIP_MIC_SIZE 8 /* size of TKIP MIC */
223 #define WLC_TKIP_EOM_SIZE 7 /* max size of TKIP EOM */
224 #define WLC_TKIP_EOM_FLAG 0x5a /* TKIP EOM flag byte */
225 #define WLC_TKIP_KEY_SIZE 32 /* size of any TKIP key */
226 #define WLC_TKIP_MIC_AUTH_TX 16 /* offset to Authenticator MIC TX key */
227 #define WLC_TKIP_MIC_AUTH_RX 24 /* offset to Authenticator MIC RX key */
228 #define WLC_TKIP_MIC_SUP_RX 16 /* offset to Supplicant MIC RX key */
229 #define WLC_TKIP_MIC_SUP_TX 24 /* offset to Supplicant MIC TX key */
230 #define WLC_TKIP_P1_KEY_SIZE 10 /* size of TKHash Phase1 output, in bytes */
231 #define WLC_TKIP_P2_KEY_SIZE 16 /* size of TKHash Phase2 output */
232 #define WLC_AES_KEY_SIZE 16 /* size of AES key */
233
234
235 typedef enum sup_auth_status {
236 WLC_SUP_DISCONNECTED = 0,
237 WLC_SUP_CONNECTING,
238 WLC_SUP_IDREQUIRED,
239 WLC_SUP_AUTHENTICATING,
240 WLC_SUP_AUTHENTICATED,
241 WLC_SUP_KEYXCHANGE,
242 WLC_SUP_KEYED
243 } sup_auth_status_t;
244
245 /* Enumerate crypto algorithms */
246 #define CRYPTO_ALGO_OFF 0
247 #define CRYPTO_ALGO_WEP1 1
248 #define CRYPTO_ALGO_TKIP 2
249 #define CRYPTO_ALGO_WEP128 3
250 #define CRYPTO_ALGO_AES_CCM 4
251 #define CRYPTO_ALGO_AES_OCB_MSDU 5
252 #define CRYPTO_ALGO_AES_OCB_MPDU 6
253 #define CRYPTO_ALGO_NALG 7
254
255 #define WSEC_GEN_MIC_ERROR 0x0001
256 #define WSEC_GEN_REPLAY 0x0002
257
258 #define WL_SOFT_KEY (1 << 0) /* Indicates this key is using soft encrypt */
259 #define WL_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */
260 #define WL_KF_RES_4 (1 << 4) /* Reserved for backward compat */
261 #define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */
262
263
264 typedef struct wlc_tkip_info {
265 uint16 phase1[WLC_TKIP_P1_KEY_SIZE/sizeof(uint16)]; /* tkhash phase1 result */
266 uint8 phase2[WLC_TKIP_P2_KEY_SIZE]; /* tkhash phase2 result */
267 uint32 micl;
268 uint32 micr;
269 } tkip_info_t;
270
271 typedef struct _wsec_iv {
272 uint32 hi; /* upper 32 bits of IV */
273 uint16 lo; /* lower 16 bits of IV */
274 } wsec_iv_t;
275
276 typedef struct wsec_key {
277 uint32 index; /* key index */
278 uint32 len; /* key length */
279 uint8 data[WLC_MAX_KEY_SIZE]; /* key data */
280 tkip_info_t tkip_tx; /* tkip transmit state */
281 tkip_info_t tkip_rx; /* tkip receive state */
282 uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
283 uint32 flags; /* misc flags */
284 uint32 algo_hw; /* cache for hw register*/
285 uint32 aes_mode; /* cache for hw register*/
286 int iv_len; /* IV length */
287 int iv_initialized; /* has IV been initialized already? */
288 int icv_len; /* ICV length */
289 wsec_iv_t rxiv; /* Rx IV */
290 wsec_iv_t txiv; /* Tx IV */
291 struct ether_addr ea; /* per station */
292 } wsec_key_t;
293
294
295
296 typedef struct wl_wsec_key {
297 uint32 index; /* key index */
298 uint32 len; /* key length */
299 uint8 data[DOT11_MAX_KEY_SIZE]; /* key data */
300 uint32 pad_1[18];
301 uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
302 uint32 flags; /* misc flags */
303 uint32 pad_2[2];
304 int pad_3;
305 int iv_initialized; /* has IV been initialized already? */
306 int pad_4;
307 /* Rx IV */
308 struct {
309 uint32 hi; /* upper 32 bits of IV */
310 uint16 lo; /* lower 16 bits of IV */
311 } rxiv;
312 uint32 pad_5[2];
313 struct ether_addr ea; /* per station */
314 } wl_wsec_key_t;
315
316 /* For use with wlc_wep_key.flags */
317 #define WSEC_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */
318 #define WSEC_TKIP_ERROR (1 << 2) /* Provoke deliberate error */
319
320 #define WSEC_MIN_PSK_LEN 8
321 #define WSEC_MAX_PSK_LEN 64
322
323 /* Flag for key material needing passhash'ing */
324 #define WSEC_PASSPHRASE (1<<0)
325
326 /* recepticle for WLC_SET_WSEC_PMK parameter */
327 typedef struct {
328 ushort key_len; /* octets in key material */
329 ushort flags; /* key handling qualification */
330 uint8 key[WSEC_MAX_PSK_LEN]; /* PMK material */
331 } wsec_pmk_t;
332
333 /* wireless security bitvec */
334 #define WEP_ENABLED 1
335 #define TKIP_ENABLED 2
336 #define AES_ENABLED 4
337 #define WSEC_SWFLAG 8
338
339 #define WSEC_SW(wsec) ((wsec) & WSEC_SWFLAG)
340 #define WSEC_HW(wsec) (!WSEC_SW(wsec))
341 #define WSEC_WEP_ENABLED(wsec) ((wsec) & WEP_ENABLED)
342 #define WSEC_TKIP_ENABLED(wsec) ((wsec) & TKIP_ENABLED)
343 #define WSEC_AES_ENABLED(wsec) ((wsec) & AES_ENABLED)
344 #define WSEC_ENABLED(wsec) ((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED))
345
346
347 /* wireless authentication bit vector */
348 #define WPA_ENABLED 1
349 #define PSK_ENABLED 2
350
351 #define WAUTH_WPA_ENABLED(wauth) ((wauth) & WPA_ENABLED)
352 #define WAUTH_PSK_ENABLED(wauth) ((wauth) & PSK_ENABLED)
353 #define WAUTH_ENABLED(wauth) ((wauth) & (WPA_ENABLED | PSK_ENABLED))
354
355 /* group/mcast cipher */
356 #define WPA_MCAST_CIPHER(wsec) (((wsec) & TKIP_ENABLED) ? WPA_CIPHER_TKIP : \
357 ((wsec) & AES_ENABLED) ? WPA_CIPHER_AES_CCM : \
358 WPA_CIPHER_NONE)
359
360
361 typedef struct wl_led_info {
362 uint32 index; /* led index */
363 uint32 behavior;
364 bool activehi;
365 } wl_led_info_t;
366
367 /*
368 * definitions for driver messages passed from WL to NAS.
369 */
370 /* Use this to recognize wpa and 802.1x driver messages. */
371 static const uint8 wl_wpa_snap_template[] =
372 { 0xaa, 0xaa, 0x03, 0x00, 0x90, 0x4c };
373
374 #define WL_WPA_MSG_IFNAME_MAX 16
375
376 /* WPA driver message */
377 typedef struct wl_wpa_header {
378 struct ether_header eth;
379 struct dot11_llc_snap_header snap;
380 uint8 version;
381 uint8 type;
382 /* version 2 additions */
383 char ifname[WL_WPA_MSG_IFNAME_MAX];
384 /* version specific data */
385 /* uint8 data[1]; */
386 } wl_wpa_header_t PACKED;
387
388 /*
389 * definitions for 802.2 messages passed from WL to NAS.
390 */
391 /* This seems not to be defined outside the kernel on linux. */
392 #ifndef ETH_P_802_2
393 #define ETH_P_802_2 4
394 #endif
395
396 #define WL_WPA_HEADER_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN + 2 + WL_WPA_MSG_IFNAME_MAX)
397
398 /* WPA driver message ethertype - private between wlc and nas */
399 #define WL_WPA_ETHER_TYPE 0x9999
400
401 /* WPA driver message current version */
402 #define WL_WPA_MSG_VERSION 2
403
404 /* Type field values for the 802.2 driver messages for WPA. */
405 #define WLC_ASSOC_MSG 1
406 #define WLC_DISASSOC_MSG 2
407 #define WLC_PTK_MIC_MSG 3
408 #define WLC_GTK_MIC_MSG 4
409
410 /* Use this to recognize 802.2 driver messages. */
411 static const uint8 wpa_snap_template[] =
412 { 0xaa, 0xaa, 0x03, 0x00, 0x90, 0x4c };
413
414
415 /* 802.1x driver message */
416 typedef struct wl_eapol_header {
417 struct ether_header eth;
418 struct dot11_llc_snap_header snap;
419 uint8 version;
420 uint8 reserved;
421 char ifname[WL_WPA_MSG_IFNAME_MAX];
422 /* version specific data */
423 /* uint8 802_1x_msg[1]; */
424 } wl_eapol_header_t PACKED;
425
426 #define WL_EAPOL_HEADER_LEN (ETHER_HDR_LEN + DOT11_LLC_SNAP_HDR_LEN + 2 + WL_WPA_MSG_IFNAME_MAX)
427
428 /* 802.1x driver message ethertype - private between wlc and nas */
429 #define WL_EAPOL_ETHER_TYPE 0x999A
430
431 /* 802.1x driver message current version */
432 #define WL_EAPOL_MSG_VERSION 1
433
434 /* srom read/write struct passed through ioctl */
435 typedef struct {
436 uint byteoff; /* byte offset */
437 uint nbytes; /* number of bytes */
438 uint16 buf[1];
439 } srom_rw_t;
440
441 /* R_REG and W_REG struct passed through ioctl */
442 typedef struct {
443 uint32 byteoff; /* byte offset of the field in d11regs_t */
444 uint32 val; /* read/write value of the field */
445 uint32 size; /* sizeof the field */
446 } rw_reg_t;
447
448 /* Structure used by GET/SET_ATTEN ioctls */
449 typedef struct {
450 uint16 auto_ctrl; /* 1: Automatic control, 0: overriden */
451 uint16 bb; /* Baseband attenuation */
452 uint16 radio; /* Radio attenuation */
453 uint16 txctl1; /* Radio TX_CTL1 value */
454 } atten_t;
455
456 /* Used to get specific STA parameters */
457 typedef struct {
458 uint32 val;
459 struct ether_addr ea;
460 } scb_val_t;
461
462 /* callback registration data types */
463
464 typedef struct _mac_event_params {
465 uint msg;
466 struct ether_addr *addr;
467 uint result;
468 uint status;
469 uint auth_type;
470 } mac_event_params_t;
471
472 typedef struct _mic_error_params {
473 struct ether_addr *ea;
474 bool group;
475 bool flush_txq;
476 } mic_error_params_t;
477
478 typedef enum _wl_callback {
479 WL_MAC_EVENT_CALLBACK = 0,
480 WL_LINK_UP_CALLBACK,
481 WL_LINK_DOWN_CALLBACK,
482 WL_MIC_ERROR_CALLBACK,
483 WL_LAST_CALLBACK
484 } wl_callback_t;
485
486 typedef struct _callback {
487 void (*fn)(void *, void *);
488 void *context;
489 } callback_t;
490
491 typedef struct _scan_callback {
492 void (*fn)(void *);
493 void *context;
494 } scan_callback_t;
495
496 /* used to register an arbitrary callback via the IOCTL interface */
497 typedef struct _set_callback {
498 int index;
499 callback_t callback;
500 } set_callback_t;
501
502
503
504 /* Event data type */
505 typedef struct {
506 uint msg; /* Message (see below) */
507 struct ether_addr *addr; /* Station address (if applicable) */
508 uint status; /* Status code (see below) */
509 uint reason; /* Reason code (if applicable) */
510 uint auth_type; /* WLC_E_AUTH */
511 bool link; /* WLC_E_LINK */
512 bool group; /* WLC_E_MIC_ERROR */
513 bool flush_txq; /* WLC_E_MIC_ERROR */
514 } wlc_event_t;
515
516 typedef struct {
517 uint16 ver; /* version of this struct */
518 uint16 cap; /* sta's advertized capabilities */
519 uint32 flags; /* flags defined below */
520 uint32 idle; /* time since data pkt rx'd from sta */
521 struct ether_addr ea; /* Station address */
522 wl_rateset_t rateset; /* rateset in use */
523 } sta_info_t;
524
525 #define WL_STA_INFO_LEN 300
526 #define WL_STA_VER 1
527
528 /* flags fields */
529 #define WL_STA_BRCM 0x01
530 #define WL_STA_WME 0x02
531 #define WL_STA_ABCAP 0x04
532 #define WL_STA_AUTHE 0x08
533 #define WL_STA_ASSOC 0x10
534 #define WL_STA_AUTHO 0x20
535
536 /* Event messages */
537 #define WLC_E_SET_SSID 1
538 #define WLC_E_JOIN 2
539 #define WLC_E_START 3
540 #define WLC_E_AUTH 4
541 #define WLC_E_AUTH_IND 5
542 #define WLC_E_DEAUTH 6
543 #define WLC_E_DEAUTH_IND 7
544 #define WLC_E_ASSOC 8
545 #define WLC_E_ASSOC_IND 9
546 #define WLC_E_REASSOC 10
547 #define WLC_E_REASSOC_IND 11
548 #define WLC_E_DISASSOC 12
549 #define WLC_E_DISASSOC_IND 13
550 #define WLC_E_QUIET_START 14 /* 802.11h Quiet period started */
551 #define WLC_E_QUIET_END 15 /* 802.11h Quiet period ended */
552 #define WLC_E_GOT_BEACONS 16
553 #define WLC_E_LINK 17 /* Link indication */
554 #define WLC_E_MIC_ERROR 18 /* TKIP MIC error occurred */
555 #define WLC_E_NDIS_LINK 19 /* NDIS style link indication */
556 #define WLC_E_ROAM 20
557 #define WLC_E_LAST 21
558
559 /* Event status codes */
560 #define WLC_E_STATUS_SUCCESS 0
561 #define WLC_E_STATUS_FAIL 1
562 #define WLC_E_STATUS_TIMEOUT 2
563 #define WLC_E_STATUS_NO_NETWORKS 3
564 #define WLC_E_STATUS_ABORT 4
565
566 typedef struct wlc_event_cb {
567 uint msg; /* Event message or 0 for all */
568 void (*fn)(void *, wlc_event_t *); /* Callback function */
569 void *context; /* Passed to callback function */
570 struct wlc_event_cb *next; /* Next in the chain */
571 } wlc_event_cb_t;
572
573 /*
574 * Country locale determines which channels are available to us.
575 */
576 typedef enum _wlc_locale {
577 WLC_WW = 0, /* Worldwide */
578 WLC_THA, /* Thailand */
579 WLC_ISR, /* Israel */
580 WLC_JDN, /* Jordan */
581 WLC_PRC, /* China */
582 WLC_JPN, /* Japan */
583 WLC_FCC, /* USA */
584 WLC_EUR, /* Europe */
585 WLC_USL, /* US Low Band only */
586 WLC_JPH, /* Japan High Band only */
587 WLC_ALL, /* All the channels in this band */
588 WLC_11D, /* Represents locale recieved by 11d beacons */
589 WLC_LAST_LOCALE,
590 WLC_UNDEFINED_LOCALE = 0xf
591 } wlc_locale_t;
592
593 /* channel encoding */
594 typedef struct channel_info {
595 int hw_channel;
596 int target_channel;
597 int scan_channel;
598 } channel_info_t;
599
600 /* For ioctls that take a list of MAC addresses */
601 struct maclist {
602 uint count; /* number of MAC addresses */
603 struct ether_addr ea[1]; /* variable length array of MAC addresses */
604 };
605
606 /* get pkt count struct passed through ioctl */
607 typedef struct get_pktcnt {
608 uint rx_good_pkt;
609 uint rx_bad_pkt;
610 uint tx_good_pkt;
611 uint tx_bad_pkt;
612 } get_pktcnt_t;
613
614 /* Linux network driver ioctl encoding */
615 typedef struct wl_ioctl {
616 uint cmd; /* common ioctl definition */
617 void *buf; /* pointer to user buffer */
618 uint len; /* length of user buffer */
619 bool set; /* get or set request (optional) */
620 uint used; /* bytes read or written (optional) */
621 uint needed; /* bytes needed (optional) */
622 } wl_ioctl_t;
623
624 /*
625 * Structure for passing hardware and software
626 * revision info up from the driver.
627 */
628 typedef struct wlc_rev_info {
629 uint vendorid; /* PCI vendor id */
630 uint deviceid; /* device id of chip */
631 uint radiorev; /* radio revision */
632 uint chiprev; /* chip revision */
633 uint corerev; /* core revision */
634 uint boardid; /* board identifier (usu. PCI sub-device id) */
635 uint boardvendor; /* board vendor (usu. PCI sub-vendor id) */
636 uint boardrev; /* board revision */
637 uint driverrev; /* driver version */
638 uint ucoderev; /* microcode version */
639 uint bus; /* bus type */
640 uint chipnum; /* chip number */
641 } wlc_rev_info_t;
642
643 /* check this magic number */
644 #define WLC_IOCTL_MAGIC 0x14e46c77
645
646 /* bump this number if you change the ioctl interface */
647 #define WLC_IOCTL_VERSION 1
648
649 /* maximum length buffer required */
650 #define WLC_IOCTL_MAXLEN 8192
651
652 /* common ioctl definitions */
653 #define WLC_GET_MAGIC 0
654 #define WLC_GET_VERSION 1
655 #define WLC_UP 2
656 #define WLC_DOWN 3
657 #define WLC_GET_LOOP 4
658 #define WLC_SET_LOOP 5
659 #define WLC_DUMP 6
660 #define WLC_GET_MSGLEVEL 7
661 #define WLC_SET_MSGLEVEL 8
662 #define WLC_GET_PROMISC 9
663 #define WLC_SET_PROMISC 10
664 #define WLC_OBSOLETE 11
665 #define WLC_GET_RATE 12
666 #define WLC_SET_RATE 13
667 #define WLC_GET_INSTANCE 14
668 #define WLC_GET_FRAG 15
669 #define WLC_SET_FRAG 16
670 #define WLC_GET_RTS 17
671 #define WLC_SET_RTS 18
672 #define WLC_GET_INFRA 19
673 #define WLC_SET_INFRA 20
674 #define WLC_GET_AUTH 21
675 #define WLC_SET_AUTH 22
676 #define WLC_GET_BSSID 23
677 #define WLC_SET_BSSID 24
678 #define WLC_GET_SSID 25
679 #define WLC_SET_SSID 26
680 #define WLC_RESTART 27
681 #define WLC_DUMP_SCB 28
682 #define WLC_GET_CHANNEL 29
683 #define WLC_SET_CHANNEL 30
684 #define WLC_GET_SRL 31
685 #define WLC_SET_SRL 32
686 #define WLC_GET_LRL 33
687 #define WLC_SET_LRL 34
688 #define WLC_GET_PLCPHDR 35
689 #define WLC_SET_PLCPHDR 36
690 #define WLC_GET_RADIO 37
691 #define WLC_SET_RADIO 38
692 #define WLC_GET_PHYTYPE 39
693 #define WLC_DUMP_RATE 40
694 #define WLC_SET_RATE_PARAMS 41
695 #define WLC_GET_WEP 42
696 #define WLC_SET_WEP 43
697 #define WLC_GET_KEY 44
698 #define WLC_SET_KEY 45
699 #define WLC_GET_REGULATORY 46
700 #define WLC_SET_REGULATORY 47
701 #define WLC_GET_PASSIVE 48 /* added by nbd */
702 #define WLC_SET_PASSIVE 49 /* added by nbd */
703 #define WLC_SCAN 50
704 #define WLC_SCAN_RESULTS 51
705 #define WLC_DISASSOC 52
706 #define WLC_REASSOC 53
707 #define WLC_GET_ROAM_TRIGGER 54
708 #define WLC_SET_ROAM_TRIGGER 55
709 #define WLC_GET_ROAM_DELTA 56
710 #define WLC_SET_ROAM_DELTA 57
711 #define WLC_GET_ROAM_SCAN_PERIOD 58
712 #define WLC_SET_ROAM_SCAN_PERIOD 59
713 #define WLC_EVM 60
714 #define WLC_GET_TXANT 61
715 #define WLC_SET_TXANT 62
716 #define WLC_GET_ANTDIV 63
717 #define WLC_SET_ANTDIV 64
718 #define WLC_GET_TXPWR 65
719 #define WLC_SET_TXPWR 66
720 #define WLC_GET_CLOSED 67
721 #define WLC_SET_CLOSED 68
722 #define WLC_GET_MACLIST 69
723 #define WLC_SET_MACLIST 70
724 #define WLC_GET_RATESET 71
725 #define WLC_SET_RATESET 72
726 #define WLC_GET_LOCALE 73
727 #define WLC_SET_LOCALE 74
728 #define WLC_GET_BCNPRD 75
729 #define WLC_SET_BCNPRD 76
730 #define WLC_GET_DTIMPRD 77
731 #define WLC_SET_DTIMPRD 78
732 #define WLC_GET_SROM 79
733 #define WLC_SET_SROM 80
734 #define WLC_GET_WEP_RESTRICT 81
735 #define WLC_SET_WEP_RESTRICT 82
736 #define WLC_GET_COUNTRY 83
737 #define WLC_SET_COUNTRY 84
738 #define WLC_GET_PM 85
739 #define WLC_SET_PM 86
740 #define WLC_GET_WAKE 87
741 #define WLC_SET_WAKE 88
742 #define WLC_GET_D11CNTS 89
743 #define WLC_GET_FORCELINK 90 /* ndis only */
744 #define WLC_SET_FORCELINK 91 /* ndis only */
745 #define WLC_FREQ_ACCURACY 92
746 #define WLC_CARRIER_SUPPRESS 93
747 #define WLC_GET_PHYREG 94
748 #define WLC_SET_PHYREG 95
749 #define WLC_GET_RADIOREG 96
750 #define WLC_SET_RADIOREG 97
751 #define WLC_GET_REVINFO 98
752 #define WLC_GET_UCANTDIV 99
753 #define WLC_SET_UCANTDIV 100
754 #define WLC_R_REG 101
755 #define WLC_W_REG 102
756 #define WLC_DIAG_LOOPBACK 103
757 #define WLC_RESET_D11CNTS 104
758 #define WLC_GET_MACMODE 105
759 #define WLC_SET_MACMODE 106
760 #define WLC_GET_MONITOR 107 /* added by nbd */
761 #define WLC_SET_MONITOR 108 /* added by nbd */
762 #define WLC_GET_GMODE 109
763 #define WLC_SET_GMODE 110
764 #define WLC_GET_LEGACY_ERP 111
765 #define WLC_SET_LEGACY_ERP 112
766 #define WLC_GET_RX_ANT 113
767 #define WLC_GET_CURR_RATESET 114 /* current rateset */
768 #define WLC_GET_SCANSUPPRESS 115
769 #define WLC_SET_SCANSUPPRESS 116
770 #define WLC_GET_AP 117
771 #define WLC_SET_AP 118
772 #define WLC_GET_EAP_RESTRICT 119
773 #define WLC_SET_EAP_RESTRICT 120
774 #define WLC_SCB_AUTHORIZE 121
775 #define WLC_SCB_DEAUTHORIZE 122
776 #define WLC_GET_WDSLIST 123
777 #define WLC_SET_WDSLIST 124
778 #define WLC_GET_ATIM 125
779 #define WLC_SET_ATIM 126
780 #define WLC_GET_RSSI 127
781 #define WLC_GET_PHYANTDIV 128
782 #define WLC_SET_PHYANTDIV 129
783 #define WLC_AP_RX_ONLY 130
784 #define WLC_GET_TX_PATH_PWR 131
785 #define WLC_SET_TX_PATH_PWR 132
786 #define WLC_GET_WSEC 133
787 #define WLC_SET_WSEC 134
788 #define WLC_GET_PHY_NOISE 135
789 #define WLC_GET_BSS_INFO 136
790 #define WLC_GET_PKTCNTS 137
791 #define WLC_GET_LAZYWDS 138
792 #define WLC_SET_LAZYWDS 139
793 #define WLC_GET_BANDLIST 140
794 #define WLC_GET_BAND 141
795 #define WLC_SET_BAND 142
796 #define WLC_SCB_DEAUTHENTICATE 143
797 #define WLC_GET_SHORTSLOT 144
798 #define WLC_GET_SHORTSLOT_OVERRIDE 145
799 #define WLC_SET_SHORTSLOT_OVERRIDE 146
800 #define WLC_GET_SHORTSLOT_RESTRICT 147
801 #define WLC_SET_SHORTSLOT_RESTRICT 148
802 #define WLC_GET_GMODE_PROTECTION 149
803 #define WLC_GET_GMODE_PROTECTION_OVERRIDE 150
804 #define WLC_SET_GMODE_PROTECTION_OVERRIDE 151
805 #define WLC_UPGRADE 152
806 #define WLC_GET_MRATE 153
807 #define WLC_SET_MRATE 154
808 #define WLC_GET_IGNORE_BCNS 155
809 #define WLC_SET_IGNORE_BCNS 156
810 #define WLC_GET_SCB_TIMEOUT 157
811 #define WLC_SET_SCB_TIMEOUT 158
812 #define WLC_GET_ASSOCLIST 159
813 #define WLC_GET_CLK 160
814 #define WLC_SET_CLK 161
815 #define WLC_GET_UP 162
816 #define WLC_OUT 163
817 #define WLC_GET_WPA_AUTH 164
818 #define WLC_SET_WPA_AUTH 165
819 #define WLC_GET_UCFLAGS 166
820 #define WLC_SET_UCFLAGS 167
821 #define WLC_GET_PWRIDX 168
822 #define WLC_SET_PWRIDX 169
823 #define WLC_GET_TSSI 170
824 #define WLC_GET_SUP_RATESET_OVERRIDE 171
825 #define WLC_SET_SUP_RATESET_OVERRIDE 172
826 #define WLC_SET_FAST_TIMER 173
827 #define WLC_GET_FAST_TIMER 174
828 #define WLC_SET_SLOW_TIMER 175
829 #define WLC_GET_SLOW_TIMER 176
830 #define WLC_DUMP_PHYREGS 177
831 #define WLC_GET_GMODE_PROTECTION_CONTROL 178
832 #define WLC_SET_GMODE_PROTECTION_CONTROL 179
833 #define WLC_GET_PHYLIST 180
834 #define WLC_ENCRYPT_STRENGTH 181 /* ndis only */
835 #define WLC_DECRYPT_STATUS 182 /* ndis only */
836 #define WLC_GET_KEY_SEQ 183
837 #define WLC_GET_SCAN_CHANNEL_TIME 184
838 #define WLC_SET_SCAN_CHANNEL_TIME 185
839 #define WLC_GET_SCAN_UNASSOC_TIME 186
840 #define WLC_SET_SCAN_UNASSOC_TIME 187
841 #define WLC_GET_SCAN_HOME_TIME 188
842 #define WLC_SET_SCAN_HOME_TIME 189
843 #define WLC_GET_SCAN_PASSES 190
844 #define WLC_SET_SCAN_PASSES 191
845 #define WLC_GET_PRB_RESP_TIMEOUT 192
846 #define WLC_SET_PRB_RESP_TIMEOUT 193
847 #define WLC_GET_ATTEN 194
848 #define WLC_SET_ATTEN 195
849 #define WLC_GET_SHMEM 196 /* diag */
850 #define WLC_SET_SHMEM 197 /* diag */
851 #define WLC_GET_GMODE_PROTECTION_CTS 198
852 #define WLC_SET_GMODE_PROTECTION_CTS 199
853 #define WLC_SET_TKIP_MIC_FLAG 200
854 #define WLC_SCB_DEAUTHENTICATE_FOR_REASON 201
855 #define WLC_TKIP_COUNTERMEASURES 202
856 #define WLC_GET_PIOMODE 203
857 #define WLC_SET_PIOMODE 204
858 #define WLC_SET_LED 209
859 #define WLC_GET_LED 210
860 #define WLC_GET_INTERFERENCE_MODE 211
861 #define WLC_SET_INTERFERENCE_MODE 212
862 #define WLC_GET_CHANNEL_QA 213
863 #define WLC_START_CHANNEL_QA 214
864 #define WLC_GET_CHANNEL_SEL 215
865 #define WLC_START_CHANNEL_SEL 216
866 #define WLC_GET_VALID_CHANNELS 217
867 #define WLC_GET_FAKEFRAG 218
868 #define WLC_SET_FAKEFRAG 219
869 #define WLC_GET_PWROUT_PERCENTAGE 220
870 #define WLC_SET_PWROUT_PERCENTAGE 221
871 #define WLC_SET_BAD_FRAME_PREEMPT 222
872 #define WLC_GET_BAD_FRAME_PREEMPT 223
873 #define WLC_SET_LEAP_LIST 224
874 #define WLC_GET_LEAP_LIST 225
875 #define WLC_GET_CWMIN 226
876 #define WLC_SET_CWMIN 227
877 #define WLC_GET_CWMAX 228
878 #define WLC_SET_CWMAX 229
879 #define WLC_GET_WET 230
880 #define WLC_SET_WET 231
881 #define WLC_GET_KEY_PRIMARY 235
882 #define WLC_SET_KEY_PRIMARY 236
883 #define WLC_SCAN_WITH_CALLBACK 240
884 #define WLC_WDS_GET_REMOTE_HWADDR 246 /* currently handled in wl_linux.c/wl_vx.c */
885 #define WLC_SET_CS_SCAN_TIMER 248
886 #define WLC_GET_CS_SCAN_TIMER 249
887 #define WLC_CURRENT_PWR 256
888 #define WLC_GET_CHANNELS_IN_COUNTRY 260
889 #define WLC_GET_COUNTRY_LIST 261
890 #define WLC_GET_VAR 262 /* get value of named variable */
891 #define WLC_SET_VAR 263 /* set named variable to value */
892 #define WLC_NVRAM_GET 264
893 #define WLC_NVRAM_SET 265
894 #define WLC_SET_WSEC_PMK 268
895 #define WLC_GET_AUTH_MODE 269
896 #define WLC_SET_AUTH_MODE 270
897 #define WLC_LAST 273 /* do not change - use get_var/set_var */
898
899 /*
900 * Minor kludge alert:
901 * Duplicate a few definitions that irelay requires from epiioctl.h here
902 * so caller doesn't have to include this file and epiioctl.h .
903 * If this grows any more, it would be time to move these irelay-specific
904 * definitions out of the epiioctl.h and into a separate driver common file.
905 */
906 #ifndef EPICTRL_COOKIE
907 #define EPICTRL_COOKIE 0xABADCEDE
908 #endif
909
910 /* vx wlc ioctl's offset */
911 #define CMN_IOCTL_OFF 0x180
912
913 /*
914 * custom OID support
915 *
916 * 0xFF - implementation specific OID
917 * 0xE4 - first byte of Broadcom PCI vendor ID
918 * 0x14 - second byte of Broadcom PCI vendor ID
919 * 0xXX - the custom OID number
920 */
921
922 /* begin 0x1f values beyond the start of the ET driver range. */
923 #define WL_OID_BASE 0xFFE41420
924
925 /* NDIS overrides */
926 #define OID_WL_GETINSTANCE (WL_OID_BASE + WLC_GET_INSTANCE)
927 #define OID_WL_GET_FORCELINK (WL_OID_BASE + WLC_GET_FORCELINK)
928 #define OID_WL_SET_FORCELINK (WL_OID_BASE + WLC_SET_FORCELINK)
929 #define OID_WL_ENCRYPT_STRENGTH (WL_OID_BASE + WLC_ENCRYPT_STRENGTH)
930 #define OID_WL_DECRYPT_STATUS (WL_OID_BASE + WLC_DECRYPT_STATUS)
931
932 #define WL_DECRYPT_STATUS_SUCCESS 1
933 #define WL_DECRYPT_STATUS_FAILURE 2
934 #define WL_DECRYPT_STATUS_UNKNOWN 3
935
936 /* allows user-mode app to poll the status of USB image upgrade */
937 #define WLC_UPGRADE_SUCCESS 0
938 #define WLC_UPGRADE_PENDING 1
939
940 /* Bit masks for radio disabled status - returned by WL_GET_RADIO */
941 #define WL_RADIO_SW_DISABLE (1<<0)
942 #define WL_RADIO_HW_DISABLE (1<<1)
943
944 /* Override bit for WLC_SET_TXPWR. if set, ignore other level limits */
945 #define WL_TXPWR_OVERRIDE (1<<31)
946
947
948 /* Bus types */
949 #define WL_SB_BUS 0 /* Silicon Backplane */
950 #define WL_PCI_BUS 1 /* PCI target */
951 #define WL_PCMCIA_BUS 2 /* PCMCIA target */
952
953 /* band types */
954 #define WLC_BAND_AUTO 0 /* auto-select */
955 #define WLC_BAND_A 1 /* "a" band (5 Ghz) */
956 #define WLC_BAND_B 2 /* "b" band (2.4 Ghz) */
957
958 /* MAC list modes */
959 #define WLC_MACMODE_DISABLED 0 /* MAC list disabled */
960 #define WLC_MACMODE_DENY 1 /* Deny specified (i.e. allow unspecified) */
961 #define WLC_MACMODE_ALLOW 2 /* Allow specified (i.e. deny unspecified) */
962
963
964 /* 54g modes (basic bits may still be overridden) */
965 #define GMODE_LEGACY_B 0 /* Rateset: 1b, 2b, 5.5, 11 */
966 /* Preamble: Long */
967 /* Shortslot: Off */
968 #define GMODE_AUTO 1 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 */
969 /* Extended Rateset: 6, 9, 12, 48 */
970 /* Preamble: Long */
971 /* Shortslot: Auto */
972 #define GMODE_ONLY 2 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54 */
973 /* Extended Rateset: 6b, 9, 12b, 48 */
974 /* Preamble: Short required */
975 /* Shortslot: Auto */
976 #define GMODE_B_DEFERRED 3 /* Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54 */
977 /* Extended Rateset: 6, 9, 12, 48 */
978 /* Preamble: Long */
979 /* Shortslot: On */
980 #define GMODE_PERFORMANCE 4 /* Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54 */
981 /* Preamble: Short required */
982 /* Shortslot: On and required */
983 #define GMODE_LRS 5 /* Rateset: 1b, 2b, 5.5b, 11b */
984 /* Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54 */
985 /* Preamble: Long */
986 /* Shortslot: Auto */
987 #define GMODE_MAX 6
988
989
990 /* values for PLCPHdr_override */
991 #define WLC_PLCP_AUTO -1
992 #define WLC_PLCP_SHORT 0
993 #define WLC_PLCP_LONG 1
994
995 /* values for g_protection_override */
996 #define WLC_G_PROTECTION_AUTO -1
997 #define WLC_G_PROTECTION_OFF 0
998 #define WLC_G_PROTECTION_ON 1
999
1000 /* values for g_protection_control */
1001 #define WLC_G_PROTECTION_CTL_OFF 0
1002 #define WLC_G_PROTECTION_CTL_LOCAL 1
1003 #define WLC_G_PROTECTION_CTL_OVERLAP 2
1004
1005 /* Values for PM */
1006 #define PM_OFF 0
1007 #define PM_MAX 1
1008 #define PM_FAST 2
1009
1010 /* interference mitigation options */
1011 #define INTERFERE_NONE 0 /* off */
1012 #define NON_WLAN 1 /* foreign/non 802.11 interference, no auto detect */
1013 #define WLAN_MANUAL 2 /* ACI: no auto detection */
1014 #define WLAN_AUTO 3 /* ACI: auto - detact */
1015
1016 /* Message levels */
1017 #define WL_ERROR_VAL 0x0001
1018 #define WL_TRACE_VAL 0x0002
1019 #define WL_PRHDRS_VAL 0x0004
1020 #define WL_PRPKT_VAL 0x0008
1021 #define WL_INFORM_VAL 0x0010
1022 #define WL_TMP_VAL 0x0020
1023 #define WL_OID_VAL 0x0040
1024 #define WL_RATE_VAL 0x0080
1025 #define WL_ASSOC_VAL 0x0100
1026 #define WL_PRUSR_VAL 0x0200
1027 #define WL_PS_VAL 0x0400
1028 #define WL_TXPWR_VAL 0x0800
1029 #define WL_GMODE_VAL 0x1000
1030 #define WL_DUAL_VAL 0x2000
1031 #define WL_WSEC_VAL 0x4000
1032 #define WL_WSEC_DUMP_VAL 0x8000
1033 #define WL_LOG_VAL 0x10000
1034 #define WL_NRSSI_VAL 0x20000
1035 #define WL_LOFT_VAL 0x40000
1036 #define WL_REGULATORY_VAL 0x80000
1037 #define WL_ACI_VAL 0x100000
1038
1039
1040 /* 802.11h enforcement levels */
1041 #define SPECT_MNGMT_OFF 0 /* 11h disabled */
1042 #define SPECT_MNGMT_LOOSE 1 /* Allow scan lists to contain non-11h AP */
1043 /* when 11h is enabled */
1044 #define SPECT_MNGMT_STRICT 2 /* Prine out non-11h APs from scan list */
1045
1046
1047
1048 /* max # of leds supported by GPIO (gpio pin# == led index#) */
1049 #define WL_LED_NUMGPIO 16 /* gpio 0-15 */
1050
1051 /* led per-pin behaviors */
1052 #define WL_LED_OFF 0 /* always off */
1053 #define WL_LED_ON 1 /* always on */
1054 #define WL_LED_ACTIVITY 2 /* activity */
1055 #define WL_LED_RADIO 3 /* radio enabled */
1056 #define WL_LED_ARADIO 4 /* 5 Ghz radio enabled */
1057 #define WL_LED_BRADIO 5 /* 2.4Ghz radio enabled */
1058 #define WL_LED_BGMODE 6 /* on if gmode, off if bmode */
1059 #define WL_LED_WI1 7
1060 #define WL_LED_WI2 8
1061 #define WL_LED_WI3 9
1062 #define WL_LED_ASSOC 10 /* associated state indicator */
1063 #define WL_LED_INACTIVE 11 /* null behavior (clears default behavior) */
1064 #define WL_LED_NUMBEHAVIOR 12
1065
1066 /* led behavior numeric value format */
1067 #define WL_LED_BEH_MASK 0x7f /* behavior mask */
1068 #define WL_LED_AL_MASK 0x80 /* activelow (polarity) bit */
1069
1070
1071 /* maximum channels */
1072 #define WL_NUMCHANNELS 64 /* max # of channels in the band */
1073
1074 /* rate check */
1075 #define WL_RATE_OFDM(r) (((r) & 0x7f) == 12 || ((r) & 0x7f) == 18 || \
1076 ((r) & 0x7f) == 24 || ((r) & 0x7f) == 36 || \
1077 ((r) & 0x7f) == 48 || ((r) & 0x7f) == 72 || \
1078 ((r) & 0x7f) == 96 || ((r) & 0x7f) == 108)
1079
1080 /* WDS link local endpoint WPA role */
1081 #define WL_WDS_WPA_ROLE_AUTH 0 /* authenticator */
1082 #define WL_WDS_WPA_ROLE_SUP 1 /* supplicant */
1083 #define WL_WDS_WPA_ROLE_AUTO 255 /* auto, based on mac addr value */
1084
1085 /* afterburner_override */
1086 #define ABO_AUTO -1 /* auto - no override */
1087 #define ABO_OFF 0 /* force afterburner off */
1088 #define ABO_ON 1 /* force afterburner on */
1089
1090 #undef PACKED
1091
1092 #endif /* _wlioctl_h_ */
This page took 0.119044 seconds and 5 git commands to generate.