2 * Custom OID/ioctl definitions for
3 * Broadcom 802.11abg Networking Device Driver
5 * Definitions subject to change without notice.
7 * Copyright (C) 1999-2010, Broadcom Corporation
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:
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.
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.
27 * $Id: wlioctl.h,v 1.601.4.15.2.14.2.62.4.3 2011/02/09 23:31:02 Exp $
35 #include <proto/ethernet.h>
36 #include <proto/bcmeth.h>
37 #include <proto/bcmevent.h>
38 #include <proto/802.11.h>
43 #define ACTION_FRAME_SIZE 1040
45 typedef struct wl_action_frame {
49 uint8 data[ACTION_FRAME_SIZE];
52 #define WL_WIFI_ACTION_FRAME_SIZE sizeof(struct wl_action_frame)
55 #define BWL_DEFAULT_PACKING
56 #include <packed_section_start.h>
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
68 typedef struct ssid_info
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
91 #define WL_BSS_INFO_VERSION 108
94 typedef struct wl_bss_info {
97 struct ether_addr BSSID;
115 uint32 reserved32[1];
118 uint8 basic_mcs[MCSSET_LEN];
126 typedef struct wlc_ssid {
132 #define WL_BSSTYPE_INFRA 1
133 #define WL_BSSTYPE_INDEP 0
134 #define WL_BSSTYPE_ANY 2
137 #define WL_SCANFLAGS_PASSIVE 0x01
138 #define WL_SCANFLAGS_PROHIBITED 0x04
140 typedef struct wl_scan_params {
142 struct ether_addr bssid;
150 uint16 channel_list[1];
153 #define WL_SCAN_PARAMS_FIXED_SIZE 64
156 #define WL_SCAN_PARAMS_COUNT_MASK 0x0000ffff
157 #define WL_SCAN_PARAMS_NSSID_SHIFT 16
159 #define WL_SCAN_ACTION_START 1
160 #define WL_SCAN_ACTION_CONTINUE 2
161 #define WL_SCAN_ACTION_ABORT 3
163 #define ISCAN_REQ_VERSION 1
166 typedef struct wl_iscan_params {
169 uint16 scan_duration;
170 wl_scan_params_t params;
173 #define WL_ISCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_iscan_params_t, params) + sizeof(wlc_ssid_t))
175 typedef struct wl_scan_results {
179 wl_bss_info_t bss_info[1];
182 #define WL_SCAN_RESULTS_FIXED_SIZE 12
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 #define WL_SCAN_RESULTS_NO_MEM 4
191 #define ESCAN_REQ_VERSION 1
193 typedef struct wl_escan_params {
197 wl_scan_params_t params;
200 #define WL_ESCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_escan_params_t, params) + sizeof(wlc_ssid_t))
202 typedef struct wl_escan_result {
207 wl_bss_info_t bss_info[1];
210 #define WL_ESCAN_RESULTS_FIXED_SIZE (sizeof(wl_escan_result_t) - sizeof(wl_bss_info_t))
213 typedef struct wl_iscan_results {
215 wl_scan_results_t results;
216 } wl_iscan_results_t;
218 #define WL_ISCAN_RESULTS_FIXED_SIZE \
219 (WL_SCAN_RESULTS_FIXED_SIZE + OFFSETOF(wl_iscan_results_t, results))
221 #define WL_NUMRATES 16
222 typedef struct wl_rateset {
224 uint8 rates[WL_NUMRATES];
228 typedef struct wl_uint32_list {
236 typedef struct wl_assoc_params {
237 struct ether_addr bssid;
240 chanspec_t chanspec_list[1];
242 #define WL_ASSOC_PARAMS_FIXED_SIZE (sizeof(wl_assoc_params_t) - sizeof(chanspec_t))
245 typedef wl_assoc_params_t wl_reassoc_params_t;
246 #define WL_REASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE
249 typedef struct wl_join_params {
251 wl_assoc_params_t params;
253 #define WL_JOIN_PARAMS_FIXED_SIZE (sizeof(wl_join_params_t) - sizeof(chanspec_t))
255 #define WLC_CNTRY_BUF_SZ 4
257 typedef struct wl_country {
258 char country_abbrev[WLC_CNTRY_BUF_SZ];
260 char ccode[WLC_CNTRY_BUF_SZ];
263 typedef enum sup_auth_status {
265 WLC_SUP_DISCONNECTED = 0,
268 WLC_SUP_AUTHENTICATING,
269 WLC_SUP_AUTHENTICATED,
273 WLC_SUP_LAST_BASIC_STATE,
276 WLC_SUP_KEYXCHANGE_WAIT_M1 = WLC_SUP_AUTHENTICATED,
278 WLC_SUP_KEYXCHANGE_PREP_M2 = WLC_SUP_KEYXCHANGE,
280 WLC_SUP_KEYXCHANGE_WAIT_M3 = WLC_SUP_LAST_BASIC_STATE,
282 WLC_SUP_KEYXCHANGE_PREP_M4,
283 WLC_SUP_KEYXCHANGE_WAIT_G1,
284 WLC_SUP_KEYXCHANGE_PREP_G2
288 #define CRYPTO_ALGO_OFF 0
289 #define CRYPTO_ALGO_WEP1 1
290 #define CRYPTO_ALGO_TKIP 2
291 #define CRYPTO_ALGO_WEP128 3
292 #define CRYPTO_ALGO_AES_CCM 4
293 #define CRYPTO_ALGO_AES_OCB_MSDU 5
294 #define CRYPTO_ALGO_AES_OCB_MPDU 6
295 #define CRYPTO_ALGO_NALG 7
296 #define CRYPTO_ALGO_SMS4 11
298 #define WSEC_GEN_MIC_ERROR 0x0001
299 #define WSEC_GEN_REPLAY 0x0002
300 #define WSEC_GEN_ICV_ERROR 0x0004
302 #define WL_SOFT_KEY (1 << 0)
303 #define WL_PRIMARY_KEY (1 << 1)
304 #define WL_KF_RES_4 (1 << 4)
305 #define WL_KF_RES_5 (1 << 5)
306 #define WL_IBSS_PEER_GROUP_KEY (1 << 6)
308 typedef struct wl_wsec_key {
311 uint8 data[DOT11_MAX_KEY_SIZE];
325 struct ether_addr ea;
328 #define WSEC_MIN_PSK_LEN 8
329 #define WSEC_MAX_PSK_LEN 64
332 #define WSEC_PASSPHRASE (1<<0)
338 uint8 key[WSEC_MAX_PSK_LEN];
342 #define WEP_ENABLED 0x0001
343 #define TKIP_ENABLED 0x0002
344 #define AES_ENABLED 0x0004
345 #define WSEC_SWFLAG 0x0008
346 #define SES_OW_ENABLED 0x0040
347 #define SMS4_ENABLED 0x0100
350 #define WPA_AUTH_DISABLED 0x0000
351 #define WPA_AUTH_NONE 0x0001
352 #define WPA_AUTH_UNSPECIFIED 0x0002
353 #define WPA_AUTH_PSK 0x0004
355 #define WPA2_AUTH_UNSPECIFIED 0x0040
356 #define WPA2_AUTH_PSK 0x0080
357 #define BRCM_AUTH_PSK 0x0100
358 #define BRCM_AUTH_DPT 0x0200
359 #define WPA_AUTH_WAPI 0x0400
361 #define WPA_AUTH_PFN_ANY 0xffffffff
366 typedef struct _pmkid {
367 struct ether_addr BSSID;
368 uint8 PMKID[WPA2_PMKID_LEN];
371 typedef struct _pmkid_list {
376 typedef struct _pmkid_cand {
377 struct ether_addr BSSID;
381 typedef struct _pmkid_cand_list {
383 pmkid_cand_t pmkid_cand[1];
391 struct ether_addr ea;
396 typedef struct channel_info {
405 struct ether_addr ea[1];
409 typedef struct get_pktcnt {
414 uint rx_ocast_good_pkt;
418 typedef struct wl_ioctl {
429 #define WLC_IOCTL_MAGIC 0x14e46c77
432 #define WLC_IOCTL_VERSION 1
434 #define WLC_IOCTL_MAXLEN 8192
435 #define WLC_IOCTL_SMLEN 256
436 #define WLC_IOCTL_MEDLEN 1536
440 #define WLC_GET_MAGIC 0
441 #define WLC_GET_VERSION 1
444 #define WLC_GET_LOOP 4
445 #define WLC_SET_LOOP 5
447 #define WLC_GET_MSGLEVEL 7
448 #define WLC_SET_MSGLEVEL 8
449 #define WLC_GET_PROMISC 9
450 #define WLC_SET_PROMISC 10
452 #define WLC_GET_RATE 12
454 #define WLC_GET_INSTANCE 14
459 #define WLC_GET_INFRA 19
460 #define WLC_SET_INFRA 20
461 #define WLC_GET_AUTH 21
462 #define WLC_SET_AUTH 22
463 #define WLC_GET_BSSID 23
464 #define WLC_SET_BSSID 24
465 #define WLC_GET_SSID 25
466 #define WLC_SET_SSID 26
467 #define WLC_RESTART 27
469 #define WLC_GET_CHANNEL 29
470 #define WLC_SET_CHANNEL 30
471 #define WLC_GET_SRL 31
472 #define WLC_SET_SRL 32
473 #define WLC_GET_LRL 33
474 #define WLC_SET_LRL 34
475 #define WLC_GET_PLCPHDR 35
476 #define WLC_SET_PLCPHDR 36
477 #define WLC_GET_RADIO 37
478 #define WLC_SET_RADIO 38
479 #define WLC_GET_PHYTYPE 39
480 #define WLC_DUMP_RATE 40
481 #define WLC_SET_RATE_PARAMS 41
484 #define WLC_GET_KEY 44
485 #define WLC_SET_KEY 45
486 #define WLC_GET_REGULATORY 46
487 #define WLC_SET_REGULATORY 47
488 #define WLC_GET_PASSIVE_SCAN 48
489 #define WLC_SET_PASSIVE_SCAN 49
491 #define WLC_SCAN_RESULTS 51
492 #define WLC_DISASSOC 52
493 #define WLC_REASSOC 53
494 #define WLC_GET_ROAM_TRIGGER 54
495 #define WLC_SET_ROAM_TRIGGER 55
496 #define WLC_GET_ROAM_DELTA 56
497 #define WLC_SET_ROAM_DELTA 57
498 #define WLC_GET_ROAM_SCAN_PERIOD 58
499 #define WLC_SET_ROAM_SCAN_PERIOD 59
501 #define WLC_GET_TXANT 61
502 #define WLC_SET_TXANT 62
503 #define WLC_GET_ANTDIV 63
504 #define WLC_SET_ANTDIV 64
507 #define WLC_GET_CLOSED 67
508 #define WLC_SET_CLOSED 68
509 #define WLC_GET_MACLIST 69
510 #define WLC_SET_MACLIST 70
511 #define WLC_GET_RATESET 71
512 #define WLC_SET_RATESET 72
514 #define WLC_LONGTRAIN 74
515 #define WLC_GET_BCNPRD 75
516 #define WLC_SET_BCNPRD 76
517 #define WLC_GET_DTIMPRD 77
518 #define WLC_SET_DTIMPRD 78
519 #define WLC_GET_SROM 79
520 #define WLC_SET_SROM 80
521 #define WLC_GET_WEP_RESTRICT 81
522 #define WLC_SET_WEP_RESTRICT 82
523 #define WLC_GET_COUNTRY 83
524 #define WLC_SET_COUNTRY 84
525 #define WLC_GET_PM 85
526 #define WLC_SET_PM 86
527 #define WLC_GET_WAKE 87
528 #define WLC_SET_WAKE 88
530 #define WLC_GET_FORCELINK 90
531 #define WLC_SET_FORCELINK 91
532 #define WLC_FREQ_ACCURACY 92
533 #define WLC_CARRIER_SUPPRESS 93
534 #define WLC_GET_PHYREG 94
535 #define WLC_SET_PHYREG 95
536 #define WLC_GET_RADIOREG 96
537 #define WLC_SET_RADIOREG 97
538 #define WLC_GET_REVINFO 98
539 #define WLC_GET_UCANTDIV 99
540 #define WLC_SET_UCANTDIV 100
541 #define WLC_R_REG 101
542 #define WLC_W_REG 102
545 #define WLC_GET_MACMODE 105
546 #define WLC_SET_MACMODE 106
547 #define WLC_GET_MONITOR 107
548 #define WLC_SET_MONITOR 108
549 #define WLC_GET_GMODE 109
550 #define WLC_SET_GMODE 110
551 #define WLC_GET_LEGACY_ERP 111
552 #define WLC_SET_LEGACY_ERP 112
553 #define WLC_GET_RX_ANT 113
554 #define WLC_GET_CURR_RATESET 114
555 #define WLC_GET_SCANSUPPRESS 115
556 #define WLC_SET_SCANSUPPRESS 116
557 #define WLC_GET_AP 117
558 #define WLC_SET_AP 118
559 #define WLC_GET_EAP_RESTRICT 119
560 #define WLC_SET_EAP_RESTRICT 120
561 #define WLC_SCB_AUTHORIZE 121
562 #define WLC_SCB_DEAUTHORIZE 122
563 #define WLC_GET_WDSLIST 123
564 #define WLC_SET_WDSLIST 124
565 #define WLC_GET_ATIM 125
566 #define WLC_SET_ATIM 126
567 #define WLC_GET_RSSI 127
568 #define WLC_GET_PHYANTDIV 128
569 #define WLC_SET_PHYANTDIV 129
570 #define WLC_AP_RX_ONLY 130
571 #define WLC_GET_TX_PATH_PWR 131
572 #define WLC_SET_TX_PATH_PWR 132
573 #define WLC_GET_WSEC 133
574 #define WLC_SET_WSEC 134
575 #define WLC_GET_PHY_NOISE 135
576 #define WLC_GET_BSS_INFO 136
577 #define WLC_GET_PKTCNTS 137
578 #define WLC_GET_LAZYWDS 138
579 #define WLC_SET_LAZYWDS 139
580 #define WLC_GET_BANDLIST 140
581 #define WLC_GET_BAND 141
582 #define WLC_SET_BAND 142
583 #define WLC_SCB_DEAUTHENTICATE 143
584 #define WLC_GET_SHORTSLOT 144
585 #define WLC_GET_SHORTSLOT_OVERRIDE 145
586 #define WLC_SET_SHORTSLOT_OVERRIDE 146
587 #define WLC_GET_SHORTSLOT_RESTRICT 147
588 #define WLC_SET_SHORTSLOT_RESTRICT 148
589 #define WLC_GET_GMODE_PROTECTION 149
590 #define WLC_GET_GMODE_PROTECTION_OVERRIDE 150
591 #define WLC_SET_GMODE_PROTECTION_OVERRIDE 151
592 #define WLC_UPGRADE 152
595 #define WLC_GET_IGNORE_BCNS 155
596 #define WLC_SET_IGNORE_BCNS 156
597 #define WLC_GET_SCB_TIMEOUT 157
598 #define WLC_SET_SCB_TIMEOUT 158
599 #define WLC_GET_ASSOCLIST 159
600 #define WLC_GET_CLK 160
601 #define WLC_SET_CLK 161
602 #define WLC_GET_UP 162
604 #define WLC_GET_WPA_AUTH 164
605 #define WLC_SET_WPA_AUTH 165
606 #define WLC_GET_UCFLAGS 166
607 #define WLC_SET_UCFLAGS 167
608 #define WLC_GET_PWRIDX 168
609 #define WLC_SET_PWRIDX 169
610 #define WLC_GET_TSSI 170
611 #define WLC_GET_SUP_RATESET_OVERRIDE 171
612 #define WLC_SET_SUP_RATESET_OVERRIDE 172
618 #define WLC_GET_PROTECTION_CONTROL 178
619 #define WLC_SET_PROTECTION_CONTROL 179
620 #define WLC_GET_PHYLIST 180
621 #define WLC_ENCRYPT_STRENGTH 181
622 #define WLC_DECRYPT_STATUS 182
623 #define WLC_GET_KEY_SEQ 183
624 #define WLC_GET_SCAN_CHANNEL_TIME 184
625 #define WLC_SET_SCAN_CHANNEL_TIME 185
626 #define WLC_GET_SCAN_UNASSOC_TIME 186
627 #define WLC_SET_SCAN_UNASSOC_TIME 187
628 #define WLC_GET_SCAN_HOME_TIME 188
629 #define WLC_SET_SCAN_HOME_TIME 189
630 #define WLC_GET_SCAN_NPROBES 190
631 #define WLC_SET_SCAN_NPROBES 191
632 #define WLC_GET_PRB_RESP_TIMEOUT 192
633 #define WLC_SET_PRB_RESP_TIMEOUT 193
634 #define WLC_GET_ATTEN 194
635 #define WLC_SET_ATTEN 195
636 #define WLC_GET_SHMEM 196
637 #define WLC_SET_SHMEM 197
640 #define WLC_SET_WSEC_TEST 200
641 #define WLC_SCB_DEAUTHENTICATE_FOR_REASON 201
642 #define WLC_TKIP_COUNTERMEASURES 202
643 #define WLC_GET_PIOMODE 203
644 #define WLC_SET_PIOMODE 204
645 #define WLC_SET_ASSOC_PREFER 205
646 #define WLC_GET_ASSOC_PREFER 206
647 #define WLC_SET_ROAM_PREFER 207
648 #define WLC_GET_ROAM_PREFER 208
649 #define WLC_SET_LED 209
650 #define WLC_GET_LED 210
651 #define WLC_GET_INTERFERENCE_MODE 211
652 #define WLC_SET_INTERFERENCE_MODE 212
653 #define WLC_GET_CHANNEL_QA 213
654 #define WLC_START_CHANNEL_QA 214
655 #define WLC_GET_CHANNEL_SEL 215
656 #define WLC_START_CHANNEL_SEL 216
657 #define WLC_GET_VALID_CHANNELS 217
658 #define WLC_GET_FAKEFRAG 218
659 #define WLC_SET_FAKEFRAG 219
660 #define WLC_GET_PWROUT_PERCENTAGE 220
661 #define WLC_SET_PWROUT_PERCENTAGE 221
662 #define WLC_SET_BAD_FRAME_PREEMPT 222
663 #define WLC_GET_BAD_FRAME_PREEMPT 223
664 #define WLC_SET_LEAP_LIST 224
665 #define WLC_GET_LEAP_LIST 225
666 #define WLC_GET_CWMIN 226
667 #define WLC_SET_CWMIN 227
668 #define WLC_GET_CWMAX 228
669 #define WLC_SET_CWMAX 229
670 #define WLC_GET_WET 230
671 #define WLC_SET_WET 231
672 #define WLC_GET_PUB 232
675 #define WLC_GET_KEY_PRIMARY 235
676 #define WLC_SET_KEY_PRIMARY 236
678 #define WLC_GET_ACI_ARGS 238
679 #define WLC_SET_ACI_ARGS 239
680 #define WLC_UNSET_CALLBACK 240
681 #define WLC_SET_CALLBACK 241
682 #define WLC_GET_RADAR 242
683 #define WLC_SET_RADAR 243
684 #define WLC_SET_SPECT_MANAGMENT 244
685 #define WLC_GET_SPECT_MANAGMENT 245
686 #define WLC_WDS_GET_REMOTE_HWADDR 246
687 #define WLC_WDS_GET_WPA_SUP 247
688 #define WLC_SET_CS_SCAN_TIMER 248
689 #define WLC_GET_CS_SCAN_TIMER 249
690 #define WLC_MEASURE_REQUEST 250
692 #define WLC_SEND_QUIET 252
693 #define WLC_KEEPALIVE 253
694 #define WLC_SEND_PWR_CONSTRAINT 254
695 #define WLC_UPGRADE_STATUS 255
696 #define WLC_CURRENT_PWR 256
697 #define WLC_GET_SCAN_PASSIVE_TIME 257
698 #define WLC_SET_SCAN_PASSIVE_TIME 258
699 #define WLC_LEGACY_LINK_BEHAVIOR 259
700 #define WLC_GET_CHANNELS_IN_COUNTRY 260
701 #define WLC_GET_COUNTRY_LIST 261
702 #define WLC_GET_VAR 262
703 #define WLC_SET_VAR 263
704 #define WLC_NVRAM_GET 264
705 #define WLC_NVRAM_SET 265
706 #define WLC_NVRAM_DUMP 266
707 #define WLC_REBOOT 267
708 #define WLC_SET_WSEC_PMK 268
709 #define WLC_GET_AUTH_MODE 269
710 #define WLC_SET_AUTH_MODE 270
711 #define WLC_GET_WAKEENTRY 271
712 #define WLC_SET_WAKEENTRY 272
713 #define WLC_NDCONFIG_ITEM 273
714 #define WLC_NVOTPW 274
716 #define WLC_IOV_BLOCK_GET 276
717 #define WLC_IOV_MODULES_GET 277
718 #define WLC_SOFT_RESET 278
719 #define WLC_GET_ALLOW_MODE 279
720 #define WLC_SET_ALLOW_MODE 280
721 #define WLC_GET_DESIRED_BSSID 281
722 #define WLC_SET_DESIRED_BSSID 282
723 #define WLC_DISASSOC_MYAP 283
724 #define WLC_GET_NBANDS 284
725 #define WLC_GET_BANDSTATES 285
726 #define WLC_GET_WLC_BSS_INFO 286
727 #define WLC_GET_ASSOC_INFO 287
728 #define WLC_GET_OID_PHY 288
729 #define WLC_SET_OID_PHY 289
730 #define WLC_SET_ASSOC_TIME 290
731 #define WLC_GET_DESIRED_SSID 291
732 #define WLC_GET_CHANSPEC 292
733 #define WLC_GET_ASSOC_STATE 293
734 #define WLC_SET_PHY_STATE 294
735 #define WLC_GET_SCAN_PENDING 295
736 #define WLC_GET_SCANREQ_PENDING 296
737 #define WLC_GET_PREV_ROAM_REASON 297
738 #define WLC_SET_PREV_ROAM_REASON 298
739 #define WLC_GET_BANDSTATES_PI 299
740 #define WLC_GET_PHY_STATE 300
741 #define WLC_GET_BSS_WPA_RSN 301
742 #define WLC_GET_BSS_WPA2_RSN 302
743 #define WLC_GET_BSS_BCN_TS 303
744 #define WLC_GET_INT_DISASSOC 304
745 #define WLC_SET_NUM_PEERS 305
746 #define WLC_GET_NUM_BSS 306
751 #define WL_RADIO_SW_DISABLE (1<<0)
752 #define WL_RADIO_HW_DISABLE (1<<1)
753 #define WL_RADIO_MPC_DISABLE (1<<2)
754 #define WL_RADIO_COUNTRY_DISABLE (1<<3)
757 #define WL_TXPWR_OVERRIDE (1U<<31)
759 #define WL_PHY_PAVARS_LEN 6
762 #define WL_DIAG_INTERRUPT 1
763 #define WL_DIAG_LOOPBACK 2
764 #define WL_DIAG_MEMORY 3
765 #define WL_DIAG_LED 4
766 #define WL_DIAG_REG 5
767 #define WL_DIAG_SROM 6
768 #define WL_DIAG_DMA 7
770 #define WL_DIAGERR_SUCCESS 0
771 #define WL_DIAGERR_FAIL_TO_RUN 1
772 #define WL_DIAGERR_NOT_SUPPORTED 2
773 #define WL_DIAGERR_INTERRUPT_FAIL 3
774 #define WL_DIAGERR_LOOPBACK_FAIL 4
775 #define WL_DIAGERR_SROM_FAIL 5
776 #define WL_DIAGERR_SROM_BADCRC 6
777 #define WL_DIAGERR_REG_FAIL 7
778 #define WL_DIAGERR_MEMORY_FAIL 8
779 #define WL_DIAGERR_NOMEM 9
780 #define WL_DIAGERR_DMA_FAIL 10
782 #define WL_DIAGERR_MEMORY_TIMEOUT 11
783 #define WL_DIAGERR_MEMORY_BADPATTERN 12
786 #define WLC_BAND_AUTO 0
787 #define WLC_BAND_5G 1
788 #define WLC_BAND_2G 2
789 #define WLC_BAND_ALL 3
792 #define WL_CHAN_FREQ_RANGE_2G 0
793 #define WL_CHAN_FREQ_RANGE_5GL 1
794 #define WL_CHAN_FREQ_RANGE_5GM 2
795 #define WL_CHAN_FREQ_RANGE_5GH 3
798 #define WLC_PHY_TYPE_A 0
799 #define WLC_PHY_TYPE_B 1
800 #define WLC_PHY_TYPE_G 2
801 #define WLC_PHY_TYPE_N 4
802 #define WLC_PHY_TYPE_LP 5
803 #define WLC_PHY_TYPE_SSN 6
804 #define WLC_PHY_TYPE_NULL 0xf
807 #define WLC_MACMODE_DISABLED 0
808 #define WLC_MACMODE_DENY 1
809 #define WLC_MACMODE_ALLOW 2
812 #define GMODE_LEGACY_B 0
815 #define GMODE_B_DEFERRED 3
816 #define GMODE_PERFORMANCE 4
821 #define WLC_PLCP_AUTO -1
822 #define WLC_PLCP_SHORT 0
823 #define WLC_PLCP_LONG 1
826 #define WLC_PROTECTION_AUTO -1
827 #define WLC_PROTECTION_OFF 0
828 #define WLC_PROTECTION_ON 1
829 #define WLC_PROTECTION_MMHDR_ONLY 2
830 #define WLC_PROTECTION_CTS_ONLY 3
833 #define WLC_PROTECTION_CTL_OFF 0
834 #define WLC_PROTECTION_CTL_LOCAL 1
835 #define WLC_PROTECTION_CTL_OVERLAP 2
838 #define WLC_N_PROTECTION_OFF 0
839 #define WLC_N_PROTECTION_OPTIONAL 1
840 #define WLC_N_PROTECTION_20IN40 2
841 #define WLC_N_PROTECTION_MIXEDMODE 3
844 #define WLC_N_PREAMBLE_MIXEDMODE 0
845 #define WLC_N_PREAMBLE_GF 1
848 #define WLC_N_BW_20ALL 0
849 #define WLC_N_BW_40ALL 1
850 #define WLC_N_BW_20IN2G_40IN5G 2
853 #define WLC_N_TXRX_CHAIN0 0
854 #define WLC_N_TXRX_CHAIN1 1
857 #define WLC_N_SGI_20 0x01
858 #define WLC_N_SGI_40 0x02
865 #define LISTEN_INTERVAL 10
867 #define INTERFERE_NONE 0
869 #define WLAN_MANUAL 2
871 #define AUTO_ACTIVE (1 << 7)
873 typedef struct wl_aci_args {
874 int enter_aci_thresh;
878 uint16 nphy_adcpwr_enter_thresh;
879 uint16 nphy_adcpwr_exit_thresh;
880 uint16 nphy_repeat_ctr;
881 uint16 nphy_num_samples;
882 uint16 nphy_undetect_window_sz;
883 uint16 nphy_b_energy_lo_aci;
884 uint16 nphy_b_energy_md_aci;
885 uint16 nphy_b_energy_hi_aci;
888 #define WL_ACI_ARGS_LEGACY_LENGTH 16
892 #define WL_ERROR_VAL 0x00000001
893 #define WL_TRACE_VAL 0x00000002
894 #define WL_PRHDRS_VAL 0x00000004
895 #define WL_PRPKT_VAL 0x00000008
896 #define WL_INFORM_VAL 0x00000010
897 #define WL_TMP_VAL 0x00000020
898 #define WL_OID_VAL 0x00000040
899 #define WL_RATE_VAL 0x00000080
900 #define WL_ASSOC_VAL 0x00000100
901 #define WL_PRUSR_VAL 0x00000200
902 #define WL_PS_VAL 0x00000400
903 #define WL_TXPWR_VAL 0x00000800
904 #define WL_PORT_VAL 0x00001000
905 #define WL_DUAL_VAL 0x00002000
906 #define WL_WSEC_VAL 0x00004000
907 #define WL_WSEC_DUMP_VAL 0x00008000
908 #define WL_LOG_VAL 0x00010000
909 #define WL_NRSSI_VAL 0x00020000
910 #define WL_LOFT_VAL 0x00040000
911 #define WL_REGULATORY_VAL 0x00080000
912 #define WL_PHYCAL_VAL 0x00100000
913 #define WL_RADAR_VAL 0x00200000
914 #define WL_MPC_VAL 0x00400000
915 #define WL_APSTA_VAL 0x00800000
916 #define WL_DFS_VAL 0x01000000
917 #define WL_BA_VAL 0x02000000
918 #define WL_MBSS_VAL 0x04000000
919 #define WL_CAC_VAL 0x08000000
920 #define WL_AMSDU_VAL 0x10000000
921 #define WL_AMPDU_VAL 0x20000000
922 #define WL_FFPLD_VAL 0x40000000
925 #define WL_DPT_VAL 0x00000001
926 #define WL_SCAN_VAL 0x00000002
927 #define WL_WOWL_VAL 0x00000004
928 #define WL_COEX_VAL 0x00000008
929 #define WL_RTDC_VAL 0x00000010
930 #define WL_BTA_VAL 0x00000040
933 #define WL_LED_NUMGPIO 16
938 #define WL_LED_ACTIVITY 2
939 #define WL_LED_RADIO 3
940 #define WL_LED_ARADIO 4
941 #define WL_LED_BRADIO 5
942 #define WL_LED_BGMODE 6
946 #define WL_LED_ASSOC 10
947 #define WL_LED_INACTIVE 11
948 #define WL_LED_ASSOCACT 12
949 #define WL_LED_NUMBEHAVIOR 13
952 #define WL_LED_BEH_MASK 0x7f
953 #define WL_LED_AL_MASK 0x80
956 #define WL_NUMCHANNELS 64
957 #define WL_NUMCHANSPECS 100
960 #define WL_WDS_WPA_ROLE_AUTH 0
961 #define WL_WDS_WPA_ROLE_SUP 1
962 #define WL_WDS_WPA_ROLE_AUTO 255
965 #define WL_EVENTING_MASK_LEN 16
968 #define VNDR_IE_CMD_LEN 4
971 #define VNDR_IE_BEACON_FLAG 0x1
972 #define VNDR_IE_PRBRSP_FLAG 0x2
973 #define VNDR_IE_ASSOCRSP_FLAG 0x4
974 #define VNDR_IE_AUTHRSP_FLAG 0x8
975 #define VNDR_IE_PRBREQ_FLAG 0x10
976 #define VNDR_IE_ASSOCREQ_FLAG 0x20
977 #define VNDR_IE_CUSTOM_FLAG 0x100
979 #define VNDR_IE_INFO_HDR_LEN (sizeof(uint32))
983 vndr_ie_t vndr_ie_data;
988 vndr_ie_info_t vndr_ie_list[1];
992 char cmd[VNDR_IE_CMD_LEN];
993 vndr_ie_buf_t vndr_ie_buffer;
999 #define WL_JOIN_PREF_RSSI 1
1000 #define WL_JOIN_PREF_WPA 2
1001 #define WL_JOIN_PREF_BAND 3
1004 #define WLJP_BAND_ASSOC_PREF 255
1007 #define WL_WPA_ACP_MCS_ANY "\x00\x00\x00\x00"
1016 #define WL_CNT_T_VERSION 5
1017 #define WL_CNT_EXT_T_VERSION 1
1062 uint32 rxuflo[NFIFO];
1064 uint32 d11cnt_txrts_off;
1065 uint32 d11cnt_rxcrc_off;
1066 uint32 d11cnt_txnocts_off;
1075 uint32 pkt_callback_reg_fail;
1087 uint32 rxfrmtoolong;
1088 uint32 rxfrmtooshrt;
1094 uint32 rxdfrmucastmbss;
1095 uint32 rxmfrmucastmbss;
1108 uint32 rxbeaconmbss;
1109 uint32 rxdfrmucastobss;
1110 uint32 rxbeaconobss;
1119 uint32 rxcgprsqovfl;
1126 uint32 txglitch_nack;
1146 uint32 tkipmicfaill;
1164 uint32 prq_entries_handled;
1165 uint32 prq_undirected_entries;
1166 uint32 prq_bad_entries;
1167 uint32 atim_suppress_count;
1168 uint32 bcn_template_not_ready;
1169 uint32 bcn_template_not_ready_done;
1170 uint32 late_tbtt_dpc;
1195 uint32 pktengrxducast;
1196 uint32 pktengrxdmcast;
1204 uint32 rxampdu_stbc;
1217 uint32 txfrmsnt_20Mlo;
1218 uint32 txfrmsnt_20Mup;
1219 uint32 txfrmsnt_40M;
1224 #define WL_RXDIV_STATS_T_VERSION 1
1232 #define WL_DELTA_STATS_T_VERSION 1
1272 #define WL_WME_CNT_VERSION 1
1277 } wl_traffic_stats_t;
1283 wl_traffic_stats_t tx[AC_COUNT];
1284 wl_traffic_stats_t tx_failed[AC_COUNT];
1285 wl_traffic_stats_t rx[AC_COUNT];
1286 wl_traffic_stats_t rx_failed[AC_COUNT];
1288 wl_traffic_stats_t forward[AC_COUNT];
1290 wl_traffic_stats_t tx_expired[AC_COUNT];
1296 #define WLC_ROAM_TRIGGER_DEFAULT 0
1297 #define WLC_ROAM_TRIGGER_BANDWIDTH 1
1298 #define WLC_ROAM_TRIGGER_DISTANCE 2
1299 #define WLC_ROAM_TRIGGER_MAX_VALUE 2
1312 #define SORT_CRITERIA_BIT 0
1313 #define AUTO_NET_SWITCH_BIT 1
1314 #define ENABLE_BKGRD_SCAN_BIT 2
1315 #define IMMEDIATE_SCAN_BIT 3
1316 #define AUTO_CONNECT_BIT 4
1317 #define ENABLE_BD_SCAN_BIT 5
1318 #define ENABLE_ADAPTSCAN_BIT 6
1320 #define SORT_CRITERIA_MASK 0x01
1321 #define AUTO_NET_SWITCH_MASK 0x02
1322 #define ENABLE_BKGRD_SCAN_MASK 0x04
1323 #define IMMEDIATE_SCAN_MASK 0x08
1324 #define AUTO_CONNECT_MASK 0x10
1325 #define ENABLE_BD_SCAN_MASK 0x20
1326 #define ENABLE_ADAPTSCAN_MASK 0x40
1328 #define PFN_VERSION 1
1330 #define MAX_PFN_LIST_COUNT 16
1333 typedef struct wl_pfn_param {
1336 int32 lost_network_timeout;
1340 int32 max_freq_adjust;
1343 typedef struct wl_pfn {
1352 #define PNO_SCAN_MAX_FW 508*1000
1353 #define PNO_SCAN_MAX_FW_SEC PNO_SCAN_MAX_FW/1000
1354 #define PNO_SCAN_MIN_FW_SEC 10
1357 #define TOE_TX_CSUM_OL 0x00000001
1358 #define TOE_RX_CSUM_OL 0x00000002
1361 #define TOE_ERRTEST_TX_CSUM 0x00000001
1362 #define TOE_ERRTEST_RX_CSUM 0x00000002
1363 #define TOE_ERRTEST_RX_CSUM2 0x00000004
1365 struct toe_ol_stats_t {
1373 uint32 tx_icmp_fill;
1382 uint32 rx_icmp_good;
1386 uint32 tx_tcp_errinj;
1387 uint32 tx_udp_errinj;
1388 uint32 tx_icmp_errinj;
1391 uint32 rx_tcp_errinj;
1392 uint32 rx_udp_errinj;
1393 uint32 rx_icmp_errinj;
1397 #define ARP_OL_AGENT 0x00000001
1398 #define ARP_OL_SNOOP 0x00000002
1399 #define ARP_OL_HOST_AUTO_REPLY 0x00000004
1400 #define ARP_OL_PEER_AUTO_REPLY 0x00000008
1403 #define ARP_ERRTEST_REPLY_PEER 0x1
1404 #define ARP_ERRTEST_REPLY_HOST 0x2
1406 #define ARP_MULTIHOMING_MAX 8
1409 struct arp_ol_stats_t {
1410 uint32 host_ip_entries;
1411 uint32 host_ip_overflow;
1413 uint32 arp_table_entries;
1414 uint32 arp_table_overflow;
1416 uint32 host_request;
1418 uint32 host_service;
1420 uint32 peer_request;
1421 uint32 peer_request_drop;
1423 uint32 peer_reply_drop;
1424 uint32 peer_service;
1431 typedef struct wl_keep_alive_pkt {
1435 } wl_keep_alive_pkt_t;
1437 #define WL_KEEP_ALIVE_FIXED_LEN OFFSETOF(wl_keep_alive_pkt_t, data)
1443 typedef enum wl_pkt_filter_type {
1444 WL_PKT_FILTER_TYPE_PATTERN_MATCH
1445 } wl_pkt_filter_type_t;
1447 #define WL_PKT_FILTER_TYPE wl_pkt_filter_type_t
1450 typedef struct wl_pkt_filter_pattern {
1453 uint8 mask_and_pattern[1];
1454 } wl_pkt_filter_pattern_t;
1457 typedef struct wl_pkt_filter {
1460 uint32 negate_match;
1462 wl_pkt_filter_pattern_t pattern;
1466 #define WL_PKT_FILTER_FIXED_LEN OFFSETOF(wl_pkt_filter_t, u)
1467 #define WL_PKT_FILTER_PATTERN_FIXED_LEN OFFSETOF(wl_pkt_filter_pattern_t, mask_and_pattern)
1470 typedef struct wl_pkt_filter_enable {
1473 } wl_pkt_filter_enable_t;
1476 typedef struct wl_pkt_filter_list {
1478 wl_pkt_filter_t filter[1];
1479 } wl_pkt_filter_list_t;
1481 #define WL_PKT_FILTER_LIST_FIXED_LEN OFFSETOF(wl_pkt_filter_list_t, filter)
1484 typedef struct wl_pkt_filter_stats {
1485 uint32 num_pkts_matched;
1486 uint32 num_pkts_forwarded;
1487 uint32 num_pkts_discarded;
1488 } wl_pkt_filter_stats_t;
1491 typedef struct wl_seq_cmd_ioctl {
1494 } wl_seq_cmd_ioctl_t;
1496 #define WL_SEQ_CMD_ALIGN_BYTES 4
1499 #define WL_SEQ_CMDS_GET_IOCTL_FILTER(cmd) \
1500 (((cmd) == WLC_GET_MAGIC) || \
1501 ((cmd) == WLC_GET_VERSION) || \
1502 ((cmd) == WLC_GET_AP) || \
1503 ((cmd) == WLC_GET_INSTANCE))
1507 #define WL_PKTENG_PER_TX_START 0x01
1508 #define WL_PKTENG_PER_TX_STOP 0x02
1509 #define WL_PKTENG_PER_RX_START 0x04
1510 #define WL_PKTENG_PER_RX_WITH_ACK_START 0x05
1511 #define WL_PKTENG_PER_TX_WITH_ACK_START 0x06
1512 #define WL_PKTENG_PER_RX_STOP 0x08
1513 #define WL_PKTENG_PER_MASK 0xff
1515 #define WL_PKTENG_SYNCHRONOUS 0x100
1517 typedef struct wl_pkteng {
1523 struct ether_addr dest;
1524 struct ether_addr src;
1527 #define NUM_80211b_RATES 4
1528 #define NUM_80211ag_RATES 8
1529 #define NUM_80211n_RATES 32
1530 #define NUM_80211_RATES (NUM_80211b_RATES+NUM_80211ag_RATES+NUM_80211n_RATES)
1531 typedef struct wl_pkteng_stats {
1535 uint16 rxpktcnt[NUM_80211_RATES+1];
1536 } wl_pkteng_stats_t;
1538 #define WL_WOWL_MAGIC (1 << 0)
1539 #define WL_WOWL_NET (1 << 1)
1540 #define WL_WOWL_DIS (1 << 2)
1541 #define WL_WOWL_RETR (1 << 3)
1542 #define WL_WOWL_BCN (1 << 4)
1543 #define WL_WOWL_TST (1 << 5)
1544 #define WL_WOWL_BCAST (1 << 15)
1546 #define MAGIC_PKT_MINLEN 102
1555 } wl_wowl_pattern_t;
1559 wl_wowl_pattern_t pattern[1];
1560 } wl_wowl_pattern_list_t;
1564 uint16 ucode_wakeind;
1565 } wl_wowl_wakeind_t;
1568 typedef struct wl_txrate_class {
1572 } wl_txrate_class_t;
1577 #define WLC_OBSS_SCAN_PASSIVE_DWELL_DEFAULT 100
1578 #define WLC_OBSS_SCAN_PASSIVE_DWELL_MIN 5
1579 #define WLC_OBSS_SCAN_PASSIVE_DWELL_MAX 1000
1580 #define WLC_OBSS_SCAN_ACTIVE_DWELL_DEFAULT 20
1581 #define WLC_OBSS_SCAN_ACTIVE_DWELL_MIN 10
1582 #define WLC_OBSS_SCAN_ACTIVE_DWELL_MAX 1000
1583 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_DEFAULT 300
1584 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MIN 10
1585 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MAX 900
1586 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_DEFAULT 5
1587 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MIN 5
1588 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MAX 100
1589 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_DEFAULT 200
1590 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MIN 200
1591 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MAX 10000
1592 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_DEFAULT 20
1593 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MIN 20
1594 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MAX 10000
1595 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_DEFAULT 25
1596 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MIN 0
1597 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MAX 100
1600 typedef struct wl_obss_scan_arg {
1601 int16 passive_dwell;
1603 int16 bss_widthscan_interval;
1604 int16 passive_total;
1606 int16 chanwidth_transition_delay;
1607 int16 activity_threshold;
1608 } wl_obss_scan_arg_t;
1609 #define WL_OBSS_SCAN_PARAM_LEN sizeof(wl_obss_scan_arg_t)
1610 #define WL_MIN_NUM_OBSS_SCAN_ARG 7
1612 #define WL_COEX_INFO_MASK 0x07
1613 #define WL_COEX_INFO_REQ 0x01
1614 #define WL_COEX_40MHZ_INTOLERANT 0x02
1615 #define WL_COEX_WIDTH20 0x04
1617 typedef struct wl_action_obss_coex_req {
1621 } wl_action_obss_coex_req_t;
1624 #define MAX_RSSI_LEVELS 8
1627 typedef struct wl_rssi_event {
1629 uint32 rate_limit_msec;
1631 uint8 num_rssi_levels;
1633 int8 rssi_levels[MAX_RSSI_LEVELS];
1638 #define WLFEATURE_DISABLE_11N 0x00000001
1639 #define WLFEATURE_DISABLE_11N_STBC_TX 0x00000002
1640 #define WLFEATURE_DISABLE_11N_STBC_RX 0x00000004
1641 #define WLFEATURE_DISABLE_11N_SGI_TX 0x00000008
1642 #define WLFEATURE_DISABLE_11N_SGI_RX 0x00000010
1643 #define WLFEATURE_DISABLE_11N_AMPDU_TX 0x00000020
1644 #define WLFEATURE_DISABLE_11N_AMPDU_RX 0x00000040
1645 #define WLFEATURE_DISABLE_11N_GF 0x00000080
1649 #include <packed_section_end.h>
1652 #include <packed_section_start.h>
1655 typedef BWL_PRE_PACKED_STRUCT struct sta_prbreq_wps_ie_hdr {
1656 struct ether_addr staAddr;
1658 } BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_hdr_t;
1660 typedef BWL_PRE_PACKED_STRUCT struct sta_prbreq_wps_ie_data {
1661 sta_prbreq_wps_ie_hdr_t hdr;
1663 } BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_data_t;
1665 typedef BWL_PRE_PACKED_STRUCT struct sta_prbreq_wps_ie_list {
1667 uint8 ieDataList[1];
1668 } BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_list_t;
1671 #include <packed_section_end.h>