• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 (C) 1999-2009, Broadcom Corporation
8  *
9  *      Unless you and Broadcom execute a separate written software license
10  * agreement governing use of this software, this software is licensed to you
11  * under the terms of the GNU General Public License version 2 (the "GPL"),
12  * available at http://www.broadcom.com/licenses/GPLv2.php, with the
13  * following added to such license:
14  *
15  *      As a special exception, the copyright holders of this software give you
16  * permission to link this software with independent modules, and to copy and
17  * distribute the resulting executable under terms of your choice, provided that
18  * you also meet, for each linked independent module, the terms and conditions of
19  * the license of that module.  An independent module is a module which is not
20  * derived from this software.  The special exception does not apply to any
21  * modifications of the software.
22  *
23  *      Notwithstanding the above, under no circumstances may you combine this
24  * software in any way with any other Broadcom software provided under a license
25  * other than the GPL, without Broadcom's express prior written consent.
26  *
27  * $Id: wlioctl.h,v 1.601.4.15.2.14.2.53 2009/10/27 06:18:20 Exp $
28  */
29 
30 
31 #ifndef _wlioctl_h_
32 #define	_wlioctl_h_
33 
34 #include <typedefs.h>
35 #include <proto/ethernet.h>
36 #include <proto/bcmeth.h>
37 #include <proto/bcmevent.h>
38 #include <proto/802.11.h>
39 #include <bcmwifi.h>
40 
41 
42 
43 #define ACTION_FRAME_SIZE 1040
44 
45 typedef struct wl_action_frame {
46 	struct ether_addr	da;
47 	uint16				len;
48 	uint32				packetId;
49 	uint8				data[ACTION_FRAME_SIZE];
50 } wl_action_frame_t;
51 
52 #define WL_WIFI_ACTION_FRAME_SIZE sizeof(struct wl_action_frame)
53 
54 
55 #define BWL_DEFAULT_PACKING
56 #include <packed_section_start.h>
57 
58 #define RWL_ACTION_WIFI_CATEGORY	127
59 #define RWL_WIFI_OUI_BYTE1		0x90
60 #define RWL_WIFI_OUI_BYTE2		0x4C
61 #define RWL_WIFI_OUI_BYTE3		0x0F
62 #define RWL_WIFI_ACTION_FRAME_SIZE	sizeof(struct dot11_action_wifi_vendor_specific)
63 #define RWL_WIFI_DEFAULT                0x00
64 #define RWL_WIFI_FIND_MY_PEER		0x09
65 #define RWL_WIFI_FOUND_PEER		0x0A
66 #define RWL_ACTION_WIFI_FRAG_TYPE	0x55
67 
68 typedef struct ssid_info
69 {
70 	uint8		ssid_len;
71 	uint8		ssid[32];
72 } ssid_info_t;
73 
74 typedef struct cnt_rx
75 {
76 	uint32 cnt_rxundec;
77 	uint32 cnt_rxframe;
78 } cnt_rx_t;
79 
80 
81 
82 #define RWL_REF_MAC_ADDRESS_OFFSET	17
83 #define RWL_DUT_MAC_ADDRESS_OFFSET	23
84 #define RWL_WIFI_CLIENT_CHANNEL_OFFSET	50
85 #define RWL_WIFI_SERVER_CHANNEL_OFFSET	51
86 
87 
88 
89 
90 
91 #define	WL_BSS_INFO_VERSION	108
92 
93 
94 typedef struct wl_bss_info {
95 	uint32		version;
96 	uint32		length;
97 	struct ether_addr BSSID;
98 	uint16		beacon_period;
99 	uint16		capability;
100 	uint8		SSID_len;
101 	uint8		SSID[32];
102 	struct {
103 		uint	count;
104 		uint8	rates[16];
105 	} rateset;
106 	chanspec_t	chanspec;
107 	uint16		atim_window;
108 	uint8		dtim_period;
109 	int16		RSSI;
110 	int8		phy_noise;
111 
112 	uint8		n_cap;
113 	uint32		nbss_cap;
114 	uint8		ctl_ch;
115 	uint32		reserved32[1];
116 	uint8		flags;
117 	uint8		reserved[3];
118 	uint8		basic_mcs[MCSSET_LEN];
119 
120 	uint16		ie_offset;
121 	uint32		ie_length;
122 
123 
124 } wl_bss_info_t;
125 
126 typedef struct wlc_ssid {
127 	uint32		SSID_len;
128 	uchar		SSID[32];
129 } wlc_ssid_t;
130 
131 
132 #define WL_BSSTYPE_INFRA 1
133 #define WL_BSSTYPE_INDEP 0
134 #define WL_BSSTYPE_ANY   2
135 
136 
137 #define WL_SCANFLAGS_PASSIVE 0x01
138 #define WL_SCANFLAGS_PROHIBITED	0x04
139 
140 typedef struct wl_scan_params {
141 	wlc_ssid_t ssid;
142 	struct ether_addr bssid;
143 	int8 bss_type;
144 	int8 scan_type;
145 	int32 nprobes;
146 	int32 active_time;
147 	int32 passive_time;
148 	int32 home_time;
149 	int32 channel_num;
150 	uint16 channel_list[1];
151 } wl_scan_params_t;
152 
153 #define WL_SCAN_PARAMS_FIXED_SIZE 64
154 
155 
156 #define WL_SCAN_PARAMS_COUNT_MASK 0x0000ffff
157 #define WL_SCAN_PARAMS_NSSID_SHIFT 16
158 
159 #define WL_SCAN_ACTION_START      1
160 #define WL_SCAN_ACTION_CONTINUE   2
161 #define WL_SCAN_ACTION_ABORT      3
162 
163 #define ISCAN_REQ_VERSION 1
164 
165 
166 typedef struct wl_iscan_params {
167 	uint32 version;
168 	uint16 action;
169 	uint16 scan_duration;
170 	wl_scan_params_t params;
171 } wl_iscan_params_t;
172 
173 #define WL_ISCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_iscan_params_t, params) + sizeof(wlc_ssid_t))
174 
175 typedef struct wl_scan_results {
176 	uint32 buflen;
177 	uint32 version;
178 	uint32 count;
179 	wl_bss_info_t bss_info[1];
180 } wl_scan_results_t;
181 
182 #define WL_SCAN_RESULTS_FIXED_SIZE 12
183 
184 
185 #define WL_SCAN_RESULTS_SUCCESS	0
186 #define WL_SCAN_RESULTS_PARTIAL	1
187 #define WL_SCAN_RESULTS_PENDING	2
188 #define WL_SCAN_RESULTS_ABORTED	3
189 
190 #define ESCAN_REQ_VERSION 1
191 
192 typedef struct wl_escan_params {
193 	uint32 version;
194 	uint16 action;
195 	uint16 sync_id;
196 	wl_scan_params_t params;
197 } wl_escan_params_t;
198 
199 #define WL_ESCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_escan_params_t, params) + sizeof(wlc_ssid_t))
200 
201 typedef struct wl_escan_result {
202 	uint32 buflen;
203 	uint32 version;
204 	uint16 sync_id;
205 	uint16 bss_count;
206 	wl_bss_info_t bss_info[1];
207 } wl_escan_result_t;
208 
209 #define WL_ESCAN_RESULTS_FIXED_SIZE (sizeof(wl_escan_result_t) - sizeof(wl_bss_info_t))
210 
211 
212 typedef struct wl_iscan_results {
213 	uint32 status;
214 	wl_scan_results_t results;
215 } wl_iscan_results_t;
216 
217 #define WL_ISCAN_RESULTS_FIXED_SIZE \
218 	(WL_SCAN_RESULTS_FIXED_SIZE + OFFSETOF(wl_iscan_results_t, results))
219 
220 #define WL_NUMRATES		16
221 typedef struct wl_rateset {
222 	uint32	count;
223 	uint8	rates[WL_NUMRATES];
224 } wl_rateset_t;
225 
226 
227 typedef struct wl_uint32_list {
228 
229 	uint32 count;
230 
231 	uint32 element[1];
232 } wl_uint32_list_t;
233 
234 
235 typedef struct wl_assoc_params {
236 	struct ether_addr bssid;
237 	uint16 bssid_cnt;
238 	int32 chanspec_num;
239 	chanspec_t chanspec_list[1];
240 } wl_assoc_params_t;
241 #define WL_ASSOC_PARAMS_FIXED_SIZE 	(sizeof(wl_assoc_params_t) - sizeof(chanspec_t))
242 
243 
244 typedef wl_assoc_params_t wl_reassoc_params_t;
245 #define WL_REASSOC_PARAMS_FIXED_SIZE	WL_ASSOC_PARAMS_FIXED_SIZE
246 
247 
248 typedef struct wl_join_params {
249 	wlc_ssid_t ssid;
250 	wl_assoc_params_t params;
251 } wl_join_params_t;
252 #define WL_JOIN_PARAMS_FIXED_SIZE 	(sizeof(wl_join_params_t) - sizeof(chanspec_t))
253 
254 #define WLC_CNTRY_BUF_SZ	4
255 
256 
257 typedef enum sup_auth_status {
258 
259 	WLC_SUP_DISCONNECTED = 0,
260 	WLC_SUP_CONNECTING,
261 	WLC_SUP_IDREQUIRED,
262 	WLC_SUP_AUTHENTICATING,
263 	WLC_SUP_AUTHENTICATED,
264 	WLC_SUP_KEYXCHANGE,
265 	WLC_SUP_KEYED,
266 	WLC_SUP_TIMEOUT,
267 	WLC_SUP_LAST_BASIC_STATE,
268 
269 
270 	WLC_SUP_KEYXCHANGE_WAIT_M1 = WLC_SUP_AUTHENTICATED,
271 
272 	WLC_SUP_KEYXCHANGE_PREP_M2 = WLC_SUP_KEYXCHANGE,
273 
274 	WLC_SUP_KEYXCHANGE_WAIT_M3 = WLC_SUP_LAST_BASIC_STATE,
275 
276 	WLC_SUP_KEYXCHANGE_PREP_M4,
277 	WLC_SUP_KEYXCHANGE_WAIT_G1,
278 	WLC_SUP_KEYXCHANGE_PREP_G2
279 } sup_auth_status_t;
280 
281 
282 #define	CRYPTO_ALGO_OFF			0
283 #define	CRYPTO_ALGO_WEP1		1
284 #define	CRYPTO_ALGO_TKIP		2
285 #define	CRYPTO_ALGO_WEP128		3
286 #define CRYPTO_ALGO_AES_CCM		4
287 #define CRYPTO_ALGO_AES_OCB_MSDU	5
288 #define CRYPTO_ALGO_AES_OCB_MPDU	6
289 #define CRYPTO_ALGO_NALG		7
290 
291 #define WSEC_GEN_MIC_ERROR	0x0001
292 #define WSEC_GEN_REPLAY		0x0002
293 #define WSEC_GEN_ICV_ERROR	0x0004
294 
295 #define WL_SOFT_KEY	(1 << 0)
296 #define WL_PRIMARY_KEY	(1 << 1)
297 #define WL_KF_RES_4	(1 << 4)
298 #define WL_KF_RES_5	(1 << 5)
299 #define WL_IBSS_PEER_GROUP_KEY	(1 << 6)
300 
301 typedef struct wl_wsec_key {
302 	uint32		index;
303 	uint32		len;
304 	uint8		data[DOT11_MAX_KEY_SIZE];
305 	uint32		pad_1[18];
306 	uint32		algo;
307 	uint32		flags;
308 	uint32		pad_2[2];
309 	int		pad_3;
310 	int		iv_initialized;
311 	int		pad_4;
312 
313 	struct {
314 		uint32	hi;
315 		uint16	lo;
316 	} rxiv;
317 	uint32		pad_5[2];
318 	struct ether_addr ea;
319 } wl_wsec_key_t;
320 
321 #define WSEC_MIN_PSK_LEN	8
322 #define WSEC_MAX_PSK_LEN	64
323 
324 
325 #define WSEC_PASSPHRASE		(1<<0)
326 
327 
328 typedef struct {
329 	ushort	key_len;
330 	ushort	flags;
331 	uint8	key[WSEC_MAX_PSK_LEN];
332 } wsec_pmk_t;
333 
334 
335 #define WEP_ENABLED		0x0001
336 #define TKIP_ENABLED		0x0002
337 #define AES_ENABLED		0x0004
338 #define WSEC_SWFLAG		0x0008
339 #define SES_OW_ENABLED		0x0040
340 
341 
342 #define WPA_AUTH_DISABLED	0x0000
343 #define WPA_AUTH_NONE		0x0001
344 #define WPA_AUTH_UNSPECIFIED	0x0002
345 #define WPA_AUTH_PSK		0x0004
346 
347 #define WPA2_AUTH_UNSPECIFIED	0x0040
348 #define WPA2_AUTH_PSK		0x0080
349 #define BRCM_AUTH_PSK           0x0100
350 #define BRCM_AUTH_DPT		0x0200
351 
352 #define WPA_AUTH_PFN_ANY	0xffffffff
353 
354 
355 #define	MAXPMKID		16
356 
357 typedef struct _pmkid {
358 	struct ether_addr	BSSID;
359 	uint8			PMKID[WPA2_PMKID_LEN];
360 } pmkid_t;
361 
362 typedef struct _pmkid_list {
363 	uint32	npmkid;
364 	pmkid_t	pmkid[1];
365 } pmkid_list_t;
366 
367 typedef struct _pmkid_cand {
368 	struct ether_addr	BSSID;
369 	uint8			preauth;
370 } pmkid_cand_t;
371 
372 typedef struct _pmkid_cand_list {
373 	uint32	npmkid_cand;
374 	pmkid_cand_t	pmkid_cand[1];
375 } pmkid_cand_list_t;
376 
377 
378 
379 
380 typedef struct {
381 	uint32	val;
382 	struct ether_addr ea;
383 } scb_val_t;
384 
385 
386 
387 typedef struct channel_info {
388 	int hw_channel;
389 	int target_channel;
390 	int scan_channel;
391 } channel_info_t;
392 
393 
394 struct maclist {
395 	uint count;
396 	struct ether_addr ea[1];
397 };
398 
399 
400 typedef struct get_pktcnt {
401 	uint rx_good_pkt;
402 	uint rx_bad_pkt;
403 	uint tx_good_pkt;
404 	uint tx_bad_pkt;
405 	uint rx_ocast_good_pkt;
406 } get_pktcnt_t;
407 
408 
409 typedef struct wl_ioctl {
410 	uint cmd;
411 	void *buf;
412 	uint len;
413 	uint8 set;
414 	uint used;
415 	uint needed;
416 } wl_ioctl_t;
417 
418 
419 
420 #define WLC_IOCTL_MAGIC		0x14e46c77
421 
422 
423 #define WLC_IOCTL_VERSION	1
424 
425 #define	WLC_IOCTL_MAXLEN	8192
426 #define	WLC_IOCTL_SMLEN		256
427 #define	WLC_IOCTL_MEDLEN	1536
428 
429 
430 
431 #define WLC_GET_MAGIC				0
432 #define WLC_GET_VERSION				1
433 #define WLC_UP					2
434 #define WLC_DOWN				3
435 #define WLC_GET_LOOP				4
436 #define WLC_SET_LOOP				5
437 #define WLC_DUMP				6
438 #define WLC_GET_MSGLEVEL			7
439 #define WLC_SET_MSGLEVEL			8
440 #define WLC_GET_PROMISC				9
441 #define WLC_SET_PROMISC				10
442 
443 #define WLC_GET_RATE				12
444 
445 #define WLC_GET_INSTANCE			14
446 
447 
448 
449 
450 #define WLC_GET_INFRA				19
451 #define WLC_SET_INFRA				20
452 #define WLC_GET_AUTH				21
453 #define WLC_SET_AUTH				22
454 #define WLC_GET_BSSID				23
455 #define WLC_SET_BSSID				24
456 #define WLC_GET_SSID				25
457 #define WLC_SET_SSID				26
458 #define WLC_RESTART				27
459 
460 #define WLC_GET_CHANNEL				29
461 #define WLC_SET_CHANNEL				30
462 #define WLC_GET_SRL				31
463 #define WLC_SET_SRL				32
464 #define WLC_GET_LRL				33
465 #define WLC_SET_LRL				34
466 #define WLC_GET_PLCPHDR				35
467 #define WLC_SET_PLCPHDR				36
468 #define WLC_GET_RADIO				37
469 #define WLC_SET_RADIO				38
470 #define WLC_GET_PHYTYPE				39
471 #define WLC_DUMP_RATE				40
472 #define WLC_SET_RATE_PARAMS			41
473 
474 
475 #define WLC_GET_KEY				44
476 #define WLC_SET_KEY				45
477 #define WLC_GET_REGULATORY			46
478 #define WLC_SET_REGULATORY			47
479 #define WLC_GET_PASSIVE_SCAN			48
480 #define WLC_SET_PASSIVE_SCAN			49
481 #define WLC_SCAN				50
482 #define WLC_SCAN_RESULTS			51
483 #define WLC_DISASSOC				52
484 #define WLC_REASSOC				53
485 #define WLC_GET_ROAM_TRIGGER			54
486 #define WLC_SET_ROAM_TRIGGER			55
487 #define WLC_GET_ROAM_DELTA			56
488 #define WLC_SET_ROAM_DELTA			57
489 #define WLC_GET_ROAM_SCAN_PERIOD		58
490 #define WLC_SET_ROAM_SCAN_PERIOD		59
491 #define WLC_EVM					60
492 #define WLC_GET_TXANT				61
493 #define WLC_SET_TXANT				62
494 #define WLC_GET_ANTDIV				63
495 #define WLC_SET_ANTDIV				64
496 
497 
498 #define WLC_GET_CLOSED				67
499 #define WLC_SET_CLOSED				68
500 #define WLC_GET_MACLIST				69
501 #define WLC_SET_MACLIST				70
502 #define WLC_GET_RATESET				71
503 #define WLC_SET_RATESET				72
504 
505 #define WLC_LONGTRAIN				74
506 #define WLC_GET_BCNPRD				75
507 #define WLC_SET_BCNPRD				76
508 #define WLC_GET_DTIMPRD				77
509 #define WLC_SET_DTIMPRD				78
510 #define WLC_GET_SROM				79
511 #define WLC_SET_SROM				80
512 #define WLC_GET_WEP_RESTRICT			81
513 #define WLC_SET_WEP_RESTRICT			82
514 #define WLC_GET_COUNTRY				83
515 #define WLC_SET_COUNTRY				84
516 #define WLC_GET_PM				85
517 #define WLC_SET_PM				86
518 #define WLC_GET_WAKE				87
519 #define WLC_SET_WAKE				88
520 
521 #define WLC_GET_FORCELINK			90
522 #define WLC_SET_FORCELINK			91
523 #define WLC_FREQ_ACCURACY			92
524 #define WLC_CARRIER_SUPPRESS			93
525 #define WLC_GET_PHYREG				94
526 #define WLC_SET_PHYREG				95
527 #define WLC_GET_RADIOREG			96
528 #define WLC_SET_RADIOREG			97
529 #define WLC_GET_REVINFO				98
530 #define WLC_GET_UCANTDIV			99
531 #define WLC_SET_UCANTDIV			100
532 #define WLC_R_REG				101
533 #define WLC_W_REG				102
534 
535 
536 #define WLC_GET_MACMODE				105
537 #define WLC_SET_MACMODE				106
538 #define WLC_GET_MONITOR				107
539 #define WLC_SET_MONITOR				108
540 #define WLC_GET_GMODE				109
541 #define WLC_SET_GMODE				110
542 #define WLC_GET_LEGACY_ERP			111
543 #define WLC_SET_LEGACY_ERP			112
544 #define WLC_GET_RX_ANT				113
545 #define WLC_GET_CURR_RATESET			114
546 #define WLC_GET_SCANSUPPRESS			115
547 #define WLC_SET_SCANSUPPRESS			116
548 #define WLC_GET_AP				117
549 #define WLC_SET_AP				118
550 #define WLC_GET_EAP_RESTRICT			119
551 #define WLC_SET_EAP_RESTRICT			120
552 #define WLC_SCB_AUTHORIZE			121
553 #define WLC_SCB_DEAUTHORIZE			122
554 #define WLC_GET_WDSLIST				123
555 #define WLC_SET_WDSLIST				124
556 #define WLC_GET_ATIM				125
557 #define WLC_SET_ATIM				126
558 #define WLC_GET_RSSI				127
559 #define WLC_GET_PHYANTDIV			128
560 #define WLC_SET_PHYANTDIV			129
561 #define WLC_AP_RX_ONLY				130
562 #define WLC_GET_TX_PATH_PWR			131
563 #define WLC_SET_TX_PATH_PWR			132
564 #define WLC_GET_WSEC				133
565 #define WLC_SET_WSEC				134
566 #define WLC_GET_PHY_NOISE			135
567 #define WLC_GET_BSS_INFO			136
568 #define WLC_GET_PKTCNTS				137
569 #define WLC_GET_LAZYWDS				138
570 #define WLC_SET_LAZYWDS				139
571 #define WLC_GET_BANDLIST			140
572 #define WLC_GET_BAND				141
573 #define WLC_SET_BAND				142
574 #define WLC_SCB_DEAUTHENTICATE			143
575 #define WLC_GET_SHORTSLOT			144
576 #define WLC_GET_SHORTSLOT_OVERRIDE		145
577 #define WLC_SET_SHORTSLOT_OVERRIDE		146
578 #define WLC_GET_SHORTSLOT_RESTRICT		147
579 #define WLC_SET_SHORTSLOT_RESTRICT		148
580 #define WLC_GET_GMODE_PROTECTION		149
581 #define WLC_GET_GMODE_PROTECTION_OVERRIDE	150
582 #define WLC_SET_GMODE_PROTECTION_OVERRIDE	151
583 #define WLC_UPGRADE				152
584 
585 
586 #define WLC_GET_IGNORE_BCNS			155
587 #define WLC_SET_IGNORE_BCNS			156
588 #define WLC_GET_SCB_TIMEOUT			157
589 #define WLC_SET_SCB_TIMEOUT			158
590 #define WLC_GET_ASSOCLIST			159
591 #define WLC_GET_CLK				160
592 #define WLC_SET_CLK				161
593 #define WLC_GET_UP				162
594 #define WLC_OUT					163
595 #define WLC_GET_WPA_AUTH			164
596 #define WLC_SET_WPA_AUTH			165
597 #define WLC_GET_UCFLAGS				166
598 #define WLC_SET_UCFLAGS				167
599 #define WLC_GET_PWRIDX				168
600 #define WLC_SET_PWRIDX				169
601 #define WLC_GET_TSSI				170
602 #define WLC_GET_SUP_RATESET_OVERRIDE		171
603 #define WLC_SET_SUP_RATESET_OVERRIDE		172
604 
605 
606 
607 
608 
609 #define WLC_GET_PROTECTION_CONTROL		178
610 #define WLC_SET_PROTECTION_CONTROL		179
611 #define WLC_GET_PHYLIST				180
612 #define WLC_ENCRYPT_STRENGTH			181
613 #define WLC_DECRYPT_STATUS			182
614 #define WLC_GET_KEY_SEQ				183
615 #define WLC_GET_SCAN_CHANNEL_TIME		184
616 #define WLC_SET_SCAN_CHANNEL_TIME		185
617 #define WLC_GET_SCAN_UNASSOC_TIME		186
618 #define WLC_SET_SCAN_UNASSOC_TIME		187
619 #define WLC_GET_SCAN_HOME_TIME			188
620 #define WLC_SET_SCAN_HOME_TIME			189
621 #define WLC_GET_SCAN_NPROBES			190
622 #define WLC_SET_SCAN_NPROBES			191
623 #define WLC_GET_PRB_RESP_TIMEOUT		192
624 #define WLC_SET_PRB_RESP_TIMEOUT		193
625 #define WLC_GET_ATTEN				194
626 #define WLC_SET_ATTEN				195
627 #define WLC_GET_SHMEM				196
628 #define WLC_SET_SHMEM				197
629 
630 
631 #define WLC_SET_WSEC_TEST			200
632 #define WLC_SCB_DEAUTHENTICATE_FOR_REASON	201
633 #define WLC_TKIP_COUNTERMEASURES		202
634 #define WLC_GET_PIOMODE				203
635 #define WLC_SET_PIOMODE				204
636 #define WLC_SET_ASSOC_PREFER			205
637 #define WLC_GET_ASSOC_PREFER			206
638 #define WLC_SET_ROAM_PREFER			207
639 #define WLC_GET_ROAM_PREFER			208
640 #define WLC_SET_LED				209
641 #define WLC_GET_LED				210
642 #define WLC_GET_INTERFERENCE_MODE		211
643 #define WLC_SET_INTERFERENCE_MODE		212
644 #define WLC_GET_CHANNEL_QA			213
645 #define WLC_START_CHANNEL_QA			214
646 #define WLC_GET_CHANNEL_SEL			215
647 #define WLC_START_CHANNEL_SEL			216
648 #define WLC_GET_VALID_CHANNELS			217
649 #define WLC_GET_FAKEFRAG			218
650 #define WLC_SET_FAKEFRAG			219
651 #define WLC_GET_PWROUT_PERCENTAGE		220
652 #define WLC_SET_PWROUT_PERCENTAGE		221
653 #define WLC_SET_BAD_FRAME_PREEMPT		222
654 #define WLC_GET_BAD_FRAME_PREEMPT		223
655 #define WLC_SET_LEAP_LIST			224
656 #define WLC_GET_LEAP_LIST			225
657 #define WLC_GET_CWMIN				226
658 #define WLC_SET_CWMIN				227
659 #define WLC_GET_CWMAX				228
660 #define WLC_SET_CWMAX				229
661 #define WLC_GET_WET				230
662 #define WLC_SET_WET				231
663 #define WLC_GET_PUB				232
664 
665 
666 #define WLC_GET_KEY_PRIMARY			235
667 #define WLC_SET_KEY_PRIMARY			236
668 
669 #define WLC_GET_ACI_ARGS			238
670 #define WLC_SET_ACI_ARGS			239
671 #define WLC_UNSET_CALLBACK			240
672 #define WLC_SET_CALLBACK			241
673 #define WLC_GET_RADAR				242
674 #define WLC_SET_RADAR				243
675 #define WLC_SET_SPECT_MANAGMENT			244
676 #define WLC_GET_SPECT_MANAGMENT			245
677 #define WLC_WDS_GET_REMOTE_HWADDR		246
678 #define WLC_WDS_GET_WPA_SUP			247
679 #define WLC_SET_CS_SCAN_TIMER			248
680 #define WLC_GET_CS_SCAN_TIMER			249
681 #define WLC_MEASURE_REQUEST			250
682 #define WLC_INIT				251
683 #define WLC_SEND_QUIET				252
684 #define WLC_KEEPALIVE			253
685 #define WLC_SEND_PWR_CONSTRAINT			254
686 #define WLC_UPGRADE_STATUS			255
687 #define WLC_CURRENT_PWR				256
688 #define WLC_GET_SCAN_PASSIVE_TIME		257
689 #define WLC_SET_SCAN_PASSIVE_TIME		258
690 #define WLC_LEGACY_LINK_BEHAVIOR		259
691 #define WLC_GET_CHANNELS_IN_COUNTRY		260
692 #define WLC_GET_COUNTRY_LIST			261
693 #define WLC_GET_VAR				262
694 #define WLC_SET_VAR				263
695 #define WLC_NVRAM_GET				264
696 #define WLC_NVRAM_SET				265
697 #define WLC_NVRAM_DUMP				266
698 #define WLC_REBOOT				267
699 #define WLC_SET_WSEC_PMK			268
700 #define WLC_GET_AUTH_MODE			269
701 #define WLC_SET_AUTH_MODE			270
702 #define WLC_GET_WAKEENTRY			271
703 #define WLC_SET_WAKEENTRY			272
704 #define WLC_NDCONFIG_ITEM			273
705 #define WLC_NVOTPW				274
706 #define WLC_OTPW				275
707 #define WLC_IOV_BLOCK_GET			276
708 #define WLC_IOV_MODULES_GET			277
709 #define WLC_SOFT_RESET				278
710 #define WLC_GET_ALLOW_MODE			279
711 #define WLC_SET_ALLOW_MODE			280
712 #define WLC_GET_DESIRED_BSSID			281
713 #define WLC_SET_DESIRED_BSSID			282
714 #define	WLC_DISASSOC_MYAP			283
715 #define WLC_GET_NBANDS				284
716 #define WLC_GET_BANDSTATES			285
717 #define WLC_GET_WLC_BSS_INFO			286
718 #define WLC_GET_ASSOC_INFO			287
719 #define WLC_GET_OID_PHY				288
720 #define WLC_SET_OID_PHY				289
721 #define WLC_SET_ASSOC_TIME			290
722 #define WLC_GET_DESIRED_SSID			291
723 #define WLC_GET_CHANSPEC			292
724 #define WLC_GET_ASSOC_STATE			293
725 #define WLC_SET_PHY_STATE			294
726 #define WLC_GET_SCAN_PENDING			295
727 #define WLC_GET_SCANREQ_PENDING			296
728 #define WLC_GET_PREV_ROAM_REASON		297
729 #define WLC_SET_PREV_ROAM_REASON		298
730 #define WLC_GET_BANDSTATES_PI			299
731 #define WLC_GET_PHY_STATE			300
732 #define WLC_GET_BSS_WPA_RSN			301
733 #define WLC_GET_BSS_WPA2_RSN			302
734 #define WLC_GET_BSS_BCN_TS			303
735 #define WLC_GET_INT_DISASSOC			304
736 #define WLC_SET_NUM_PEERS			305
737 #define WLC_GET_NUM_BSS				306
738 #define WLC_LAST				307
739 
740 
741 
742 #define WL_RADIO_SW_DISABLE		(1<<0)
743 #define WL_RADIO_HW_DISABLE		(1<<1)
744 #define WL_RADIO_MPC_DISABLE		(1<<2)
745 #define WL_RADIO_COUNTRY_DISABLE	(1<<3)
746 
747 
748 #define WL_TXPWR_OVERRIDE	(1U<<31)
749 
750 #define WL_PHY_PAVARS_LEN	6
751 
752 
753 #define WL_DIAG_INTERRUPT			1
754 #define WL_DIAG_LOOPBACK			2
755 #define WL_DIAG_MEMORY				3
756 #define WL_DIAG_LED				4
757 #define WL_DIAG_REG				5
758 #define WL_DIAG_SROM				6
759 #define WL_DIAG_DMA				7
760 
761 #define WL_DIAGERR_SUCCESS			0
762 #define WL_DIAGERR_FAIL_TO_RUN			1
763 #define WL_DIAGERR_NOT_SUPPORTED		2
764 #define WL_DIAGERR_INTERRUPT_FAIL		3
765 #define WL_DIAGERR_LOOPBACK_FAIL		4
766 #define WL_DIAGERR_SROM_FAIL			5
767 #define WL_DIAGERR_SROM_BADCRC			6
768 #define WL_DIAGERR_REG_FAIL			7
769 #define WL_DIAGERR_MEMORY_FAIL			8
770 #define WL_DIAGERR_NOMEM			9
771 #define WL_DIAGERR_DMA_FAIL			10
772 
773 #define WL_DIAGERR_MEMORY_TIMEOUT		11
774 #define WL_DIAGERR_MEMORY_BADPATTERN		12
775 
776 
777 #define	WLC_BAND_AUTO		0
778 #define	WLC_BAND_5G		1
779 #define	WLC_BAND_2G		2
780 #define	WLC_BAND_ALL		3
781 
782 
783 #define WL_CHAN_FREQ_RANGE_2G      0
784 #define WL_CHAN_FREQ_RANGE_5GL     1
785 #define WL_CHAN_FREQ_RANGE_5GM     2
786 #define WL_CHAN_FREQ_RANGE_5GH     3
787 
788 
789 #define	WLC_PHY_TYPE_A		0
790 #define	WLC_PHY_TYPE_B		1
791 #define	WLC_PHY_TYPE_G		2
792 #define	WLC_PHY_TYPE_N		4
793 #define	WLC_PHY_TYPE_LP		5
794 #define	WLC_PHY_TYPE_SSN	6
795 #define	WLC_PHY_TYPE_NULL	0xf
796 
797 
798 #define WLC_MACMODE_DISABLED	0
799 #define WLC_MACMODE_DENY	1
800 #define WLC_MACMODE_ALLOW	2
801 
802 
803 #define GMODE_LEGACY_B		0
804 #define GMODE_AUTO		1
805 #define GMODE_ONLY		2
806 #define GMODE_B_DEFERRED	3
807 #define GMODE_PERFORMANCE	4
808 #define GMODE_LRS		5
809 #define GMODE_MAX		6
810 
811 
812 #define WLC_PLCP_AUTO	-1
813 #define WLC_PLCP_SHORT	0
814 #define WLC_PLCP_LONG	1
815 
816 
817 #define WLC_PROTECTION_AUTO		-1
818 #define WLC_PROTECTION_OFF		0
819 #define WLC_PROTECTION_ON		1
820 #define WLC_PROTECTION_MMHDR_ONLY	2
821 #define WLC_PROTECTION_CTS_ONLY		3
822 
823 
824 #define WLC_PROTECTION_CTL_OFF		0
825 #define WLC_PROTECTION_CTL_LOCAL	1
826 #define WLC_PROTECTION_CTL_OVERLAP	2
827 
828 
829 #define WLC_N_PROTECTION_OFF		0
830 #define WLC_N_PROTECTION_OPTIONAL	1
831 #define WLC_N_PROTECTION_20IN40		2
832 #define WLC_N_PROTECTION_MIXEDMODE	3
833 
834 
835 #define WLC_N_PREAMBLE_MIXEDMODE	0
836 #define WLC_N_PREAMBLE_GF		1
837 
838 
839 #define WLC_N_BW_20ALL			0
840 #define WLC_N_BW_40ALL			1
841 #define WLC_N_BW_20IN2G_40IN5G		2
842 
843 
844 #define WLC_N_TXRX_CHAIN0		0
845 #define WLC_N_TXRX_CHAIN1		1
846 
847 
848 #define WLC_N_SGI_20			0x01
849 #define WLC_N_SGI_40			0x02
850 
851 
852 #define PM_OFF	0
853 #define PM_MAX	1
854 #define PM_FAST 2
855 
856 
857 #define	INTERFERE_NONE	0
858 #define	NON_WLAN	1
859 #define	WLAN_MANUAL	2
860 #define	WLAN_AUTO	3
861 #define AUTO_ACTIVE	(1 << 7)
862 
863 typedef struct wl_aci_args {
864 	int enter_aci_thresh;
865 	int exit_aci_thresh;
866 	int usec_spin;
867 	int glitch_delay;
868 	uint16 nphy_adcpwr_enter_thresh;
869 	uint16 nphy_adcpwr_exit_thresh;
870 	uint16 nphy_repeat_ctr;
871 	uint16 nphy_num_samples;
872 	uint16 nphy_undetect_window_sz;
873 	uint16 nphy_b_energy_lo_aci;
874 	uint16 nphy_b_energy_md_aci;
875 	uint16 nphy_b_energy_hi_aci;
876 } wl_aci_args_t;
877 
878 #define WL_ACI_ARGS_LEGACY_LENGTH	16
879 
880 
881 
882 #define WL_ERROR_VAL		0x00000001
883 #define WL_TRACE_VAL		0x00000002
884 #define WL_PRHDRS_VAL		0x00000004
885 #define WL_PRPKT_VAL		0x00000008
886 #define WL_INFORM_VAL		0x00000010
887 #define WL_TMP_VAL		0x00000020
888 #define WL_OID_VAL		0x00000040
889 #define WL_RATE_VAL		0x00000080
890 #define WL_ASSOC_VAL		0x00000100
891 #define WL_PRUSR_VAL		0x00000200
892 #define WL_PS_VAL		0x00000400
893 #define WL_TXPWR_VAL		0x00000800
894 #define WL_PORT_VAL		0x00001000
895 #define WL_DUAL_VAL		0x00002000
896 #define WL_WSEC_VAL		0x00004000
897 #define WL_WSEC_DUMP_VAL	0x00008000
898 #define WL_LOG_VAL		0x00010000
899 #define WL_NRSSI_VAL		0x00020000
900 #define WL_LOFT_VAL		0x00040000
901 #define WL_REGULATORY_VAL	0x00080000
902 #define WL_PHYCAL_VAL		0x00100000
903 #define WL_RADAR_VAL		0x00200000
904 #define WL_MPC_VAL		0x00400000
905 #define WL_APSTA_VAL		0x00800000
906 #define WL_DFS_VAL		0x01000000
907 #define WL_BA_VAL		0x02000000
908 #define WL_MBSS_VAL		0x04000000
909 #define WL_CAC_VAL		0x08000000
910 #define WL_AMSDU_VAL		0x10000000
911 #define WL_AMPDU_VAL		0x20000000
912 #define WL_FFPLD_VAL		0x40000000
913 
914 
915 #define WL_DPT_VAL 		0x00000001
916 #define WL_SCAN_VAL		0x00000002
917 #define WL_WOWL_VAL		0x00000004
918 #define WL_COEX_VAL		0x00000008
919 #define WL_RTDC_VAL		0x00000010
920 #define WL_BTA_VAL		0x00000040
921 
922 
923 #define	WL_LED_NUMGPIO		16
924 
925 
926 #define	WL_LED_OFF		0
927 #define	WL_LED_ON		1
928 #define	WL_LED_ACTIVITY		2
929 #define	WL_LED_RADIO		3
930 #define	WL_LED_ARADIO		4
931 #define	WL_LED_BRADIO		5
932 #define	WL_LED_BGMODE		6
933 #define	WL_LED_WI1		7
934 #define	WL_LED_WI2		8
935 #define	WL_LED_WI3		9
936 #define	WL_LED_ASSOC		10
937 #define	WL_LED_INACTIVE		11
938 #define	WL_LED_ASSOCACT		12
939 #define	WL_LED_NUMBEHAVIOR	13
940 
941 
942 #define	WL_LED_BEH_MASK		0x7f
943 #define	WL_LED_AL_MASK		0x80
944 
945 
946 #define WL_NUMCHANNELS		64
947 #define WL_NUMCHANSPECS		100
948 
949 
950 #define WL_WDS_WPA_ROLE_AUTH	0
951 #define WL_WDS_WPA_ROLE_SUP	1
952 #define WL_WDS_WPA_ROLE_AUTO	255
953 
954 
955 #define WL_EVENTING_MASK_LEN	16
956 
957 
958 #define VNDR_IE_CMD_LEN		4
959 
960 
961 #define VNDR_IE_BEACON_FLAG	0x1
962 #define VNDR_IE_PRBRSP_FLAG	0x2
963 #define VNDR_IE_ASSOCRSP_FLAG	0x4
964 #define VNDR_IE_AUTHRSP_FLAG	0x8
965 #define VNDR_IE_PRBREQ_FLAG	0x10
966 #define VNDR_IE_ASSOCREQ_FLAG	0x20
967 #define VNDR_IE_CUSTOM_FLAG		0x100
968 
969 #define VNDR_IE_INFO_HDR_LEN	(sizeof(uint32))
970 
971 typedef struct {
972 	uint32 pktflag;
973 	vndr_ie_t vndr_ie_data;
974 } vndr_ie_info_t;
975 
976 typedef struct {
977 	int iecount;
978 	vndr_ie_info_t vndr_ie_list[1];
979 } vndr_ie_buf_t;
980 
981 typedef struct {
982 	char cmd[VNDR_IE_CMD_LEN];
983 	vndr_ie_buf_t vndr_ie_buffer;
984 } vndr_ie_setbuf_t;
985 
986 
987 
988 
989 #define WL_JOIN_PREF_RSSI	1
990 #define WL_JOIN_PREF_WPA	2
991 #define WL_JOIN_PREF_BAND	3
992 
993 
994 #define WLJP_BAND_ASSOC_PREF	255
995 
996 
997 #define WL_WPA_ACP_MCS_ANY	"\x00\x00\x00\x00"
998 
999 struct tsinfo_arg {
1000 	uint8 octets[3];
1001 };
1002 
1003 
1004 #define	NFIFO			6
1005 
1006 #define	WL_CNT_T_VERSION	5
1007 #define	WL_CNT_EXT_T_VERSION	1
1008 
1009 typedef struct {
1010 	uint16	version;
1011 	uint16	length;
1012 
1013 
1014 	uint32	txframe;
1015 	uint32	txbyte;
1016 	uint32	txretrans;
1017 	uint32	txerror;
1018 	uint32	txctl;
1019 	uint32	txprshort;
1020 	uint32	txserr;
1021 	uint32	txnobuf;
1022 	uint32	txnoassoc;
1023 	uint32	txrunt;
1024 	uint32	txchit;
1025 	uint32	txcmiss;
1026 
1027 
1028 	uint32	txuflo;
1029 	uint32	txphyerr;
1030 	uint32	txphycrs;
1031 
1032 
1033 	uint32	rxframe;
1034 	uint32	rxbyte;
1035 	uint32	rxerror;
1036 	uint32	rxctl;
1037 	uint32	rxnobuf;
1038 	uint32	rxnondata;
1039 	uint32	rxbadds;
1040 	uint32	rxbadcm;
1041 	uint32	rxfragerr;
1042 	uint32	rxrunt;
1043 	uint32	rxgiant;
1044 	uint32	rxnoscb;
1045 	uint32	rxbadproto;
1046 	uint32	rxbadsrcmac;
1047 	uint32	rxbadda;
1048 	uint32	rxfilter;
1049 
1050 
1051 	uint32	rxoflo;
1052 	uint32	rxuflo[NFIFO];
1053 
1054 	uint32	d11cnt_txrts_off;
1055 	uint32	d11cnt_rxcrc_off;
1056 	uint32	d11cnt_txnocts_off;
1057 
1058 
1059 	uint32	dmade;
1060 	uint32	dmada;
1061 	uint32	dmape;
1062 	uint32	reset;
1063 	uint32	tbtt;
1064 	uint32	txdmawar;
1065 	uint32	pkt_callback_reg_fail;
1066 
1067 
1068 	uint32	txallfrm;
1069 	uint32	txrtsfrm;
1070 	uint32	txctsfrm;
1071 	uint32	txackfrm;
1072 	uint32	txdnlfrm;
1073 	uint32	txbcnfrm;
1074 	uint32	txfunfl[8];
1075 	uint32	txtplunfl;
1076 	uint32	txphyerror;
1077 	uint32	rxfrmtoolong;
1078 	uint32	rxfrmtooshrt;
1079 	uint32	rxinvmachdr;
1080 	uint32	rxbadfcs;
1081 	uint32	rxbadplcp;
1082 	uint32	rxcrsglitch;
1083 	uint32	rxstrt;
1084 	uint32	rxdfrmucastmbss;
1085 	uint32	rxmfrmucastmbss;
1086 	uint32	rxcfrmucast;
1087 	uint32	rxrtsucast;
1088 	uint32	rxctsucast;
1089 	uint32	rxackucast;
1090 	uint32	rxdfrmocast;
1091 	uint32	rxmfrmocast;
1092 	uint32	rxcfrmocast;
1093 	uint32	rxrtsocast;
1094 	uint32	rxctsocast;
1095 	uint32	rxdfrmmcast;
1096 	uint32	rxmfrmmcast;
1097 	uint32	rxcfrmmcast;
1098 	uint32	rxbeaconmbss;
1099 	uint32	rxdfrmucastobss;
1100 	uint32	rxbeaconobss;
1101 	uint32	rxrsptmout;
1102 	uint32	bcntxcancl;
1103 	uint32	rxf0ovfl;
1104 	uint32	rxf1ovfl;
1105 	uint32	rxf2ovfl;
1106 	uint32	txsfovfl;
1107 	uint32	pmqovfl;
1108 	uint32	rxcgprqfrm;
1109 	uint32	rxcgprsqovfl;
1110 	uint32	txcgprsfail;
1111 	uint32	txcgprssuc;
1112 	uint32	prs_timeout;
1113 	uint32	rxnack;
1114 	uint32	frmscons;
1115 	uint32	txnack;
1116 	uint32	txglitch_nack;
1117 	uint32	txburst;
1118 
1119 
1120 	uint32	txfrag;
1121 	uint32	txmulti;
1122 	uint32	txfail;
1123 	uint32	txretry;
1124 	uint32	txretrie;
1125 	uint32	rxdup;
1126 	uint32	txrts;
1127 	uint32	txnocts;
1128 	uint32	txnoack;
1129 	uint32	rxfrag;
1130 	uint32	rxmulti;
1131 	uint32	rxcrc;
1132 	uint32	txfrmsnt;
1133 	uint32	rxundec;
1134 
1135 
1136 	uint32	tkipmicfaill;
1137 	uint32	tkipcntrmsr;
1138 	uint32	tkipreplay;
1139 	uint32	ccmpfmterr;
1140 	uint32	ccmpreplay;
1141 	uint32	ccmpundec;
1142 	uint32	fourwayfail;
1143 	uint32	wepundec;
1144 	uint32	wepicverr;
1145 	uint32	decsuccess;
1146 	uint32	tkipicverr;
1147 	uint32	wepexcluded;
1148 
1149 	uint32	txchanrej;
1150 	uint32	psmwds;
1151 	uint32	phywatchdog;
1152 
1153 
1154 	uint32	prq_entries_handled;
1155 	uint32	prq_undirected_entries;
1156 	uint32	prq_bad_entries;
1157 	uint32	atim_suppress_count;
1158 	uint32	bcn_template_not_ready;
1159 	uint32	bcn_template_not_ready_done;
1160 	uint32	late_tbtt_dpc;
1161 
1162 
1163 	uint32  rx1mbps;
1164 	uint32  rx2mbps;
1165 	uint32  rx5mbps5;
1166 	uint32  rx6mbps;
1167 	uint32  rx9mbps;
1168 	uint32  rx11mbps;
1169 	uint32  rx12mbps;
1170 	uint32  rx18mbps;
1171 	uint32  rx24mbps;
1172 	uint32  rx36mbps;
1173 	uint32  rx48mbps;
1174 	uint32  rx54mbps;
1175 	uint32  rx108mbps;
1176 	uint32  rx162mbps;
1177 	uint32  rx216mbps;
1178 	uint32  rx270mbps;
1179 	uint32  rx324mbps;
1180 	uint32  rx378mbps;
1181 	uint32  rx432mbps;
1182 	uint32  rx486mbps;
1183 	uint32  rx540mbps;
1184 
1185 	uint32	pktengrxducast;
1186 	uint32	pktengrxdmcast;
1187 } wl_cnt_t;
1188 
1189 typedef struct {
1190 	uint16	version;
1191 	uint16	length;
1192 
1193 	uint32 rxampdu_sgi;
1194 	uint32 rxampdu_stbc;
1195 	uint32 rxmpdu_sgi;
1196 	uint32 rxmpdu_stbc;
1197 	uint32	rxmcs0_40M;
1198 	uint32	rxmcs1_40M;
1199 	uint32	rxmcs2_40M;
1200 	uint32	rxmcs3_40M;
1201 	uint32	rxmcs4_40M;
1202 	uint32	rxmcs5_40M;
1203 	uint32	rxmcs6_40M;
1204 	uint32	rxmcs7_40M;
1205 	uint32	rxmcs32_40M;
1206 
1207 	uint32	txfrmsnt_20Mlo;
1208 	uint32	txfrmsnt_20Mup;
1209 	uint32	txfrmsnt_40M;
1210 
1211 	uint32 rx_20ul;
1212 } wl_cnt_ext_t;
1213 
1214 #define	WL_RXDIV_STATS_T_VERSION	1
1215 typedef struct {
1216 	uint16	version;
1217 	uint16	length;
1218 
1219 	uint32 rxant[4];
1220 } wl_rxdiv_stats_t;
1221 
1222 #define	WL_DELTA_STATS_T_VERSION	1
1223 
1224 typedef struct {
1225 	uint16 version;
1226 	uint16 length;
1227 
1228 
1229 	uint32 txframe;
1230 	uint32 txbyte;
1231 	uint32 txretrans;
1232 	uint32 txfail;
1233 
1234 
1235 	uint32 rxframe;
1236 	uint32 rxbyte;
1237 
1238 
1239 	uint32  rx1mbps;
1240 	uint32  rx2mbps;
1241 	uint32  rx5mbps5;
1242 	uint32  rx6mbps;
1243 	uint32  rx9mbps;
1244 	uint32  rx11mbps;
1245 	uint32  rx12mbps;
1246 	uint32  rx18mbps;
1247 	uint32  rx24mbps;
1248 	uint32  rx36mbps;
1249 	uint32  rx48mbps;
1250 	uint32  rx54mbps;
1251 	uint32  rx108mbps;
1252 	uint32  rx162mbps;
1253 	uint32  rx216mbps;
1254 	uint32  rx270mbps;
1255 	uint32  rx324mbps;
1256 	uint32  rx378mbps;
1257 	uint32  rx432mbps;
1258 	uint32  rx486mbps;
1259 	uint32  rx540mbps;
1260 } wl_delta_stats_t;
1261 
1262 #define WL_WME_CNT_VERSION	1
1263 
1264 typedef struct {
1265 	uint32 packets;
1266 	uint32 bytes;
1267 } wl_traffic_stats_t;
1268 
1269 typedef struct {
1270 	uint16	version;
1271 	uint16	length;
1272 
1273 	wl_traffic_stats_t tx[AC_COUNT];
1274 	wl_traffic_stats_t tx_failed[AC_COUNT];
1275 	wl_traffic_stats_t rx[AC_COUNT];
1276 	wl_traffic_stats_t rx_failed[AC_COUNT];
1277 
1278 	wl_traffic_stats_t forward[AC_COUNT];
1279 
1280 	wl_traffic_stats_t tx_expired[AC_COUNT];
1281 
1282 } wl_wme_cnt_t;
1283 
1284 
1285 
1286 #define WLC_ROAM_TRIGGER_DEFAULT	0
1287 #define WLC_ROAM_TRIGGER_BANDWIDTH	1
1288 #define WLC_ROAM_TRIGGER_DISTANCE	2
1289 #define WLC_ROAM_TRIGGER_MAX_VALUE	2
1290 
1291 
1292 enum {
1293 	PFN_LIST_ORDER,
1294 	PFN_RSSI
1295 };
1296 
1297 enum {
1298 	DISABLE,
1299 	ENABLE
1300 };
1301 
1302 #define SORT_CRITERIA_BIT		0
1303 #define AUTO_NET_SWITCH_BIT		1
1304 #define ENABLE_BKGRD_SCAN_BIT	2
1305 #define IMMEDIATE_SCAN_BIT		3
1306 #define	AUTO_CONNECT_BIT		4
1307 
1308 #define SORT_CRITERIA_MASK		0x01
1309 #define AUTO_NET_SWITCH_MASK	0x02
1310 #define ENABLE_BKGRD_SCAN_MASK	0x04
1311 #define IMMEDIATE_SCAN_MASK		0x08
1312 #define	AUTO_CONNECT_MASK		0x10
1313 
1314 #define PFN_VERSION			1
1315 
1316 
1317 typedef struct wl_pfn_param {
1318 	int32 version;
1319 	int32 scan_freq;
1320 	int32 lost_network_timeout;
1321 	int16 flags;
1322 	int16 rssi_margin;
1323 } wl_pfn_param_t;
1324 
1325 typedef struct wl_pfn {
1326 	wlc_ssid_t		ssid;
1327 	int32			bss_type;
1328 	int32			infra;
1329 	int32			auth;
1330 	int32			wpa_auth;
1331 	int32			wsec;
1332 #ifdef WLPFN_AUTO_CONNECT
1333 	union {
1334 		wl_wsec_key_t	sec_key;
1335 		wsec_pmk_t	wpa_sec_key;
1336 	} pfn_security;
1337 #endif
1338 } wl_pfn_t;
1339 
1340 
1341 #define TOE_TX_CSUM_OL		0x00000001
1342 #define TOE_RX_CSUM_OL		0x00000002
1343 
1344 
1345 #define TOE_ERRTEST_TX_CSUM	0x00000001
1346 #define TOE_ERRTEST_RX_CSUM	0x00000002
1347 #define TOE_ERRTEST_RX_CSUM2	0x00000004
1348 
1349 struct toe_ol_stats_t {
1350 
1351 	uint32 tx_summed;
1352 
1353 
1354 	uint32 tx_iph_fill;
1355 	uint32 tx_tcp_fill;
1356 	uint32 tx_udp_fill;
1357 	uint32 tx_icmp_fill;
1358 
1359 
1360 	uint32 rx_iph_good;
1361 	uint32 rx_iph_bad;
1362 	uint32 rx_tcp_good;
1363 	uint32 rx_tcp_bad;
1364 	uint32 rx_udp_good;
1365 	uint32 rx_udp_bad;
1366 	uint32 rx_icmp_good;
1367 	uint32 rx_icmp_bad;
1368 
1369 
1370 	uint32 tx_tcp_errinj;
1371 	uint32 tx_udp_errinj;
1372 	uint32 tx_icmp_errinj;
1373 
1374 
1375 	uint32 rx_tcp_errinj;
1376 	uint32 rx_udp_errinj;
1377 	uint32 rx_icmp_errinj;
1378 };
1379 
1380 
1381 #define ARP_OL_AGENT		0x00000001
1382 #define ARP_OL_SNOOP		0x00000002
1383 #define ARP_OL_HOST_AUTO_REPLY	0x00000004
1384 #define ARP_OL_PEER_AUTO_REPLY	0x00000008
1385 
1386 
1387 #define ARP_ERRTEST_REPLY_PEER	0x1
1388 #define ARP_ERRTEST_REPLY_HOST	0x2
1389 
1390 #define ARP_MULTIHOMING_MAX	8
1391 
1392 
1393 struct arp_ol_stats_t {
1394 	uint32  host_ip_entries;
1395 	uint32  host_ip_overflow;
1396 
1397 	uint32  arp_table_entries;
1398 	uint32  arp_table_overflow;
1399 
1400 	uint32  host_request;
1401 	uint32  host_reply;
1402 	uint32  host_service;
1403 
1404 	uint32  peer_request;
1405 	uint32  peer_request_drop;
1406 	uint32  peer_reply;
1407 	uint32  peer_reply_drop;
1408 	uint32  peer_service;
1409 };
1410 
1411 
1412 
1413 
1414 
1415 typedef struct wl_keep_alive_pkt {
1416 	uint32	period_msec;
1417 	uint16	len_bytes;
1418 	uint8	data[1];
1419 } wl_keep_alive_pkt_t;
1420 
1421 #define WL_KEEP_ALIVE_FIXED_LEN		OFFSETOF(wl_keep_alive_pkt_t, data)
1422 
1423 
1424 
1425 
1426 
1427 typedef enum wl_pkt_filter_type {
1428 	WL_PKT_FILTER_TYPE_PATTERN_MATCH
1429 } wl_pkt_filter_type_t;
1430 
1431 #define WL_PKT_FILTER_TYPE wl_pkt_filter_type_t
1432 
1433 
1434 typedef struct wl_pkt_filter_pattern {
1435 	uint32	offset;
1436 	uint32	size_bytes;
1437 	uint8   mask_and_pattern[1];
1438 } wl_pkt_filter_pattern_t;
1439 
1440 
1441 typedef struct wl_pkt_filter {
1442 	uint32	id;
1443 	uint32	type;
1444 	uint32	negate_match;
1445 	union {
1446 		wl_pkt_filter_pattern_t pattern;
1447 	} u;
1448 } wl_pkt_filter_t;
1449 
1450 #define WL_PKT_FILTER_FIXED_LEN		  OFFSETOF(wl_pkt_filter_t, u)
1451 #define WL_PKT_FILTER_PATTERN_FIXED_LEN	  OFFSETOF(wl_pkt_filter_pattern_t, mask_and_pattern)
1452 
1453 
1454 typedef struct wl_pkt_filter_enable {
1455 	uint32	id;
1456 	uint32	enable;
1457 } wl_pkt_filter_enable_t;
1458 
1459 
1460 typedef struct wl_pkt_filter_list {
1461 	uint32	num;
1462 	wl_pkt_filter_t	filter[1];
1463 } wl_pkt_filter_list_t;
1464 
1465 #define WL_PKT_FILTER_LIST_FIXED_LEN	  OFFSETOF(wl_pkt_filter_list_t, filter)
1466 
1467 
1468 typedef struct wl_pkt_filter_stats {
1469 	uint32	num_pkts_matched;
1470 	uint32	num_pkts_forwarded;
1471 	uint32	num_pkts_discarded;
1472 } wl_pkt_filter_stats_t;
1473 
1474 
1475 typedef struct wl_seq_cmd_ioctl {
1476 	uint32 cmd;
1477 	uint32 len;
1478 } wl_seq_cmd_ioctl_t;
1479 
1480 #define WL_SEQ_CMD_ALIGN_BYTES	4
1481 
1482 
1483 #define WL_SEQ_CMDS_GET_IOCTL_FILTER(cmd) \
1484 	(((cmd) == WLC_GET_MAGIC)		|| \
1485 	 ((cmd) == WLC_GET_VERSION)		|| \
1486 	 ((cmd) == WLC_GET_AP)			|| \
1487 	 ((cmd) == WLC_GET_INSTANCE))
1488 
1489 
1490 
1491 #define WL_PKTENG_PER_TX_START			0x01
1492 #define WL_PKTENG_PER_TX_STOP			0x02
1493 #define WL_PKTENG_PER_RX_START			0x04
1494 #define WL_PKTENG_PER_RX_WITH_ACK_START 	0x05
1495 #define WL_PKTENG_PER_TX_WITH_ACK_START 	0x06
1496 #define WL_PKTENG_PER_RX_STOP			0x08
1497 #define WL_PKTENG_PER_MASK			0xff
1498 
1499 #define WL_PKTENG_SYNCHRONOUS			0x100
1500 
1501 typedef struct wl_pkteng {
1502 	uint32 flags;
1503 	uint32 delay;
1504 	uint32 nframes;
1505 	uint32 length;
1506 	uint8  seqno;
1507 	struct ether_addr dest;
1508 	struct ether_addr src;
1509 } wl_pkteng_t;
1510 
1511 #define NUM_80211b_RATES	4
1512 #define NUM_80211ag_RATES	8
1513 #define NUM_80211n_RATES	32
1514 #define NUM_80211_RATES		(NUM_80211b_RATES+NUM_80211ag_RATES+NUM_80211n_RATES)
1515 typedef struct wl_pkteng_stats {
1516 	uint32 lostfrmcnt;
1517 	int32 rssi;
1518 	int32 snr;
1519 	uint16 rxpktcnt[NUM_80211_RATES+1];
1520 } wl_pkteng_stats_t;
1521 
1522 #define WL_WOWL_MAGIC	(1 << 0)
1523 #define WL_WOWL_NET	(1 << 1)
1524 #define WL_WOWL_DIS	(1 << 2)
1525 #define WL_WOWL_RETR	(1 << 3)
1526 #define WL_WOWL_BCN	(1 << 4)
1527 #define WL_WOWL_TST	(1 << 5)
1528 #define WL_WOWL_BCAST	(1 << 15)
1529 
1530 #define MAGIC_PKT_MINLEN 102
1531 
1532 typedef struct {
1533 	uint masksize;
1534 	uint offset;
1535 	uint patternoffset;
1536 	uint patternsize;
1537 
1538 
1539 } wl_wowl_pattern_t;
1540 
1541 typedef struct {
1542 	uint			count;
1543 	wl_wowl_pattern_t	pattern[1];
1544 } wl_wowl_pattern_list_t;
1545 
1546 typedef struct {
1547 	uint8	pci_wakeind;
1548 	uint16	ucode_wakeind;
1549 } wl_wowl_wakeind_t;
1550 
1551 
1552 typedef struct wl_txrate_class {
1553 	uint8		init_rate;
1554 	uint8		min_rate;
1555 	uint8		max_rate;
1556 } wl_txrate_class_t;
1557 
1558 
1559 
1560 
1561 #define WLC_OBSS_SCAN_PASSIVE_DWELL_DEFAULT		100
1562 #define WLC_OBSS_SCAN_PASSIVE_DWELL_MIN			5
1563 #define WLC_OBSS_SCAN_PASSIVE_DWELL_MAX			1000
1564 #define WLC_OBSS_SCAN_ACTIVE_DWELL_DEFAULT		20
1565 #define WLC_OBSS_SCAN_ACTIVE_DWELL_MIN			10
1566 #define WLC_OBSS_SCAN_ACTIVE_DWELL_MAX			1000
1567 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_DEFAULT	300
1568 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MIN		10
1569 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MAX		900
1570 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_DEFAULT	5
1571 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MIN	5
1572 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MAX	100
1573 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_DEFAULT	200
1574 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MIN	200
1575 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MAX	10000
1576 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_DEFAULT	20
1577 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MIN	20
1578 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MAX	10000
1579 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_DEFAULT	25
1580 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MIN		0
1581 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MAX		100
1582 
1583 
1584 typedef struct wl_obss_scan_arg {
1585 	int16	passive_dwell;
1586 	int16	active_dwell;
1587 	int16	bss_widthscan_interval;
1588 	int16	passive_total;
1589 	int16	active_total;
1590 	int16	chanwidth_transition_delay;
1591 	int16	activity_threshold;
1592 } wl_obss_scan_arg_t;
1593 #define WL_OBSS_SCAN_PARAM_LEN	sizeof(wl_obss_scan_arg_t)
1594 #define WL_MIN_NUM_OBSS_SCAN_ARG 7
1595 
1596 #define WL_COEX_INFO_MASK		0x07
1597 #define WL_COEX_INFO_REQ		0x01
1598 #define	WL_COEX_40MHZ_INTOLERANT	0x02
1599 #define	WL_COEX_WIDTH20			0x04
1600 
1601 
1602 #define MAX_RSSI_LEVELS 8
1603 
1604 
1605 typedef struct wl_rssi_event {
1606 
1607 	uint32 rate_limit_msec;
1608 
1609 	uint8 num_rssi_levels;
1610 
1611 	int8 rssi_levels[MAX_RSSI_LEVELS];
1612 } wl_rssi_event_t;
1613 
1614 
1615 
1616 #include <packed_section_end.h>
1617 
1618 #endif
1619