2 * Custom OID/ioctl definitions for
3 * Broadcom 802.11abg Networking Device Driver
5 * Definitions subject to change without notice.
7 * Copyright (C) 2014, Broadcom Corporation. All Rights Reserved.
9 * Permission to use, copy, modify, and/or distribute this software for any
10 * purpose with or without fee is hereby granted, provided that the above
11 * copyright notice and this permission notice appear in all copies.
13 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
16 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
18 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
19 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 * $Id: wlioctl.h 455621 2014-02-14 20:59:32Z $
28 #include <proto/ethernet.h>
29 #include <proto/bcmeth.h>
30 #include <proto/bcmip.h>
31 #include <proto/bcmevent.h>
32 #include <proto/802.11.h>
33 #include <bcmwifi_channels.h>
34 #include <bcmwifi_rates.h>
36 #ifndef LINUX_POSTMOGRIFY_REMOVAL
37 #include <bcm_mpool_pub.h>
39 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
43 /* NetBSD 2.0 does not have SIOCDEVPRIVATE. */
44 #define SIOCDEVPRIVATE _IOWR('i', 139, struct ifreq)
47 #ifndef LINUX_POSTMOGRIFY_REMOVAL
50 #define INTF_NAME_SIZ 16
53 /* Used to send ioctls over the transport pipe */
54 typedef struct remote_ioctl
{
58 char intf_name
[INTF_NAME_SIZ
];
61 #define REMOTE_SIZE sizeof(rem_ioctl_t)
63 #define BCMWL_IOCTL_GUID \
64 {0xB4910A35, 0x88C5, 0x4328, { 0x90, 0x08, 0x9F, 0xB2, 0x00, 0x00, 0x0, 0x0 } }
67 #define ACTION_FRAME_SIZE 1800
69 typedef struct wl_action_frame
{
73 uint8 data
[ACTION_FRAME_SIZE
];
76 #define WL_WIFI_ACTION_FRAME_SIZE sizeof(struct wl_action_frame)
78 typedef struct ssid_info
80 uint8 ssid_len
; /* the length of SSID */
81 uint8 ssid
[32]; /* SSID string */
84 typedef struct wl_af_params
{
87 struct ether_addr BSSID
;
88 wl_action_frame_t action_frame
;
91 #define WL_WIFI_AF_PARAMS_SIZE sizeof(struct wl_af_params)
93 #define MFP_TEST_FLAG_NORMAL 0
94 #define MFP_TEST_FLAG_ANY_KEY 1
95 typedef struct wl_sa_query
{
102 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
104 /* require default structure packing */
105 #define BWL_DEFAULT_PACKING
106 #include <packed_section_start.h>
109 #ifndef LINUX_POSTMOGRIFY_REMOVAL
110 /* Legacy structure to help keep backward compatible wl tool and tray app */
112 #define LEGACY_WL_BSS_INFO_VERSION 107 /* older version of wl_bss_info struct */
114 typedef struct wl_bss_info_107
{
115 uint32 version
; /* version field */
116 uint32 length
; /* byte length of data in this record,
117 * starting at version and including IEs
119 struct ether_addr BSSID
;
120 uint16 beacon_period
; /* units are Kusec */
121 uint16 capability
; /* Capability information */
125 uint count
; /* # rates in this set */
126 uint8 rates
[16]; /* rates in 500kbps units w/hi bit set if basic */
127 } rateset
; /* supported rates */
128 uint8 channel
; /* Channel no. */
129 uint16 atim_window
; /* units are Kusec */
130 uint8 dtim_period
; /* DTIM period */
131 int16 RSSI
; /* receive signal strength (in dBm) */
132 int8 phy_noise
; /* noise (in dBm) */
133 uint32 ie_length
; /* byte length of Information Elements */
134 /* variable length Information Elements */
138 * Per-BSS information structure.
141 #define LEGACY2_WL_BSS_INFO_VERSION 108 /* old version of wl_bss_info struct */
143 /* BSS info structure
144 * Applications MUST CHECK ie_offset field and length field to access IEs and
145 * next bss_info structure in a vector (in wl_scan_results_t)
147 typedef struct wl_bss_info_108
{
148 uint32 version
; /* version field */
149 uint32 length
; /* byte length of data in this record,
150 * starting at version and including IEs
152 struct ether_addr BSSID
;
153 uint16 beacon_period
; /* units are Kusec */
154 uint16 capability
; /* Capability information */
158 uint count
; /* # rates in this set */
159 uint8 rates
[16]; /* rates in 500kbps units w/hi bit set if basic */
160 } rateset
; /* supported rates */
161 chanspec_t chanspec
; /* chanspec for bss */
162 uint16 atim_window
; /* units are Kusec */
163 uint8 dtim_period
; /* DTIM period */
164 int16 RSSI
; /* receive signal strength (in dBm) */
165 int8 phy_noise
; /* noise (in dBm) */
167 uint8 n_cap
; /* BSS is 802.11N Capable */
168 uint32 nbss_cap
; /* 802.11N BSS Capabilities (based on HT_CAP_*) */
169 uint8 ctl_ch
; /* 802.11N BSS control channel number */
170 uint32 reserved32
[1]; /* Reserved for expansion of BSS properties */
171 uint8 flags
; /* flags */
172 uint8 reserved
[3]; /* Reserved for expansion of BSS properties */
173 uint8 basic_mcs
[MCSSET_LEN
]; /* 802.11N BSS required MCS set */
175 uint16 ie_offset
; /* offset at which IEs start, from beginning */
176 uint32 ie_length
; /* byte length of Information Elements */
177 /* Add new fields here */
178 /* variable length Information Elements */
181 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
183 #define WL_BSS_INFO_VERSION 109 /* current version of wl_bss_info struct */
185 /* BSS info structure
186 * Applications MUST CHECK ie_offset field and length field to access IEs and
187 * next bss_info structure in a vector (in wl_scan_results_t)
189 typedef struct wl_bss_info
{
190 uint32 version
; /* version field */
191 uint32 length
; /* byte length of data in this record,
192 * starting at version and including IEs
194 struct ether_addr BSSID
;
195 uint16 beacon_period
; /* units are Kusec */
196 uint16 capability
; /* Capability information */
200 uint count
; /* # rates in this set */
201 uint8 rates
[16]; /* rates in 500kbps units w/hi bit set if basic */
202 } rateset
; /* supported rates */
203 chanspec_t chanspec
; /* chanspec for bss */
204 uint16 atim_window
; /* units are Kusec */
205 uint8 dtim_period
; /* DTIM period */
206 int16 RSSI
; /* receive signal strength (in dBm) */
207 int8 phy_noise
; /* noise (in dBm) */
209 uint8 n_cap
; /* BSS is 802.11N Capable */
210 uint32 nbss_cap
; /* 802.11N+AC BSS Capabilities */
211 uint8 ctl_ch
; /* 802.11N BSS control channel number */
212 uint8 padding1
[3]; /* explicit struct alignment padding */
213 uint16 vht_rxmcsmap
; /* VHT rx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */
214 uint16 vht_txmcsmap
; /* VHT tx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */
215 uint8 flags
; /* flags */
216 uint8 vht_cap
; /* BSS is vht capable */
217 uint8 reserved
[2]; /* Reserved for expansion of BSS properties */
218 uint8 basic_mcs
[MCSSET_LEN
]; /* 802.11N BSS required MCS set */
220 uint16 ie_offset
; /* offset at which IEs start, from beginning */
221 uint32 ie_length
; /* byte length of Information Elements */
222 int16 SNR
; /* average SNR of during frame reception */
223 /* Add new fields here */
224 /* variable length Information Elements */
227 /* bss_info_cap_t flags */
228 #define WL_BSS_FLAGS_FROM_BEACON 0x01 /* bss_info derived from beacon */
229 #define WL_BSS_FLAGS_FROM_CACHE 0x02 /* bss_info collected from cache */
230 #define WL_BSS_FLAGS_RSSI_ONCHANNEL 0x04 /* rssi info was received on channel (vs offchannel) */
231 #define WL_BSS_FLAGS_HS20 0x08 /* hotspot 2.0 capable */
233 /* bssinfo flag for nbss_cap */
234 #define VHT_BI_SGI_80MHZ 0x00000100
235 #define VHT_BI_80MHZ 0x00000200
236 #define VHT_BI_160MHZ 0x00000400
237 #define VHT_BI_8080MHZ 0x00000800
239 #ifndef LINUX_POSTMOGRIFY_REMOVAL
241 typedef struct wl_bsscfg
{
248 struct ether_addr prev_BSSID
;
249 struct ether_addr BSSID
;
252 typedef struct wl_bss_config
{
254 uint32 beacon_period
;
258 #define WL_BSS_USER_RADAR_CHAN_SELECT 0x1 /* User application will randomply select
262 #define DLOAD_HANDLER_VER 1 /* Downloader version */
263 #define DLOAD_FLAG_VER_MASK 0xf000 /* Downloader version mask */
264 #define DLOAD_FLAG_VER_SHIFT 12 /* Downloader version shift */
266 #define DL_CRC_NOT_INUSE 0x0001
268 /* generic download types & flags */
274 /* ucode type values */
281 struct wl_dload_data
{
288 typedef struct wl_dload_data wl_dload_data_t
;
290 struct wl_ucode_info
{
297 typedef struct wl_ucode_info wl_ucode_info_t
;
299 struct wl_clm_dload_info
{
301 uint32 clm_total_len
;
307 typedef struct wl_clm_dload_info wl_clm_dload_info_t
;
309 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
311 typedef struct wlc_ssid
{
316 #ifndef LINUX_POSTMOGRIFY_REMOVAL
318 #define MAX_PREFERRED_AP_NUM 5
319 typedef struct wlc_fastssidinfo
{
320 uint32 SSID_channel
[MAX_PREFERRED_AP_NUM
];
321 wlc_ssid_t SSID_info
[MAX_PREFERRED_AP_NUM
];
322 } wlc_fastssidinfo_t
;
324 typedef BWL_PRE_PACKED_STRUCT
struct wnm_url
{
327 } BWL_POST_PACKED_STRUCT wnm_url_t
;
329 typedef struct chan_scandata
{
332 chanspec_t channel
; /* Channel num, bw, ctrl_sb and band */
333 uint32 channel_mintime
;
334 uint32 channel_maxtime
;
337 typedef enum wl_scan_type
{
338 EXTDSCAN_FOREGROUND_SCAN
,
339 EXTDSCAN_BACKGROUND_SCAN
,
340 EXTDSCAN_FORCEDBACKGROUND_SCAN
343 #define WLC_EXTDSCAN_MAX_SSID 5
345 typedef struct wl_extdscan_params
{
346 int8 nprobes
; /* 0, passive, otherwise active */
347 int8 split_scan
; /* split scan */
348 int8 band
; /* band */
350 wlc_ssid_t ssid
[WLC_EXTDSCAN_MAX_SSID
]; /* ssid list */
351 uint32 tx_rate
; /* in 500ksec units */
352 wl_scan_type_t scan_type
; /* enum */
354 chan_scandata_t channel_list
[1]; /* list of chandata structs */
355 } wl_extdscan_params_t
;
357 #define WL_EXTDSCAN_PARAMS_FIXED_SIZE (sizeof(wl_extdscan_params_t) - sizeof(chan_scandata_t))
359 #define WL_BSSTYPE_INFRA 1
360 #define WL_BSSTYPE_INDEP 0
361 #define WL_BSSTYPE_ANY 2
363 /* Bitmask for scan_type */
364 #define WL_SCANFLAGS_PASSIVE 0x01 /* force passive scan */
365 #define WL_SCANFLAGS_RESERVED 0x02 /* Reserved */
366 #define WL_SCANFLAGS_PROHIBITED 0x04 /* allow scanning prohibited channels */
367 #define WL_SCANFLAGS_OFFCHAN 0x08 /* allow scanning/reporting off-channel APs */
368 #define WL_SCANFLAGS_HOTSPOT 0x10 /* automatic ANQP to hotspot APs */
370 #define WL_SCAN_PARAMS_SSID_MAX 10
372 typedef struct wl_scan_params
{
373 wlc_ssid_t ssid
; /* default: {0, ""} */
374 struct ether_addr bssid
; /* default: bcast */
375 int8 bss_type
; /* default: any,
376 * DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT
378 uint8 scan_type
; /* flags, 0 use default */
379 int32 nprobes
; /* -1 use default, number of probes per channel */
380 int32 active_time
; /* -1 use default, dwell time per channel for
383 int32 passive_time
; /* -1 use default, dwell time per channel
384 * for passive scanning
386 int32 home_time
; /* -1 use default, dwell time for the home channel
387 * between channel scans
389 int32 channel_num
; /* count of channels and ssids that follow
391 * low half is count of channels in channel_list, 0
392 * means default (use all available channels)
394 * high half is entries in wlc_ssid_t array that
395 * follows channel_list, aligned for int32 (4 bytes)
396 * meaning an odd channel count implies a 2-byte pad
397 * between end of channel_list and first ssid
399 * if ssid count is zero, single ssid in the fixed
400 * parameter portion is assumed, otherwise ssid in
401 * the fixed portion is ignored
403 uint16 channel_list
[1]; /* list of chanspecs */
406 /* size of wl_scan_params not including variable length array */
407 #define WL_SCAN_PARAMS_FIXED_SIZE 64
409 /* masks for channel and ssid count */
410 #define WL_SCAN_PARAMS_COUNT_MASK 0x0000ffff
411 #define WL_SCAN_PARAMS_NSSID_SHIFT 16
413 #define WL_SCAN_ACTION_START 1
414 #define WL_SCAN_ACTION_CONTINUE 2
415 #define WL_SCAN_ACTION_ABORT 3
417 #define ISCAN_REQ_VERSION 1
419 /* incremental scan struct */
420 typedef struct wl_iscan_params
{
423 uint16 scan_duration
;
424 wl_scan_params_t params
;
427 /* 3 fields + size of wl_scan_params, not including variable length array */
428 #define WL_ISCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_iscan_params_t, params) + sizeof(wlc_ssid_t))
429 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
431 typedef struct wl_scan_results
{
435 wl_bss_info_t bss_info
[1];
438 #ifndef LINUX_POSTMOGRIFY_REMOVAL
439 /* size of wl_scan_results not including variable length array */
440 #define WL_SCAN_RESULTS_FIXED_SIZE (sizeof(wl_scan_results_t) - sizeof(wl_bss_info_t))
442 /* wl_iscan_results status values */
443 #define WL_SCAN_RESULTS_SUCCESS 0
444 #define WL_SCAN_RESULTS_PARTIAL 1
445 #define WL_SCAN_RESULTS_PENDING 2
446 #define WL_SCAN_RESULTS_ABORTED 3
447 #define WL_SCAN_RESULTS_NO_MEM 4
449 /* Used in EXT_STA */
450 #define DNGL_RXCTXT_SIZE 45
452 #if defined(SIMPLE_ISCAN)
453 #define ISCAN_RETRY_CNT 5
454 #define ISCAN_STATE_IDLE 0
455 #define ISCAN_STATE_SCANING 1
456 #define ISCAN_STATE_PENDING 2
458 /* the buf lengh can be WLC_IOCTL_MAXLEN (8K) to reduce iteration */
459 #define WLC_IW_ISCAN_MAXLEN 2048
460 typedef struct iscan_buf
{
461 struct iscan_buf
* next
;
462 char iscan_buf
[WLC_IW_ISCAN_MAXLEN
];
464 #endif /* SIMPLE_ISCAN */
466 #define ESCAN_REQ_VERSION 1
468 typedef struct wl_escan_params
{
472 wl_scan_params_t params
;
475 #define WL_ESCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_escan_params_t, params) + sizeof(wlc_ssid_t))
477 typedef struct wl_escan_result
{
482 wl_bss_info_t bss_info
[1];
485 #define WL_ESCAN_RESULTS_FIXED_SIZE (sizeof(wl_escan_result_t) - sizeof(wl_bss_info_t))
487 /* incremental scan results struct */
488 typedef struct wl_iscan_results
{
490 wl_scan_results_t results
;
491 } wl_iscan_results_t
;
493 /* size of wl_iscan_results not including variable length array */
494 #define WL_ISCAN_RESULTS_FIXED_SIZE \
495 (WL_SCAN_RESULTS_FIXED_SIZE + OFFSETOF(wl_iscan_results_t, results))
497 #define SCANOL_ENABLED (1 << 0)
498 #define SCANOL_BCAST_SSID (1 << 1)
499 #define SCANOL_NOTIFY_BCAST_SSID (1 << 2)
500 #define SCANOL_RESULTS_PER_CYCLE (1 << 3)
501 #define SCANOL_PARAMS_VERSION 1
503 /* scan times in milliseconds */
504 #define SCANOL_HOME_TIME 45 /* for home channel processing */
505 #define SCANOL_ASSOC_TIME 20 /* dwell on a channel while associated */
506 #define SCANOL_UNASSOC_TIME 40 /* dwell on a channel while unassociated */
507 #define SCANOL_PASSIVE_TIME 110 /* listen on a channelfor passive scan */
508 #define SCANOL_AWAY_LIMIT 100 /* max time to be away from home channel */
509 #define SCANOL_IDLE_REST_TIME 40
510 #define SCANOL_IDLE_REST_MULTIPLIER 0
511 #define SCANOL_ACTIVE_REST_TIME 20
512 #define SCANOL_ACTIVE_REST_MULTIPLIER 0
513 #define SCANOL_CYCLE_IDLE_REST_TIME 300000 /* Idle Rest Time between Scan Cycle (msec) */
514 #define SCANOL_CYCLE_IDLE_REST_MULTIPLIER 0 /* Idle Rest Time Multiplier */
515 #define SCANOL_CYCLE_ACTIVE_REST_TIME 200
516 #define SCANOL_CYCLE_ACTIVE_REST_MULTIPLIER 0
517 #define SCANOL_MAX_REST_TIME 3600000 /* max rest time between scan cycle (msec) */
518 #define SCANOL_CYCLE_DEFAULT 0 /* default for Max Scan Cycle, 0 = forever */
519 #define SCANOL_CYCLE_MAX 864000 /* Max Scan Cycle */
520 /* 10 sec/scan cycle => 100 days */
521 #define SCANOL_NPROBES 2 /* for Active scan; send n probes on each channel */
522 #define SCANOL_NPROBES_MAX 5 /* for Active scan; send n probes on each channel */
523 #define SCANOL_SCAN_START_DLY 10 /* delay start of offload scan (sec) */
524 #define SCANOL_SCAN_START_DLY_MAX 240 /* delay start of offload scan (sec) */
525 #define SCANOL_MULTIPLIER_MAX 10 /* Max Multiplier */
526 #define SCANOL_UNASSOC_TIME_MAX 100 /* max dwell on a channel while unassociated */
527 #define SCANOL_PASSIVE_TIME_MAX 500 /* max listen on a channel for passive scan */
528 #define SCANOL_SSID_MAX 16 /* max supported preferred SSID */
530 typedef struct scanol_params
{
532 uint32 flags
; /* offload scanning flags */
533 int32 active_time
; /* -1 use default, dwell time per channel for active scanning */
534 int32 passive_time
; /* -1 use default, dwell time per channel for passive scanning */
535 int32 idle_rest_time
; /* -1 use default, time idle between scan cycle */
536 int32 idle_rest_time_multiplier
;
537 int32 active_rest_time
;
538 int32 active_rest_time_multiplier
;
539 int32 scan_cycle_idle_rest_time
;
540 int32 scan_cycle_idle_rest_multiplier
;
541 int32 scan_cycle_active_rest_time
;
542 int32 scan_cycle_active_rest_multiplier
;
544 int32 max_scan_cycles
;
545 int32 nprobes
; /* -1 use default, number of probes per channel */
546 int32 scan_start_delay
;
549 wlc_ssid_t ssidlist
[1];
552 typedef struct wl_probe_params
{
554 struct ether_addr bssid
;
555 struct ether_addr mac
;
557 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
559 #define WL_MAXRATES_IN_SET 16 /* max # of rates in a rateset */
560 typedef struct wl_rateset
{
561 uint32 count
; /* # rates in this set */
562 uint8 rates
[WL_MAXRATES_IN_SET
]; /* rates in 500kbps units w/hi bit set if basic */
565 typedef struct wl_rateset_args
{
566 uint32 count
; /* # rates in this set */
567 uint8 rates
[WL_MAXRATES_IN_SET
]; /* rates in 500kbps units w/hi bit set if basic */
568 uint8 mcs
[MCSSET_LEN
]; /* supported mcs index bit map */
569 uint16 vht_mcs
[VHT_CAP_MCS_MAP_NSS_MAX
]; /* supported mcs index bit map per nss */
572 #define TXBF_RATE_MCS_ALL 4
573 #define TXBF_RATE_VHT_ALL 4
574 #define TXBF_RATE_OFDM_ALL 8
576 typedef struct wl_txbf_rateset
{
577 uint8 txbf_rate_mcs
[TXBF_RATE_MCS_ALL
]; /* one for each stream */
578 uint8 txbf_rate_mcs_bcm
[TXBF_RATE_MCS_ALL
]; /* one for each stream */
579 uint16 txbf_rate_vht
[TXBF_RATE_VHT_ALL
]; /* one for each stream */
580 uint16 txbf_rate_vht_bcm
[TXBF_RATE_VHT_ALL
]; /* one for each stream */
581 uint8 txbf_rate_ofdm
[TXBF_RATE_OFDM_ALL
]; /* bitmap of ofdm rates that enables txbf */
582 uint8 txbf_rate_ofdm_bcm
[TXBF_RATE_OFDM_ALL
]; /* bitmap of ofdm rates that enables txbf */
583 uint8 txbf_rate_ofdm_cnt
;
584 uint8 txbf_rate_ofdm_cnt_bcm
;
587 #define OFDM_RATE_MASK 0x0000007f
588 typedef uint8 ofdm_rates_t
;
591 typedef struct wl_uint32_list
{
592 /* in - # of elements, out - # of entries */
594 /* variable length uint32 list */
598 /* used for association with a specific BSSID and chanspec list */
599 typedef struct wl_assoc_params
{
600 struct ether_addr bssid
; /* 00:00:00:00:00:00: broadcast scan */
601 uint16 bssid_cnt
; /* 0: just use chanspec_num,
602 * otherwise count of chanspecs in chanspec_list
603 * AND paired bssids following chanspec_list
605 int32 chanspec_num
; /* 0: all available channels,
606 * otherwise count of chanspecs in chanspec_list
608 chanspec_t chanspec_list
[1]; /* list of chanspecs */
610 #define WL_ASSOC_PARAMS_FIXED_SIZE OFFSETOF(wl_assoc_params_t, chanspec_list)
612 /* used for reassociation/roam to a specific BSSID and channel */
613 typedef wl_assoc_params_t wl_reassoc_params_t
;
614 #define WL_REASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE
616 /* used for association to a specific BSSID and channel */
617 typedef wl_assoc_params_t wl_join_assoc_params_t
;
618 #define WL_JOIN_ASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE
620 /* used for join with or without a specific bssid and channel list */
621 typedef struct wl_join_params
{
623 wl_assoc_params_t params
; /* optional field, but it must include the fixed portion
624 * of the wl_assoc_params_t struct when it does present.
628 #ifndef LINUX_POSTMOGRIFY_REMOVAL
629 #define WL_JOIN_PARAMS_FIXED_SIZE (OFFSETOF(wl_join_params_t, params) + \
630 WL_ASSOC_PARAMS_FIXED_SIZE)
631 /* scan params for extended join */
632 typedef struct wl_join_scan_params
{
633 uint8 scan_type
; /* 0 use default, active or passive scan */
634 int32 nprobes
; /* -1 use default, number of probes per channel */
635 int32 active_time
; /* -1 use default, dwell time per channel for
638 int32 passive_time
; /* -1 use default, dwell time per channel
639 * for passive scanning
641 int32 home_time
; /* -1 use default, dwell time for the home channel
642 * between channel scans
644 } wl_join_scan_params_t
;
646 /* extended join params */
647 typedef struct wl_extjoin_params
{
648 wlc_ssid_t ssid
; /* {0, ""}: wildcard scan */
649 wl_join_scan_params_t scan
;
650 wl_join_assoc_params_t assoc
; /* optional field, but it must include the fixed portion
651 * of the wl_join_assoc_params_t struct when it does
654 } wl_extjoin_params_t
;
655 #define WL_EXTJOIN_PARAMS_FIXED_SIZE (OFFSETOF(wl_extjoin_params_t, assoc) + \
656 WL_JOIN_ASSOC_PARAMS_FIXED_SIZE)
658 /* All builds use the new 11ac ratespec/chanspec */
660 #define D11AC_IOTYPES
662 #ifndef D11AC_IOTYPES
664 /* defines used by the nrate iovar */
665 #define NRATE_MCS_INUSE 0x00000080 /* MSC in use,indicates b0-6 holds an mcs */
666 #define NRATE_RATE_MASK 0x0000007f /* rate/mcs value */
667 #define NRATE_STF_MASK 0x0000ff00 /* stf mode mask: siso, cdd, stbc, sdm */
668 #define NRATE_STF_SHIFT 8 /* stf mode shift */
669 #define NRATE_OVERRIDE 0x80000000 /* bit indicates override both rate & mode */
670 #define NRATE_OVERRIDE_MCS_ONLY 0x40000000 /* bit indicate to override mcs only */
671 #define NRATE_SGI_MASK 0x00800000 /* sgi mode */
672 #define NRATE_SGI_SHIFT 23 /* sgi mode */
673 #define NRATE_LDPC_CODING 0x00400000 /* bit indicates adv coding in use */
674 #define NRATE_LDPC_SHIFT 22 /* ldpc shift */
676 #define NRATE_STF_SISO 0 /* stf mode SISO */
677 #define NRATE_STF_CDD 1 /* stf mode CDD */
678 #define NRATE_STF_STBC 2 /* stf mode STBC */
679 #define NRATE_STF_SDM 3 /* stf mode SDM */
681 #else /* D11AC_IOTYPES */
683 /* WL_RSPEC defines for rate information */
684 #define WL_RSPEC_RATE_MASK 0x000000FF /* rate or HT MCS value */
685 #define WL_RSPEC_VHT_MCS_MASK 0x0000000F /* VHT MCS value */
686 #define WL_RSPEC_VHT_NSS_MASK 0x000000F0 /* VHT Nss value */
687 #define WL_RSPEC_VHT_NSS_SHIFT 4 /* VHT Nss value shift */
688 #define WL_RSPEC_TXEXP_MASK 0x00000300
689 #define WL_RSPEC_TXEXP_SHIFT 8
690 #define WL_RSPEC_BW_MASK 0x00070000 /* bandwidth mask */
691 #define WL_RSPEC_BW_SHIFT 16 /* bandwidth shift */
692 #define WL_RSPEC_STBC 0x00100000 /* STBC encoding, Nsts = 2 x Nss */
693 #define WL_RSPEC_TXBF 0x00200000 /* bit indicates TXBF mode */
694 #define WL_RSPEC_LDPC 0x00400000 /* bit indicates adv coding in use */
695 #define WL_RSPEC_SGI 0x00800000 /* Short GI mode */
696 #define WL_RSPEC_ENCODING_MASK 0x03000000 /* Encoding of Rate/MCS field */
697 #define WL_RSPEC_OVERRIDE_RATE 0x40000000 /* bit indicate to override mcs only */
698 #define WL_RSPEC_OVERRIDE_MODE 0x80000000 /* bit indicates override both rate & mode */
700 /* WL_RSPEC_ENCODING field defs */
701 #define WL_RSPEC_ENCODE_RATE 0x00000000 /* Legacy rate is stored in RSPEC_RATE_MASK */
702 #define WL_RSPEC_ENCODE_HT 0x01000000 /* HT MCS is stored in RSPEC_RATE_MASK */
703 #define WL_RSPEC_ENCODE_VHT 0x02000000 /* VHT MCS and Nss is stored in RSPEC_RATE_MASK */
705 /* WL_RSPEC_BW field defs */
706 #define WL_RSPEC_BW_UNSPECIFIED 0
707 #define WL_RSPEC_BW_20MHZ 0x00010000
708 #define WL_RSPEC_BW_40MHZ 0x00020000
709 #define WL_RSPEC_BW_80MHZ 0x00030000
710 #define WL_RSPEC_BW_160MHZ 0x00040000
712 /* Legacy defines for the nrate iovar */
713 #define OLD_NRATE_MCS_INUSE 0x00000080 /* MSC in use,indicates b0-6 holds an mcs */
714 #define OLD_NRATE_RATE_MASK 0x0000007f /* rate/mcs value */
715 #define OLD_NRATE_STF_MASK 0x0000ff00 /* stf mode mask: siso, cdd, stbc, sdm */
716 #define OLD_NRATE_STF_SHIFT 8 /* stf mode shift */
717 #define OLD_NRATE_OVERRIDE 0x80000000 /* bit indicates override both rate & mode */
718 #define OLD_NRATE_OVERRIDE_MCS_ONLY 0x40000000 /* bit indicate to override mcs only */
719 #define OLD_NRATE_SGI 0x00800000 /* sgi mode */
720 #define OLD_NRATE_LDPC_CODING 0x00400000 /* bit indicates adv coding in use */
722 #define OLD_NRATE_STF_SISO 0 /* stf mode SISO */
723 #define OLD_NRATE_STF_CDD 1 /* stf mode CDD */
724 #define OLD_NRATE_STF_STBC 2 /* stf mode STBC */
725 #define OLD_NRATE_STF_SDM 3 /* stf mode SDM */
727 #endif /* D11AC_IOTYPES */
729 #define ANTENNA_NUM_1 1 /* total number of antennas to be used */
730 #define ANTENNA_NUM_2 2
731 #define ANTENNA_NUM_3 3
732 #define ANTENNA_NUM_4 4
734 #define ANT_SELCFG_AUTO 0x80 /* bit indicates antenna sel AUTO */
735 #define ANT_SELCFG_MASK 0x33 /* antenna configuration mask */
736 #define ANT_SELCFG_MAX 4 /* max number of antenna configurations */
737 #define ANT_SELCFG_TX_UNICAST 0 /* unicast tx antenna configuration */
738 #define ANT_SELCFG_RX_UNICAST 1 /* unicast rx antenna configuration */
739 #define ANT_SELCFG_TX_DEF 2 /* default tx antenna configuration */
740 #define ANT_SELCFG_RX_DEF 3 /* default rx antenna configuration */
742 #define MAX_STREAMS_SUPPORTED 4 /* max number of streams supported */
745 uint8 ant_config
[ANT_SELCFG_MAX
]; /* antenna configuration */
746 uint8 num_antcfg
; /* number of available antenna configurations */
749 #define HIGHEST_SINGLE_STREAM_MCS 7 /* MCS values greater than this enable multiple streams */
751 #define MAX_CCA_CHANNELS 38 /* Max number of 20 Mhz wide channels */
752 #define MAX_CCA_SECS 60 /* CCA keeps this many seconds history */
754 #define IBSS_MED 15 /* Mediom in-bss congestion percentage */
755 #define IBSS_HI 25 /* Hi in-bss congestion percentage */
758 #define INTERFER_MED 5
759 #define INTERFER_HI 10
761 #define CCA_FLAG_2G_ONLY 0x01 /* Return a channel from 2.4 Ghz band */
762 #define CCA_FLAG_5G_ONLY 0x02 /* Return a channel from 2.4 Ghz band */
763 #define CCA_FLAG_IGNORE_DURATION 0x04 /* Ignore dwell time for each channel */
764 #define CCA_FLAGS_PREFER_1_6_11 0x10
765 #define CCA_FLAG_IGNORE_INTERFER 0x20 /* do not exlude channel based on interfer level */
767 #define CCA_ERRNO_BAND 1 /* After filtering for band pref, no choices left */
768 #define CCA_ERRNO_DURATION 2 /* After filtering for duration, no choices left */
769 #define CCA_ERRNO_PREF_CHAN 3 /* After filtering for chan pref, no choices left */
770 #define CCA_ERRNO_INTERFER 4 /* After filtering for interference, no choices left */
771 #define CCA_ERRNO_TOO_FEW 5 /* Only 1 channel was input */
774 uint32 duration
; /* millisecs spent sampling this channel */
775 uint32 congest_ibss
; /* millisecs in our bss (presumably this traffic will */
776 /* move if cur bss moves channels) */
777 uint32 congest_obss
; /* traffic not in our bss */
778 uint32 interference
; /* millisecs detecting a non 802.11 interferer. */
779 uint32 timestamp
; /* second timestamp */
783 chanspec_t chanspec
; /* Which channel? */
784 uint8 num_secs
; /* How many secs worth of data */
785 cca_congest_t secs
[1]; /* Data */
786 } cca_congest_channel_req_t
;
790 uint32 msrmnt_time
; /* Time for Measurement (msec) */
791 uint32 msrmnt_done
; /* flag set when measurement complete */
796 uint32 msrmnt_query
; /* host to driver query for measurement done */
797 uint32 time_req
; /* Time required for measurement */
801 /* interference source detection and identification mode */
802 #define ITFR_MODE_DISABLE 0 /* disable feature */
803 #define ITFR_MODE_MANUAL_ENABLE 1 /* enable manual detection */
804 #define ITFR_MODE_AUTO_ENABLE 2 /* enable auto detection */
806 /* interference sources */
807 enum interference_source
{
808 ITFR_NONE
= 0, /* interference */
809 ITFR_PHONE
, /* wireless phone */
810 ITFR_VIDEO_CAMERA
, /* wireless video camera */
811 ITFR_MICROWAVE_OVEN
, /* microwave oven */
812 ITFR_BABY_MONITOR
, /* wireless baby monitor */
813 ITFR_BLUETOOTH
, /* bluetooth */
814 ITFR_VIDEO_CAMERA_OR_BABY_MONITOR
, /* wireless camera or baby monitor */
815 ITFR_BLUETOOTH_OR_BABY_MONITOR
, /* bluetooth or baby monitor */
816 ITFR_VIDEO_CAMERA_OR_PHONE
, /* video camera or phone */
817 ITFR_UNIDENTIFIED
/* interference from unidentified source */
820 /* structure for interference source report */
822 uint32 flags
; /* flags. bit definitions below */
823 uint32 source
; /* last detected interference source */
824 uint32 timestamp
; /* second timestamp on interferenced flag change */
825 } interference_source_rep_t
;
827 /* bit definitions for flags in interference source report */
828 #define ITFR_INTERFERENCED 1 /* interference detected */
829 #define ITFR_HOME_CHANNEL 2 /* home channel has interference */
830 #define ITFR_NOISY_ENVIRONMENT 4 /* noisy environemnt so feature stopped */
832 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
834 #define WLC_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NUL */
836 #ifndef LINUX_POSTMOGRIFY_REMOVAL
838 typedef struct wl_country
{
839 char country_abbrev
[WLC_CNTRY_BUF_SZ
]; /* nul-terminated country code used in
842 int32 rev
; /* revision specifier for ccode
843 * on set, -1 indicates unspecified.
846 char ccode
[WLC_CNTRY_BUF_SZ
]; /* nul-terminated built-in country code.
847 * variable length, but fixed size in
848 * struct allows simple allocation for
849 * expected country strings <= 3 chars.
853 typedef struct wl_channels_in_country
{
856 char country_abbrev
[WLC_CNTRY_BUF_SZ
];
859 } wl_channels_in_country_t
;
861 typedef struct wl_country_list
{
866 char country_abbrev
[1];
869 #define WL_NUM_RPI_BINS 8
870 #define WL_RM_TYPE_BASIC 1
871 #define WL_RM_TYPE_CCA 2
872 #define WL_RM_TYPE_RPI 3
874 #define WL_RM_FLAG_PARALLEL (1<<0)
876 #define WL_RM_FLAG_LATE (1<<1)
877 #define WL_RM_FLAG_INCAPABLE (1<<2)
878 #define WL_RM_FLAG_REFUSED (1<<3)
880 typedef struct wl_rm_req_elt
{
884 uint32 token
; /* token for this measurement */
885 uint32 tsf_h
; /* TSF high 32-bits of Measurement start time */
886 uint32 tsf_l
; /* TSF low 32-bits */
887 uint32 dur
; /* TUs */
890 typedef struct wl_rm_req
{
891 uint32 token
; /* overall measurement set token */
892 uint32 count
; /* number of measurement requests */
893 void *cb
; /* completion callback function: may be NULL */
894 void *cb_arg
; /* arg to completion callback function */
895 wl_rm_req_elt_t req
[1]; /* variable length block of requests */
897 #define WL_RM_REQ_FIXED_LEN OFFSETOF(wl_rm_req_t, req)
899 typedef struct wl_rm_rep_elt
{
903 uint32 token
; /* token for this measurement */
904 uint32 tsf_h
; /* TSF high 32-bits of Measurement start time */
905 uint32 tsf_l
; /* TSF low 32-bits */
906 uint32 dur
; /* TUs */
907 uint32 len
; /* byte length of data block */
908 uint8 data
[1]; /* variable length data block */
910 #define WL_RM_REP_ELT_FIXED_LEN 24 /* length excluding data block */
912 #define WL_RPI_REP_BIN_NUM 8
913 typedef struct wl_rm_rpi_rep
{
914 uint8 rpi
[WL_RPI_REP_BIN_NUM
];
915 int8 rpi_max
[WL_RPI_REP_BIN_NUM
];
918 typedef struct wl_rm_rep
{
919 uint32 token
; /* overall measurement set token */
920 uint32 len
; /* length of measurement report block */
921 wl_rm_rep_elt_t rep
[1]; /* variable length block of reports */
923 #define WL_RM_REP_FIXED_LEN 8
926 #if defined(BCMSUP_PSK)
927 typedef enum sup_auth_status
{
928 /* Basic supplicant authentication states */
929 WLC_SUP_DISCONNECTED
= 0,
932 WLC_SUP_AUTHENTICATING
,
933 WLC_SUP_AUTHENTICATED
,
937 WLC_SUP_LAST_BASIC_STATE
,
939 /* Extended supplicant authentication states */
940 /* Waiting to receive handshake msg M1 */
941 WLC_SUP_KEYXCHANGE_WAIT_M1
= WLC_SUP_AUTHENTICATED
,
942 /* Preparing to send handshake msg M2 */
943 WLC_SUP_KEYXCHANGE_PREP_M2
= WLC_SUP_KEYXCHANGE
,
944 /* Waiting to receive handshake msg M3 */
945 WLC_SUP_KEYXCHANGE_WAIT_M3
= WLC_SUP_LAST_BASIC_STATE
,
946 WLC_SUP_KEYXCHANGE_PREP_M4
, /* Preparing to send handshake msg M4 */
947 WLC_SUP_KEYXCHANGE_WAIT_G1
, /* Waiting to receive handshake msg G1 */
948 WLC_SUP_KEYXCHANGE_PREP_G2
/* Preparing to send handshake msg G2 */
951 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
953 /* Enumerate crypto algorithms */
954 #define CRYPTO_ALGO_OFF 0
955 #define CRYPTO_ALGO_WEP1 1
956 #define CRYPTO_ALGO_TKIP 2
957 #define CRYPTO_ALGO_WEP128 3
958 #define CRYPTO_ALGO_AES_CCM 4
959 #define CRYPTO_ALGO_AES_OCB_MSDU 5
960 #define CRYPTO_ALGO_AES_OCB_MPDU 6
961 #define CRYPTO_ALGO_NALG 7
962 #define CRYPTO_ALGO_PMK 12 /* for 802.1x supp to set PMK before 4-way */
963 #define CRYPTO_ALGO_BIP 13 /* 802.11w BIP (aes cmac) */
965 #define WSEC_GEN_MIC_ERROR 0x0001
966 #define WSEC_GEN_REPLAY 0x0002
967 #define WSEC_GEN_ICV_ERROR 0x0004
968 #define WSEC_GEN_MFP_ACT_ERROR 0x0008
969 #define WSEC_GEN_MFP_DISASSOC_ERROR 0x0010
970 #define WSEC_GEN_MFP_DEAUTH_ERROR 0x0020
972 #define WL_SOFT_KEY (1 << 0) /* Indicates this key is using soft encrypt */
973 #define WL_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */
974 #define WL_KF_RES_4 (1 << 4) /* Reserved for backward compat */
975 #define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */
976 #define WL_IBSS_PEER_GROUP_KEY (1 << 6) /* Indicates a group key for a IBSS PEER */
978 typedef struct wl_wsec_key
{
979 uint32 index
; /* key index */
980 uint32 len
; /* key length */
981 uint8 data
[DOT11_MAX_KEY_SIZE
]; /* key data */
983 uint32 algo
; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
984 uint32 flags
; /* misc flags */
987 int iv_initialized
; /* has IV been initialized already? */
991 uint32 hi
; /* upper 32 bits of IV */
992 uint16 lo
; /* lower 16 bits of IV */
995 struct ether_addr ea
; /* per station */
998 #define WSEC_MIN_PSK_LEN 8
999 #define WSEC_MAX_PSK_LEN 64
1001 /* Flag for key material needing passhash'ing */
1002 #define WSEC_PASSPHRASE (1<<0)
1004 /* receptacle for WLC_SET_WSEC_PMK parameter */
1006 ushort key_len
; /* octets in key material */
1007 ushort flags
; /* key handling qualification */
1008 uint8 key
[WSEC_MAX_PSK_LEN
]; /* PMK material */
1011 /* wireless security bitvec */
1012 #define WEP_ENABLED 0x0001
1013 #define TKIP_ENABLED 0x0002
1014 #define AES_ENABLED 0x0004
1015 #define WSEC_SWFLAG 0x0008
1016 #define SES_OW_ENABLED 0x0040 /* to go into transition mode without setting wep */
1018 /* wsec macros for operating on the above definitions */
1019 #define WSEC_WEP_ENABLED(wsec) ((wsec) & WEP_ENABLED)
1020 #define WSEC_TKIP_ENABLED(wsec) ((wsec) & TKIP_ENABLED)
1021 #define WSEC_AES_ENABLED(wsec) ((wsec) & AES_ENABLED)
1023 #define WSEC_ENABLED(wsec) ((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED))
1024 #define WSEC_SES_OW_ENABLED(wsec) ((wsec) & SES_OW_ENABLED)
1026 #define MFP_CAPABLE 0x0200
1027 #define MFP_REQUIRED 0x0400
1028 #define MFP_SHA256 0x0800 /* a special configuration for STA for WIFI test tool */
1030 /* WPA authentication mode bitvec */
1031 #define WPA_AUTH_DISABLED 0x0000 /* Legacy (i.e., non-WPA) */
1032 #define WPA_AUTH_NONE 0x0001 /* none (IBSS) */
1033 #define WPA_AUTH_UNSPECIFIED 0x0002 /* over 802.1x */
1034 #define WPA_AUTH_PSK 0x0004 /* Pre-shared key */
1035 /* #define WPA_AUTH_8021X 0x0020 */ /* 802.1x, reserved */
1036 #define WPA2_AUTH_UNSPECIFIED 0x0040 /* over 802.1x */
1037 #define WPA2_AUTH_PSK 0x0080 /* Pre-shared key */
1038 #define BRCM_AUTH_PSK 0x0100 /* BRCM specific PSK */
1039 #define BRCM_AUTH_DPT 0x0200 /* DPT PSK without group keys */
1040 #define WPA2_AUTH_MFP 0x1000 /* MFP (11w) in contrast to CCX */
1041 #define WPA2_AUTH_TPK 0x2000 /* TDLS Peer Key */
1042 #define WPA2_AUTH_FT 0x4000 /* Fast Transition. */
1043 #define WPA_AUTH_PFN_ANY 0xffffffff /* for PFN, match only ssid */
1048 typedef struct _pmkid
{
1049 struct ether_addr BSSID
;
1050 uint8 PMKID
[WPA2_PMKID_LEN
];
1053 typedef struct _pmkid_list
{
1058 typedef struct _pmkid_cand
{
1059 struct ether_addr BSSID
;
1063 typedef struct _pmkid_cand_list
{
1065 pmkid_cand_t pmkid_cand
[1];
1066 } pmkid_cand_list_t
;
1068 #ifndef LINUX_POSTMOGRIFY_REMOVAL
1069 typedef struct wl_assoc_info
{
1073 struct dot11_assoc_req req
;
1074 struct ether_addr reassoc_bssid
; /* used in reassoc's */
1075 struct dot11_assoc_resp resp
;
1079 #define WLC_ASSOC_REQ_IS_REASSOC 0x01 /* assoc req was actually a reassoc */
1081 typedef struct wl_led_info
{
1082 uint32 index
; /* led index */
1088 /* srom read/write struct passed through ioctl */
1090 uint byteoff
; /* byte offset */
1091 uint nbytes
; /* number of bytes */
1095 /* similar cis (srom or otp) struct [iovar: may not be aligned] */
1097 uint32 source
; /* cis source */
1098 uint32 byteoff
; /* byte offset */
1099 uint32 nbytes
; /* number of bytes */
1100 /* data follows here */
1103 #define WLC_CIS_DEFAULT 0 /* built-in default */
1104 #define WLC_CIS_SROM 1 /* source is sprom */
1105 #define WLC_CIS_OTP 2 /* source is otp */
1107 /* R_REG and W_REG struct passed through ioctl */
1109 uint32 byteoff
; /* byte offset of the field in d11regs_t */
1110 uint32 val
; /* read/write value of the field */
1111 uint32 size
; /* sizeof the field */
1112 uint band
; /* band (optional) */
1115 /* Structure used by GET/SET_ATTEN ioctls - it controls power in b/g-band */
1116 /* PCL - Power Control Loop */
1117 /* current gain setting is replaced by user input */
1118 #define WL_ATTEN_APP_INPUT_PCL_OFF 0 /* turn off PCL, apply supplied input */
1119 #define WL_ATTEN_PCL_ON 1 /* turn on PCL */
1120 /* current gain setting is maintained */
1121 #define WL_ATTEN_PCL_OFF 2 /* turn off PCL. */
1124 uint16 auto_ctrl
; /* WL_ATTEN_XX */
1125 uint16 bb
; /* Baseband attenuation */
1126 uint16 radio
; /* Radio attenuation */
1127 uint16 txctl1
; /* Radio TX_CTL1 value */
1130 /* Per-AC retry parameters */
1131 struct wme_tx_params_s
{
1133 uint8 short_fallback
;
1135 uint8 long_fallback
;
1136 uint16 max_rate
; /* In units of 512 Kbps */
1139 typedef struct wme_tx_params_s wme_tx_params_t
;
1141 #define WL_WME_TX_PARAMS_IO_BYTES (sizeof(wme_tx_params_t) * AC_COUNT)
1143 /* defines used by poweridx iovar - it controls power in a-band */
1144 /* current gain setting is maintained */
1145 #define WL_PWRIDX_PCL_OFF -2 /* turn off PCL. */
1146 #define WL_PWRIDX_PCL_ON -1 /* turn on PCL */
1147 #define WL_PWRIDX_LOWER_LIMIT -2 /* lower limit */
1148 #define WL_PWRIDX_UPPER_LIMIT 63 /* upper limit */
1149 /* value >= 0 causes
1150 * - input to be set to that value
1154 /* Used to get specific link/ac parameters */
1158 struct ether_addr ea
;
1161 #define BCM_MAC_STATUS_INDICATION (0x40010200L)
1164 #define WL_STA_ANT_MAX 4 /* max possible rx antennas */
1167 uint16 ver
; /* version of this struct */
1168 uint16 len
; /* length in bytes of this structure */
1169 uint16 cap
; /* sta's advertised capabilities */
1170 uint32 flags
; /* flags defined below */
1171 uint32 idle
; /* time since data pkt rx'd from sta */
1172 struct ether_addr ea
; /* Station address */
1173 wl_rateset_t rateset
; /* rateset in use */
1174 uint32 in
; /* seconds elapsed since associated */
1175 uint32 listen_interval_inms
; /* Min Listen interval in ms for this STA */
1176 uint32 tx_pkts
; /* # of packets transmitted */
1177 uint32 tx_failures
; /* # of packets failed */
1178 uint32 rx_ucast_pkts
; /* # of unicast packets received */
1179 uint32 rx_mcast_pkts
; /* # of multicast packets received */
1180 uint32 tx_rate
; /* Rate of last successful tx frame */
1181 uint32 rx_rate
; /* Rate of last successful rx frame */
1182 uint32 rx_decrypt_succeeds
; /* # of packet decrypted successfully */
1183 uint32 rx_decrypt_failures
; /* # of packet decrypted unsuccessfully */
1184 uint32 tx_tot_pkts
; /* # of tx pkts (ucast + mcast) */
1185 uint32 rx_tot_pkts
; /* # of data packets recvd (uni + mcast) */
1186 uint32 tx_mcast_pkts
; /* # of mcast pkts txed */
1187 uint64 tx_tot_bytes
; /* data bytes txed (ucast + mcast) */
1188 uint64 rx_tot_bytes
; /* data bytes recvd (ucast + mcast) */
1189 uint64 tx_ucast_bytes
; /* data bytes txed (ucast) */
1190 uint64 tx_mcast_bytes
; /* # data bytes txed (mcast) */
1191 uint64 rx_ucast_bytes
; /* data bytes recvd (ucast) */
1192 uint64 rx_mcast_bytes
; /* data bytes recvd (mcast) */
1193 int8 rssi
[WL_STA_ANT_MAX
]; /* average rssi per antenna of data
1196 int8 nf
[WL_STA_ANT_MAX
]; /* per antenna noise floor */
1197 uint16 aid
; /* association ID */
1198 uint16 ht_capabilities
; /* advertised ht caps */
1199 uint16 vht_flags
; /* converted vht flags */
1200 uint32 tx_pkts_retried
; /* # of frames where a retry was
1203 uint32 tx_pkts_retry_exhausted
; /* # of frames where a retry was
1206 int8 rx_lastpkt_rssi
[WL_STA_ANT_MAX
]; /* Per antenna RSSI of last
1207 * received data frame
1211 #define WL_OLD_STAINFO_SIZE OFFSETOF(sta_info_t, tx_tot_pkts)
1213 #define WL_STA_VER 4
1215 #define WL_STA_AID(a) ((a) &~ 0xc000)
1217 /* Flags for sta_info_t indicating properties of STA */
1218 #define WL_STA_BRCM 0x00000001 /* Running a Broadcom driver */
1219 #define WL_STA_WME 0x00000002 /* WMM association */
1220 #define WL_STA_NONERP 0x00000004 /* No ERP */
1221 #define WL_STA_AUTHE 0x00000008 /* Authenticated */
1222 #define WL_STA_ASSOC 0x00000010 /* Associated */
1223 #define WL_STA_AUTHO 0x00000020 /* Authorized */
1224 #define WL_STA_WDS 0x00000040 /* Wireless Distribution System */
1225 #define WL_STA_WDS_LINKUP 0x00000080 /* WDS traffic/probes flowing properly */
1226 #define WL_STA_PS 0x00000100 /* STA is in power save mode from AP's viewpoint */
1227 #define WL_STA_APSD_BE 0x00000200 /* APSD delv/trigger for AC_BE is default enabled */
1228 #define WL_STA_APSD_BK 0x00000400 /* APSD delv/trigger for AC_BK is default enabled */
1229 #define WL_STA_APSD_VI 0x00000800 /* APSD delv/trigger for AC_VI is default enabled */
1230 #define WL_STA_APSD_VO 0x00001000 /* APSD delv/trigger for AC_VO is default enabled */
1231 #define WL_STA_N_CAP 0x00002000 /* STA 802.11n capable */
1232 #define WL_STA_SCBSTATS 0x00004000 /* Per STA debug stats */
1233 #define WL_STA_AMPDU_CAP 0x00008000 /* STA AMPDU capable */
1234 #define WL_STA_AMSDU_CAP 0x00010000 /* STA AMSDU capable */
1235 #define WL_STA_MIMO_PS 0x00020000 /* mimo ps mode is enabled */
1236 #define WL_STA_MIMO_RTS 0x00040000 /* send rts in mimo ps mode */
1237 #define WL_STA_RIFS_CAP 0x00080000 /* rifs enabled */
1238 #define WL_STA_VHT_CAP 0x00100000 /* STA VHT(11ac) capable */
1240 #define WL_WDS_LINKUP WL_STA_WDS_LINKUP /* deprecated */
1241 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
1243 #define WLC_NUMRATES 16 /* max # of rates in a rateset */
1245 typedef struct wlc_rateset
{
1246 uint count
; /* number of rates in rates[] */
1247 uint8 rates
[WLC_NUMRATES
]; /* rates in 500kbps units w/hi bit set if basic */
1248 uint8 htphy_membership
; /* HT PHY Membership */
1249 uint8 mcs
[MCSSET_LEN
]; /* supported mcs index bit map */
1250 uint16 vht_mcsmap
; /* supported vht mcs nss bit map */
1253 #ifndef LINUX_POSTMOGRIFY_REMOVAL
1254 /* STA HT cap fields */
1255 #define WL_STA_CAP_LDPC_CODING 0x0001 /* Support for rx of LDPC coded pkts */
1256 #define WL_STA_CAP_40MHZ 0x0002 /* FALSE:20Mhz, TRUE:20/40MHZ supported */
1257 #define WL_STA_CAP_MIMO_PS_MASK 0x000C /* Mimo PS mask */
1258 #define WL_STA_CAP_MIMO_PS_SHIFT 0x0002 /* Mimo PS shift */
1259 #define WL_STA_CAP_MIMO_PS_OFF 0x0003 /* Mimo PS, no restriction */
1260 #define WL_STA_CAP_MIMO_PS_RTS 0x0001 /* Mimo PS, send RTS/CTS around MIMO frames */
1261 #define WL_STA_CAP_MIMO_PS_ON 0x0000 /* Mimo PS, MIMO disallowed */
1262 #define WL_STA_CAP_GF 0x0010 /* Greenfield preamble support */
1263 #define WL_STA_CAP_SHORT_GI_20 0x0020 /* 20MHZ short guard interval support */
1264 #define WL_STA_CAP_SHORT_GI_40 0x0040 /* 40Mhz short guard interval support */
1265 #define WL_STA_CAP_TX_STBC 0x0080 /* Tx STBC support */
1266 #define WL_STA_CAP_RX_STBC_MASK 0x0300 /* Rx STBC mask */
1267 #define WL_STA_CAP_RX_STBC_SHIFT 8 /* Rx STBC shift */
1268 #define WL_STA_CAP_DELAYED_BA 0x0400 /* delayed BA support */
1269 #define WL_STA_CAP_MAX_AMSDU 0x0800 /* Max AMSDU size in bytes , 0=3839, 1=7935 */
1270 #define WL_STA_CAP_DSSS_CCK 0x1000 /* DSSS/CCK supported by the BSS */
1271 #define WL_STA_CAP_PSMP 0x2000 /* Power Save Multi Poll support */
1272 #define WL_STA_CAP_40MHZ_INTOLERANT 0x4000 /* 40MHz Intolerant */
1273 #define WL_STA_CAP_LSIG_TXOP 0x8000 /* L-SIG TXOP protection support */
1275 #define WL_STA_CAP_RX_STBC_NO 0x0 /* no rx STBC support */
1276 #define WL_STA_CAP_RX_STBC_ONE_STREAM 0x1 /* rx STBC support of 1 spatial stream */
1277 #define WL_STA_CAP_RX_STBC_TWO_STREAM 0x2 /* rx STBC support of 1-2 spatial streams */
1278 #define WL_STA_CAP_RX_STBC_THREE_STREAM 0x3 /* rx STBC support of 1-3 spatial streams */
1281 #define WL_STA_VHT_LDPCCAP 0x0001
1282 #define WL_STA_SGI80 0x0002
1283 #define WL_STA_SGI160 0x0004
1284 #define WL_STA_VHT_TX_STBCCAP 0x0008
1285 #define WL_STA_VHT_RX_STBCCAP 0x0010
1286 #define WL_STA_SU_BEAMFORMER 0x0020
1287 #define WL_STA_SU_BEAMFORMEE 0x0040
1288 #define WL_STA_MU_BEAMFORMER 0x0080
1289 #define WL_STA_MU_BEAMFORMEE 0x0100
1290 #define WL_STA_VHT_TXOP_PS 0x0200
1291 #define WL_STA_HTC_VHT_CAP 0x0400
1293 /* Values for TX Filter override mode */
1294 #define WLC_TXFILTER_OVERRIDE_DISABLED 0
1295 #define WLC_TXFILTER_OVERRIDE_ENABLED 1
1297 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
1299 /* Used to get specific STA parameters */
1302 struct ether_addr ea
;
1305 /* Used by iovar versions of some ioctls, i.e. WLC_SCB_AUTHORIZE et al */
1308 scb_val_t ioctl_args
;
1311 /* channel encoding */
1312 typedef struct channel_info
{
1318 /* For ioctls that take a list of MAC addresses */
1320 uint count
; /* number of MAC addresses */
1321 struct ether_addr ea
[1]; /* variable length array of MAC addresses */
1324 #ifndef LINUX_POSTMOGRIFY_REMOVAL
1325 /* get pkt count struct passed through ioctl */
1326 typedef struct get_pktcnt
{
1331 uint rx_ocast_good_pkt
; /* unicast packets destined for others */
1335 #define LQ_IDX_MIN 0
1336 #define LQ_IDX_MAX 1
1337 #define LQ_IDX_AVG 2
1338 #define LQ_IDX_SUM 2
1339 #define LQ_IDX_LAST 3
1340 #define LQ_STOP_MONITOR 0
1341 #define LQ_START_MONITOR 1
1343 /* Get averages RSSI, Rx PHY rate and SNR values */
1345 int rssi
[LQ_IDX_LAST
]; /* Array to keep min, max, avg rssi */
1346 int snr
[LQ_IDX_LAST
]; /* Array to keep min, max, avg snr */
1347 int isvalid
; /* Flag indicating whether above data is valid */
1348 } wl_lq_t
; /* Link Quality */
1350 typedef enum wl_wakeup_reason_type
{
1359 /* Unique filter id */
1362 /* stores the reason for the last wake up */
1366 /* Get MAC specific rate histogram command */
1368 struct ether_addr ea
; /* MAC Address */
1369 uint8 ac_cat
; /* Access Category */
1370 uint8 num_pkts
; /* Number of packet entries to be averaged */
1371 } wl_mac_ratehisto_cmd_t
; /* MAC Specific Rate Histogram command */
1373 /* Get MAC rate histogram response */
1375 uint32 rate
[DOT11_RATE_MAX
+ 1]; /* Rates */
1376 uint32 mcs
[WL_RATESET_SZ_HT_MCS
* WL_TX_CHAINS_MAX
]; /* MCS counts */
1377 uint32 vht
[WL_RATESET_SZ_VHT_MCS
][WL_TX_CHAINS_MAX
]; /* VHT counts */
1378 uint32 tsf_timer
[2][2]; /* Start and End time for 8bytes value */
1379 } wl_mac_ratehisto_res_t
; /* MAC Specific Rate Histogram Response */
1381 /* Values for TX Filter override mode */
1382 #define WLC_TXFILTER_OVERRIDE_DISABLED 0
1383 #define WLC_TXFILTER_OVERRIDE_ENABLED 1
1385 #define WL_IOCTL_ACTION_GET 0x0
1386 #define WL_IOCTL_ACTION_SET 0x1
1387 #define WL_IOCTL_ACTION_OVL_IDX_MASK 0x1e
1388 #define WL_IOCTL_ACTION_OVL_RSV 0x20
1389 #define WL_IOCTL_ACTION_OVL 0x40
1390 #define WL_IOCTL_ACTION_MASK 0x7e
1391 #define WL_IOCTL_ACTION_OVL_SHIFT 1
1393 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
1395 /* Linux network driver ioctl encoding */
1396 typedef struct wl_ioctl
{
1397 uint cmd
; /* common ioctl definition */
1398 void *buf
; /* pointer to user buffer */
1399 uint len
; /* length of user buffer */
1400 uint8 set
; /* 1=set IOCTL; 0=query IOCTL */
1401 uint used
; /* bytes read or written (optional) */
1402 uint needed
; /* bytes needed (optional) */
1405 #ifndef LINUX_POSTMOGRIFY_REMOVAL
1407 /* reference to wl_ioctl_t struct used by usermode driver */
1408 #define ioctl_subtype set /* subtype param */
1409 #define ioctl_pid used /* pid param */
1410 #define ioctl_status needed /* status param */
1413 * Structure for passing hardware and software
1414 * revision info up from the driver.
1416 typedef struct wlc_rev_info
{
1417 uint vendorid
; /* PCI vendor id */
1418 uint deviceid
; /* device id of chip */
1419 uint radiorev
; /* radio revision */
1420 uint chiprev
; /* chip revision */
1421 uint corerev
; /* core revision */
1422 uint boardid
; /* board identifier (usu. PCI sub-device id) */
1423 uint boardvendor
; /* board vendor (usu. PCI sub-vendor id) */
1424 uint boardrev
; /* board revision */
1425 uint driverrev
; /* driver version */
1426 uint ucoderev
; /* microcode version */
1427 uint bus
; /* bus type */
1428 uint chipnum
; /* chip number */
1429 uint phytype
; /* phy type */
1430 uint phyrev
; /* phy revision */
1431 uint anarev
; /* anacore rev */
1432 uint chippkg
; /* chip package info */
1433 uint nvramrev
; /* nvram revision number */
1436 #define WL_REV_INFO_LEGACY_LENGTH 48
1438 #define WL_BRAND_MAX 10
1439 typedef struct wl_instance_info
{
1441 char brand
[WL_BRAND_MAX
];
1442 } wl_instance_info_t
;
1444 /* structure to change size of tx fifo */
1445 typedef struct wl_txfifo_sz
{
1450 /* magic pattern used for mismatch driver and wl */
1451 #define WL_TXFIFO_SZ_MAGIC 0xa5a5
1453 /* Transfer info about an IOVar from the driver */
1454 /* Max supported IOV name size in bytes, + 1 for nul termination */
1455 #define WLC_IOV_NAME_LEN 30
1456 typedef struct wlc_iov_trx_s
{
1459 char name
[WLC_IOV_NAME_LEN
];
1462 /* check this magic number */
1463 #define WLC_IOCTL_MAGIC 0x14e46c77
1465 /* bump this number if you change the ioctl interface */
1466 #ifdef D11AC_IOTYPES
1467 #define WLC_IOCTL_VERSION 2
1468 #define WLC_IOCTL_VERSION_LEGACY_IOTYPES 1
1470 #define WLC_IOCTL_VERSION 1
1471 #endif /* D11AC_IOTYPES */
1472 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
1474 #define WLC_IOCTL_MAXLEN 8192 /* max length ioctl buffer required */
1475 #define WLC_IOCTL_SMLEN 256 /* "small" length ioctl buffer required */
1476 #define WLC_IOCTL_MEDLEN 1536 /* "med" length ioctl buffer required */
1477 #ifdef WLC_HIGH_ONLY
1478 #define WLC_SAMPLECOLLECT_MAXLEN 1024 /* limit sample size for bmac */
1479 #define WLC_SAMPLECOLLECT_MAXLEN_LCN40 1024
1481 #if defined(LCNCONF) || defined(LCN40CONF)
1482 #define WLC_SAMPLECOLLECT_MAXLEN 8192 /* Max Sample Collect buffer */
1484 #define WLC_SAMPLECOLLECT_MAXLEN 10240 /* Max Sample Collect buffer for two cores */
1486 #define WLC_SAMPLECOLLECT_MAXLEN_LCN40 8192
1487 #endif /* WLC_HIGH_ONLY */
1489 /* common ioctl definitions */
1490 #define WLC_GET_MAGIC 0
1491 #define WLC_GET_VERSION 1
1494 #define WLC_GET_LOOP 4
1495 #define WLC_SET_LOOP 5
1497 #define WLC_GET_MSGLEVEL 7
1498 #define WLC_SET_MSGLEVEL 8
1499 #define WLC_GET_PROMISC 9
1500 #define WLC_SET_PROMISC 10
1501 /* #define WLC_OVERLAY_IOCTL 11 */ /* not supported */
1502 #define WLC_GET_RATE 12
1503 #define WLC_GET_MAX_RATE 13
1504 #define WLC_GET_INSTANCE 14
1505 /* #define WLC_GET_FRAG 15 */ /* no longer supported */
1506 /* #define WLC_SET_FRAG 16 */ /* no longer supported */
1507 /* #define WLC_GET_RTS 17 */ /* no longer supported */
1508 /* #define WLC_SET_RTS 18 */ /* no longer supported */
1509 #define WLC_GET_INFRA 19
1510 #define WLC_SET_INFRA 20
1511 #define WLC_GET_AUTH 21
1512 #define WLC_SET_AUTH 22
1513 #define WLC_GET_BSSID 23
1514 #define WLC_SET_BSSID 24
1515 #define WLC_GET_SSID 25
1516 #define WLC_SET_SSID 26
1517 #define WLC_RESTART 27
1518 #define WLC_TERMINATED 28
1519 /* #define WLC_DUMP_SCB 28 */ /* no longer supported */
1520 #define WLC_GET_CHANNEL 29
1521 #define WLC_SET_CHANNEL 30
1522 #define WLC_GET_SRL 31
1523 #define WLC_SET_SRL 32
1524 #define WLC_GET_LRL 33
1525 #define WLC_SET_LRL 34
1526 #define WLC_GET_PLCPHDR 35
1527 #define WLC_SET_PLCPHDR 36
1528 #define WLC_GET_RADIO 37
1529 #define WLC_SET_RADIO 38
1530 #define WLC_GET_PHYTYPE 39
1531 #define WLC_DUMP_RATE 40
1532 #define WLC_SET_RATE_PARAMS 41
1533 #define WLC_GET_FIXRATE 42
1534 #define WLC_SET_FIXRATE 43
1535 /* #define WLC_GET_WEP 42 */ /* no longer supported */
1536 /* #define WLC_SET_WEP 43 */ /* no longer supported */
1537 #define WLC_GET_KEY 44
1538 #define WLC_SET_KEY 45
1539 #define WLC_GET_REGULATORY 46
1540 #define WLC_SET_REGULATORY 47
1541 #define WLC_GET_PASSIVE_SCAN 48
1542 #define WLC_SET_PASSIVE_SCAN 49
1544 #define WLC_SCAN_RESULTS 51
1545 #define WLC_DISASSOC 52
1546 #define WLC_REASSOC 53
1547 #define WLC_GET_ROAM_TRIGGER 54
1548 #define WLC_SET_ROAM_TRIGGER 55
1549 #define WLC_GET_ROAM_DELTA 56
1550 #define WLC_SET_ROAM_DELTA 57
1551 #define WLC_GET_ROAM_SCAN_PERIOD 58
1552 #define WLC_SET_ROAM_SCAN_PERIOD 59
1553 #define WLC_EVM 60 /* diag */
1554 #define WLC_GET_TXANT 61
1555 #define WLC_SET_TXANT 62
1556 #define WLC_GET_ANTDIV 63
1557 #define WLC_SET_ANTDIV 64
1558 /* #define WLC_GET_TXPWR 65 */ /* no longer supported */
1559 /* #define WLC_SET_TXPWR 66 */ /* no longer supported */
1560 #define WLC_GET_CLOSED 67
1561 #define WLC_SET_CLOSED 68
1562 #define WLC_GET_MACLIST 69
1563 #define WLC_SET_MACLIST 70
1564 #define WLC_GET_RATESET 71
1565 #define WLC_SET_RATESET 72
1566 /* #define WLC_GET_LOCALE 73 */ /* no longer supported */
1567 #define WLC_LONGTRAIN 74
1568 #define WLC_GET_BCNPRD 75
1569 #define WLC_SET_BCNPRD 76
1570 #define WLC_GET_DTIMPRD 77
1571 #define WLC_SET_DTIMPRD 78
1572 #define WLC_GET_SROM 79
1573 #define WLC_SET_SROM 80
1574 #define WLC_GET_WEP_RESTRICT 81
1575 #define WLC_SET_WEP_RESTRICT 82
1576 #define WLC_GET_COUNTRY 83
1577 #define WLC_SET_COUNTRY 84
1578 #define WLC_GET_PM 85
1579 #define WLC_SET_PM 86
1580 #define WLC_GET_WAKE 87
1581 #define WLC_SET_WAKE 88
1582 /* #define WLC_GET_D11CNTS 89 */ /* -> "counters" iovar */
1583 #define WLC_GET_FORCELINK 90 /* ndis only */
1584 #define WLC_SET_FORCELINK 91 /* ndis only */
1585 #define WLC_FREQ_ACCURACY 92 /* diag */
1586 #define WLC_CARRIER_SUPPRESS 93 /* diag */
1587 #define WLC_GET_PHYREG 94
1588 #define WLC_SET_PHYREG 95
1589 #define WLC_GET_RADIOREG 96
1590 #define WLC_SET_RADIOREG 97
1591 #define WLC_GET_REVINFO 98
1592 #define WLC_GET_UCANTDIV 99
1593 #define WLC_SET_UCANTDIV 100
1594 #define WLC_R_REG 101
1595 #define WLC_W_REG 102
1596 /* #define WLC_DIAG_LOOPBACK 103 old tray diag */
1597 /* #define WLC_RESET_D11CNTS 104 */ /* -> "reset_d11cnts" iovar */
1598 #define WLC_GET_MACMODE 105
1599 #define WLC_SET_MACMODE 106
1600 #define WLC_GET_MONITOR 107
1601 #define WLC_SET_MONITOR 108
1602 #define WLC_GET_GMODE 109
1603 #define WLC_SET_GMODE 110
1604 #define WLC_GET_LEGACY_ERP 111
1605 #define WLC_SET_LEGACY_ERP 112
1606 #define WLC_GET_RX_ANT 113
1607 #define WLC_GET_CURR_RATESET 114 /* current rateset */
1608 #define WLC_GET_SCANSUPPRESS 115
1609 #define WLC_SET_SCANSUPPRESS 116
1610 #define WLC_GET_AP 117
1611 #define WLC_SET_AP 118
1612 #define WLC_GET_EAP_RESTRICT 119
1613 #define WLC_SET_EAP_RESTRICT 120
1614 #define WLC_SCB_AUTHORIZE 121
1615 #define WLC_SCB_DEAUTHORIZE 122
1616 #define WLC_GET_WDSLIST 123
1617 #define WLC_SET_WDSLIST 124
1618 #define WLC_GET_ATIM 125
1619 #define WLC_SET_ATIM 126
1620 #define WLC_GET_RSSI 127
1621 #define WLC_GET_PHYANTDIV 128
1622 #define WLC_SET_PHYANTDIV 129
1623 #define WLC_AP_RX_ONLY 130
1624 #define WLC_GET_TX_PATH_PWR 131
1625 #define WLC_SET_TX_PATH_PWR 132
1626 #define WLC_GET_WSEC 133
1627 #define WLC_SET_WSEC 134
1628 #define WLC_GET_PHY_NOISE 135
1629 #define WLC_GET_BSS_INFO 136
1630 #define WLC_GET_PKTCNTS 137
1631 #define WLC_GET_LAZYWDS 138
1632 #define WLC_SET_LAZYWDS 139
1633 #define WLC_GET_BANDLIST 140
1635 #ifndef LINUX_POSTMOGRIFY_REMOVAL
1636 #define WLC_GET_BAND 141
1637 #define WLC_SET_BAND 142
1638 #define WLC_SCB_DEAUTHENTICATE 143
1639 #define WLC_GET_SHORTSLOT 144
1640 #define WLC_GET_SHORTSLOT_OVERRIDE 145
1641 #define WLC_SET_SHORTSLOT_OVERRIDE 146
1642 #define WLC_GET_SHORTSLOT_RESTRICT 147
1643 #define WLC_SET_SHORTSLOT_RESTRICT 148
1644 #define WLC_GET_GMODE_PROTECTION 149
1645 #define WLC_GET_GMODE_PROTECTION_OVERRIDE 150
1646 #define WLC_SET_GMODE_PROTECTION_OVERRIDE 151
1647 #define WLC_UPGRADE 152
1648 /* #define WLC_GET_MRATE 153 */ /* no longer supported */
1649 /* #define WLC_SET_MRATE 154 */ /* no longer supported */
1650 #define WLC_GET_IGNORE_BCNS 155
1651 #define WLC_SET_IGNORE_BCNS 156
1652 #define WLC_GET_SCB_TIMEOUT 157
1653 #define WLC_SET_SCB_TIMEOUT 158
1654 #define WLC_GET_ASSOCLIST 159
1655 #define WLC_GET_CLK 160
1656 #define WLC_SET_CLK 161
1657 #define WLC_GET_UP 162
1659 #define WLC_GET_WPA_AUTH 164
1660 #define WLC_SET_WPA_AUTH 165
1661 #define WLC_GET_UCFLAGS 166
1662 #define WLC_SET_UCFLAGS 167
1663 #define WLC_GET_PWRIDX 168
1664 #define WLC_SET_PWRIDX 169
1665 #define WLC_GET_TSSI 170
1666 #define WLC_GET_SUP_RATESET_OVERRIDE 171
1667 #define WLC_SET_SUP_RATESET_OVERRIDE 172
1668 /* #define WLC_SET_FAST_TIMER 173 */ /* no longer supported */
1669 /* #define WLC_GET_FAST_TIMER 174 */ /* no longer supported */
1670 /* #define WLC_SET_SLOW_TIMER 175 */ /* no longer supported */
1671 /* #define WLC_GET_SLOW_TIMER 176 */ /* no longer supported */
1672 /* #define WLC_DUMP_PHYREGS 177 */ /* no longer supported */
1673 #define WLC_GET_PROTECTION_CONTROL 178
1674 #define WLC_SET_PROTECTION_CONTROL 179
1675 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
1676 #define WLC_GET_PHYLIST 180
1677 #ifndef LINUX_POSTMOGRIFY_REMOVAL
1678 #define WLC_ENCRYPT_STRENGTH 181 /* ndis only */
1679 #define WLC_DECRYPT_STATUS 182 /* ndis only */
1680 #define WLC_GET_KEY_SEQ 183
1681 #define WLC_GET_SCAN_CHANNEL_TIME 184
1682 #define WLC_SET_SCAN_CHANNEL_TIME 185
1683 #define WLC_GET_SCAN_UNASSOC_TIME 186
1684 #define WLC_SET_SCAN_UNASSOC_TIME 187
1685 #define WLC_GET_SCAN_HOME_TIME 188
1686 #define WLC_SET_SCAN_HOME_TIME 189
1687 #define WLC_GET_SCAN_NPROBES 190
1688 #define WLC_SET_SCAN_NPROBES 191
1689 #define WLC_GET_PRB_RESP_TIMEOUT 192
1690 #define WLC_SET_PRB_RESP_TIMEOUT 193
1691 #define WLC_GET_ATTEN 194
1692 #define WLC_SET_ATTEN 195
1693 #define WLC_GET_SHMEM 196 /* diag */
1694 #define WLC_SET_SHMEM 197 /* diag */
1695 /* #define WLC_GET_GMODE_PROTECTION_CTS 198 */ /* no longer supported */
1696 /* #define WLC_SET_GMODE_PROTECTION_CTS 199 */ /* no longer supported */
1697 #define WLC_SET_WSEC_TEST 200
1698 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
1699 #define WLC_SCB_DEAUTHENTICATE_FOR_REASON 201
1700 #ifndef LINUX_POSTMOGRIFY_REMOVAL
1701 #define WLC_TKIP_COUNTERMEASURES 202
1702 #define WLC_GET_PIOMODE 203
1703 #define WLC_SET_PIOMODE 204
1704 #define WLC_SET_ASSOC_PREFER 205
1705 #define WLC_GET_ASSOC_PREFER 206
1706 #define WLC_SET_ROAM_PREFER 207
1707 #define WLC_GET_ROAM_PREFER 208
1708 #define WLC_SET_LED 209
1709 #define WLC_GET_LED 210
1710 #define WLC_GET_INTERFERENCE_MODE 211
1711 #define WLC_SET_INTERFERENCE_MODE 212
1712 #define WLC_GET_CHANNEL_QA 213
1713 #define WLC_START_CHANNEL_QA 214
1714 #define WLC_GET_CHANNEL_SEL 215
1715 #define WLC_START_CHANNEL_SEL 216
1716 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
1717 #define WLC_GET_VALID_CHANNELS 217
1718 #define WLC_GET_FAKEFRAG 218
1719 #define WLC_SET_FAKEFRAG 219
1720 #define WLC_GET_PWROUT_PERCENTAGE 220
1721 #define WLC_SET_PWROUT_PERCENTAGE 221
1722 #define WLC_SET_BAD_FRAME_PREEMPT 222
1723 #define WLC_GET_BAD_FRAME_PREEMPT 223
1724 #define WLC_SET_LEAP_LIST 224
1725 #define WLC_GET_LEAP_LIST 225
1726 #define WLC_GET_CWMIN 226
1727 #define WLC_SET_CWMIN 227
1728 #define WLC_GET_CWMAX 228
1729 #define WLC_SET_CWMAX 229
1730 #define WLC_GET_WET 230
1731 #define WLC_SET_WET 231
1732 #define WLC_GET_PUB 232
1733 /* #define WLC_SET_GLACIAL_TIMER 233 */ /* no longer supported */
1734 /* #define WLC_GET_GLACIAL_TIMER 234 */ /* no longer supported */
1735 #define WLC_GET_KEY_PRIMARY 235
1736 #define WLC_SET_KEY_PRIMARY 236
1738 #ifndef LINUX_POSTMOGRIFY_REMOVAL
1740 /* #define WLC_DUMP_RADIOREGS 237 */ /* no longer supported */
1741 #define WLC_GET_ACI_ARGS 238
1742 #define WLC_SET_ACI_ARGS 239
1743 #define WLC_UNSET_CALLBACK 240
1744 #define WLC_SET_CALLBACK 241
1745 #define WLC_GET_RADAR 242
1746 #define WLC_SET_RADAR 243
1747 #define WLC_SET_SPECT_MANAGMENT 244
1748 #define WLC_GET_SPECT_MANAGMENT 245
1749 #define WLC_WDS_GET_REMOTE_HWADDR 246 /* handled in wl_linux.c/wl_vx.c */
1750 #define WLC_WDS_GET_WPA_SUP 247
1751 #define WLC_SET_CS_SCAN_TIMER 248
1752 #define WLC_GET_CS_SCAN_TIMER 249
1753 #define WLC_MEASURE_REQUEST 250
1754 #define WLC_INIT 251
1755 #define WLC_SEND_QUIET 252
1756 #define WLC_KEEPALIVE 253
1757 #define WLC_SEND_PWR_CONSTRAINT 254
1758 #define WLC_UPGRADE_STATUS 255
1759 #define WLC_CURRENT_PWR 256
1760 #define WLC_GET_SCAN_PASSIVE_TIME 257
1761 #define WLC_SET_SCAN_PASSIVE_TIME 258
1762 #define WLC_LEGACY_LINK_BEHAVIOR 259
1763 #define WLC_GET_CHANNELS_IN_COUNTRY 260
1764 #define WLC_GET_COUNTRY_LIST 261
1765 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
1766 #define WLC_GET_VAR 262 /* get value of named variable */
1767 #define WLC_SET_VAR 263 /* set named variable to value */
1768 #ifndef LINUX_POSTMOGRIFY_REMOVAL
1769 #define WLC_NVRAM_GET 264 /* deprecated */
1770 #define WLC_NVRAM_SET 265
1771 #define WLC_NVRAM_DUMP 266
1772 #define WLC_REBOOT 267
1773 #define WLC_SET_WSEC_PMK 268
1774 #define WLC_GET_AUTH_MODE 269
1775 #define WLC_SET_AUTH_MODE 270
1776 #define WLC_GET_WAKEENTRY 271
1777 #define WLC_SET_WAKEENTRY 272
1778 #define WLC_NDCONFIG_ITEM 273 /* currently handled in wl_oid.c */
1779 #define WLC_NVOTPW 274
1780 #define WLC_OTPW 275
1781 #define WLC_IOV_BLOCK_GET 276
1782 #define WLC_IOV_MODULES_GET 277
1783 #define WLC_SOFT_RESET 278
1784 #define WLC_GET_ALLOW_MODE 279
1785 #define WLC_SET_ALLOW_MODE 280
1786 #define WLC_GET_DESIRED_BSSID 281
1787 #define WLC_SET_DESIRED_BSSID 282
1788 #define WLC_DISASSOC_MYAP 283
1789 #define WLC_GET_NBANDS 284 /* for Dongle EXT_STA support */
1790 #define WLC_GET_BANDSTATES 285 /* for Dongle EXT_STA support */
1791 #define WLC_GET_WLC_BSS_INFO 286 /* for Dongle EXT_STA support */
1792 #define WLC_GET_ASSOC_INFO 287 /* for Dongle EXT_STA support */
1793 #define WLC_GET_OID_PHY 288 /* for Dongle EXT_STA support */
1794 #define WLC_SET_OID_PHY 289 /* for Dongle EXT_STA support */
1795 #define WLC_SET_ASSOC_TIME 290 /* for Dongle EXT_STA support */
1796 #define WLC_GET_DESIRED_SSID 291 /* for Dongle EXT_STA support */
1797 #define WLC_GET_CHANSPEC 292 /* for Dongle EXT_STA support */
1798 #define WLC_GET_ASSOC_STATE 293 /* for Dongle EXT_STA support */
1799 #define WLC_SET_PHY_STATE 294 /* for Dongle EXT_STA support */
1800 #define WLC_GET_SCAN_PENDING 295 /* for Dongle EXT_STA support */
1801 #define WLC_GET_SCANREQ_PENDING 296 /* for Dongle EXT_STA support */
1802 #define WLC_GET_PREV_ROAM_REASON 297 /* for Dongle EXT_STA support */
1803 #define WLC_SET_PREV_ROAM_REASON 298 /* for Dongle EXT_STA support */
1804 #define WLC_GET_BANDSTATES_PI 299 /* for Dongle EXT_STA support */
1805 #define WLC_GET_PHY_STATE 300 /* for Dongle EXT_STA support */
1806 #define WLC_GET_BSS_WPA_RSN 301 /* for Dongle EXT_STA support */
1807 #define WLC_GET_BSS_WPA2_RSN 302 /* for Dongle EXT_STA support */
1808 #define WLC_GET_BSS_BCN_TS 303 /* for Dongle EXT_STA support */
1809 #define WLC_GET_INT_DISASSOC 304 /* for Dongle EXT_STA support */
1810 #define WLC_SET_NUM_PEERS 305 /* for Dongle EXT_STA support */
1811 #define WLC_GET_NUM_BSS 306 /* for Dongle EXT_STA support */
1812 #define WLC_PHY_SAMPLE_COLLECT 307 /* phy sample collect mode */
1813 /* #define WLC_UM_PRIV 308 */ /* Deprecated: usermode driver */
1814 #define WLC_GET_CMD 309
1815 /* #define WLC_LAST 310 */ /* Never used - can be reused */
1816 #define WLC_SET_INTERFERENCE_OVERRIDE_MODE 311 /* set inter mode override */
1817 #define WLC_GET_INTERFERENCE_OVERRIDE_MODE 312 /* get inter mode override */
1818 /* #define WLC_GET_WAI_RESTRICT 313 */ /* for WAPI, deprecated use iovar instead */
1819 /* #define WLC_SET_WAI_RESTRICT 314 */ /* for WAPI, deprecated use iovar instead */
1820 /* #define WLC_SET_WAI_REKEY 315 */ /* for WAPI, deprecated use iovar instead */
1821 #define WLC_SET_NAT_CONFIG 316 /* for configuring NAT filter driver */
1822 #define WLC_GET_NAT_STATE 317
1823 #define WLC_GET_TXBF_RATESET 318
1824 #define WLC_SET_TXBF_RATESET 319
1825 #define WLC_SCAN_CQ 320
1826 #define WLC_GET_RSSI_QDB 321 /* qdB portion of the RSSI */
1828 #define WLC_LAST 322
1830 #ifndef EPICTRL_COOKIE
1831 #define EPICTRL_COOKIE 0xABADCEDE
1834 /* vx wlc ioctl's offset */
1835 #define CMN_IOCTL_OFF 0x180
1838 * custom OID support
1840 * 0xFF - implementation specific OID
1841 * 0xE4 - first byte of Broadcom PCI vendor ID
1842 * 0x14 - second byte of Broadcom PCI vendor ID
1843 * 0xXX - the custom OID number
1846 /* begin 0x1f values beyond the start of the ET driver range. */
1847 #define WL_OID_BASE 0xFFE41420
1849 /* NDIS overrides */
1850 #define OID_WL_GETINSTANCE (WL_OID_BASE + WLC_GET_INSTANCE)
1851 #define OID_WL_GET_FORCELINK (WL_OID_BASE + WLC_GET_FORCELINK)
1852 #define OID_WL_SET_FORCELINK (WL_OID_BASE + WLC_SET_FORCELINK)
1853 #define OID_WL_ENCRYPT_STRENGTH (WL_OID_BASE + WLC_ENCRYPT_STRENGTH)
1854 #define OID_WL_DECRYPT_STATUS (WL_OID_BASE + WLC_DECRYPT_STATUS)
1855 #define OID_LEGACY_LINK_BEHAVIOR (WL_OID_BASE + WLC_LEGACY_LINK_BEHAVIOR)
1856 #define OID_WL_NDCONFIG_ITEM (WL_OID_BASE + WLC_NDCONFIG_ITEM)
1858 /* EXT_STA Dongle suuport */
1859 #define OID_STA_CHANSPEC (WL_OID_BASE + WLC_GET_CHANSPEC)
1860 #define OID_STA_NBANDS (WL_OID_BASE + WLC_GET_NBANDS)
1861 #define OID_STA_GET_PHY (WL_OID_BASE + WLC_GET_OID_PHY)
1862 #define OID_STA_SET_PHY (WL_OID_BASE + WLC_SET_OID_PHY)
1863 #define OID_STA_ASSOC_TIME (WL_OID_BASE + WLC_SET_ASSOC_TIME)
1864 #define OID_STA_DESIRED_SSID (WL_OID_BASE + WLC_GET_DESIRED_SSID)
1865 #define OID_STA_SET_PHY_STATE (WL_OID_BASE + WLC_SET_PHY_STATE)
1866 #define OID_STA_SCAN_PENDING (WL_OID_BASE + WLC_GET_SCAN_PENDING)
1867 #define OID_STA_SCANREQ_PENDING (WL_OID_BASE + WLC_GET_SCANREQ_PENDING)
1868 #define OID_STA_GET_ROAM_REASON (WL_OID_BASE + WLC_GET_PREV_ROAM_REASON)
1869 #define OID_STA_SET_ROAM_REASON (WL_OID_BASE + WLC_SET_PREV_ROAM_REASON)
1870 #define OID_STA_GET_PHY_STATE (WL_OID_BASE + WLC_GET_PHY_STATE)
1871 #define OID_STA_INT_DISASSOC (WL_OID_BASE + WLC_GET_INT_DISASSOC)
1872 #define OID_STA_SET_NUM_PEERS (WL_OID_BASE + WLC_SET_NUM_PEERS)
1873 #define OID_STA_GET_NUM_BSS (WL_OID_BASE + WLC_GET_NUM_BSS)
1875 /* NAT filter driver support */
1876 #define OID_NAT_SET_CONFIG (WL_OID_BASE + WLC_SET_NAT_CONFIG)
1877 #define OID_NAT_GET_STATE (WL_OID_BASE + WLC_GET_NAT_STATE)
1879 #define WL_DECRYPT_STATUS_SUCCESS 1
1880 #define WL_DECRYPT_STATUS_FAILURE 2
1881 #define WL_DECRYPT_STATUS_UNKNOWN 3
1883 /* allows user-mode app to poll the status of USB image upgrade */
1884 #define WLC_UPGRADE_SUCCESS 0
1885 #define WLC_UPGRADE_PENDING 1
1887 #ifdef CONFIG_USBRNDIS_RETAIL
1888 /* struct passed in for WLC_NDCONFIG_ITEM */
1896 /* WLC_GET_AUTH, WLC_SET_AUTH values */
1897 #define WL_AUTH_OPEN_SYSTEM 0 /* d11 open authentication */
1898 #define WL_AUTH_SHARED_KEY 1 /* d11 shared authentication */
1899 #define WL_AUTH_OPEN_SHARED 2 /* try open, then shared if open failed w/rc 13 */
1900 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
1902 /* Bit masks for radio disabled status - returned by WL_GET_RADIO */
1903 #define WL_RADIO_SW_DISABLE (1<<0)
1904 #define WL_RADIO_HW_DISABLE (1<<1)
1905 #define WL_RADIO_MPC_DISABLE (1<<2)
1906 #define WL_RADIO_COUNTRY_DISABLE (1<<3) /* some countries don't support any channel */
1908 #define WL_SPURAVOID_OFF 0
1909 #define WL_SPURAVOID_ON1 1
1910 #define WL_SPURAVOID_ON2 2
1913 /* Override bit for WLC_SET_TXPWR. if set, ignore other level limits */
1914 #define WL_TXPWR_OVERRIDE (1U<<31)
1915 #define WL_TXPWR_NEG (1U<<30)
1917 #ifndef LINUX_POSTMOGRIFY_REMOVAL
1918 #define WL_PHY_PAVARS_LEN 32 /* Phy type, Band range, chain, a1[0], b0[0], b1[0] ... */
1920 #define WL_PHY_PAVARS2_NUM 3 /* a1, b0, b1 */
1921 #define WL_PHY_PAVAR_VER 1 /* pavars version */
1922 typedef struct wl_pavars2
{
1923 uint16 ver
; /* version of this struct */
1924 uint16 len
; /* len of this structure */
1925 uint16 inuse
; /* driver return 1 for a1,b0,b1 in current band range */
1926 uint16 phy_type
; /* phy type */
1929 uint16 inpa
[WL_PHY_PAVARS2_NUM
]; /* phy pavars for one band range */
1932 typedef struct wl_po
{
1933 uint16 phy_type
; /* Phy type */
1940 #define WL_NUM_RPCALVARS 5 /* number of rpcal vars */
1942 typedef struct wl_rpcal
{
1947 /* a large TX Power as an init value to factor out of MIN() calculations,
1948 * keep low enough to fit in an int8, units are .25 dBm
1950 #define WLC_TXPWR_MAX (127) /* ~32 dBm = 1,500 mW */
1952 /* "diag" iovar argument and error code */
1953 #define WL_DIAG_INTERRUPT 1 /* d11 loopback interrupt test */
1954 #define WL_DIAG_LOOPBACK 2 /* d11 loopback data test */
1955 #define WL_DIAG_MEMORY 3 /* d11 memory test */
1956 #define WL_DIAG_LED 4 /* LED test */
1957 #define WL_DIAG_REG 5 /* d11/phy register test */
1958 #define WL_DIAG_SROM 6 /* srom read/crc test */
1959 #define WL_DIAG_DMA 7 /* DMA test */
1960 #define WL_DIAG_LOOPBACK_EXT 8 /* enhenced d11 loopback data test */
1962 #define WL_DIAGERR_SUCCESS 0
1963 #define WL_DIAGERR_FAIL_TO_RUN 1 /* unable to run requested diag */
1964 #define WL_DIAGERR_NOT_SUPPORTED 2 /* diag requested is not supported */
1965 #define WL_DIAGERR_INTERRUPT_FAIL 3 /* loopback interrupt test failed */
1966 #define WL_DIAGERR_LOOPBACK_FAIL 4 /* loopback data test failed */
1967 #define WL_DIAGERR_SROM_FAIL 5 /* srom read failed */
1968 #define WL_DIAGERR_SROM_BADCRC 6 /* srom crc failed */
1969 #define WL_DIAGERR_REG_FAIL 7 /* d11/phy register test failed */
1970 #define WL_DIAGERR_MEMORY_FAIL 8 /* d11 memory test failed */
1971 #define WL_DIAGERR_NOMEM 9 /* diag test failed due to no memory */
1972 #define WL_DIAGERR_DMA_FAIL 10 /* DMA test failed */
1974 #define WL_DIAGERR_MEMORY_TIMEOUT 11 /* d11 memory test didn't finish in time */
1975 #define WL_DIAGERR_MEMORY_BADPATTERN 12 /* d11 memory test result in bad pattern */
1978 #define WLC_BAND_AUTO 0 /* auto-select */
1979 #define WLC_BAND_5G 1 /* 5 Ghz */
1980 #define WLC_BAND_2G 2 /* 2.4 Ghz */
1981 #define WLC_BAND_ALL 3 /* all bands */
1983 /* band range returned by band_range iovar */
1984 #define WL_CHAN_FREQ_RANGE_2G 0
1985 #define WL_CHAN_FREQ_RANGE_5GL 1
1986 #define WL_CHAN_FREQ_RANGE_5GM 2
1987 #define WL_CHAN_FREQ_RANGE_5GH 3
1989 #define WL_CHAN_FREQ_RANGE_5GLL_5BAND 4
1990 #define WL_CHAN_FREQ_RANGE_5GLH_5BAND 5
1991 #define WL_CHAN_FREQ_RANGE_5GML_5BAND 6
1992 #define WL_CHAN_FREQ_RANGE_5GMH_5BAND 7
1993 #define WL_CHAN_FREQ_RANGE_5GH_5BAND 8
1995 #define WL_CHAN_FREQ_RANGE_5G_BAND0 1
1996 #define WL_CHAN_FREQ_RANGE_5G_BAND1 2
1997 #define WL_CHAN_FREQ_RANGE_5G_BAND2 3
1998 #define WL_CHAN_FREQ_RANGE_5G_BAND3 4
2000 #define WL_CHAN_FREQ_RANGE_5G_4BAND 5
2001 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
2003 /* phy types (returned by WLC_GET_PHYTPE) */
2004 #define WLC_PHY_TYPE_A 0
2005 #define WLC_PHY_TYPE_B 1
2006 #define WLC_PHY_TYPE_G 2
2007 #define WLC_PHY_TYPE_N 4
2008 #define WLC_PHY_TYPE_LP 5
2009 #define WLC_PHY_TYPE_SSN 6
2010 #define WLC_PHY_TYPE_HT 7
2011 #define WLC_PHY_TYPE_LCN 8
2012 #define WLC_PHY_TYPE_LCN40 10
2013 #define WLC_PHY_TYPE_AC 11
2014 #define WLC_PHY_TYPE_NULL 0xf
2020 #define PM_FORCE_OFF 3 /* use this bit to force PM off even bt is active */
2022 #ifndef LINUX_POSTMOGRIFY_REMOVAL
2023 /* MAC list modes */
2024 #define WLC_MACMODE_DISABLED 0 /* MAC list disabled */
2025 #define WLC_MACMODE_DENY 1 /* Deny specified (i.e. allow unspecified) */
2026 #define WLC_MACMODE_ALLOW 2 /* Allow specified (i.e. deny unspecified) */
2029 * 54g modes (basic bits may still be overridden)
2031 * GMODE_LEGACY_B Rateset: 1b, 2b, 5.5, 11
2034 * GMODE_AUTO Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
2035 * Extended Rateset: 6, 9, 12, 48
2038 * GMODE_ONLY Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54
2039 * Extended Rateset: 6b, 9, 12b, 48
2040 * Preamble: Short required
2042 * GMODE_B_DEFERRED Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
2043 * Extended Rateset: 6, 9, 12, 48
2046 * GMODE_PERFORMANCE Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54
2047 * Preamble: Short required
2048 * Shortslot: On and required
2049 * GMODE_LRS Rateset: 1b, 2b, 5.5b, 11b
2050 * Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54
2054 #define GMODE_LEGACY_B 0
2055 #define GMODE_AUTO 1
2056 #define GMODE_ONLY 2
2057 #define GMODE_B_DEFERRED 3
2058 #define GMODE_PERFORMANCE 4
2062 /* values for PLCPHdr_override */
2063 #define WLC_PLCP_AUTO -1
2064 #define WLC_PLCP_SHORT 0
2065 #define WLC_PLCP_LONG 1
2067 /* values for g_protection_override and n_protection_override */
2068 #define WLC_PROTECTION_AUTO -1
2069 #define WLC_PROTECTION_OFF 0
2070 #define WLC_PROTECTION_ON 1
2071 #define WLC_PROTECTION_MMHDR_ONLY 2
2072 #define WLC_PROTECTION_CTS_ONLY 3
2074 /* values for g_protection_control and n_protection_control */
2075 #define WLC_PROTECTION_CTL_OFF 0
2076 #define WLC_PROTECTION_CTL_LOCAL 1
2077 #define WLC_PROTECTION_CTL_OVERLAP 2
2079 /* values for n_protection */
2080 #define WLC_N_PROTECTION_OFF 0
2081 #define WLC_N_PROTECTION_OPTIONAL 1
2082 #define WLC_N_PROTECTION_20IN40 2
2083 #define WLC_N_PROTECTION_MIXEDMODE 3
2085 /* values for n_preamble_type */
2086 #define WLC_N_PREAMBLE_MIXEDMODE 0
2087 #define WLC_N_PREAMBLE_GF 1
2088 #define WLC_N_PREAMBLE_GF_BRCM 2
2090 /* values for band specific 40MHz capabilities (deprecated) */
2091 #define WLC_N_BW_20ALL 0
2092 #define WLC_N_BW_40ALL 1
2093 #define WLC_N_BW_20IN2G_40IN5G 2
2095 #define WLC_BW_20MHZ_BIT (1<<0)
2096 #define WLC_BW_40MHZ_BIT (1<<1)
2097 #define WLC_BW_80MHZ_BIT (1<<2)
2099 /* Bandwidth capabilities */
2100 #define WLC_BW_CAP_20MHZ (WLC_BW_20MHZ_BIT)
2101 #define WLC_BW_CAP_40MHZ (WLC_BW_40MHZ_BIT|WLC_BW_20MHZ_BIT)
2102 #define WLC_BW_CAP_80MHZ (WLC_BW_80MHZ_BIT|WLC_BW_40MHZ_BIT|WLC_BW_20MHZ_BIT)
2103 #define WLC_BW_CAP_UNRESTRICTED 0xFF
2105 #define WL_BW_CAP_20MHZ(bw_cap) (((bw_cap) & WLC_BW_20MHZ_BIT) ? TRUE : FALSE)
2106 #define WL_BW_CAP_40MHZ(bw_cap) (((bw_cap) & WLC_BW_40MHZ_BIT) ? TRUE : FALSE)
2107 #define WL_BW_CAP_80MHZ(bw_cap) (((bw_cap) & WLC_BW_80MHZ_BIT) ? TRUE : FALSE)
2109 /* values to force tx/rx chain */
2110 #define WLC_N_TXRX_CHAIN0 0
2111 #define WLC_N_TXRX_CHAIN1 1
2113 /* bitflags for SGI support (sgi_rx iovar) */
2114 #define WLC_N_SGI_20 0x01
2115 #define WLC_N_SGI_40 0x02
2116 #define WLC_VHT_SGI_80 0x04
2118 /* when sgi_tx==WLC_SGI_ALL, bypass rate selection, enable sgi for all mcs */
2119 #define WLC_SGI_ALL 0x02
2121 #define LISTEN_INTERVAL 10
2122 /* interference mitigation options */
2123 #define INTERFERE_OVRRIDE_OFF -1 /* interference override off */
2124 #define INTERFERE_NONE 0 /* off */
2125 #define NON_WLAN 1 /* foreign/non 802.11 interference, no auto detect */
2126 #define WLAN_MANUAL 2 /* ACI: no auto detection */
2127 #define WLAN_AUTO 3 /* ACI: auto detect */
2128 #define WLAN_AUTO_W_NOISE 4 /* ACI: auto - detect and non 802.11 interference */
2129 #define AUTO_ACTIVE (1 << 7) /* Auto is currently active */
2131 /* interfernece mode bit-masks (ACPHY) */
2132 #define ACPHY_ACI_GLITCHBASED_DESENSE 1 /* bit 0 */
2133 #define ACPHY_ACI_HWACI_PKTGAINLMT 2 /* bit 1 */
2134 #define ACPHY_ACI_W2NB_PKTGAINLMT 4 /* bit 2 */
2135 #define ACPHY_ACI_MAX_MODE 7
2137 typedef struct wl_aci_args
{
2138 int enter_aci_thresh
; /* Trigger level to start detecting ACI */
2139 int exit_aci_thresh
; /* Trigger level to exit ACI mode */
2140 int usec_spin
; /* microsecs to delay between rssi samples */
2141 int glitch_delay
; /* interval between ACI scans when glitch count is consistently high */
2142 uint16 nphy_adcpwr_enter_thresh
; /* ADC power to enter ACI mitigation mode */
2143 uint16 nphy_adcpwr_exit_thresh
; /* ADC power to exit ACI mitigation mode */
2144 uint16 nphy_repeat_ctr
; /* Number of tries per channel to compute power */
2145 uint16 nphy_num_samples
; /* Number of samples to compute power on one channel */
2146 uint16 nphy_undetect_window_sz
; /* num of undetects to exit ACI Mitigation mode */
2147 uint16 nphy_b_energy_lo_aci
; /* low ACI power energy threshold for bphy */
2148 uint16 nphy_b_energy_md_aci
; /* mid ACI power energy threshold for bphy */
2149 uint16 nphy_b_energy_hi_aci
; /* high ACI power energy threshold for bphy */
2150 uint16 nphy_noise_noassoc_glitch_th_up
; /* wl interference 4 */
2151 uint16 nphy_noise_noassoc_glitch_th_dn
;
2152 uint16 nphy_noise_assoc_glitch_th_up
;
2153 uint16 nphy_noise_assoc_glitch_th_dn
;
2154 uint16 nphy_noise_assoc_aci_glitch_th_up
;
2155 uint16 nphy_noise_assoc_aci_glitch_th_dn
;
2156 uint16 nphy_noise_assoc_enter_th
;
2157 uint16 nphy_noise_noassoc_enter_th
;
2158 uint16 nphy_noise_assoc_rx_glitch_badplcp_enter_th
;
2159 uint16 nphy_noise_noassoc_crsidx_incr
;
2160 uint16 nphy_noise_assoc_crsidx_incr
;
2161 uint16 nphy_noise_crsidx_decr
;
2164 #define TRIGGER_NOW 0
2165 #define TRIGGER_CRS 0x01
2166 #define TRIGGER_CRSDEASSERT 0x02
2167 #define TRIGGER_GOODFCS 0x04
2168 #define TRIGGER_BADFCS 0x08
2169 #define TRIGGER_BADPLCP 0x10
2170 #define TRIGGER_CRSGLITCH 0x20
2171 #define WL_ACI_ARGS_LEGACY_LENGTH 16 /* bytes of pre NPHY aci args */
2172 #define WL_SAMPLECOLLECT_T_VERSION 2 /* version of wl_samplecollect_args_t struct */
2173 typedef struct wl_samplecollect_args
{
2174 /* version 0 fields */
2177 /* add'l version 1 fields */
2178 uint16 version
; /* see definition of WL_SAMPLECOLLECT_T_VERSION */
2179 uint16 length
; /* length of entire structure */
2188 bool agc
; /* loop from init gain and going down */
2189 bool filter
; /* override high pass corners to lowest */
2190 /* add'l version 2 fields */
2191 uint8 trigger_state
;
2197 } wl_samplecollect_args_t
;
2199 #define WL_SAMPLEDATA_HEADER_TYPE 1
2200 #define WL_SAMPLEDATA_HEADER_SIZE 80 /* sample collect header size (bytes) */
2201 #define WL_SAMPLEDATA_TYPE 2
2202 #define WL_SAMPLEDATA_SEQ 0xff /* sequence # */
2203 #define WL_SAMPLEDATA_MORE_DATA 0x100 /* more data mask */
2204 #define WL_SAMPLEDATA_T_VERSION 1 /* version of wl_samplecollect_args_t struct */
2205 /* version for unpacked sample data, int16 {(I,Q),Core(0..N)} */
2206 #define WL_SAMPLEDATA_T_VERSION_SPEC_AN 2
2208 typedef struct wl_sampledata
{
2209 uint16 version
; /* structure version */
2210 uint16 size
; /* size of structure */
2211 uint16 tag
; /* Header/Data */
2212 uint16 length
; /* data length */
2213 uint32 flag
; /* bit def */
2216 /* wl_radar_args_t */
2218 int npulses
; /* required number of pulses at n * t_int */
2219 int ncontig
; /* required number of pulses at t_int */
2220 int min_pw
; /* minimum pulse width (20 MHz clocks) */
2221 int max_pw
; /* maximum pulse width (20 MHz clocks) */
2222 uint16 thresh0
; /* Radar detection, thresh 0 */
2223 uint16 thresh1
; /* Radar detection, thresh 1 */
2224 uint16 blank
; /* Radar detection, blank control */
2225 uint16 fmdemodcfg
; /* Radar detection, fmdemod config */
2226 int npulses_lp
; /* Radar detection, minimum long pulses */
2227 int min_pw_lp
; /* Minimum pulsewidth for long pulses */
2228 int max_pw_lp
; /* Maximum pulsewidth for long pulses */
2229 int min_fm_lp
; /* Minimum fm for long pulses */
2230 int max_span_lp
; /* Maximum deltat for long pulses */
2231 int min_deltat
; /* Minimum spacing between pulses */
2232 int max_deltat
; /* Maximum spacing between pulses */
2233 uint16 autocorr
; /* Radar detection, autocorr on or off */
2234 uint16 st_level_time
; /* Radar detection, start_timing level */
2235 uint16 t2_min
; /* minimum clocks needed to remain in state 2 */
2236 uint32 version
; /* version */
2237 uint32 fra_pulse_err
; /* sample error margin for detecting French radar pulsed */
2238 int npulses_fra
; /* Radar detection, minimum French pulses set */
2239 int npulses_stg2
; /* Radar detection, minimum staggered-2 pulses set */
2240 int npulses_stg3
; /* Radar detection, minimum staggered-3 pulses set */
2241 uint16 percal_mask
; /* defines which period cal is masked from radar detection */
2242 int quant
; /* quantization resolution to pulse positions */
2243 uint32 min_burst_intv_lp
; /* minimum burst to burst interval for bin3 radar */
2244 uint32 max_burst_intv_lp
; /* maximum burst to burst interval for bin3 radar */
2245 int nskip_rst_lp
; /* number of skipped pulses before resetting lp buffer */
2246 int max_pw_tol
; /* maximum tollerance allowed in detected pulse width for radar detection */
2247 uint16 feature_mask
; /* 16-bit mask to specify enabled features */
2250 #define WL_RADAR_ARGS_VERSION 2
2253 uint32 version
; /* version */
2254 uint16 thresh0_20_lo
; /* Radar detection, thresh 0 (range 5250-5350MHz) for BW 20MHz */
2255 uint16 thresh1_20_lo
; /* Radar detection, thresh 1 (range 5250-5350MHz) for BW 20MHz */
2256 uint16 thresh0_40_lo
; /* Radar detection, thresh 0 (range 5250-5350MHz) for BW 40MHz */
2257 uint16 thresh1_40_lo
; /* Radar detection, thresh 1 (range 5250-5350MHz) for BW 40MHz */
2258 uint16 thresh0_80_lo
; /* Radar detection, thresh 0 (range 5250-5350MHz) for BW 80MHz */
2259 uint16 thresh1_80_lo
; /* Radar detection, thresh 1 (range 5250-5350MHz) for BW 80MHz */
2260 uint16 thresh0_20_hi
; /* Radar detection, thresh 0 (range 5470-5725MHz) for BW 20MHz */
2261 uint16 thresh1_20_hi
; /* Radar detection, thresh 1 (range 5470-5725MHz) for BW 20MHz */
2262 uint16 thresh0_40_hi
; /* Radar detection, thresh 0 (range 5470-5725MHz) for BW 40MHz */
2263 uint16 thresh1_40_hi
; /* Radar detection, thresh 1 (range 5470-5725MHz) for BW 40MHz */
2264 uint16 thresh0_80_hi
; /* Radar detection, thresh 0 (range 5470-5725MHz) for BW 80MHz */
2265 uint16 thresh1_80_hi
; /* Radar detection, thresh 1 (range 5470-5725MHz) for BW 80MHz */
2268 #define WL_RADAR_THR_VERSION 2
2269 #define WL_THRESHOLD_LO_BAND 70 /* range from 5250MHz - 5350MHz */
2271 /* radar iovar SET defines */
2272 #define WL_RADAR_DETECTOR_OFF 0 /* radar detector off */
2273 #define WL_RADAR_DETECTOR_ON 1 /* radar detector on */
2274 #define WL_RADAR_SIMULATED 2 /* force radar detector to declare
2277 #define WL_RSSI_ANT_VERSION 1 /* current version of wl_rssi_ant_t */
2278 #define WL_ANT_RX_MAX 2 /* max 2 receive antennas */
2279 #define WL_ANT_HT_RX_MAX 3 /* max 3 receive antennas/cores */
2280 #define WL_ANT_IDX_1 0 /* antenna index 1 */
2281 #define WL_ANT_IDX_2 1 /* antenna index 2 */
2283 #ifndef WL_RSSI_ANT_MAX
2284 #define WL_RSSI_ANT_MAX 4 /* max possible rx antennas */
2285 #elif WL_RSSI_ANT_MAX != 4
2286 #error "WL_RSSI_ANT_MAX does not match"
2289 /* RSSI per antenna */
2291 uint32 version
; /* version field */
2292 uint32 count
; /* number of valid antenna rssi */
2293 int8 rssi_ant
[WL_RSSI_ANT_MAX
]; /* rssi per antenna */
2296 /* dfs_status iovar-related defines */
2298 /* cac - channel availability check,
2299 * ism - in-service monitoring
2300 * csa - channel switching announcement
2303 /* cac state values */
2304 #define WL_DFS_CACSTATE_IDLE 0 /* state for operating in non-radar channel */
2305 #define WL_DFS_CACSTATE_PREISM_CAC 1 /* CAC in progress */
2306 #define WL_DFS_CACSTATE_ISM 2 /* ISM in progress */
2307 #define WL_DFS_CACSTATE_CSA 3 /* csa */
2308 #define WL_DFS_CACSTATE_POSTISM_CAC 4 /* ISM CAC */
2309 #define WL_DFS_CACSTATE_PREISM_OOC 5 /* PREISM OOC */
2310 #define WL_DFS_CACSTATE_POSTISM_OOC 6 /* POSTISM OOC */
2311 #define WL_DFS_CACSTATES 7 /* this many states exist */
2313 /* data structure used in 'dfs_status' wl interface, which is used to query dfs status */
2315 uint state
; /* noted by WL_DFS_CACSTATE_XX. */
2316 uint duration
; /* time spent in ms in state. */
2317 /* as dfs enters ISM state, it removes the operational channel from quiet channel
2318 * list and notes the channel in channel_cleared. set to 0 if no channel is cleared
2320 chanspec_t chanspec_cleared
;
2321 /* chanspec cleared used to be a uint, add another to uint16 to maintain size */
2325 /* data structure used in 'radar_status' wl interface, which is use to query radar det status */
2333 int lp_csect_single
;
2334 int detected_pulse_index
;
2335 int nconsecq_pulses
;
2340 } wl_radar_status_t
;
2343 #define NUM_PWRCTRL_RATES 12
2346 uint8 txpwr_band_max
[NUM_PWRCTRL_RATES
]; /* User set target */
2347 uint8 txpwr_limit
[NUM_PWRCTRL_RATES
]; /* reg and local power limit */
2348 uint8 txpwr_local_max
; /* local max according to the AP */
2349 uint8 txpwr_local_constraint
; /* local constraint according to the AP */
2350 uint8 txpwr_chan_reg_max
; /* Regulatory max for this channel */
2351 uint8 txpwr_target
[2][NUM_PWRCTRL_RATES
]; /* Latest target for 2.4 and 5 Ghz */
2352 uint8 txpwr_est_Pout
[2]; /* Latest estimate for 2.4 and 5 Ghz */
2353 uint8 txpwr_opo
[NUM_PWRCTRL_RATES
]; /* On G phy, OFDM power offset */
2354 uint8 txpwr_bphy_cck_max
[NUM_PWRCTRL_RATES
]; /* Max CCK power for this band (SROM) */
2355 uint8 txpwr_bphy_ofdm_max
; /* Max OFDM power for this band (SROM) */
2356 uint8 txpwr_aphy_max
[NUM_PWRCTRL_RATES
]; /* Max power for A band (SROM) */
2357 int8 txpwr_antgain
[2]; /* Ant gain for each band - from SROM */
2358 uint8 txpwr_est_Pout_gofdm
; /* Pwr estimate for 2.4 OFDM */
2359 } tx_power_legacy_t
;
2361 #define WL_TX_POWER_RATES_LEGACY 45
2362 #define WL_TX_POWER_MCS20_FIRST 12
2363 #define WL_TX_POWER_MCS20_NUM 16
2364 #define WL_TX_POWER_MCS40_FIRST 28
2365 #define WL_TX_POWER_MCS40_NUM 17
2369 chanspec_t chanspec
; /* txpwr report for this channel */
2370 chanspec_t local_chanspec
; /* channel on which we are associated */
2371 uint8 local_max
; /* local max according to the AP */
2372 uint8 local_constraint
; /* local constraint according to the AP */
2373 int8 antgain
[2]; /* Ant gain for each band - from SROM */
2374 uint8 rf_cores
; /* count of RF Cores being reported */
2375 uint8 est_Pout
[4]; /* Latest tx power out estimate per RF
2376 * chain without adjustment
2378 uint8 est_Pout_cck
; /* Latest CCK tx power out estimate */
2379 uint8 user_limit
[WL_TX_POWER_RATES_LEGACY
]; /* User limit */
2380 uint8 reg_limit
[WL_TX_POWER_RATES_LEGACY
]; /* Regulatory power limit */
2381 uint8 board_limit
[WL_TX_POWER_RATES_LEGACY
]; /* Max power board can support (SROM) */
2382 uint8 target
[WL_TX_POWER_RATES_LEGACY
]; /* Latest target power */
2383 } tx_power_legacy2_t
;
2385 /* TX Power index defines */
2386 #define WL_NUM_RATES_CCK 4 /* 1, 2, 5.5, 11 Mbps */
2387 #define WL_NUM_RATES_OFDM 8 /* 6, 9, 12, 18, 24, 36, 48, 54 Mbps SISO/CDD */
2388 #define WL_NUM_RATES_MCS_1STREAM 8 /* MCS 0-7 1-stream rates - SISO/CDD/STBC/MCS */
2389 #define WL_NUM_RATES_EXTRA_VHT 2 /* Additional VHT 11AC rates */
2390 #define WL_NUM_RATES_VHT 10
2391 #define WL_NUM_RATES_MCS32 1
2393 #define WLC_NUM_RATES_CCK WL_NUM_RATES_CCK
2394 #define WLC_NUM_RATES_OFDM WL_NUM_RATES_OFDM
2395 #define WLC_NUM_RATES_MCS_1_STREAM WL_NUM_RATES_MCS_1STREAM
2396 #define WLC_NUM_RATES_MCS_2_STREAM WL_NUM_RATES_MCS_1STREAM
2397 #define WLC_NUM_RATES_MCS32 WL_NUM_RATES_MCS32
2398 #define WL_TX_POWER_CCK_NUM WL_NUM_RATES_CCK
2399 #define WL_TX_POWER_OFDM_NUM WL_NUM_RATES_OFDM
2400 #define WL_TX_POWER_MCS_1_STREAM_NUM WL_NUM_RATES_MCS_1STREAM
2401 #define WL_TX_POWER_MCS_2_STREAM_NUM WL_NUM_RATES_MCS_1STREAM
2402 #define WL_TX_POWER_MCS_32_NUM WL_NUM_RATES_MCS32
2404 #define WL_NUM_2x2_ELEMENTS 4
2405 #define WL_NUM_3x3_ELEMENTS 6
2408 uint16 ver
; /* version of this struct */
2409 uint16 len
; /* length in bytes of this structure */
2411 chanspec_t chanspec
; /* txpwr report for this channel */
2412 chanspec_t local_chanspec
; /* channel on which we are associated */
2413 uint32 buflen
; /* ppr buffer length */
2414 uint8 pprbuf
[1]; /* Latest target power buffer */
2417 #define WL_TXPPR_VERSION 1
2418 #define WL_TXPPR_LENGTH (sizeof(wl_txppr_t))
2419 #define TX_POWER_T_VERSION 44
2421 typedef struct chanspec_txpwr_max
{
2422 chanspec_t chanspec
; /* chanspec */
2423 uint8 txpwr_max
; /* max txpwr in all the rates */
2425 } chanspec_txpwr_max_t
;
2427 typedef struct wl_chanspec_txpwr_max
{
2428 uint16 ver
; /* version of this struct */
2429 uint16 len
; /* length in bytes of this structure */
2430 uint32 count
; /* number of elements of (chanspec, txpwr_max) pair */
2431 chanspec_txpwr_max_t txpwr
[1]; /* array of (chanspec, max_txpwr) pair */
2432 } wl_chanspec_txpwr_max_t
;
2434 #define WL_CHANSPEC_TXPWR_MAX_VER 1
2435 #define WL_CHANSPEC_TXPWR_MAX_LEN (sizeof(wl_chanspec_txpwr_max_t))
2437 /* Defines used with channel_bandwidth for curpower */
2438 #define WL_BW_20MHZ 0
2439 #define WL_BW_40MHZ 1
2440 #define WL_BW_80MHZ 2
2441 #define WL_BW_160MHZ 3
2443 /* tx_power_t.flags bits */
2444 #define WL_TX_POWER_F_ENABLED 1
2445 #define WL_TX_POWER_F_HW 2
2446 #define WL_TX_POWER_F_MIMO 4
2447 #define WL_TX_POWER_F_SISO 8
2448 #define WL_TX_POWER_F_HT 0x10
2449 #define WL_TX_POWER_F_VHT 0x20
2450 #define WL_TX_POWER_F_OPENLOOP 0x40
2452 typedef struct tx_inst_power
{
2453 uint8 txpwr_est_Pout
[2]; /* Latest estimate for 2.4 and 5 Ghz */
2454 uint8 txpwr_est_Pout_gofdm
; /* Pwr estimate for 2.4 OFDM */
2457 #define WL_NUM_TXCHAIN_MAX 4
2458 typedef struct wl_txchain_pwr_offsets
{
2459 int8 offset
[WL_NUM_TXCHAIN_MAX
]; /* quarter dBm signed offset for each chain */
2460 } wl_txchain_pwr_offsets_t
;
2462 /* 802.11h measurement types */
2463 #define WLC_MEASURE_TPC 1
2464 #define WLC_MEASURE_CHANNEL_BASIC 2
2465 #define WLC_MEASURE_CHANNEL_CCA 3
2466 #define WLC_MEASURE_CHANNEL_RPI 4
2468 /* regulatory enforcement levels */
2469 #define SPECT_MNGMT_OFF 0 /* both 11h and 11d disabled */
2470 #define SPECT_MNGMT_LOOSE_11H 1 /* allow non-11h APs in scan lists */
2471 #define SPECT_MNGMT_STRICT_11H 2 /* prune out non-11h APs from scan list */
2472 #define SPECT_MNGMT_STRICT_11D 3 /* switch to 802.11D mode */
2473 /* SPECT_MNGMT_LOOSE_11H_D - same as SPECT_MNGMT_LOOSE with the exception that Country IE
2474 * adoption is done regardless of capability spectrum_management
2476 #define SPECT_MNGMT_LOOSE_11H_D 4 /* operation defined above */
2478 #define WL_CHAN_VALID_HW (1 << 0) /* valid with current HW */
2479 #define WL_CHAN_VALID_SW (1 << 1) /* valid with current country setting */
2480 #define WL_CHAN_BAND_5G (1 << 2) /* 5GHz-band channel */
2481 #define WL_CHAN_RADAR (1 << 3) /* radar sensitive channel */
2482 #define WL_CHAN_INACTIVE (1 << 4) /* temporarily inactive due to radar */
2483 #define WL_CHAN_PASSIVE (1 << 5) /* channel is in passive mode */
2484 #define WL_CHAN_RESTRICTED (1 << 6) /* restricted use channel */
2486 /* BTC mode used by "btc_mode" iovar */
2487 #define WL_BTC_DISABLE 0 /* disable BT coexistence */
2488 #define WL_BTC_FULLTDM 1 /* full TDM COEX */
2489 #define WL_BTC_ENABLE 1 /* full TDM COEX to maintain backward compatiblity */
2490 #define WL_BTC_PREMPT 2 /* full TDM COEX with preemption */
2491 #define WL_BTC_LITE 3 /* light weight coex for large isolation platform */
2492 #define WL_BTC_PARALLEL 4 /* BT and WLAN run in parallel with separate antenna */
2493 #define WL_BTC_HYBRID 5 /* hybrid coex, only ack is allowed to transmit in BT slot */
2494 #define WL_BTC_DEFAULT 8 /* set the default mode for the device */
2495 #define WL_INF_BTC_DISABLE 0
2496 #define WL_INF_BTC_ENABLE 1
2497 #define WL_INF_BTC_AUTO 3
2499 /* BTC wire used by "btc_wire" iovar */
2500 #define WL_BTC_DEFWIRE 0 /* use default wire setting */
2501 #define WL_BTC_2WIRE 2 /* use 2-wire BTC */
2502 #define WL_BTC_3WIRE 3 /* use 3-wire BTC */
2503 #define WL_BTC_4WIRE 4 /* use 4-wire BTC */
2505 /* BTC flags: BTC configuration that can be set by host */
2506 #define WL_BTC_FLAG_PREMPT (1 << 0)
2507 #define WL_BTC_FLAG_BT_DEF (1 << 1)
2508 #define WL_BTC_FLAG_ACTIVE_PROT (1 << 2)
2509 #define WL_BTC_FLAG_SIM_RSP (1 << 3)
2510 #define WL_BTC_FLAG_PS_PROTECT (1 << 4)
2511 #define WL_BTC_FLAG_SIM_TX_LP (1 << 5)
2512 #define WL_BTC_FLAG_ECI (1 << 6)
2513 #define WL_BTC_FLAG_LIGHT (1 << 7)
2514 #define WL_BTC_FLAG_PARALLEL (1 << 8)
2516 /* Message levels */
2517 #define WL_ERROR_VAL 0x00000001
2518 #define WL_TRACE_VAL 0x00000002
2519 #define WL_PRHDRS_VAL 0x00000004
2520 #define WL_PRPKT_VAL 0x00000008
2521 #define WL_INFORM_VAL 0x00000010
2522 #define WL_TMP_VAL 0x00000020
2523 #define WL_OID_VAL 0x00000040
2524 #define WL_RATE_VAL 0x00000080
2525 #define WL_ASSOC_VAL 0x00000100
2526 #define WL_PRUSR_VAL 0x00000200
2527 #define WL_PS_VAL 0x00000400
2528 #define WL_TXPWR_VAL 0x00000800 /* retired in TOT on 6/10/2009 */
2529 #define WL_PORT_VAL 0x00001000
2530 #define WL_DUAL_VAL 0x00002000
2531 #define WL_WSEC_VAL 0x00004000
2532 #define WL_WSEC_DUMP_VAL 0x00008000
2533 #define WL_LOG_VAL 0x00010000
2534 #define WL_NRSSI_VAL 0x00020000 /* retired in TOT on 6/10/2009 */
2535 #define WL_LOFT_VAL 0x00040000 /* retired in TOT on 6/10/2009 */
2536 #define WL_REGULATORY_VAL 0x00080000
2537 #define WL_TAF_VAL 0x00100000
2538 #define WL_RADAR_VAL 0x00200000 /* retired in TOT on 6/10/2009 */
2539 #define WL_MPC_VAL 0x00400000
2540 #define WL_APSTA_VAL 0x00800000
2541 #define WL_DFS_VAL 0x01000000
2542 #define WL_BA_VAL 0x02000000 /* retired in TOT on 6/14/2010 */
2543 #define WL_ACI_VAL 0x04000000
2544 #define WL_MBSS_VAL 0x04000000
2545 #define WL_CAC_VAL 0x08000000
2546 #define WL_AMSDU_VAL 0x10000000
2547 #define WL_AMPDU_VAL 0x20000000
2548 #define WL_FFPLD_VAL 0x40000000
2550 /* wl_msg_level is full. For new bits take the next one and AND with
2551 * wl_msg_level2 in wl_dbg.h
2553 #define WL_DPT_VAL 0x00000001
2554 #define WL_SCAN_VAL 0x00000002
2555 #define WL_WOWL_VAL 0x00000004
2556 #define WL_COEX_VAL 0x00000008
2557 #define WL_RTDC_VAL 0x00000010
2558 #define WL_PROTO_VAL 0x00000020
2559 #define WL_BTA_VAL 0x00000040
2560 #define WL_CHANINT_VAL 0x00000080
2561 #define WL_WMF_VAL 0x00000100
2562 #define WL_P2P_VAL 0x00000200
2563 #define WL_ITFR_VAL 0x00000400
2564 #define WL_MCHAN_VAL 0x00000800
2565 #define WL_TDLS_VAL 0x00001000
2566 #define WL_MCNX_VAL 0x00002000
2567 #define WL_PROT_VAL 0x00004000
2568 #define WL_PSTA_VAL 0x00008000
2569 #define WL_TSO_VAL 0x00010000
2570 #define WL_TRF_MGMT_VAL 0x00020000
2571 #define WL_LPC_VAL 0x00040000
2572 #define WL_L2FILTER_VAL 0x00080000
2573 #define WL_TXBF_VAL 0x00100000
2574 #define WL_P2PO_VAL 0x00200000
2575 /* Space reserved for conflicting message levels from trunk */
2576 #define WL_WNM_VAL 0x04000000
2577 #define WL_AWDL_VAL 0x08000000
2578 #define WL_PWRSEL_VAL 0x10000000
2579 #define WL_NET_DETECT_VAL 0x20000000
2580 #define WL_PCIE_VAL 0x40000000
2582 /* use top-bit for WL_TIME_STAMP_VAL because this is a modifier
2583 * rather than a message-type of its own
2585 #define WL_TIMESTAMP_VAL 0x80000000
2587 /* max # of leds supported by GPIO (gpio pin# == led index#) */
2588 #define WL_LED_NUMGPIO 32 /* gpio 0-31 */
2590 /* led per-pin behaviors */
2591 #define WL_LED_OFF 0 /* always off */
2592 #define WL_LED_ON 1 /* always on */
2593 #define WL_LED_ACTIVITY 2 /* activity */
2594 #define WL_LED_RADIO 3 /* radio enabled */
2595 #define WL_LED_ARADIO 4 /* 5 Ghz radio enabled */
2596 #define WL_LED_BRADIO 5 /* 2.4Ghz radio enabled */
2597 #define WL_LED_BGMODE 6 /* on if gmode, off if bmode */
2598 #define WL_LED_WI1 7
2599 #define WL_LED_WI2 8
2600 #define WL_LED_WI3 9
2601 #define WL_LED_ASSOC 10 /* associated state indicator */
2602 #define WL_LED_INACTIVE 11 /* null behavior (clears default behavior) */
2603 #define WL_LED_ASSOCACT 12 /* on when associated; blink fast for activity */
2604 #define WL_LED_WI4 13
2605 #define WL_LED_WI5 14
2606 #define WL_LED_BLINKSLOW 15 /* blink slow */
2607 #define WL_LED_BLINKMED 16 /* blink med */
2608 #define WL_LED_BLINKFAST 17 /* blink fast */
2609 #define WL_LED_BLINKCUSTOM 18 /* blink custom */
2610 #define WL_LED_BLINKPERIODIC 19 /* blink periodic (custom 1000ms / off 400ms) */
2611 #define WL_LED_ASSOC_WITH_SEC 20 /* when connected with security */
2612 /* keep on for 300 sec */
2613 #define WL_LED_START_OFF 21 /* off upon boot, could be turned on later */
2614 #define WL_LED_WI6 22
2615 #define WL_LED_WI7 23
2616 #define WL_LED_WI8 24
2617 #define WL_LED_NUMBEHAVIOR 25
2619 /* led behavior numeric value format */
2620 #define WL_LED_BEH_MASK 0x7f /* behavior mask */
2621 #define WL_LED_AL_MASK 0x80 /* activelow (polarity) bit */
2623 /* maximum channels returned by the get valid channels iovar */
2624 #define WL_NUMCHANNELS 64
2626 /* max number of chanspecs (used by the iovar to calc. buf space) */
2627 #define WL_NUMCHANSPECS 110
2629 /* WDS link local endpoint WPA role */
2630 #define WL_WDS_WPA_ROLE_AUTH 0 /* authenticator */
2631 #define WL_WDS_WPA_ROLE_SUP 1 /* supplicant */
2632 #define WL_WDS_WPA_ROLE_AUTO 255 /* auto, based on mac addr value */
2634 /* number of bytes needed to define a 128-bit mask for MAC event reporting */
2635 #define WL_EVENTING_MASK_LEN ((WLC_E_LAST + 7) / 8)
2638 * Join preference iovar value is an array of tuples. Each tuple has a one-byte type,
2639 * a one-byte length, and a variable length value. RSSI type tuple must be present
2642 * Types are defined in "join preference types" section.
2644 * Length is the value size in octets. It is reserved for WL_JOIN_PREF_WPA type tuple
2645 * and must be set to zero.
2647 * Values are defined below.
2649 * 1. RSSI - 2 octets
2650 * offset 0: reserved
2651 * offset 1: reserved
2653 * 2. WPA - 2 + 12 * n octets (n is # tuples defined below)
2654 * offset 0: reserved
2655 * offset 1: # of tuples
2657 * offset 14: tuple 2
2659 * offset 2 + 12 * (n - 1) octets: tuple n
2661 * struct wpa_cfg_tuple {
2662 * uint8 akm[DOT11_OUI_LEN+1]; akm suite
2663 * uint8 ucipher[DOT11_OUI_LEN+1]; unicast cipher suite
2664 * uint8 mcipher[DOT11_OUI_LEN+1]; multicast cipher suite
2667 * multicast cipher suite can be specified as a specific cipher suite or WL_WPA_ACP_MCS_ANY.
2669 * 3. BAND - 2 octets
2670 * offset 0: reserved
2671 * offset 1: see "band preference" and "band types"
2673 * 4. BAND RSSI - 2 octets
2674 * offset 0: band types
2675 * offset 1: +ve RSSI boost balue in dB
2678 /* join preference types */
2679 #define WL_JOIN_PREF_RSSI 1 /* by RSSI */
2680 #define WL_JOIN_PREF_WPA 2 /* by akm and ciphers */
2681 #define WL_JOIN_PREF_BAND 3 /* by 802.11 band */
2682 #define WL_JOIN_PREF_RSSI_DELTA 4 /* by 802.11 band only if RSSI delta condition matches */
2683 #define WL_JOIN_PREF_TRANS_PREF 5 /* defined by requesting AP */
2685 /* band preference */
2686 #define WLJP_BAND_ASSOC_PREF 255 /* use what WLC_SET_ASSOC_PREFER ioctl specifies */
2688 /* any multicast cipher suite */
2689 #define WL_WPA_ACP_MCS_ANY "\x00\x00\x00\x00"
2694 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
2696 #define NFIFO 6 /* # tx/rx fifopairs */
2698 #define WL_CNT_T_VERSION 9 /* current version of wl_cnt_t struct */
2701 uint16 version
; /* see definition of WL_CNT_T_VERSION */
2702 uint16 length
; /* length of entire structure */
2704 /* transmit stat counters */
2705 uint32 txframe
; /* tx data frames */
2706 uint32 txbyte
; /* tx data bytes */
2707 uint32 txretrans
; /* tx mac retransmits */
2708 uint32 txerror
; /* tx data errors (derived: sum of others) */
2709 uint32 txctl
; /* tx management frames */
2710 uint32 txprshort
; /* tx short preamble frames */
2711 uint32 txserr
; /* tx status errors */
2712 uint32 txnobuf
; /* tx out of buffers errors */
2713 uint32 txnoassoc
; /* tx discard because we're not associated */
2714 uint32 txrunt
; /* tx runt frames */
2715 uint32 txchit
; /* tx header cache hit (fastpath) */
2716 uint32 txcmiss
; /* tx header cache miss (slowpath) */
2718 /* transmit chip error counters */
2719 uint32 txuflo
; /* tx fifo underflows */
2720 uint32 txphyerr
; /* tx phy errors (indicated in tx status) */
2723 /* receive stat counters */
2724 uint32 rxframe
; /* rx data frames */
2725 uint32 rxbyte
; /* rx data bytes */
2726 uint32 rxerror
; /* rx data errors (derived: sum of others) */
2727 uint32 rxctl
; /* rx management frames */
2728 uint32 rxnobuf
; /* rx out of buffers errors */
2729 uint32 rxnondata
; /* rx non data frames in the data channel errors */
2730 uint32 rxbadds
; /* rx bad DS errors */
2731 uint32 rxbadcm
; /* rx bad control or management frames */
2732 uint32 rxfragerr
; /* rx fragmentation errors */
2733 uint32 rxrunt
; /* rx runt frames */
2734 uint32 rxgiant
; /* rx giant frames */
2735 uint32 rxnoscb
; /* rx no scb error */
2736 uint32 rxbadproto
; /* rx invalid frames */
2737 uint32 rxbadsrcmac
; /* rx frames with Invalid Src Mac */
2738 uint32 rxbadda
; /* rx frames tossed for invalid da */
2739 uint32 rxfilter
; /* rx frames filtered out */
2741 /* receive chip error counters */
2742 uint32 rxoflo
; /* rx fifo overflow errors */
2743 uint32 rxuflo
[NFIFO
]; /* rx dma descriptor underflow errors */
2745 uint32 d11cnt_txrts_off
; /* d11cnt txrts value when reset d11cnt */
2746 uint32 d11cnt_rxcrc_off
; /* d11cnt rxcrc value when reset d11cnt */
2747 uint32 d11cnt_txnocts_off
; /* d11cnt txnocts value when reset d11cnt */
2750 uint32 dmade
; /* tx/rx dma descriptor errors */
2751 uint32 dmada
; /* tx/rx dma data errors */
2752 uint32 dmape
; /* tx/rx dma descriptor protocol errors */
2753 uint32 reset
; /* reset count */
2754 uint32 tbtt
; /* cnts the TBTT int's */
2756 uint32 pkt_callback_reg_fail
; /* callbacks register failure */
2758 /* MAC counters: 32-bit version of d11.h's macstat_t */
2759 uint32 txallfrm
; /* total number of frames sent, incl. Data, ACK, RTS, CTS,
2760 * Control Management (includes retransmissions)
2762 uint32 txrtsfrm
; /* number of RTS sent out by the MAC */
2763 uint32 txctsfrm
; /* number of CTS sent out by the MAC */
2764 uint32 txackfrm
; /* number of ACK frames sent out */
2765 uint32 txdnlfrm
; /* Not used */
2766 uint32 txbcnfrm
; /* beacons transmitted */
2767 uint32 txfunfl
[6]; /* per-fifo tx underflows */
2768 uint32 rxtoolate
; /* receive too late */
2769 uint32 txfbw
; /* transmit at fallback bw (dynamic bw) */
2770 uint32 txtplunfl
; /* Template underflows (mac was too slow to transmit ACK/CTS
2773 uint32 txphyerror
; /* Transmit phy error, type of error is reported in tx-status for
2774 * driver enqueued frames
2776 uint32 rxfrmtoolong
; /* Received frame longer than legal limit (2346 bytes) */
2777 uint32 rxfrmtooshrt
; /* Received frame did not contain enough bytes for its frame type */
2778 uint32 rxinvmachdr
; /* Either the protocol version != 0 or frame type not
2779 * data/control/management
2781 uint32 rxbadfcs
; /* number of frames for which the CRC check failed in the MAC */
2782 uint32 rxbadplcp
; /* parity check of the PLCP header failed */
2783 uint32 rxcrsglitch
; /* PHY was able to correlate the preamble but not the header */
2784 uint32 rxstrt
; /* Number of received frames with a good PLCP
2785 * (i.e. passing parity check)
2787 uint32 rxdfrmucastmbss
; /* Number of received DATA frames with good FCS and matching RA */
2788 uint32 rxmfrmucastmbss
; /* number of received mgmt frames with good FCS and matching RA */
2789 uint32 rxcfrmucast
; /* number of received CNTRL frames with good FCS and matching RA */
2790 uint32 rxrtsucast
; /* number of unicast RTS addressed to the MAC (good FCS) */
2791 uint32 rxctsucast
; /* number of unicast CTS addressed to the MAC (good FCS) */
2792 uint32 rxackucast
; /* number of ucast ACKS received (good FCS) */
2793 uint32 rxdfrmocast
; /* number of received DATA frames (good FCS and not matching RA) */
2794 uint32 rxmfrmocast
; /* number of received MGMT frames (good FCS and not matching RA) */
2795 uint32 rxcfrmocast
; /* number of received CNTRL frame (good FCS and not matching RA) */
2796 uint32 rxrtsocast
; /* number of received RTS not addressed to the MAC */
2797 uint32 rxctsocast
; /* number of received CTS not addressed to the MAC */
2798 uint32 rxdfrmmcast
; /* number of RX Data multicast frames received by the MAC */
2799 uint32 rxmfrmmcast
; /* number of RX Management multicast frames received by the MAC */
2800 uint32 rxcfrmmcast
; /* number of RX Control multicast frames received by the MAC
2801 * (unlikely to see these)
2803 uint32 rxbeaconmbss
; /* beacons received from member of BSS */
2804 uint32 rxdfrmucastobss
; /* number of unicast frames addressed to the MAC from
2805 * other BSS (WDS FRAME)
2807 uint32 rxbeaconobss
; /* beacons received from other BSS */
2808 uint32 rxrsptmout
; /* Number of response timeouts for transmitted frames
2809 * expecting a response
2811 uint32 bcntxcancl
; /* transmit beacons canceled due to receipt of beacon (IBSS) */
2812 uint32 rxf0ovfl
; /* Number of receive fifo 0 overflows */
2813 uint32 rxf1ovfl
; /* Number of receive fifo 1 overflows (obsolete) */
2814 uint32 rxf2ovfl
; /* Number of receive fifo 2 overflows (obsolete) */
2815 uint32 txsfovfl
; /* Number of transmit status fifo overflows (obsolete) */
2816 uint32 pmqovfl
; /* Number of PMQ overflows */
2817 uint32 rxcgprqfrm
; /* Number of received Probe requests that made it into
2820 uint32 rxcgprsqovfl
; /* Rx Probe Request Que overflow in the AP */
2821 uint32 txcgprsfail
; /* Tx Probe Response Fail. AP sent probe response but did
2824 uint32 txcgprssuc
; /* Tx Probe Response Success (ACK was received) */
2825 uint32 prs_timeout
; /* Number of probe requests that were dropped from the PRQ
2826 * fifo because a probe response could not be sent out within
2827 * the time limit defined in M_PRS_MAXTIME
2829 uint32 rxnack
; /* obsolete */
2830 uint32 frmscons
; /* obsolete */
2831 uint32 txnack
; /* obsolete */
2832 uint32 rxback
; /* blockack rxcnt */
2833 uint32 txback
; /* blockack txcnt */
2835 /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
2836 uint32 txfrag
; /* dot11TransmittedFragmentCount */
2837 uint32 txmulti
; /* dot11MulticastTransmittedFrameCount */
2838 uint32 txfail
; /* dot11FailedCount */
2839 uint32 txretry
; /* dot11RetryCount */
2840 uint32 txretrie
; /* dot11MultipleRetryCount */
2841 uint32 rxdup
; /* dot11FrameduplicateCount */
2842 uint32 txrts
; /* dot11RTSSuccessCount */
2843 uint32 txnocts
; /* dot11RTSFailureCount */
2844 uint32 txnoack
; /* dot11ACKFailureCount */
2845 uint32 rxfrag
; /* dot11ReceivedFragmentCount */
2846 uint32 rxmulti
; /* dot11MulticastReceivedFrameCount */
2847 uint32 rxcrc
; /* dot11FCSErrorCount */
2848 uint32 txfrmsnt
; /* dot11TransmittedFrameCount (bogus MIB?) */
2849 uint32 rxundec
; /* dot11WEPUndecryptableCount */
2851 /* WPA2 counters (see rxundec for DecryptFailureCount) */
2852 uint32 tkipmicfaill
; /* TKIPLocalMICFailures */
2853 uint32 tkipcntrmsr
; /* TKIPCounterMeasuresInvoked */
2854 uint32 tkipreplay
; /* TKIPReplays */
2855 uint32 ccmpfmterr
; /* CCMPFormatErrors */
2856 uint32 ccmpreplay
; /* CCMPReplays */
2857 uint32 ccmpundec
; /* CCMPDecryptErrors */
2858 uint32 fourwayfail
; /* FourWayHandshakeFailures */
2859 uint32 wepundec
; /* dot11WEPUndecryptableCount */
2860 uint32 wepicverr
; /* dot11WEPICVErrorCount */
2861 uint32 decsuccess
; /* DecryptSuccessCount */
2862 uint32 tkipicverr
; /* TKIPICVErrorCount */
2863 uint32 wepexcluded
; /* dot11WEPExcludedCount */
2865 uint32 txchanrej
; /* Tx frames suppressed due to channel rejection */
2866 uint32 psmwds
; /* Count PSM watchdogs */
2867 uint32 phywatchdog
; /* Count Phy watchdogs (triggered by ucode) */
2869 /* MBSS counters, AP only */
2870 uint32 prq_entries_handled
; /* PRQ entries read in */
2871 uint32 prq_undirected_entries
; /* which were bcast bss & ssid */
2872 uint32 prq_bad_entries
; /* which could not be translated to info */
2873 uint32 atim_suppress_count
; /* TX suppressions on ATIM fifo */
2874 uint32 bcn_template_not_ready
; /* Template marked in use on send bcn ... */
2875 uint32 bcn_template_not_ready_done
; /* ...but "DMA done" interrupt rcvd */
2876 uint32 late_tbtt_dpc
; /* TBTT DPC did not happen in time */
2878 /* per-rate receive stat counters */
2879 uint32 rx1mbps
; /* packets rx at 1Mbps */
2880 uint32 rx2mbps
; /* packets rx at 2Mbps */
2881 uint32 rx5mbps5
; /* packets rx at 5.5Mbps */
2882 uint32 rx6mbps
; /* packets rx at 6Mbps */
2883 uint32 rx9mbps
; /* packets rx at 9Mbps */
2884 uint32 rx11mbps
; /* packets rx at 11Mbps */
2885 uint32 rx12mbps
; /* packets rx at 12Mbps */
2886 uint32 rx18mbps
; /* packets rx at 18Mbps */
2887 uint32 rx24mbps
; /* packets rx at 24Mbps */
2888 uint32 rx36mbps
; /* packets rx at 36Mbps */
2889 uint32 rx48mbps
; /* packets rx at 48Mbps */
2890 uint32 rx54mbps
; /* packets rx at 54Mbps */
2891 uint32 rx108mbps
; /* packets rx at 108mbps */
2892 uint32 rx162mbps
; /* packets rx at 162mbps */
2893 uint32 rx216mbps
; /* packets rx at 216 mbps */
2894 uint32 rx270mbps
; /* packets rx at 270 mbps */
2895 uint32 rx324mbps
; /* packets rx at 324 mbps */
2896 uint32 rx378mbps
; /* packets rx at 378 mbps */
2897 uint32 rx432mbps
; /* packets rx at 432 mbps */
2898 uint32 rx486mbps
; /* packets rx at 486 mbps */
2899 uint32 rx540mbps
; /* packets rx at 540 mbps */
2901 /* pkteng rx frame stats */
2902 uint32 pktengrxducast
; /* unicast frames rxed by the pkteng code */
2903 uint32 pktengrxdmcast
; /* multicast frames rxed by the pkteng code */
2905 uint32 rfdisable
; /* count of radio disables */
2906 uint32 bphy_rxcrsglitch
; /* PHY count of bphy glitches */
2907 uint32 bphy_badplcp
;
2909 uint32 txexptime
; /* Tx frames suppressed due to timer expiration */
2911 uint32 txmpdu_sgi
; /* count for sgi transmit */
2912 uint32 rxmpdu_sgi
; /* count for sgi received */
2913 uint32 txmpdu_stbc
; /* count for stbc transmit */
2914 uint32 rxmpdu_stbc
; /* count for stbc received */
2916 uint32 rxundec_mcst
; /* dot11WEPUndecryptableCount */
2918 /* WPA2 counters (see rxundec for DecryptFailureCount) */
2919 uint32 tkipmicfaill_mcst
; /* TKIPLocalMICFailures */
2920 uint32 tkipcntrmsr_mcst
; /* TKIPCounterMeasuresInvoked */
2921 uint32 tkipreplay_mcst
; /* TKIPReplays */
2922 uint32 ccmpfmterr_mcst
; /* CCMPFormatErrors */
2923 uint32 ccmpreplay_mcst
; /* CCMPReplays */
2924 uint32 ccmpundec_mcst
; /* CCMPDecryptErrors */
2925 uint32 fourwayfail_mcst
; /* FourWayHandshakeFailures */
2926 uint32 wepundec_mcst
; /* dot11WEPUndecryptableCount */
2927 uint32 wepicverr_mcst
; /* dot11WEPICVErrorCount */
2928 uint32 decsuccess_mcst
; /* DecryptSuccessCount */
2929 uint32 tkipicverr_mcst
; /* TKIPICVErrorCount */
2930 uint32 wepexcluded_mcst
; /* dot11WEPExcludedCount */
2932 uint32 dma_hang
; /* count for dma hang */
2933 uint32 reinit
; /* count for reinit */
2935 uint32 pstatxucast
; /* count of ucast frames xmitted on all psta assoc */
2936 uint32 pstatxnoassoc
; /* count of txnoassoc frames xmitted on all psta assoc */
2937 uint32 pstarxucast
; /* count of ucast frames received on all psta assoc */
2938 uint32 pstarxbcmc
; /* count of bcmc frames received on all psta */
2939 uint32 pstatxbcmc
; /* count of bcmc frames transmitted on all psta */
2941 uint32 cso_passthrough
; /* hw cso required but passthrough */
2942 uint32 cso_normal
; /* hw cso hdr for normal process */
2943 uint32 chained
; /* number of frames chained */
2944 uint32 chainedsz1
; /* number of chain size 1 frames */
2945 uint32 unchained
; /* number of frames not chained */
2946 uint32 maxchainsz
; /* max chain size so far */
2947 uint32 currchainsz
; /* current chain size */
2948 uint32 rxdrop20s
; /* drop secondary cnt */
2949 uint32 pciereset
; /* Secondary Bus Reset issued by driver */
2950 uint32 cfgrestore
; /* configspace restore by driver */
2952 uint32 rxdma_frame
; /* count for rx dma */
2953 uint32 rxdma_inactivity
; /* cleared when rxdma handler is serviced or increased in watchdog */
2954 uint32 rxdma_stuck
; /* count for rx stuck */
2955 uint32 reset_countdown
;
2958 #ifndef LINUX_POSTMOGRIFY_REMOVAL
2960 uint16 version
; /* see definition of WL_CNT_T_VERSION */
2961 uint16 length
; /* length of entire structure */
2963 /* transmit stat counters */
2964 uint32 txframe
; /* tx data frames */
2965 uint32 txbyte
; /* tx data bytes */
2966 uint32 txretrans
; /* tx mac retransmits */
2967 uint32 txerror
; /* tx data errors (derived: sum of others) */
2968 uint32 txctl
; /* tx management frames */
2969 uint32 txprshort
; /* tx short preamble frames */
2970 uint32 txserr
; /* tx status errors */
2971 uint32 txnobuf
; /* tx out of buffers errors */
2972 uint32 txnoassoc
; /* tx discard because we're not associated */
2973 uint32 txrunt
; /* tx runt frames */
2974 uint32 txchit
; /* tx header cache hit (fastpath) */
2975 uint32 txcmiss
; /* tx header cache miss (slowpath) */
2977 /* transmit chip error counters */
2978 uint32 txuflo
; /* tx fifo underflows */
2979 uint32 txphyerr
; /* tx phy errors (indicated in tx status) */
2982 /* receive stat counters */
2983 uint32 rxframe
; /* rx data frames */
2984 uint32 rxbyte
; /* rx data bytes */
2985 uint32 rxerror
; /* rx data errors (derived: sum of others) */
2986 uint32 rxctl
; /* rx management frames */
2987 uint32 rxnobuf
; /* rx out of buffers errors */
2988 uint32 rxnondata
; /* rx non data frames in the data channel errors */
2989 uint32 rxbadds
; /* rx bad DS errors */
2990 uint32 rxbadcm
; /* rx bad control or management frames */
2991 uint32 rxfragerr
; /* rx fragmentation errors */
2992 uint32 rxrunt
; /* rx runt frames */
2993 uint32 rxgiant
; /* rx giant frames */
2994 uint32 rxnoscb
; /* rx no scb error */
2995 uint32 rxbadproto
; /* rx invalid frames */
2996 uint32 rxbadsrcmac
; /* rx frames with Invalid Src Mac */
2997 uint32 rxbadda
; /* rx frames tossed for invalid da */
2998 uint32 rxfilter
; /* rx frames filtered out */
3000 /* receive chip error counters */
3001 uint32 rxoflo
; /* rx fifo overflow errors */
3002 uint32 rxuflo
[NFIFO
]; /* rx dma descriptor underflow errors */
3004 uint32 d11cnt_txrts_off
; /* d11cnt txrts value when reset d11cnt */
3005 uint32 d11cnt_rxcrc_off
; /* d11cnt rxcrc value when reset d11cnt */
3006 uint32 d11cnt_txnocts_off
; /* d11cnt txnocts value when reset d11cnt */
3009 uint32 dmade
; /* tx/rx dma descriptor errors */
3010 uint32 dmada
; /* tx/rx dma data errors */
3011 uint32 dmape
; /* tx/rx dma descriptor protocol errors */
3012 uint32 reset
; /* reset count */
3013 uint32 tbtt
; /* cnts the TBTT int's */
3015 uint32 pkt_callback_reg_fail
; /* callbacks register failure */
3017 /* MAC counters: 32-bit version of d11.h's macstat_t */
3018 uint32 txallfrm
; /* total number of frames sent, incl. Data, ACK, RTS, CTS,
3019 * Control Management (includes retransmissions)
3021 uint32 txrtsfrm
; /* number of RTS sent out by the MAC */
3022 uint32 txctsfrm
; /* number of CTS sent out by the MAC */
3023 uint32 txackfrm
; /* number of ACK frames sent out */
3024 uint32 txdnlfrm
; /* Not used */
3025 uint32 txbcnfrm
; /* beacons transmitted */
3026 uint32 txfunfl
[6]; /* per-fifo tx underflows */
3027 uint32 rxtoolate
; /* receive too late */
3028 uint32 txfbw
; /* transmit at fallback bw (dynamic bw) */
3029 uint32 txtplunfl
; /* Template underflows (mac was too slow to transmit ACK/CTS
3032 uint32 txphyerror
; /* Transmit phy error, type of error is reported in tx-status for
3033 * driver enqueued frames
3035 uint32 rxfrmtoolong
; /* Received frame longer than legal limit (2346 bytes) */
3036 uint32 rxfrmtooshrt
; /* Received frame did not contain enough bytes for its frame type */
3037 uint32 rxinvmachdr
; /* Either the protocol version != 0 or frame type not
3038 * data/control/management
3040 uint32 rxbadfcs
; /* number of frames for which the CRC check failed in the MAC */
3041 uint32 rxbadplcp
; /* parity check of the PLCP header failed */
3042 uint32 rxcrsglitch
; /* PHY was able to correlate the preamble but not the header */
3043 uint32 rxstrt
; /* Number of received frames with a good PLCP
3044 * (i.e. passing parity check)
3046 uint32 rxdfrmucastmbss
; /* Number of received DATA frames with good FCS and matching RA */
3047 uint32 rxmfrmucastmbss
; /* number of received mgmt frames with good FCS and matching RA */
3048 uint32 rxcfrmucast
; /* number of received CNTRL frames with good FCS and matching RA */
3049 uint32 rxrtsucast
; /* number of unicast RTS addressed to the MAC (good FCS) */
3050 uint32 rxctsucast
; /* number of unicast CTS addressed to the MAC (good FCS) */
3051 uint32 rxackucast
; /* number of ucast ACKS received (good FCS) */
3052 uint32 rxdfrmocast
; /* number of received DATA frames (good FCS and not matching RA) */
3053 uint32 rxmfrmocast
; /* number of received MGMT frames (good FCS and not matching RA) */
3054 uint32 rxcfrmocast
; /* number of received CNTRL frame (good FCS and not matching RA) */
3055 uint32 rxrtsocast
; /* number of received RTS not addressed to the MAC */
3056 uint32 rxctsocast
; /* number of received CTS not addressed to the MAC */
3057 uint32 rxdfrmmcast
; /* number of RX Data multicast frames received by the MAC */
3058 uint32 rxmfrmmcast
; /* number of RX Management multicast frames received by the MAC */
3059 uint32 rxcfrmmcast
; /* number of RX Control multicast frames received by the MAC
3060 * (unlikely to see these)
3062 uint32 rxbeaconmbss
; /* beacons received from member of BSS */
3063 uint32 rxdfrmucastobss
; /* number of unicast frames addressed to the MAC from
3064 * other BSS (WDS FRAME)
3066 uint32 rxbeaconobss
; /* beacons received from other BSS */
3067 uint32 rxrsptmout
; /* Number of response timeouts for transmitted frames
3068 * expecting a response
3070 uint32 bcntxcancl
; /* transmit beacons canceled due to receipt of beacon (IBSS) */
3071 uint32 rxf0ovfl
; /* Number of receive fifo 0 overflows */
3072 uint32 rxf1ovfl
; /* Number of receive fifo 1 overflows (obsolete) */
3073 uint32 rxf2ovfl
; /* Number of receive fifo 2 overflows (obsolete) */
3074 uint32 txsfovfl
; /* Number of transmit status fifo overflows (obsolete) */
3075 uint32 pmqovfl
; /* Number of PMQ overflows */
3076 uint32 rxcgprqfrm
; /* Number of received Probe requests that made it into
3079 uint32 rxcgprsqovfl
; /* Rx Probe Request Que overflow in the AP */
3080 uint32 txcgprsfail
; /* Tx Probe Response Fail. AP sent probe response but did
3083 uint32 txcgprssuc
; /* Tx Probe Response Success (ACK was received) */
3084 uint32 prs_timeout
; /* Number of probe requests that were dropped from the PRQ
3085 * fifo because a probe response could not be sent out within
3086 * the time limit defined in M_PRS_MAXTIME
3090 uint32 txnack
; /* obsolete */
3091 uint32 rxback
; /* blockack rxcnt */
3092 uint32 txback
; /* blockack txcnt */
3094 /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
3095 uint32 txfrag
; /* dot11TransmittedFragmentCount */
3096 uint32 txmulti
; /* dot11MulticastTransmittedFrameCount */
3097 uint32 txfail
; /* dot11FailedCount */
3098 uint32 txretry
; /* dot11RetryCount */
3099 uint32 txretrie
; /* dot11MultipleRetryCount */
3100 uint32 rxdup
; /* dot11FrameduplicateCount */
3101 uint32 txrts
; /* dot11RTSSuccessCount */
3102 uint32 txnocts
; /* dot11RTSFailureCount */
3103 uint32 txnoack
; /* dot11ACKFailureCount */
3104 uint32 rxfrag
; /* dot11ReceivedFragmentCount */
3105 uint32 rxmulti
; /* dot11MulticastReceivedFrameCount */
3106 uint32 rxcrc
; /* dot11FCSErrorCount */
3107 uint32 txfrmsnt
; /* dot11TransmittedFrameCount (bogus MIB?) */
3108 uint32 rxundec
; /* dot11WEPUndecryptableCount */
3110 /* WPA2 counters (see rxundec for DecryptFailureCount) */
3111 uint32 tkipmicfaill
; /* TKIPLocalMICFailures */
3112 uint32 tkipcntrmsr
; /* TKIPCounterMeasuresInvoked */
3113 uint32 tkipreplay
; /* TKIPReplays */
3114 uint32 ccmpfmterr
; /* CCMPFormatErrors */
3115 uint32 ccmpreplay
; /* CCMPReplays */
3116 uint32 ccmpundec
; /* CCMPDecryptErrors */
3117 uint32 fourwayfail
; /* FourWayHandshakeFailures */
3118 uint32 wepundec
; /* dot11WEPUndecryptableCount */
3119 uint32 wepicverr
; /* dot11WEPICVErrorCount */
3120 uint32 decsuccess
; /* DecryptSuccessCount */
3121 uint32 tkipicverr
; /* TKIPICVErrorCount */
3122 uint32 wepexcluded
; /* dot11WEPExcludedCount */
3124 uint32 rxundec_mcst
; /* dot11WEPUndecryptableCount */
3126 /* WPA2 counters (see rxundec for DecryptFailureCount) */
3127 uint32 tkipmicfaill_mcst
; /* TKIPLocalMICFailures */
3128 uint32 tkipcntrmsr_mcst
; /* TKIPCounterMeasuresInvoked */
3129 uint32 tkipreplay_mcst
; /* TKIPReplays */
3130 uint32 ccmpfmterr_mcst
; /* CCMPFormatErrors */
3131 uint32 ccmpreplay_mcst
; /* CCMPReplays */
3132 uint32 ccmpundec_mcst
; /* CCMPDecryptErrors */
3133 uint32 fourwayfail_mcst
; /* FourWayHandshakeFailures */
3134 uint32 wepundec_mcst
; /* dot11WEPUndecryptableCount */
3135 uint32 wepicverr_mcst
; /* dot11WEPICVErrorCount */
3136 uint32 decsuccess_mcst
; /* DecryptSuccessCount */
3137 uint32 tkipicverr_mcst
; /* TKIPICVErrorCount */
3138 uint32 wepexcluded_mcst
; /* dot11WEPExcludedCount */
3140 uint32 txchanrej
; /* Tx frames suppressed due to channel rejection */
3141 uint32 txexptime
; /* Tx frames suppressed due to timer expiration */
3142 uint32 psmwds
; /* Count PSM watchdogs */
3143 uint32 phywatchdog
; /* Count Phy watchdogs (triggered by ucode) */
3145 /* MBSS counters, AP only */
3146 uint32 prq_entries_handled
; /* PRQ entries read in */
3147 uint32 prq_undirected_entries
; /* which were bcast bss & ssid */
3148 uint32 prq_bad_entries
; /* which could not be translated to info */
3149 uint32 atim_suppress_count
; /* TX suppressions on ATIM fifo */
3150 uint32 bcn_template_not_ready
; /* Template marked in use on send bcn ... */
3151 uint32 bcn_template_not_ready_done
; /* ...but "DMA done" interrupt rcvd */
3152 uint32 late_tbtt_dpc
; /* TBTT DPC did not happen in time */
3154 /* per-rate receive stat counters */
3155 uint32 rx1mbps
; /* packets rx at 1Mbps */
3156 uint32 rx2mbps
; /* packets rx at 2Mbps */
3157 uint32 rx5mbps5
; /* packets rx at 5.5Mbps */
3158 uint32 rx6mbps
; /* packets rx at 6Mbps */
3159 uint32 rx9mbps
; /* packets rx at 9Mbps */
3160 uint32 rx11mbps
; /* packets rx at 11Mbps */
3161 uint32 rx12mbps
; /* packets rx at 12Mbps */
3162 uint32 rx18mbps
; /* packets rx at 18Mbps */
3163 uint32 rx24mbps
; /* packets rx at 24Mbps */
3164 uint32 rx36mbps
; /* packets rx at 36Mbps */
3165 uint32 rx48mbps
; /* packets rx at 48Mbps */
3166 uint32 rx54mbps
; /* packets rx at 54Mbps */
3167 uint32 rx108mbps
; /* packets rx at 108mbps */
3168 uint32 rx162mbps
; /* packets rx at 162mbps */
3169 uint32 rx216mbps
; /* packets rx at 216 mbps */
3170 uint32 rx270mbps
; /* packets rx at 270 mbps */
3171 uint32 rx324mbps
; /* packets rx at 324 mbps */
3172 uint32 rx378mbps
; /* packets rx at 378 mbps */
3173 uint32 rx432mbps
; /* packets rx at 432 mbps */
3174 uint32 rx486mbps
; /* packets rx at 486 mbps */
3175 uint32 rx540mbps
; /* packets rx at 540 mbps */
3177 /* pkteng rx frame stats */
3178 uint32 pktengrxducast
; /* unicast frames rxed by the pkteng code */
3179 uint32 pktengrxdmcast
; /* multicast frames rxed by the pkteng code */
3181 uint32 rfdisable
; /* count of radio disables */
3182 uint32 bphy_rxcrsglitch
; /* PHY count of bphy glitches */
3183 uint32 bphy_badplcp
;
3185 uint32 txmpdu_sgi
; /* count for sgi transmit */
3186 uint32 rxmpdu_sgi
; /* count for sgi received */
3187 uint32 txmpdu_stbc
; /* count for stbc transmit */
3188 uint32 rxmpdu_stbc
; /* count for stbc received */
3190 uint32 rxdrop20s
; /* drop secondary cnt */
3194 #define WL_DELTA_STATS_T_VERSION 2 /* current version of wl_delta_stats_t struct */
3197 uint16 version
; /* see definition of WL_DELTA_STATS_T_VERSION */
3198 uint16 length
; /* length of entire structure */
3200 /* transmit stat counters */
3201 uint32 txframe
; /* tx data frames */
3202 uint32 txbyte
; /* tx data bytes */
3203 uint32 txretrans
; /* tx mac retransmits */
3204 uint32 txfail
; /* tx failures */
3206 /* receive stat counters */
3207 uint32 rxframe
; /* rx data frames */
3208 uint32 rxbyte
; /* rx data bytes */
3210 /* per-rate receive stat counters */
3211 uint32 rx1mbps
; /* packets rx at 1Mbps */
3212 uint32 rx2mbps
; /* packets rx at 2Mbps */
3213 uint32 rx5mbps5
; /* packets rx at 5.5Mbps */
3214 uint32 rx6mbps
; /* packets rx at 6Mbps */
3215 uint32 rx9mbps
; /* packets rx at 9Mbps */
3216 uint32 rx11mbps
; /* packets rx at 11Mbps */
3217 uint32 rx12mbps
; /* packets rx at 12Mbps */
3218 uint32 rx18mbps
; /* packets rx at 18Mbps */
3219 uint32 rx24mbps
; /* packets rx at 24Mbps */
3220 uint32 rx36mbps
; /* packets rx at 36Mbps */
3221 uint32 rx48mbps
; /* packets rx at 48Mbps */
3222 uint32 rx54mbps
; /* packets rx at 54Mbps */
3223 uint32 rx108mbps
; /* packets rx at 108mbps */
3224 uint32 rx162mbps
; /* packets rx at 162mbps */
3225 uint32 rx216mbps
; /* packets rx at 216 mbps */
3226 uint32 rx270mbps
; /* packets rx at 270 mbps */
3227 uint32 rx324mbps
; /* packets rx at 324 mbps */
3228 uint32 rx378mbps
; /* packets rx at 378 mbps */
3229 uint32 rx432mbps
; /* packets rx at 432 mbps */
3230 uint32 rx486mbps
; /* packets rx at 486 mbps */
3231 uint32 rx540mbps
; /* packets rx at 540 mbps */
3236 uint32 bphy_rxcrsglitch
;
3237 uint32 bphy_badplcp
;
3240 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
3242 #define WL_WME_CNT_VERSION 1 /* current version of wl_wme_cnt_t */
3247 } wl_traffic_stats_t
;
3250 uint16 version
; /* see definition of WL_WME_CNT_VERSION */
3251 uint16 length
; /* length of entire structure */
3253 wl_traffic_stats_t tx
[AC_COUNT
]; /* Packets transmitted */
3254 wl_traffic_stats_t tx_failed
[AC_COUNT
]; /* Packets dropped or failed to transmit */
3255 wl_traffic_stats_t rx
[AC_COUNT
]; /* Packets received */
3256 wl_traffic_stats_t rx_failed
[AC_COUNT
]; /* Packets failed to receive */
3258 wl_traffic_stats_t forward
[AC_COUNT
]; /* Packets forwarded by AP */
3260 wl_traffic_stats_t tx_expired
[AC_COUNT
]; /* packets dropped due to lifetime expiry */
3264 #ifndef LINUX_POSTMOGRIFY_REMOVAL
3265 struct wl_msglevel2
{
3270 typedef struct wl_mkeep_alive_pkt
{
3271 uint16 version
; /* Version for mkeep_alive */
3272 uint16 length
; /* length of fixed parameters in the structure */
3275 uint8 keep_alive_id
; /* 0 - 3 for N = 4 */
3277 } wl_mkeep_alive_pkt_t
;
3279 #define WL_MKEEP_ALIVE_VERSION 1
3280 #define WL_MKEEP_ALIVE_FIXED_LEN OFFSETOF(wl_mkeep_alive_pkt_t, data)
3281 #define WL_MKEEP_ALIVE_PRECISION 500
3283 /* TCP Keep-Alive conn struct */
3284 typedef struct wl_mtcpkeep_alive_conn_pkt
{
3285 struct ether_addr saddr
; /* src mac address */
3286 struct ether_addr daddr
; /* dst mac address */
3287 struct ipv4_addr sipaddr
; /* source IP addr */
3288 struct ipv4_addr dipaddr
; /* dest IP addr */
3289 uint16 sport
; /* src port */
3290 uint16 dport
; /* dest port */
3291 uint32 seq
; /* seq number */
3292 uint32 ack
; /* ACK number */
3293 uint16 tcpwin
; /* TCP window */
3294 } wl_mtcpkeep_alive_conn_pkt_t
;
3296 /* TCP Keep-Alive interval struct */
3297 typedef struct wl_mtcpkeep_alive_timers_pkt
{
3298 uint16 interval
; /* interval timer */
3299 uint16 retry_interval
; /* retry_interval timer */
3300 uint16 retry_count
; /* retry_count */
3301 } wl_mtcpkeep_alive_timers_pkt_t
;
3303 #ifndef ETHER_MAX_DATA
3304 #define ETHER_MAX_DATA 1500
3305 #endif /* ETHER_MAX_DATA */
3307 typedef struct wake_info
{
3309 uint32 wake_info_len
; /* size of packet */
3313 typedef struct wake_pkt
{
3314 uint32 wake_pkt_len
; /* size of packet */
3319 #define WL_MTCPKEEP_ALIVE_VERSION 1
3323 #define WLC_BA_CNT_VERSION 1 /* current version of wlc_ba_cnt_t */
3325 /* block ack related stats */
3326 typedef struct wlc_ba_cnt
{
3327 uint16 version
; /* WLC_BA_CNT_VERSION */
3328 uint16 length
; /* length of entire structure */
3330 /* transmit stat counters */
3331 uint32 txpdu
; /* pdus sent */
3332 uint32 txsdu
; /* sdus sent */
3333 uint32 txfc
; /* tx side flow controlled packets */
3334 uint32 txfci
; /* tx side flow control initiated */
3335 uint32 txretrans
; /* retransmitted pdus */
3336 uint32 txbatimer
; /* ba resend due to timer */
3337 uint32 txdrop
; /* dropped packets */
3338 uint32 txaddbareq
; /* addba req sent */
3339 uint32 txaddbaresp
; /* addba resp sent */
3340 uint32 txdelba
; /* delba sent */
3341 uint32 txba
; /* ba sent */
3342 uint32 txbar
; /* bar sent */
3343 uint32 txpad
[4]; /* future */
3345 /* receive side counters */
3346 uint32 rxpdu
; /* pdus recd */
3347 uint32 rxqed
; /* pdus buffered before sending up */
3348 uint32 rxdup
; /* duplicate pdus */
3349 uint32 rxnobuf
; /* pdus discarded due to no buf */
3350 uint32 rxaddbareq
; /* addba req recd */
3351 uint32 rxaddbaresp
; /* addba resp recd */
3352 uint32 rxdelba
; /* delba recd */
3353 uint32 rxba
; /* ba recd */
3354 uint32 rxbar
; /* bar recd */
3355 uint32 rxinvba
; /* invalid ba recd */
3356 uint32 rxbaholes
; /* ba recd with holes */
3357 uint32 rxunexp
; /* unexpected packets */
3358 uint32 rxpad
[4]; /* future */
3362 /* structure for per-tid ampdu control */
3363 struct ampdu_tid_control
{
3364 uint8 tid
; /* tid */
3365 uint8 enable
; /* enable/disable */
3368 /* structure for identifying ea/tid for sending addba/delba */
3369 struct ampdu_ea_tid
{
3370 struct ether_addr ea
; /* Station address */
3371 uint8 tid
; /* tid */
3373 /* structure for identifying retry/tid for retry_limit_tid/rr_retry_limit_tid */
3374 struct ampdu_retry_tid
{
3375 uint8 tid
; /* tid */
3376 uint8 retry
; /* retry value */
3379 /* Different discovery modes for dpt */
3380 #define DPT_DISCOVERY_MANUAL 0x01 /* manual discovery mode */
3381 #define DPT_DISCOVERY_AUTO 0x02 /* auto discovery mode */
3382 #define DPT_DISCOVERY_SCAN 0x04 /* scan-based discovery mode */
3384 /* different path selection values */
3385 #define DPT_PATHSEL_AUTO 0 /* auto mode for path selection */
3386 #define DPT_PATHSEL_DIRECT 1 /* always use direct DPT path */
3387 #define DPT_PATHSEL_APPATH 2 /* always use AP path */
3389 /* different ops for deny list */
3390 #define DPT_DENY_LIST_ADD 1 /* add to dpt deny list */
3391 #define DPT_DENY_LIST_REMOVE 2 /* remove from dpt deny list */
3393 /* different ops for manual end point */
3394 #define DPT_MANUAL_EP_CREATE 1 /* create manual dpt endpoint */
3395 #define DPT_MANUAL_EP_MODIFY 2 /* modify manual dpt endpoint */
3396 #define DPT_MANUAL_EP_DELETE 3 /* delete manual dpt endpoint */
3398 /* structure for dpt iovars */
3399 typedef struct dpt_iovar
{
3400 struct ether_addr ea
; /* Station address */
3401 uint8 mode
; /* mode: depends on iovar */
3402 uint32 pad
; /* future */
3405 /* flags to indicate DPT status */
3406 #define DPT_STATUS_ACTIVE 0x01 /* link active (though may be suspended) */
3407 #define DPT_STATUS_AES 0x02 /* link secured through AES encryption */
3408 #define DPT_STATUS_FAILED 0x04 /* DPT link failed */
3410 #define DPT_FNAME_LEN 48 /* Max length of friendly name */
3412 typedef struct dpt_status
{
3413 uint8 status
; /* flags to indicate status */
3414 uint8 fnlen
; /* length of friendly name */
3415 uchar name
[DPT_FNAME_LEN
]; /* friendly name */
3416 uint32 rssi
; /* RSSI of the link */
3417 sta_info_t sta
; /* sta info */
3420 /* structure for dpt list */
3421 typedef struct dpt_list
{
3422 uint32 num
; /* number of entries in struct */
3423 dpt_status_t status
[1]; /* per station info */
3426 /* structure for dpt friendly name */
3427 typedef struct dpt_fname
{
3428 uint8 len
; /* length of friendly name */
3429 uchar name
[DPT_FNAME_LEN
]; /* friendly name */
3432 #define BDD_FNAME_LEN 32 /* Max length of friendly name */
3433 typedef struct bdd_fname
{
3434 uint8 len
; /* length of friendly name */
3435 uchar name
[BDD_FNAME_LEN
]; /* friendly name */
3438 /* structure for addts arguments */
3439 /* For ioctls that take a list of TSPEC */
3441 int count
; /* number of tspecs */
3442 struct tsinfo_arg tsinfo
[1]; /* variable length array of tsinfo */
3446 /* different ops for manual end point */
3447 #define TDLS_MANUAL_EP_CREATE 1 /* create manual dpt endpoint */
3448 #define TDLS_MANUAL_EP_MODIFY 2 /* modify manual dpt endpoint */
3449 #define TDLS_MANUAL_EP_DELETE 3 /* delete manual dpt endpoint */
3450 #define TDLS_MANUAL_EP_PM 4 /* put dpt endpoint in PM mode */
3451 #define TDLS_MANUAL_EP_WAKE 5 /* wake up dpt endpoint from PM */
3452 #define TDLS_MANUAL_EP_DISCOVERY 6 /* discover if endpoint is TDLS capable */
3453 #define TDLS_MANUAL_EP_CHSW 7 /* channel switch */
3454 #define TDLS_MANUAL_EP_WFD_TPQ 8 /* WiFi-Display Tunneled Probe reQuest */
3456 /* structure for tdls iovars */
3457 typedef struct tdls_iovar
{
3458 struct ether_addr ea
; /* Station address */
3459 uint8 mode
; /* mode: depends on iovar */
3460 chanspec_t chanspec
;
3461 uint32 pad
; /* future */
3465 #define TDLS_WFD_IE_TX 0
3466 #define TDLS_WFD_IE_RX 1
3467 #define TDLS_WFD_PROBE_IE_TX 2
3468 #define TDLS_WFD_PROBE_IE_RX 3
3469 #define TDLS_WFD_IE_SIZE 512
3470 /* structure for tdls wfd ie */
3471 typedef struct tdls_wfd_ie_iovar
{
3472 struct ether_addr ea
; /* Station address */
3475 uint8 data
[TDLS_WFD_IE_SIZE
];
3476 } tdls_wfd_ie_iovar_t
;
3479 /* structure for addts/delts arguments */
3480 typedef struct tspec_arg
{
3481 uint16 version
; /* see definition of TSPEC_ARG_VERSION */
3482 uint16 length
; /* length of entire structure */
3483 uint flag
; /* bit field */
3484 /* TSPEC Arguments */
3485 struct tsinfo_arg tsinfo
; /* TS Info bit field */
3486 uint16 nom_msdu_size
; /* (Nominal or fixed) MSDU Size (bytes) */
3487 uint16 max_msdu_size
; /* Maximum MSDU Size (bytes) */
3488 uint min_srv_interval
; /* Minimum Service Interval (us) */
3489 uint max_srv_interval
; /* Maximum Service Interval (us) */
3490 uint inactivity_interval
; /* Inactivity Interval (us) */
3491 uint suspension_interval
; /* Suspension Interval (us) */
3492 uint srv_start_time
; /* Service Start Time (us) */
3493 uint min_data_rate
; /* Minimum Data Rate (bps) */
3494 uint mean_data_rate
; /* Mean Data Rate (bps) */
3495 uint peak_data_rate
; /* Peak Data Rate (bps) */
3496 uint max_burst_size
; /* Maximum Burst Size (bytes) */
3497 uint delay_bound
; /* Delay Bound (us) */
3498 uint min_phy_rate
; /* Minimum PHY Rate (bps) */
3499 uint16 surplus_bw
; /* Surplus Bandwidth Allowance (range 1.0 to 8.0) */
3500 uint16 medium_time
; /* Medium Time (32 us/s periods) */
3501 uint8 dialog_token
; /* dialog token */
3504 /* tspec arg for desired station */
3505 typedef struct tspec_per_sta_arg
{
3506 struct ether_addr ea
;
3507 struct tspec_arg ts
;
3508 } tspec_per_sta_arg_t
;
3510 /* structure for max bandwidth for each access category */
3511 typedef struct wme_max_bandwidth
{
3512 uint32 ac
[AC_COUNT
]; /* max bandwidth for each access category */
3513 } wme_max_bandwidth_t
;
3515 #define WL_WME_MBW_PARAMS_IO_BYTES (sizeof(wme_max_bandwidth_t))
3517 /* current version of wl_tspec_arg_t struct */
3518 #define TSPEC_ARG_VERSION 2 /* current version of wl_tspec_arg_t struct */
3519 #define TSPEC_ARG_LENGTH 55 /* argument length from tsinfo to medium_time */
3520 #define TSPEC_DEFAULT_DIALOG_TOKEN 42 /* default dialog token */
3521 #define TSPEC_DEFAULT_SBW_FACTOR 0x3000 /* default surplus bw */
3524 #define WL_WOWL_KEEPALIVE_MAX_PACKET_SIZE 80
3525 #define WLC_WOWL_MAX_KEEPALIVE 2
3527 /* define for flag */
3528 #define TSPEC_PENDING 0 /* TSPEC pending */
3529 #define TSPEC_ACCEPTED 1 /* TSPEC accepted */
3530 #define TSPEC_REJECTED 2 /* TSPEC rejected */
3531 #define TSPEC_UNKNOWN 3 /* TSPEC unknown */
3532 #define TSPEC_STATUS_MASK 7 /* TSPEC status mask */
3535 /* Software feature flag defines used by wlfeatureflag */
3536 #ifdef WLAFTERBURNER
3537 #define WL_SWFL_ABBFL 0x0001 /* Allow Afterburner on systems w/o hardware BFL */
3538 #define WL_SWFL_ABENCORE 0x0002 /* Allow AB on non-4318E chips */
3539 #endif /* WLAFTERBURNER */
3540 #define WL_SWFL_NOHWRADIO 0x0004
3541 #define WL_SWFL_FLOWCONTROL 0x0008 /* Enable backpressure to OS stack */
3542 #define WL_SWFL_WLBSSSORT 0x0010 /* Per-port supports sorting of BSS */
3544 #define WL_LIFETIME_MAX 0xFFFF /* Max value in ms */
3546 /* Packet lifetime configuration per ac */
3547 typedef struct wl_lifetime
{
3548 uint32 ac
; /* access class */
3549 uint32 lifetime
; /* Packet lifetime value in ms */
3552 #define CSA_BROADCAST_ACTION_FRAME 0 /* csa broadcast action frame */
3553 #define CSA_UNICAST_ACTION_FRAME 1 /* csa unicast action frame */
3555 /* Channel Switch Announcement param */
3556 typedef struct wl_chan_switch
{
3557 uint8 mode
; /* value 0 or 1 */
3558 uint8 count
; /* count # of beacons before switching */
3559 chanspec_t chspec
; /* chanspec */
3560 uint8 reg
; /* regulatory class */
3561 uint8 frame_type
; /* csa frame type, unicast or broadcast */
3564 /* Roaming trigger definitions for WLC_SET_ROAM_TRIGGER.
3566 * (-100 < value < 0) value is used directly as a roaming trigger in dBm
3567 * (0 <= value) value specifies a logical roaming trigger level from
3570 * WLC_GET_ROAM_TRIGGER always returns roaming trigger value in dBm, never
3571 * the logical roam trigger value.
3573 #define WLC_ROAM_TRIGGER_DEFAULT 0 /* default roaming trigger */
3574 #define WLC_ROAM_TRIGGER_BANDWIDTH 1 /* optimize for bandwidth roaming trigger */
3575 #define WLC_ROAM_TRIGGER_DISTANCE 2 /* optimize for distance roaming trigger */
3576 #define WLC_ROAM_TRIGGER_AUTO 3 /* auto-detect environment */
3577 #define WLC_ROAM_TRIGGER_MAX_VALUE 3 /* max. valid value */
3579 #define WLC_ROAM_NEVER_ROAM_TRIGGER (-100) /* Avoid Roaming by setting a large value */
3581 /* Preferred Network Offload (PNO, formerly PFN) defines */
3582 #define WPA_AUTH_PFN_ANY 0xffffffff /* for PFN, match only ssid */
3601 #define SORT_CRITERIA_BIT 0
3602 #define AUTO_NET_SWITCH_BIT 1
3603 #define ENABLE_BKGRD_SCAN_BIT 2
3604 #define IMMEDIATE_SCAN_BIT 3
3605 #define AUTO_CONNECT_BIT 4
3606 #define ENABLE_BD_SCAN_BIT 5
3607 #define ENABLE_ADAPTSCAN_BIT 6
3608 #define IMMEDIATE_EVENT_BIT 8
3609 #define SUPPRESS_SSID_BIT 9
3610 #define ENABLE_NET_OFFLOAD_BIT 10
3612 #define SORT_CRITERIA_MASK 0x0001
3613 #define AUTO_NET_SWITCH_MASK 0x0002
3614 #define ENABLE_BKGRD_SCAN_MASK 0x0004
3615 #define IMMEDIATE_SCAN_MASK 0x0008
3616 #define AUTO_CONNECT_MASK 0x0010
3618 #define ENABLE_BD_SCAN_MASK 0x0020
3619 #define ENABLE_ADAPTSCAN_MASK 0x00c0
3620 #define IMMEDIATE_EVENT_MASK 0x0100
3621 #define SUPPRESS_SSID_MASK 0x0200
3622 #define ENABLE_NET_OFFLOAD_MASK 0x0400
3624 #define PFN_VERSION 2
3625 #define PFN_SCANRESULT_VERSION 1
3626 #define MAX_PFN_LIST_COUNT 16
3628 #define PFN_COMPLETE 1
3629 #define PFN_INCOMPLETE 0
3631 #define DEFAULT_BESTN 2
3632 #define DEFAULT_MSCAN 0
3633 #define DEFAULT_REPEAT 10
3634 #define DEFAULT_EXP 2
3636 /* PFN network info structure */
3637 typedef struct wl_pfn_subnet_info
{
3638 struct ether_addr BSSID
;
3639 uint8 channel
; /* channel number only */
3642 } wl_pfn_subnet_info_t
;
3644 typedef struct wl_pfn_net_info
{
3645 wl_pfn_subnet_info_t pfnsubnet
;
3646 int16 RSSI
; /* receive signal strength (in dBm) */
3647 uint16 timestamp
; /* age in seconds */
3648 } wl_pfn_net_info_t
;
3650 typedef struct wl_pfn_scanresults
{
3654 wl_pfn_net_info_t netinfo
[1];
3655 } wl_pfn_scanresults_t
;
3657 /* PFN data structure */
3658 typedef struct wl_pfn_param
{
3659 int32 version
; /* PNO parameters version */
3660 int32 scan_freq
; /* Scan frequency */
3661 int32 lost_network_timeout
; /* Timeout in sec. to declare
3662 * discovered network as lost
3664 int16 flags
; /* Bit field to control features
3665 * of PFN such as sort criteria auto
3666 * enable switch and background scan
3668 int16 rssi_margin
; /* Margin to avoid jitter for choosing a
3669 * PFN based on RSSI sort criteria
3671 uint8 bestn
; /* number of best networks in each scan */
3672 uint8 mscan
; /* number of scans recorded */
3673 uint8 repeat
; /* Minimum number of scan intervals
3674 *before scan frequency changes in adaptive scan
3676 uint8 exp
; /* Exponent of 2 for maximum scan interval */
3677 #if !defined(WLC_PATCH) || !defined(BCM43362A2)
3678 int32 slow_freq
; /* slow scan period */
3679 #endif /* !WLC_PATCH || !BCM43362A2 */
3682 typedef struct wl_pfn_bssid
{
3683 struct ether_addr macaddr
;
3684 /* Bit4: suppress_lost, Bit3: suppress_found */
3687 #define WL_PFN_SUPPRESSFOUND_MASK 0x08
3688 #define WL_PFN_SUPPRESSLOST_MASK 0x10
3689 #define WL_PFN_RSSI_MASK 0xff00
3690 #define WL_PFN_RSSI_SHIFT 8
3692 typedef struct wl_pfn_cfg
{
3695 uint16 channel_list
[WL_NUMCHANNELS
];
3697 #define WL_PFN_REPORT_ALLNET 0
3698 #define WL_PFN_REPORT_SSIDNET 1
3699 #define WL_PFN_REPORT_BSSIDNET 2
3701 typedef struct wl_pfn
{
3702 wlc_ssid_t ssid
; /* ssid name and its length */
3703 int32 flags
; /* bit2: hidden */
3704 int32 infra
; /* BSS Vs IBSS */
3705 int32 auth
; /* Open Vs Closed */
3706 int32 wpa_auth
; /* WPA type */
3707 int32 wsec
; /* wsec value */
3710 typedef struct wl_pfn_list
{
3717 typedef BWL_PRE_PACKED_STRUCT
struct pfn_olmsg_params_t
{
3722 } BWL_POST_PACKED_STRUCT pfn_olmsg_params
;
3724 #define WL_PFN_HIDDEN_BIT 2
3725 #define PNO_SCAN_MAX_FW 508*1000 /* max time scan time in msec */
3726 #define PNO_SCAN_MAX_FW_SEC PNO_SCAN_MAX_FW/1000 /* max time scan time in SEC */
3727 #define PNO_SCAN_MIN_FW_SEC 10 /* min time scan time in SEC */
3728 #define WL_PFN_HIDDEN_MASK 0x4
3730 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
3732 /* Service discovery */
3734 uint8 transaction_id
; /* Transaction id */
3735 uint8 protocol
; /* Service protocol type */
3736 uint16 query_len
; /* Length of query */
3737 uint16 response_len
; /* Length of response */
3742 uint16 period
; /* extended listen period */
3743 uint16 interval
; /* extended listen interval */
3748 #define ANQPO_MAX_QUERY_SIZE 256
3750 uint16 max_retransmit
; /* ~0 use default, max retransmit on no ACK from peer */
3751 uint16 response_timeout
; /* ~0 use default, msec to wait for resp after tx packet */
3752 uint16 max_comeback_delay
; /* ~0 use default, max comeback delay in resp else fail */
3753 uint16 max_retries
; /* ~0 use default, max retries on failure */
3754 uint16 query_len
; /* length of ANQP query */
3755 uint8 query_data
[1]; /* ANQP encoded query (max ANQPO_MAX_QUERY_SIZE) */
3759 uint16 channel
; /* channel of the peer */
3760 struct ether_addr addr
; /* addr of the peer */
3763 #define ANQPO_MAX_PEER_LIST 64
3765 uint16 count
; /* number of peers in list */
3766 wl_anqpo_peer_t peer
[1]; /* max ANQPO_MAX_PEER_LIST */
3767 } wl_anqpo_peer_list_t
;
3769 #define ANQPO_MAX_IGNORE_SSID 64
3771 bool is_clear
; /* set to clear list (not used on GET) */
3772 uint16 count
; /* number of SSID in list */
3773 wlc_ssid_t ssid
[1]; /* max ANQPO_MAX_IGNORE_SSID */
3774 } wl_anqpo_ignore_ssid_list_t
;
3776 #define ANQPO_MAX_IGNORE_BSSID 64
3778 bool is_clear
; /* set to clear list (not used on GET) */
3779 uint16 count
; /* number of addr in list */
3780 struct ether_addr bssid
[1]; /* max ANQPO_MAX_IGNORE_BSSID */
3781 } wl_anqpo_ignore_bssid_list_t
;
3783 /* TCP Checksum Offload defines */
3784 #define TOE_TX_CSUM_OL 0x00000001
3785 #define TOE_RX_CSUM_OL 0x00000002
3787 #ifndef LINUX_POSTMOGRIFY_REMOVAL
3788 /* TCP Checksum Offload error injection for testing */
3789 #define TOE_ERRTEST_TX_CSUM 0x00000001
3790 #define TOE_ERRTEST_RX_CSUM 0x00000002
3791 #define TOE_ERRTEST_RX_CSUM2 0x00000004
3793 struct toe_ol_stats_t
{
3794 /* Num of tx packets that don't need to be checksummed */
3797 /* Num of tx packets where checksum is filled by offload engine */
3801 uint32 tx_icmp_fill
;
3803 /* Num of rx packets where toe finds out if checksum is good or bad */
3810 uint32 rx_icmp_good
;
3813 /* Num of tx packets in which csum error is injected */
3814 uint32 tx_tcp_errinj
;
3815 uint32 tx_udp_errinj
;
3816 uint32 tx_icmp_errinj
;
3818 /* Num of rx packets in which csum error is injected */
3819 uint32 rx_tcp_errinj
;
3820 uint32 rx_udp_errinj
;
3821 uint32 rx_icmp_errinj
;
3824 /* ARP Offload feature flags for arp_ol iovar */
3825 #define ARP_OL_AGENT 0x00000001
3826 #define ARP_OL_SNOOP 0x00000002
3827 #define ARP_OL_HOST_AUTO_REPLY 0x00000004
3828 #define ARP_OL_PEER_AUTO_REPLY 0x00000008
3830 /* ARP Offload error injection */
3831 #define ARP_ERRTEST_REPLY_PEER 0x1
3832 #define ARP_ERRTEST_REPLY_HOST 0x2
3834 #define ARP_MULTIHOMING_MAX 8 /* Maximum local host IP addresses */
3835 #define ND_MULTIHOMING_MAX 10 /* Maximum local host IP addresses */
3837 /* Arp offload statistic counts */
3838 struct arp_ol_stats_t
{
3839 uint32 host_ip_entries
; /* Host IP table addresses (more than one if multihomed) */
3840 uint32 host_ip_overflow
; /* Host IP table additions skipped due to overflow */
3842 uint32 arp_table_entries
; /* ARP table entries */
3843 uint32 arp_table_overflow
; /* ARP table additions skipped due to overflow */
3845 uint32 host_request
; /* ARP requests from host */
3846 uint32 host_reply
; /* ARP replies from host */
3847 uint32 host_service
; /* ARP requests from host serviced by ARP Agent */
3849 uint32 peer_request
; /* ARP requests received from network */
3850 uint32 peer_request_drop
; /* ARP requests from network that were dropped */
3851 uint32 peer_reply
; /* ARP replies received from network */
3852 uint32 peer_reply_drop
; /* ARP replies from network that were dropped */
3853 uint32 peer_service
; /* ARP request from host serviced by ARP Agent */
3856 /* NS offload statistic counts */
3857 struct nd_ol_stats_t
{
3858 uint32 host_ip_entries
; /* Host IP table addresses (more than one if multihomed) */
3859 uint32 host_ip_overflow
; /* Host IP table additions skipped due to overflow */
3860 uint32 peer_request
; /* NS requests received from network */
3861 uint32 peer_request_drop
; /* NS requests from network that were dropped */
3862 uint32 peer_reply_drop
; /* NA replies from network that were dropped */
3863 uint32 peer_service
; /* NS request from host serviced by firmware */
3867 * Keep-alive packet offloading.
3870 /* NAT keep-alive packets format: specifies the re-transmission period, the packet
3871 * length, and packet contents.
3873 typedef struct wl_keep_alive_pkt
{
3874 uint32 period_msec
; /* Retransmission period (0 to disable packet re-transmits) */
3875 uint16 len_bytes
; /* Size of packet to transmit (0 for null packet) */
3876 uint8 data
[1]; /* Variable length packet to transmit. Contents should include
3877 * entire ethernet packet (enet header, IP header, UDP header,
3878 * and UDP payload) in network byte order.
3880 } wl_keep_alive_pkt_t
;
3882 #define WL_KEEP_ALIVE_FIXED_LEN OFFSETOF(wl_keep_alive_pkt_t, data)
3884 typedef struct awdl_config_params
{
3886 uint8 awdl_chan
; /* awdl channel */
3887 uint8 guard_time
; /* Guard Time */
3888 uint16 aw_period
; /* AW interval period */
3889 uint16 aw_cmn_length
; /* Radio on Time AW */
3890 uint16 action_frame_period
; /* awdl action frame period */
3891 uint16 awdl_pktlifetime
; /* max packet life time in msec for awdl action frames */
3892 uint16 awdl_maxnomaster
; /* max master missing time */
3893 uint16 awdl_extcount
; /* Max extended period count for traffic */
3894 uint16 aw_ext_length
; /* AW ext period */
3895 uint16 awdl_nmode
; /* Operation mode of awdl interface; * 0 - Legacy mode
3896 * 1 - 11n rate only * 2 - 11n + ampdu rx/tx
3898 struct ether_addr ea
; /* destination bcast/mcast address to which action frame
3901 } awdl_config_params_t
;
3903 typedef struct wl_awdl_action_frame
{
3905 uint8 awdl_action_frame_data
[1];
3906 } wl_awdl_action_frame_t
;
3908 #define WL_AWDL_ACTION_FRAME_FIXED_LEN OFFSETOF(wl_awdl_action_frame_t, awdl_sync_frame)
3910 typedef struct awdl_peer_node
{
3911 uint32 type_state
; /* Master, slave , etc.. */
3912 uint16 aw_counter
; /* avail window counter */
3913 int8 rssi
; /* rssi last af was received at */
3914 int8 last_rssi
; /* rssi in the last AF */
3916 uint16 tx_delay
; /* ts_hw - ts_fw */
3919 uint16 aw_cmn_length
;
3920 uint16 aw_ext_length
;
3921 uint32 self_metrics
; /* Election Metric */
3922 uint32 top_master_metrics
; /* Top Master Metric */
3923 struct ether_addr addr
;
3924 struct ether_addr top_master
;
3925 uint8 dist_top
; /* Distance from Top */
3928 typedef struct awdl_peer_table
{
3931 uint8 peer_nodes
[1];
3932 } awdl_peer_table_t
;
3934 typedef struct awdl_af_hdr
{
3935 struct ether_addr dst_mac
;
3936 uint8 action_hdr
[4]; /* Category + OUI[3] */
3939 typedef struct awdl_oui
{
3940 uint8 oui
[3]; /* default: 0x00 0x17 0xf2 */
3941 uint8 oui_type
; /* AWDL: 0x08 */
3944 typedef BWL_PRE_PACKED_STRUCT
struct awdl_hdr
{
3945 uint8 type
; /* 0x08 AWDL */
3947 uint8 sub_type
; /* Sub type */
3948 uint8 rsvd
; /* Reserved */
3949 uint32 phy_timestamp
; /* PHY Tx time */
3950 uint32 fw_timestamp
; /* Target Tx time */
3951 } BWL_POST_PACKED_STRUCT awdl_hdr_t
;
3953 /* AWDL AF flags for awdl_oob_af iovar */
3954 #define AWDL_OOB_AF_FILL_TSF_PARAMS 0x00000001
3955 #define AWDL_OOB_AF_FILL_SYNC_PARAMS 0x00000002
3956 #define AWDL_OOB_AF_FILL_ELECT_PARAMS 0x00000004
3957 #define AWDL_OOB_AF_PARAMS_SIZE 38
3959 typedef BWL_PRE_PACKED_STRUCT
struct awdl_oob_af_params
{
3960 struct ether_addr bssid
;
3961 struct ether_addr dst_mac
;
3965 uint32 pkt_lifetime
;
3967 uint32 max_retries
; /* for unicast frames only */
3969 uint8 payload
[1]; /* complete AF payload */
3970 } BWL_POST_PACKED_STRUCT awdl_oob_af_params_t
;
3972 typedef BWL_PRE_PACKED_STRUCT
struct awdl_sync_params
{
3973 uint8 type
; /* Type */
3974 uint16 param_len
; /* sync param length */
3975 uint8 tx_chan
; /* tx channel */
3976 uint16 tx_counter
; /* tx down counter */
3977 uint8 master_chan
; /* master home channel */
3978 uint8 guard_time
; /* Gaurd Time */
3979 uint16 aw_period
; /* AW period */
3980 uint16 action_frame_period
; /* awdl action frame period */
3981 uint16 awdl_flags
; /* AWDL Flags */
3982 uint16 aw_ext_length
; /* AW extention len */
3983 uint16 aw_cmn_length
; /* AW common len */
3984 uint16 aw_remaining
; /* Remaining AW length */
3985 uint8 min_ext
; /* Minimum Extention count */
3986 uint8 max_ext_multi
; /* Max multicast Extention count */
3987 uint8 max_ext_uni
; /* Max unicast Extention count */
3988 uint8 max_ext_af
; /* Max af Extention count */
3989 struct ether_addr current_master
; /* Current Master mac addr */
3990 uint8 presence_mode
; /* Presence mode */
3992 uint16 aw_counter
; /* AW seq# */
3993 uint16 ap_bcn_alignment_delta
; /* AP Beacon alignment delta */
3994 } BWL_POST_PACKED_STRUCT awdl_sync_params_t
;
3996 typedef BWL_PRE_PACKED_STRUCT
struct awdl_channel_sequence
{
3997 uint8 aw_seq_len
; /* AW seq length */
3998 uint8 aw_seq_enc
; /* AW seq encoding */
3999 uint8 aw_seq_duplicate_cnt
; /* AW seq dupilcate count */
4000 uint8 seq_step_cnt
; /* Seq spet count */
4001 uint16 seq_fill_chan
; /* channel to fill in; 0xffff repeat current channel */
4002 uint8 chan_sequence
[1]; /* Variable list of channel Sequence */
4003 } BWL_POST_PACKED_STRUCT awdl_channel_sequence_t
;
4004 #define WL_AWDL_CHAN_SEQ_FIXED_LEN OFFSETOF(awdl_channel_sequence_t, chan_sequence)
4006 typedef BWL_PRE_PACKED_STRUCT
struct awdl_election_info
{
4007 uint8 election_flags
; /* Election Flags */
4008 uint16 election_ID
; /* Election ID */
4009 uint32 self_metrics
;
4010 } BWL_POST_PACKED_STRUCT awdl_election_info_t
;
4012 typedef BWL_PRE_PACKED_STRUCT
struct awdl_election_tree_info
{
4013 uint8 election_flags
; /* Election Flags */
4014 uint16 election_ID
; /* Election ID */
4015 uint32 self_metrics
;
4016 int8 master_sync_rssi_thld
;
4017 int8 slave_sync_rssi_thld
;
4018 int8 edge_sync_rssi_thld
;
4019 int8 close_range_rssi_thld
;
4020 int8 mid_range_rssi_thld
;
4021 uint8 max_higher_masters_close_range
;
4022 uint8 max_higher_masters_mid_range
;
4023 uint8 max_tree_depth
;
4025 struct ether_addr top_master
; /* top Master mac addr */
4026 uint32 top_master_self_metric
;
4027 uint8 current_tree_depth
;
4028 } BWL_POST_PACKED_STRUCT awdl_election_tree_info_t
;
4030 typedef BWL_PRE_PACKED_STRUCT
struct awdl_election_params_tlv
{
4031 uint8 type
; /* Type */
4032 uint16 param_len
; /* Election param length */
4033 uint8 election_flags
; /* Election Flags */
4034 uint16 election_ID
; /* Election ID */
4035 uint8 dist_top
; /* Distance from Top */
4036 uint8 rsvd
; /* Reserved */
4037 struct ether_addr top_master
; /* Top Master mac addr */
4038 uint32 top_master_metrics
;
4039 uint32 self_metrics
;
4040 uint8 pad
[2]; /* Padding */
4041 } BWL_POST_PACKED_STRUCT awdl_election_params_tlv_t
;
4043 typedef struct awdl_payload
{
4044 uint32 len
; /* Payload length */
4045 uint8 payload
[1]; /* Payload */
4048 typedef struct awdl_long_payload
{
4049 uint8 long_psf_period
; /* transmit every long_psf_perios AWs */
4050 uint8 long_psf_tx_offset
; /* delay from aw_start */
4051 uint16 len
; /* Payload length */
4052 uint8 payload
[1]; /* Payload */
4053 } BWL_POST_PACKED_STRUCT awdl_long_payload_t
;
4055 typedef BWL_PRE_PACKED_STRUCT
struct awdl_opmode
{
4056 uint8 mode
; /* 0 - Auto; 1 - Fixed */
4057 uint8 role
; /* 0 - slave; 1 - non-elect master; 2 - master */
4058 uint16 bcast_tu
; /* Bcasting period(TU) for non-elect master */
4059 struct ether_addr master
; /* Address of master to sync to */
4060 uint16 cur_bcast_tu
; /* Current Bcasting Period(TU) */
4061 } BWL_PRE_PACKED_STRUCT awdl_opmode_t
;
4063 typedef BWL_PRE_PACKED_STRUCT
struct awdl_extcount
{
4064 uint8 minExt
; /* Min extension count */
4065 uint8 maxExtMulti
; /* Max extension count for mcast packets */
4066 uint8 maxExtUni
; /* Max extension count for unicast packets */
4067 uint8 maxAfExt
; /* Max extension count */
4068 } BWL_PRE_PACKED_STRUCT awdl_extcount_t
;
4070 #define AWDL_OPMODE_AUTO 0
4071 #define AWDL_OPMODE_FIXED 1
4073 /* peer add/del operation */
4074 typedef struct awdl_peer_op
{
4076 uint8 opcode
; /* see opcode definition */
4077 struct ether_addr addr
;
4082 typedef struct awdl_peer_op_tbl
{
4083 uint16 len
; /* length */
4084 uint8 tbl
[1]; /* Peer table */
4085 } awdl_peer_op_tbl_t
;
4087 typedef BWL_PRE_PACKED_STRUCT
struct awdl_peer_op_node
{
4088 struct ether_addr addr
;
4089 uint32 flags
; /* Flags to indicate various states */
4090 } BWL_POST_PACKED_STRUCT awdl_peer_op_node_t
;
4092 #define AWDL_PEER_OP_CUR_VER 0
4094 /* AWDL related statistics */
4095 typedef BWL_PRE_PACKED_STRUCT
struct awdl_stats
{
4114 } BWL_POST_PACKED_STRUCT awdl_stats_t
;
4116 typedef BWL_PRE_PACKED_STRUCT
struct awdl_uct_stats
{
4117 uint32 aw_proc_in_aw_sched
;
4118 uint32 aw_upd_in_pre_aw_proc
;
4119 uint32 pre_aw_proc_in_aw_set
;
4120 uint32 ignore_pre_aw_proc
;
4121 uint32 miss_pre_aw_intr
;
4128 } BWL_POST_PACKED_STRUCT awdl_uct_stats_t
;
4131 #define AWDL_PEER_OP_ADD 0
4132 #define AWDL_PEER_OP_DEL 1
4133 #define AWDL_PEER_OP_INFO 2
4134 #define AWDL_PEER_OP_UPD 3
4136 typedef struct awdl_pw_opmode
{
4137 struct ether_addr top_master
; /* Peer mac addr */
4138 uint8 mode
; /* 0 - normal; 1 - fast mode */
4142 typedef struct wl_awdl_if
{
4145 struct ether_addr if_addr
;
4146 struct ether_addr bssid
;
4149 typedef struct _aw_start
{
4151 struct ether_addr master
;
4155 typedef struct _aw_extension_start
{
4157 } aw_extension_start_t
;
4159 typedef struct _awdl_peer_state
{
4160 struct ether_addr peer
;
4162 } awdl_peer_state_t
;
4163 #define AWDL_PEER_STATE_OPEN 0
4164 #define AWDL_PEER_STATE_CLOSE 1
4166 typedef struct _awdl_sync_state_changed
{
4168 struct ether_addr master
;
4169 } awdl_sync_state_changed_t
;
4171 #define SYNC_ROLE_SLAVE 0
4172 #define SYNC_ROLE_NE_MASTER 1 /* Non-election master */
4173 #define SYNC_ROLE_MASTER 2
4175 typedef struct _awdl_sync_state
{
4177 struct ether_addr master
;
4178 uint32 continuous_election_enable
;
4179 } awdl_sync_state_t
;
4181 typedef struct _awdl_aw_ap_alignment
{
4184 uint32 align_on_dtim
;
4185 } awdl_aw_ap_alignment_t
;
4187 typedef struct _awdl_peer_stats
{
4189 struct ether_addr address
;
4196 uint32 numTxRetries
;
4197 uint32 numTxFailures
;
4198 } awdl_peer_stats_t
;
4200 #define MAX_NUM_AWDL_KEYS 4
4201 typedef struct _awdl_aes_key
{
4204 struct ether_addr awdl_peer
;
4205 uint8 keys
[MAX_NUM_AWDL_KEYS
][16];
4209 * Dongle pattern matching filter.
4211 /* AOAC wake event flag */
4212 #define WAKE_EVENT_NLO_DISCOVERY_BIT 1
4213 #define WAKE_EVENT_AP_ASSOCIATION_LOST_BIT 2
4214 #define WAKE_EVENT_GTK_HANDSHAKE_ERROR_BIT 4
4215 #define WAKE_EVENT_4WAY_HANDSHAKE_REQUEST_BIT 8
4217 #define MAX_NUM_WOL_PATTERN 16 /* LOGO requirements min 16 */
4218 #define MAX_WAKE_PACKET_CACHE_BYTES 128 /* Maximum cached wake packet */
4220 typedef struct pm_wake_packet
{
4221 uint32 status
; /* Is the wake reason a packet (if all the other field's valid) */
4222 uint32 pattern_id
; /* Pattern ID that matched */
4223 uint32 original_packet_size
;
4224 uint32 saved_packet_size
;
4225 uchar packet
[MAX_WAKE_PACKET_CACHE_BYTES
];
4228 /* Packet filter operation mode */
4229 /* True: 1; False: 0 */
4230 #define PKT_FILTER_MODE_FORWARD_ON_MATCH 1
4231 /* Enable and disable pkt_filter as a whole */
4232 #define PKT_FILTER_MODE_DISABLE 2
4233 /* Cache first matched rx pkt(be queried by host later) */
4234 #define PKT_FILTER_MODE_PKT_CACHE_ON_MATCH 4
4235 /* If pkt_filter is enabled and no filter is set, don't forward anything */
4236 #define PKT_FILTER_MODE_PKT_FORWARD_OFF_DEFAULT 8
4238 /* Packet filter types. Currently, only pattern matching is supported. */
4239 typedef enum wl_pkt_filter_type
{
4240 WL_PKT_FILTER_TYPE_PATTERN_MATCH
=0, /* Pattern matching filter */
4241 WL_PKT_FILTER_TYPE_MAGIC_PATTERN_MATCH
=1, /* Magic packet match */
4242 WL_PKT_FILTER_TYPE_PATTERN_LIST_MATCH
=2 /* A pattern list (match all to match filter) */
4243 } wl_pkt_filter_type_t
;
4245 #define WL_PKT_FILTER_TYPE wl_pkt_filter_type_t
4247 /* String mapping for types that may be used by applications or debug */
4248 #define WL_PKT_FILTER_TYPE_NAMES \
4249 { "PATTERN", WL_PKT_FILTER_TYPE_PATTERN_MATCH }, \
4250 { "MAGIC", WL_PKT_FILTER_TYPE_MAGIC_PATTERN_MATCH }, \
4251 { "PATLIST", WL_PKT_FILTER_TYPE_PATTERN_LIST_MATCH }
4253 /* Pattern matching filter. Specifies an offset within received packets to
4254 * start matching, the pattern to match, the size of the pattern, and a bitmask
4255 * that indicates which bits within the pattern should be matched.
4257 typedef struct wl_pkt_filter_pattern
{
4258 uint32 offset
; /* Offset within received packet to start pattern matching.
4259 * Offset '0' is the first byte of the ethernet header.
4261 uint32 size_bytes
; /* Size of the pattern. Bitmask must be the same size. */
4262 uint8 mask_and_pattern
[1]; /* Variable length mask and pattern data. mask starts
4263 * at offset 0. Pattern immediately follows mask.
4265 } wl_pkt_filter_pattern_t
;
4267 /* A pattern list is a numerically specified list of modified pattern structures. */
4268 typedef struct wl_pkt_filter_pattern_listel
{
4269 uint16 rel_offs
; /* Offset to begin match (relative to 'base' below) */
4270 uint16 base_offs
; /* Base for offset (defined below) */
4271 uint16 size_bytes
; /* Size of mask/pattern */
4272 uint16 match_flags
; /* Addition flags controlling the match */
4273 uint8 mask_and_data
[1]; /* Variable length mask followed by data, each size_bytes */
4274 } wl_pkt_filter_pattern_listel_t
;
4276 typedef struct wl_pkt_filter_pattern_list
{
4277 uint8 list_cnt
; /* Number of elements in the list */
4278 uint8 PAD1
[1]; /* Reserved (possible version: reserved) */
4279 uint16 totsize
; /* Total size of this pattern list (includes this struct) */
4280 wl_pkt_filter_pattern_listel_t patterns
[1]; /* Variable number of list elements */
4281 } wl_pkt_filter_pattern_list_t
;
4283 /* Base offset values */
4284 #define WL_PKT_FILTER_BASE_PKT 0
4285 #define WL_PKT_FILTER_BASE_END 1
4286 #define WL_PKT_FILTER_BASE_D11_H 2 /* May be removed */
4287 #define WL_PKT_FILTER_BASE_D11_D 3 /* May be removed */
4288 #define WL_PKT_FILTER_BASE_ETH_H 4
4289 #define WL_PKT_FILTER_BASE_ETH_D 5
4290 #define WL_PKT_FILTER_BASE_ARP_H 6
4291 #define WL_PKT_FILTER_BASE_ARP_D 7 /* May be removed */
4292 #define WL_PKT_FILTER_BASE_IP4_H 8
4293 #define WL_PKT_FILTER_BASE_IP4_D 9
4294 #define WL_PKT_FILTER_BASE_IP6_H 10
4295 #define WL_PKT_FILTER_BASE_IP6_D 11
4296 #define WL_PKT_FILTER_BASE_TCP_H 12
4297 #define WL_PKT_FILTER_BASE_TCP_D 13 /* May be removed */
4298 #define WL_PKT_FILTER_BASE_UDP_H 14
4299 #define WL_PKT_FILTER_BASE_UDP_D 15
4300 #define WL_PKT_FILTER_BASE_IP6_P 16
4301 #define WL_PKT_FILTER_BASE_COUNT 17 /* May be removed */
4303 /* String mapping for bases that may be used by applications or debug */
4304 #define WL_PKT_FILTER_BASE_NAMES \
4305 { "START", WL_PKT_FILTER_BASE_PKT }, \
4306 { "END", WL_PKT_FILTER_BASE_END }, \
4307 { "ETH_H", WL_PKT_FILTER_BASE_ETH_H }, \
4308 { "ETH_D", WL_PKT_FILTER_BASE_ETH_D }, \
4309 { "D11_H", WL_PKT_FILTER_BASE_D11_H }, \
4310 { "D11_D", WL_PKT_FILTER_BASE_D11_D }, \
4311 { "ARP_H", WL_PKT_FILTER_BASE_ARP_H }, \
4312 { "IP4_H", WL_PKT_FILTER_BASE_IP4_H }, \
4313 { "IP4_D", WL_PKT_FILTER_BASE_IP4_D }, \
4314 { "IP6_H", WL_PKT_FILTER_BASE_IP6_H }, \
4315 { "IP6_D", WL_PKT_FILTER_BASE_IP6_D }, \
4316 { "IP6_P", WL_PKT_FILTER_BASE_IP6_P }, \
4317 { "TCP_H", WL_PKT_FILTER_BASE_TCP_H }, \
4318 { "TCP_D", WL_PKT_FILTER_BASE_TCP_D }, \
4319 { "UDP_H", WL_PKT_FILTER_BASE_UDP_H }, \
4320 { "UDP_D", WL_PKT_FILTER_BASE_UDP_D }
4322 /* Flags for a pattern list element */
4323 #define WL_PKT_FILTER_MFLAG_NEG 0x0001
4325 /* IOVAR "pkt_filter_add" parameter. Used to install packet filters. */
4326 typedef struct wl_pkt_filter
{
4327 uint32 id
; /* Unique filter id, specified by app. */
4328 uint32 type
; /* Filter type (WL_PKT_FILTER_TYPE_xxx). */
4329 uint32 negate_match
; /* Negate the result of filter matches */
4330 union { /* Filter definitions */
4331 wl_pkt_filter_pattern_t pattern
; /* Pattern matching filter */
4332 wl_pkt_filter_pattern_list_t patlist
; /* List of patterns to match */
4336 /* IOVAR "tcp_keep_set" parameter. Used to install tcp keep_alive stuff. */
4337 typedef struct wl_tcp_keep_set
{
4340 } wl_tcp_keep_set_t
;
4342 #define WL_PKT_FILTER_FIXED_LEN OFFSETOF(wl_pkt_filter_t, u)
4343 #define WL_PKT_FILTER_PATTERN_FIXED_LEN OFFSETOF(wl_pkt_filter_pattern_t, mask_and_pattern)
4344 #define WL_PKT_FILTER_PATTERN_LIST_FIXED_LEN OFFSETOF(wl_pkt_filter_pattern_list_t, patterns)
4345 #define WL_PKT_FILTER_PATTERN_LISTEL_FIXED_LEN \
4346 OFFSETOF(wl_pkt_filter_pattern_listel_t, mask_and_data)
4348 /* IOVAR "pkt_filter_enable" parameter. */
4349 typedef struct wl_pkt_filter_enable
{
4350 uint32 id
; /* Unique filter id */
4351 uint32 enable
; /* Enable/disable bool */
4352 } wl_pkt_filter_enable_t
;
4354 /* IOVAR "pkt_filter_list" parameter. Used to retrieve a list of installed filters. */
4355 typedef struct wl_pkt_filter_list
{
4356 uint32 num
; /* Number of installed packet filters */
4357 wl_pkt_filter_t filter
[1]; /* Variable array of packet filters. */
4358 } wl_pkt_filter_list_t
;
4360 #define WL_PKT_FILTER_LIST_FIXED_LEN OFFSETOF(wl_pkt_filter_list_t, filter)
4362 /* IOVAR "pkt_filter_stats" parameter. Used to retrieve debug statistics. */
4363 typedef struct wl_pkt_filter_stats
{
4364 uint32 num_pkts_matched
; /* # filter matches for specified filter id */
4365 uint32 num_pkts_forwarded
; /* # packets fwded from dongle to host for all filters */
4366 uint32 num_pkts_discarded
; /* # packets discarded by dongle for all filters */
4367 } wl_pkt_filter_stats_t
;
4369 /* IOVAR "pkt_filter_ports" parameter. Configure TCP/UDP port filters. */
4370 typedef struct wl_pkt_filter_ports
{
4371 uint8 version
; /* Be proper */
4372 uint8 reserved
; /* Be really proper */
4373 uint16 count
; /* Number of ports following */
4374 /* End of fixed data */
4375 uint16 ports
[1]; /* Placeholder for ports[<count>] */
4376 } wl_pkt_filter_ports_t
;
4378 #define WL_PKT_FILTER_PORTS_FIXED_LEN OFFSETOF(wl_pkt_filter_ports_t, ports)
4380 #define WL_PKT_FILTER_PORTS_VERSION 0
4381 #define WL_PKT_FILTER_PORTS_MAX 128
4383 #define RSN_KCK_LENGTH 16
4384 #define RSN_KEK_LENGTH 16
4385 #define RSN_REPLAY_LEN 8
4386 typedef struct _gtkrefresh
{
4387 uchar KCK
[RSN_KCK_LENGTH
];
4388 uchar KEK
[RSN_KEK_LENGTH
];
4389 uchar ReplayCounter
[RSN_REPLAY_LEN
];
4390 } gtk_keyinfo_t
, *pgtk_keyinfo_t
;
4392 /* Sequential Commands ioctl */
4393 typedef struct wl_seq_cmd_ioctl
{
4394 uint32 cmd
; /* common ioctl definition */
4395 uint32 len
; /* length of user buffer */
4396 } wl_seq_cmd_ioctl_t
;
4398 #define WL_SEQ_CMD_ALIGN_BYTES 4
4400 /* These are the set of get IOCTLs that should be allowed when using
4401 * IOCTL sequence commands. These are issued implicitly by wl.exe each time
4402 * it is invoked. We never want to buffer these, or else wl.exe will stop working.
4404 #define WL_SEQ_CMDS_GET_IOCTL_FILTER(cmd) \
4405 (((cmd) == WLC_GET_MAGIC) || \
4406 ((cmd) == WLC_GET_VERSION) || \
4407 ((cmd) == WLC_GET_AP) || \
4408 ((cmd) == WLC_GET_INSTANCE))
4411 * Packet engine interface
4414 #define WL_PKTENG_PER_TX_START 0x01
4415 #define WL_PKTENG_PER_TX_STOP 0x02
4416 #define WL_PKTENG_PER_RX_START 0x04
4417 #define WL_PKTENG_PER_RX_WITH_ACK_START 0x05
4418 #define WL_PKTENG_PER_TX_WITH_ACK_START 0x06
4419 #define WL_PKTENG_PER_RX_STOP 0x08
4420 #define WL_PKTENG_PER_MASK 0xff
4422 #define WL_PKTENG_SYNCHRONOUS 0x100 /* synchronous flag */
4424 #define WL_PKTENG_MAXPKTSZ 16384 /* max pktsz limit for pkteng */
4426 typedef struct wl_pkteng
{
4428 uint32 delay
; /* Inter-packet delay */
4429 uint32 nframes
; /* Number of frames */
4430 uint32 length
; /* Packet length */
4431 uint8 seqno
; /* Enable/disable sequence no. */
4432 struct ether_addr dest
; /* Destination address */
4433 struct ether_addr src
; /* Source address */
4436 #define NUM_80211b_RATES 4
4437 #define NUM_80211ag_RATES 8
4438 #define NUM_80211n_RATES 32
4439 #define NUM_80211_RATES (NUM_80211b_RATES+NUM_80211ag_RATES+NUM_80211n_RATES)
4440 typedef struct wl_pkteng_stats
{
4441 uint32 lostfrmcnt
; /* RX PER test: no of frames lost (skip seqno) */
4442 int32 rssi
; /* RSSI */
4443 int32 snr
; /* signal to noise ratio */
4444 uint16 rxpktcnt
[NUM_80211_RATES
+1];
4445 uint8 rssi_qdb
; /* qdB portion of the computed rssi */
4446 } wl_pkteng_stats_t
;
4448 typedef struct wl_sslpnphy_papd_debug_data
{
4456 } wl_sslpnphy_papd_debug_data_t
;
4457 typedef struct wl_sslpnphy_debug_data
{
4458 int16 papdcompRe
[64];
4459 int16 papdcompIm
[64];
4460 } wl_sslpnphy_debug_data_t
;
4461 typedef struct wl_sslpnphy_spbdump_data
{
4465 } wl_sslpnphy_spbdump_data_t
;
4466 typedef struct wl_sslpnphy_percal_debug_data
{
4474 int32 last_cal_volt
;
4479 } wl_sslpnphy_percal_debug_data_t
;
4482 * WOWL capability/override settings
4484 #define WL_WOWL_MAGIC (1 << 0) /* Wakeup on Magic packet */
4485 #define WL_WOWL_NET (1 << 1) /* Wakeup on Netpattern */
4486 #define WL_WOWL_DIS (1 << 2) /* Wakeup on loss-of-link due to Disassoc/Deauth */
4487 #define WL_WOWL_RETR (1 << 3) /* Wakeup on retrograde TSF */
4488 #define WL_WOWL_BCN (1 << 4) /* Wakeup on loss of beacon */
4489 #define WL_WOWL_TST (1 << 5) /* Wakeup after test */
4490 #define WL_WOWL_M1 (1 << 6) /* Wakeup after PTK refresh */
4491 #define WL_WOWL_EAPID (1 << 7) /* Wakeup after receipt of EAP-Identity Req */
4492 #define WL_WOWL_PME_GPIO (1 << 8) /* Wakeind via PME(0) or GPIO(1) */
4493 #define WL_WOWL_NEEDTKIP1 (1 << 9) /* need tkip phase 1 key to be updated by the driver */
4494 #define WL_WOWL_GTK_FAILURE (1 << 10) /* enable wakeup if GTK fails */
4495 #define WL_WOWL_EXTMAGPAT (1 << 11) /* support extended magic packets */
4496 #define WL_WOWL_ARPOFFLOAD (1 << 12) /* support ARP/NS/keepalive offloading */
4497 #define WL_WOWL_WPA2 (1 << 13) /* read protocol version for EAPOL frames */
4498 #define WL_WOWL_KEYROT (1 << 14) /* If the bit is set, use key rotaton */
4499 #define WL_WOWL_BCAST (1 << 15) /* If the bit is set, frm received was bcast frame */
4500 #define WL_WOWL_SCANOL (1 << 16) /* If the bit is set, scan offload is enabled */
4501 #define WL_WOWL_NOT_USED (1 << 17) /* Currently unused, use this bit next */
4502 #define WL_WOWL_MDNS_CONFLICT (1 << 18) /* Wakeup on mDNS Conflict Resolution */
4503 #define WL_WOWL_MDNS_SERVICE (1 << 19) /* Wakeup on mDNS Service Connect */
4504 #define WL_WOWL_TCPKEEP (1 << 20) /* tcp keepalive either timed out or got data */
4505 #define WL_WOWL_FW_HALT (1 << 21) /* Firmware died in wowl mode */
4506 #define WL_WOWL_ENAB_HWRADIO (1 << 22) /* Enable detection of radio button changes */
4509 #define MAGIC_PKT_MINLEN 102 /* Magic pkt min length is 6 * 0xFF + 16 * ETHER_ADDR_LEN */
4510 #define MAGIC_PKT_NUM_MAC_ADDRS 16
4513 wowl_pattern_type_bitmap
= 0,
4514 wowl_pattern_type_arp
,
4515 wowl_pattern_type_na
4516 } wowl_pattern_type_t
;
4518 typedef struct wl_wowl_pattern
{
4519 uint32 masksize
; /* Size of the mask in #of bytes */
4520 uint32 offset
; /* Pattern byte offset in packet */
4521 uint32 patternoffset
; /* Offset of start of pattern in the structure */
4522 uint32 patternsize
; /* Size of the pattern itself in #of bytes */
4524 uint32 reasonsize
; /* Size of the wakeup reason code */
4525 wowl_pattern_type_t type
; /* Type of pattern */
4526 /* Mask follows the structure above */
4527 /* Pattern follows the mask is at 'patternoffset' from the start */
4528 } wl_wowl_pattern_t
;
4530 typedef struct wl_wowl_pattern_list
{
4532 wl_wowl_pattern_t pattern
[1];
4533 } wl_wowl_pattern_list_t
;
4535 typedef struct wl_wowl_wakeind
{
4536 uint8 pci_wakeind
; /* Whether PCI PMECSR PMEStatus bit was set */
4537 uint32 ucode_wakeind
; /* What wakeup-event indication was set by ucode */
4538 } wl_wowl_wakeind_t
;
4541 uint32 pktlen
; /* size of packet */
4543 } tcp_keepalive_wake_pkt_infop_t
;
4545 /* per AC rate control related data structure */
4546 typedef struct wl_txrate_class
{
4550 } wl_txrate_class_t
;
4553 #if defined(DSLCPE_DELAY)
4554 #define WL_DELAYMODE_DEFER 0 /* defer by scheduler's choice, make this driver default */
4555 #define WL_DELAYMODE_FORCE 1 /* force, this is driver default */
4556 #define WL_DELAYMODE_AUTO 2 /* defer if no sta associated, force if sta associated */
4559 /* Overlap BSS Scan parameters default, minimum, maximum */
4560 #define WLC_OBSS_SCAN_PASSIVE_DWELL_DEFAULT 20 /* unit TU */
4561 #define WLC_OBSS_SCAN_PASSIVE_DWELL_MIN 5 /* unit TU */
4562 #define WLC_OBSS_SCAN_PASSIVE_DWELL_MAX 1000 /* unit TU */
4563 #define WLC_OBSS_SCAN_ACTIVE_DWELL_DEFAULT 10 /* unit TU */
4564 #define WLC_OBSS_SCAN_ACTIVE_DWELL_MIN 10 /* unit TU */
4565 #define WLC_OBSS_SCAN_ACTIVE_DWELL_MAX 1000 /* unit TU */
4566 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_DEFAULT 300 /* unit Sec */
4567 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MIN 10 /* unit Sec */
4568 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MAX 900 /* unit Sec */
4569 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_DEFAULT 5
4570 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MIN 5
4571 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MAX 100
4572 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_DEFAULT 200 /* unit TU */
4573 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MIN 200 /* unit TU */
4574 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MAX 10000 /* unit TU */
4575 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_DEFAULT 20 /* unit TU */
4576 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MIN 20 /* unit TU */
4577 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MAX 10000 /* unit TU */
4578 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_DEFAULT 25 /* unit percent */
4579 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MIN 0 /* unit percent */
4580 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MAX 100 /* unit percent */
4582 /* structure for Overlap BSS scan arguments */
4583 typedef struct wl_obss_scan_arg
{
4584 int16 passive_dwell
;
4586 int16 bss_widthscan_interval
;
4587 int16 passive_total
;
4589 int16 chanwidth_transition_delay
;
4590 int16 activity_threshold
;
4591 } wl_obss_scan_arg_t
;
4593 #define WL_OBSS_SCAN_PARAM_LEN sizeof(wl_obss_scan_arg_t)
4594 #define WL_MIN_NUM_OBSS_SCAN_ARG 7 /* minimum number of arguments required for OBSS Scan */
4596 #define WL_COEX_INFO_MASK 0x07
4597 #define WL_COEX_INFO_REQ 0x01
4598 #define WL_COEX_40MHZ_INTOLERANT 0x02
4599 #define WL_COEX_WIDTH20 0x04
4601 #define WLC_RSSI_INVALID 0 /* invalid RSSI value */
4603 #define MAX_RSSI_LEVELS 8
4605 /* RSSI event notification configuration. */
4606 typedef struct wl_rssi_event
{
4607 uint32 rate_limit_msec
; /* # of events posted to application will be limited to
4608 * one per specified period (0 to disable rate limit).
4610 uint8 num_rssi_levels
; /* Number of entries in rssi_levels[] below */
4611 int8 rssi_levels
[MAX_RSSI_LEVELS
]; /* Variable number of RSSI levels. An event
4612 * will be posted each time the RSSI of received
4613 * beacons/packets crosses a level.
4617 typedef struct wl_action_obss_coex_req
{
4621 } wl_action_obss_coex_req_t
;
4624 /* IOVar parameter block for small MAC address array with type indicator */
4625 #define WL_IOV_MAC_PARAM_LEN 4
4627 #define WL_IOV_PKTQ_LOG_PRECS 16
4631 char addr_type
[WL_IOV_MAC_PARAM_LEN
];
4632 struct ether_addr ea
[WL_IOV_MAC_PARAM_LEN
];
4633 } wl_iov_mac_params_t
;
4635 /* This is extra info that follows wl_iov_mac_params_t */
4637 uint32 addr_info
[WL_IOV_MAC_PARAM_LEN
];
4638 } wl_iov_mac_extra_params_t
;
4640 /* Combined structure */
4642 wl_iov_mac_params_t params
;
4643 wl_iov_mac_extra_params_t extra_params
;
4644 } wl_iov_mac_full_params_t
;
4646 /* Parameter block for PKTQ_LOG statistics */
4647 #define PKTQ_LOG_COUNTERS_V4 \
4648 /* packets requested to be stored */ \
4650 /* packets stored */ \
4652 /* packets saved, because a lowest priority queue has given away one packet */ \
4654 /* packets saved, because an older packet from the same queue has been dropped */ \
4656 /* packets dropped, because pktq is full with higher precedence packets */ \
4657 uint32 full_dropped; \
4658 /* packets dropped because pktq per that precedence is full */ \
4660 /* packets dropped, in order to save one from a queue of a highest priority */ \
4661 uint32 sacrificed; \
4662 /* packets droped because of hardware/transmission error */ \
4664 /* packets re-sent because they were not received */ \
4666 /* packets retried again (ps pretend) prior to moving power save mode */ \
4668 /* suppressed packet count */ \
4670 /* packets finally dropped after retry limit */ \
4671 uint32 retry_drop; \
4672 /* the high-water mark of the queue capacity for packets - goes to zero as queue fills */ \
4674 /* the high-water mark of the queue utilisation for packets - ('inverse' of max_avail) */ \
4676 /* the maximum capacity of the queue */ \
4677 uint32 queue_capacity; \
4678 /* count of rts attempts that failed to receive cts */ \
4680 /* count of packets sent (acked) successfully */ \
4682 /* running total of phy rate of packets sent successfully */ \
4683 uint32 txrate_succ; \
4684 /* running total of phy 'main' rate */ \
4685 uint32 txrate_main; \
4686 /* actual data transferred successfully */ \
4687 uint32 throughput; \
4688 /* time difference since last pktq_stats */ \
4692 PKTQ_LOG_COUNTERS_V4
4693 } pktq_log_counters_v04_t
;
4695 /* v5 is the same as V4 with extra parameter */
4697 PKTQ_LOG_COUNTERS_V4
4698 /* cumulative time to transmit */
4700 } pktq_log_counters_v05_t
;
4703 uint8 num_prec
[WL_IOV_MAC_PARAM_LEN
];
4704 pktq_log_counters_v04_t counters
[WL_IOV_MAC_PARAM_LEN
][WL_IOV_PKTQ_LOG_PRECS
];
4705 uint32 counter_info
[WL_IOV_MAC_PARAM_LEN
];
4706 uint32 pspretend_time_delta
[WL_IOV_MAC_PARAM_LEN
];
4708 } pktq_log_format_v04_t
;
4711 uint8 num_prec
[WL_IOV_MAC_PARAM_LEN
];
4712 pktq_log_counters_v05_t counters
[WL_IOV_MAC_PARAM_LEN
][WL_IOV_PKTQ_LOG_PRECS
];
4713 uint32 counter_info
[WL_IOV_MAC_PARAM_LEN
];
4714 uint32 pspretend_time_delta
[WL_IOV_MAC_PARAM_LEN
];
4716 } pktq_log_format_v05_t
;
4721 wl_iov_mac_params_t params
;
4723 pktq_log_format_v04_t v04
;
4724 pktq_log_format_v05_t v05
;
4726 } wl_iov_pktq_log_t
;
4728 /* PKTQ_LOG_AUTO, PKTQ_LOG_DEF_PREC flags introduced in v05, they are ignored by v04 */
4729 #define PKTQ_LOG_AUTO (1 << 31)
4730 #define PKTQ_LOG_DEF_PREC (1 << 30)
4733 * SCB_BS_DATA iovar definitions start.
4735 #define SCB_BS_DATA_STRUCT_VERSION 1
4737 /* The actual counters maintained for each station */
4738 typedef BWL_PRE_PACKED_STRUCT
struct {
4739 /* The following counters are a subset of what pktq_stats provides per precedence. */
4740 uint32 retry
; /* packets re-sent because they were not received */
4741 uint32 retry_drop
; /* packets finally dropped after retry limit */
4742 uint32 rtsfail
; /* count of rts attempts that failed to receive cts */
4743 uint32 acked
; /* count of packets sent (acked) successfully */
4744 uint32 txrate_succ
; /* running total of phy rate of packets sent successfully */
4745 uint32 txrate_main
; /* running total of phy 'main' rate */
4746 uint32 throughput
; /* actual data transferred successfully */
4747 uint32 time_delta
; /* time difference since last pktq_stats */
4748 uint32 airtime
; /* RESERVED - zero until pktq_stats V5 is committed. */
4749 } BWL_POST_PACKED_STRUCT iov_bs_data_counters_t
;
4751 /* The structure for individual station information. */
4752 typedef BWL_PRE_PACKED_STRUCT
struct {
4753 struct ether_addr station_address
; /* The station MAC address */
4754 uint16 station_flags
; /* Bit mask of flags, for future use. */
4755 iov_bs_data_counters_t station_counters
; /* The actual counter values */
4756 } BWL_POST_PACKED_STRUCT iov_bs_data_record_t
;
4758 typedef BWL_PRE_PACKED_STRUCT
struct {
4759 uint16 structure_version
; /* Structure version number (for wl/wlu matching) */
4760 uint16 structure_count
; /* Number of iov_bs_data_record_t records following */
4761 iov_bs_data_record_t structure_record
[]; /* 0 - structure_count records */
4762 } BWL_POST_PACKED_STRUCT iov_bs_data_struct_t
;
4764 /* Bitmask of options that can be passed in to the iovar. */
4766 SCB_BS_DATA_FLAG_NO_RESET
= (1<<0) /* Do not clear the counters after reading */
4769 * SCB_BS_DATA iovar definitions end.
4772 /* **** EXTLOG **** */
4773 #define EXTLOG_CUR_VER 0x0100
4775 #define MAX_ARGSTR_LEN 18 /* At least big enough for storing ETHER_ADDR_STR_LEN */
4777 /* log modules (bitmap) */
4778 #define LOG_MODULE_COMMON 0x0001
4779 #define LOG_MODULE_ASSOC 0x0002
4780 #define LOG_MODULE_EVENT 0x0004
4781 #define LOG_MODULE_MAX 3 /* Update when adding module */
4784 #define WL_LOG_LEVEL_DISABLE 0
4785 #define WL_LOG_LEVEL_ERR 1
4786 #define WL_LOG_LEVEL_WARN 2
4787 #define WL_LOG_LEVEL_INFO 3
4788 #define WL_LOG_LEVEL_MAX WL_LOG_LEVEL_INFO /* Update when adding level */
4791 #define LOG_FLAG_EVENT 1
4794 #define LOG_ARGTYPE_NULL 0
4795 #define LOG_ARGTYPE_STR 1 /* %s */
4796 #define LOG_ARGTYPE_INT 2 /* %d */
4797 #define LOG_ARGTYPE_INT_STR 3 /* %d...%s */
4798 #define LOG_ARGTYPE_STR_INT 4 /* %s...%d */
4800 typedef struct wlc_extlog_cfg
{
4802 uint16 module
; /* bitmap */
4808 typedef struct log_record
{
4816 char str
[MAX_ARGSTR_LEN
];
4819 typedef struct wlc_extlog_req
{
4824 typedef struct wlc_extlog_results
{
4828 log_record_t logs
[1];
4829 } wlc_extlog_results_t
;
4831 typedef struct log_idstr
{
4835 const char *fmt_str
;
4838 #define FMTSTRF_USER 1
4840 /* flat ID definitions
4841 * New definitions HAVE TO BE ADDED at the end of the table. Otherwise, it will
4842 * affect backward compatibility with pre-existing apps
4845 FMTSTR_DRIVER_UP_ID
= 0,
4846 FMTSTR_DRIVER_DOWN_ID
= 1,
4847 FMTSTR_SUSPEND_MAC_FAIL_ID
= 2,
4848 FMTSTR_NO_PROGRESS_ID
= 3,
4849 FMTSTR_RFDISABLE_ID
= 4,
4850 FMTSTR_REG_PRINT_ID
= 5,
4851 FMTSTR_EXPTIME_ID
= 6,
4852 FMTSTR_JOIN_START_ID
= 7,
4853 FMTSTR_JOIN_COMPLETE_ID
= 8,
4854 FMTSTR_NO_NETWORKS_ID
= 9,
4855 FMTSTR_SECURITY_MISMATCH_ID
= 10,
4856 FMTSTR_RATE_MISMATCH_ID
= 11,
4857 FMTSTR_AP_PRUNED_ID
= 12,
4858 FMTSTR_KEY_INSERTED_ID
= 13,
4859 FMTSTR_DEAUTH_ID
= 14,
4860 FMTSTR_DISASSOC_ID
= 15,
4861 FMTSTR_LINK_UP_ID
= 16,
4862 FMTSTR_LINK_DOWN_ID
= 17,
4863 FMTSTR_RADIO_HW_OFF_ID
= 18,
4864 FMTSTR_RADIO_HW_ON_ID
= 19,
4865 FMTSTR_EVENT_DESC_ID
= 20,
4866 FMTSTR_PNP_SET_POWER_ID
= 21,
4867 FMTSTR_RADIO_SW_OFF_ID
= 22,
4868 FMTSTR_RADIO_SW_ON_ID
= 23,
4869 FMTSTR_PWD_MISMATCH_ID
= 24,
4870 FMTSTR_FATAL_ERROR_ID
= 25,
4871 FMTSTR_AUTH_FAIL_ID
= 26,
4872 FMTSTR_ASSOC_FAIL_ID
= 27,
4873 FMTSTR_IBSS_FAIL_ID
= 28,
4874 FMTSTR_EXTAP_FAIL_ID
= 29,
4878 #ifdef DONGLEOVERLAYS
4880 uint32 flags_idx
; /* lower 8 bits: overlay index; upper 24 bits: flags */
4881 uint32 offset
; /* offset into overlay region to write code */
4882 uint32 len
; /* overlay code len */
4883 /* overlay code follows this struct */
4884 } wl_ioctl_overlay_t
;
4886 #define OVERLAY_IDX_MASK 0x000000ff
4887 #define OVERLAY_IDX_SHIFT 0
4888 #define OVERLAY_FLAGS_MASK 0xffffff00
4889 #define OVERLAY_FLAGS_SHIFT 8
4890 /* overlay written to device memory immediately after loading the base image */
4891 #define OVERLAY_FLAG_POSTLOAD 0x100
4892 /* defer overlay download until the device responds w/WLC_E_OVL_DOWNLOAD event */
4893 #define OVERLAY_FLAG_DEFER_DL 0x200
4894 /* overlay downloaded prior to the host going to sleep */
4895 #define OVERLAY_FLAG_PRESLEEP 0x400
4897 #define OVERLAY_DOWNLOAD_CHUNKSIZE 1024
4898 #endif /* DONGLEOVERLAYS */
4900 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
4902 /* 11k Neighbor Report element */
4903 typedef struct nbr_element
{
4906 struct ether_addr bssid
;
4914 /* no default structure packing */
4915 #include <packed_section_end.h>
4917 /* require strict packing */
4918 #include <packed_section_start.h>
4920 #ifndef LINUX_POSTMOGRIFY_REMOVAL
4922 /* Structures and constants used for "vndr_ie" IOVar interface */
4923 #define VNDR_IE_CMD_LEN 4 /* length of the set command string:
4924 * "add", "del" (+ NUL)
4927 /* 802.11 Mgmt Packet flags */
4928 #define VNDR_IE_BEACON_FLAG 0x1
4929 #define VNDR_IE_PRBRSP_FLAG 0x2
4930 #define VNDR_IE_ASSOCRSP_FLAG 0x4
4931 #define VNDR_IE_AUTHRSP_FLAG 0x8
4932 #define VNDR_IE_PRBREQ_FLAG 0x10
4933 #define VNDR_IE_ASSOCREQ_FLAG 0x20
4934 #define VNDR_IE_IWAPID_FLAG 0x40 /* vendor IE in IW advertisement protocol ID field */
4935 #define VNDR_IE_CUSTOM_FLAG 0x100 /* allow custom IE id */
4938 /* P2P Action Frames flags (spec ordered) */
4939 #define VNDR_IE_GONREQ_FLAG 0x001000
4940 #define VNDR_IE_GONRSP_FLAG 0x002000
4941 #define VNDR_IE_GONCFM_FLAG 0x004000
4942 #define VNDR_IE_INVREQ_FLAG 0x008000
4943 #define VNDR_IE_INVRSP_FLAG 0x010000
4944 #define VNDR_IE_DISREQ_FLAG 0x020000
4945 #define VNDR_IE_DISRSP_FLAG 0x040000
4946 #define VNDR_IE_PRDREQ_FLAG 0x080000
4947 #define VNDR_IE_PRDRSP_FLAG 0x100000
4949 #define VNDR_IE_P2PAF_SHIFT 12
4952 #define VNDR_IE_INFO_HDR_LEN (sizeof(uint32))
4954 typedef BWL_PRE_PACKED_STRUCT
struct {
4955 uint32 pktflag
; /* bitmask indicating which packet(s) contain this IE */
4956 vndr_ie_t vndr_ie_data
; /* vendor IE data */
4957 } BWL_POST_PACKED_STRUCT vndr_ie_info_t
;
4959 typedef BWL_PRE_PACKED_STRUCT
struct {
4960 int iecount
; /* number of entries in the vndr_ie_list[] array */
4961 vndr_ie_info_t vndr_ie_list
[1]; /* variable size list of vndr_ie_info_t structs */
4962 } BWL_POST_PACKED_STRUCT vndr_ie_buf_t
;
4964 typedef BWL_PRE_PACKED_STRUCT
struct {
4965 char cmd
[VNDR_IE_CMD_LEN
]; /* vndr_ie IOVar set command : "add", "del" + NUL */
4966 vndr_ie_buf_t vndr_ie_buffer
; /* buffer containing Vendor IE list information */
4967 } BWL_POST_PACKED_STRUCT vndr_ie_setbuf_t
;
4969 /* tag_ID/length/value_buffer tuple */
4970 typedef BWL_PRE_PACKED_STRUCT
struct {
4974 } BWL_POST_PACKED_STRUCT tlv_t
;
4976 typedef BWL_PRE_PACKED_STRUCT
struct {
4977 uint32 pktflag
; /* bitmask indicating which packet(s) contain this IE */
4978 tlv_t ie_data
; /* IE data */
4979 } BWL_POST_PACKED_STRUCT ie_info_t
;
4981 typedef BWL_PRE_PACKED_STRUCT
struct {
4982 int iecount
; /* number of entries in the ie_list[] array */
4983 ie_info_t ie_list
[1]; /* variable size list of ie_info_t structs */
4984 } BWL_POST_PACKED_STRUCT ie_buf_t
;
4986 typedef BWL_PRE_PACKED_STRUCT
struct {
4987 char cmd
[VNDR_IE_CMD_LEN
]; /* ie IOVar set command : "add" + NUL */
4988 ie_buf_t ie_buffer
; /* buffer containing IE list information */
4989 } BWL_POST_PACKED_STRUCT ie_setbuf_t
;
4991 typedef BWL_PRE_PACKED_STRUCT
struct {
4992 uint32 pktflag
; /* bitmask indicating which packet(s) contain this IE */
4993 uint8 id
; /* IE type */
4994 } BWL_POST_PACKED_STRUCT ie_getbuf_t
;
4996 /* structures used to define format of wps ie data from probe requests */
4997 /* passed up to applications via iovar "prbreq_wpsie" */
4998 typedef BWL_PRE_PACKED_STRUCT
struct sta_prbreq_wps_ie_hdr
{
4999 struct ether_addr staAddr
;
5001 } BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_hdr_t
;
5003 typedef BWL_PRE_PACKED_STRUCT
struct sta_prbreq_wps_ie_data
{
5004 sta_prbreq_wps_ie_hdr_t hdr
;
5006 } BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_data_t
;
5008 typedef BWL_PRE_PACKED_STRUCT
struct sta_prbreq_wps_ie_list
{
5010 uint8 ieDataList
[1];
5011 } BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_list_t
;
5014 #ifdef WLMEDIA_TXFAILEVENT
5015 typedef BWL_PRE_PACKED_STRUCT
struct {
5016 char dest
[ETHER_ADDR_LEN
]; /* destination MAC */
5017 uint8 prio
; /* Packet Priority */
5018 uint8 flags
; /* Flags */
5019 uint32 tsf_l
; /* TSF timer low */
5020 uint32 tsf_h
; /* TSF timer high */
5021 uint16 rates
; /* Main Rates */
5022 uint16 txstatus
; /* TX Status */
5023 } BWL_POST_PACKED_STRUCT txfailinfo_t
;
5024 #endif /* WLMEDIA_TXFAILEVENT */
5026 typedef BWL_PRE_PACKED_STRUCT
struct {
5028 chanspec_t chanspec
; /* txpwr report for this channel */
5029 chanspec_t local_chanspec
; /* channel on which we are associated */
5030 uint8 local_max
; /* local max according to the AP */
5031 uint8 local_constraint
; /* local constraint according to the AP */
5032 int8 antgain
[2]; /* Ant gain for each band - from SROM */
5033 uint8 rf_cores
; /* count of RF Cores being reported */
5034 uint8 est_Pout
[4]; /* Latest tx power out estimate per RF chain */
5035 uint8 est_Pout_act
[4]; /* Latest tx power out estimate per RF chain w/o adjustment */
5036 uint8 est_Pout_cck
; /* Latest CCK tx power out estimate */
5037 uint8 tx_power_max
[4]; /* Maximum target power among all rates */
5038 uint tx_power_max_rate_ind
[4]; /* Index of the rate with the max target power */
5039 int8 clm_limits
[WL_NUMRATES
]; /* regulatory limits - 20, 40 or 80MHz */
5040 int8 clm_limits_subchan1
[WL_NUMRATES
]; /* regulatory limits - 20in40 or 40in80 */
5041 int8 clm_limits_subchan2
[WL_NUMRATES
]; /* regulatory limits - 20in80MHz */
5042 int8 sar
; /* SAR limit for display by wl executable */
5043 int8 channel_bandwidth
; /* 20, 40 or 80 MHz bandwidth? */
5044 uint8 version
; /* Version of the data format wlu <--> driver */
5045 uint8 display_core
; /* Displayed curpower core */
5046 int8 target_offsets
[4]; /* Target power offsets for current rate per core */
5047 uint32 last_tx_ratespec
; /* Ratespec for last transmition */
5048 uint user_target
; /* user limit */
5049 uint32 board_limit_len
; /* length of board limit buffer */
5050 uint32 target_len
; /* length of target power buffer */
5051 int8 SARLIMIT
[MAX_STREAMS_SUPPORTED
];
5052 uint8 pprdata
[1]; /* ppr serialization buffer */
5053 } BWL_POST_PACKED_STRUCT tx_pwr_rpt_t
;
5055 #define TXPWR_TARGET_VERSION 0
5056 typedef BWL_PRE_PACKED_STRUCT
struct {
5057 int32 version
; /* version number */
5058 chanspec_t chanspec
; /* txpwr report for this channel */
5059 int8 txpwr
[WL_STA_ANT_MAX
]; /* Max tx target power, in qdb */
5060 uint8 rf_cores
; /* count of RF Cores being reported */
5061 } BWL_POST_PACKED_STRUCT txpwr_target_max_t
;
5063 /* fbt_cap: FBT assoc / reassoc modes. */
5064 #define WLC_FBT_CAP_DRV_4WAY_AND_REASSOC 1 /* Driver 4-way handshake & reassoc (WLFBT). */
5066 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
5068 /* no strict structure packing */
5069 #include <packed_section_end.h>
5071 #ifndef LINUX_POSTMOGRIFY_REMOVAL
5072 /* Global ASSERT Logging */
5073 #define ASSERTLOG_CUR_VER 0x0100
5074 #define MAX_ASSRTSTR_LEN 64
5076 typedef struct assert_record
{
5079 char str
[MAX_ASSRTSTR_LEN
];
5082 typedef struct assertlog_results
{
5086 assert_record_t logs
[1];
5087 } assertlog_results_t
;
5089 #define LOGRRC_FIX_LEN 8
5090 #define IOBUF_ALLOWED_NUM_OF_LOGREC(type, len) ((len - LOGRRC_FIX_LEN)/sizeof(type))
5093 /* channel interference measurement (chanim) related defines */
5096 #define CHANIM_DISABLE 0 /* disabled */
5097 #define CHANIM_DETECT 1 /* detection only */
5098 #define CHANIM_EXT 2 /* external state machine */
5099 #define CHANIM_ACT 3 /* full internal state machine, detect + act */
5100 #define CHANIM_MODE_MAX 4
5102 /* define for apcs reason code */
5104 #define APCS_IOCTL 1
5105 #define APCS_CHANIM 2
5106 #define APCS_CSTIMER 3
5108 #define APCS_TXDLY 5
5109 #define APCS_NONACSD 6
5110 #define APCS_DFS_REENTRY 7
5111 #define APCS_TXFAIL 8
5114 /* number of ACS record entries */
5115 #define CHANIM_ACS_RECORD 10
5118 #define CCASTATS_TXDUR 0
5119 #define CCASTATS_INBSS 1
5120 #define CCASTATS_OBSS 2
5121 #define CCASTATS_NOCTG 3
5122 #define CCASTATS_NOPKT 4
5123 #define CCASTATS_DOZE 5
5124 #define CCASTATS_TXOP 6
5125 #define CCASTATS_GDTXDUR 7
5126 #define CCASTATS_BDTXDUR 8
5127 #define CCASTATS_MAX 9
5129 /* chanim acs record */
5133 chanspec_t selected_chspc
;
5139 } chanim_acs_record_t
;
5142 chanim_acs_record_t acs_record
[CHANIM_ACS_RECORD
];
5147 typedef struct chanim_stats
{
5148 uint32 glitchcnt
; /* normalized as per second count */
5149 uint32 badplcp
; /* normalized as per second count */
5150 uint8 ccastats
[CCASTATS_MAX
]; /* normalized as 0-255 */
5151 int8 bgnoise
; /* background noise level (in dBm) */
5152 chanspec_t chanspec
;
5154 uint32 bphy_glitchcnt
; /* normalized as per second count */
5155 uint32 bphy_badplcp
; /* normalized as per second count */
5156 uint8 chan_idle
; /* normalized as 0~100 */
5159 #define WL_CHANIM_STATS_VERSION 1
5160 #define WL_CHANIM_COUNT_ALL 0xff
5161 #define WL_CHANIM_COUNT_ONE 0x1
5167 chanim_stats_t stats
[1];
5168 } wl_chanim_stats_t
;
5170 #define WL_CHANIM_STATS_FIXED_LEN OFFSETOF(wl_chanim_stats_t, stats)
5172 /* Noise measurement metrics. */
5173 #define NOISE_MEASURE_KNOISE 0x1
5175 /* scb probe parameter */
5178 uint32 scb_activity_time
;
5179 uint32 scb_max_probe
;
5183 #define AP_TPC_OFF 0
5184 #define AP_TPC_BSS_PWR 1 /* BSS power control */
5185 #define AP_TPC_AP_PWR 2 /* AP power control */
5186 #define AP_TPC_AP_BSS_PWR 3 /* Both AP and BSS power control */
5187 #define AP_TPC_MAX_LINK_MARGIN 127
5189 /* structure/defines for selective mgmt frame (smf) stats support */
5191 #define SMFS_VERSION 1
5192 /* selected mgmt frame (smf) stats element */
5193 typedef struct wl_smfs_elem
{
5195 uint16 code
; /* SC or RC code */
5198 typedef struct wl_smf_stats
{
5200 uint16 length
; /* reserved for future usage */
5204 uint32 malformed_cnt
;
5205 uint32 count_total
; /* count included the interested group */
5206 wl_smfs_elem_t elem
[1];
5209 #define WL_SMFSTATS_FIXED_LEN OFFSETOF(wl_smf_stats_t, elem);
5216 /* reuse two number in the sc/rc space */
5217 #define SMFS_CODE_MALFORMED 0xFFFE
5218 #define SMFS_CODE_IGNORED 0xFFFD
5220 typedef enum smfs_type
{
5224 SMFS_TYPE_DISASSOC_TX
,
5225 SMFS_TYPE_DISASSOC_RX
,
5226 SMFS_TYPE_DEAUTH_TX
,
5227 SMFS_TYPE_DEAUTH_RX
,
5233 #define PHYMON_VERSION 1
5235 typedef struct wl_phycal_core_state
{
5236 /* Tx IQ/LO calibration coeffs */
5248 /* Rx IQ calibration coeffs */
5252 uint8 tx_iqlocal_pwridx
; /* Tx Power Index for Tx IQ/LO calibration */
5253 uint32 papd_epsilon_table
[64]; /* PAPD epsilon table */
5254 int16 papd_epsilon_offset
; /* PAPD epsilon offset */
5255 uint8 curr_tx_pwrindex
; /* Tx power index */
5256 int8 idle_tssi
; /* Idle TSSI */
5257 int8 est_tx_pwr
; /* Estimated Tx Power (dB) */
5258 int8 est_rx_pwr
; /* Estimated Rx Power (dB) from RSSI */
5259 uint16 rx_gaininfo
; /* Rx gain applied on last Rx pkt */
5260 uint16 init_gaincode
; /* initgain required for ACI */
5264 } wl_phycal_core_state_t
;
5266 typedef struct wl_phycal_state
{
5268 int8 num_phy_cores
; /* number of cores */
5269 int8 curr_temperature
; /* on-chip temperature sensor reading */
5270 chanspec_t chspec
; /* channspec for this state */
5271 bool aci_state
; /* ACI state: ON/OFF */
5272 uint16 crsminpower
; /* crsminpower required for ACI */
5273 uint16 crsminpowerl
; /* crsminpowerl required for ACI */
5274 uint16 crsminpoweru
; /* crsminpoweru required for ACI */
5275 wl_phycal_core_state_t phycal_core
[1];
5276 } wl_phycal_state_t
;
5278 #define WL_PHYCAL_STAT_FIXED_LEN OFFSETOF(wl_phycal_state_t, phycal_core)
5281 /* discovery state */
5282 typedef struct wl_p2p_disc_st
{
5283 uint8 state
; /* see state */
5284 chanspec_t chspec
; /* valid in listen state */
5285 uint16 dwell
; /* valid in listen state, in ms */
5289 #define WL_P2P_DISC_ST_SCAN 0
5290 #define WL_P2P_DISC_ST_LISTEN 1
5291 #define WL_P2P_DISC_ST_SEARCH 2
5294 typedef struct wl_p2p_scan
{
5295 uint8 type
; /* 'S' for WLC_SCAN, 'E' for "escan" */
5297 /* scan or escan parms... */
5301 typedef struct wl_p2p_if
{
5302 struct ether_addr addr
;
5303 uint8 type
; /* see i/f type */
5304 chanspec_t chspec
; /* for p2p_ifadd GO */
5308 #define WL_P2P_IF_CLIENT 0
5309 #define WL_P2P_IF_GO 1
5310 #define WL_P2P_IF_DYNBCN_GO 2
5311 #define WL_P2P_IF_DEV 3
5314 typedef struct wl_p2p_ifq
{
5316 char ifname
[BCM_MSG_IFNAME_MAX
];
5319 /* OppPS & CTWindow */
5320 typedef struct wl_p2p_ops
{
5321 uint8 ops
; /* 0: disable 1: enable */
5322 uint8 ctw
; /* >= 10 */
5325 /* absence and presence request */
5326 typedef struct wl_p2p_sched_desc
{
5330 uint32 count
; /* see count */
5331 } wl_p2p_sched_desc_t
;
5334 #define WL_P2P_SCHED_RSVD 0
5335 #define WL_P2P_SCHED_REPEAT 255 /* anything > 255 will be treated as 255 */
5337 typedef struct wl_p2p_sched
{
5338 uint8 type
; /* see schedule type */
5339 uint8 action
; /* see schedule action */
5340 uint8 option
; /* see schedule option */
5341 wl_p2p_sched_desc_t desc
[1];
5343 #define WL_P2P_SCHED_FIXED_LEN 3
5346 #define WL_P2P_SCHED_TYPE_ABS 0 /* Scheduled Absence */
5347 #define WL_P2P_SCHED_TYPE_REQ_ABS 1 /* Requested Absence */
5349 /* schedule action during absence periods (for WL_P2P_SCHED_ABS type) */
5350 #define WL_P2P_SCHED_ACTION_NONE 0 /* no action */
5351 #define WL_P2P_SCHED_ACTION_DOZE 1 /* doze */
5352 /* schedule option - WL_P2P_SCHED_TYPE_REQ_ABS */
5353 #define WL_P2P_SCHED_ACTION_GOOFF 2 /* turn off GO beacon/prbrsp functions */
5354 /* schedule option - WL_P2P_SCHED_TYPE_XXX */
5355 #define WL_P2P_SCHED_ACTION_RESET 255 /* reset */
5357 /* schedule option - WL_P2P_SCHED_TYPE_ABS */
5358 #define WL_P2P_SCHED_OPTION_NORMAL 0 /* normal start/interval/duration/count */
5359 #define WL_P2P_SCHED_OPTION_BCNPCT 1 /* percentage of beacon interval */
5360 /* schedule option - WL_P2P_SCHED_TYPE_REQ_ABS */
5361 #define WL_P2P_SCHED_OPTION_TSFOFS 2 /* normal start/internal/duration/count with
5362 * start being an offset of the 'current' TSF
5366 #define WL_P2P_FEAT_GO_CSA (1 << 0) /* GO moves with the STA using CSA method */
5367 #define WL_P2P_FEAT_GO_NOLEGACY (1 << 1) /* GO does not probe respond to non-p2p probe
5370 #define WL_P2P_FEAT_RESTRICT_DEV_RESP (1 << 2) /* Restrict p2p dev interface from responding */
5373 #define BCM_ACTION_RFAWARE 0x77
5374 #define BCM_ACTION_RFAWARE_DCS 0x01
5376 /* DCS reason code define */
5377 #define BCM_DCS_IOVAR 0x1
5378 #define BCM_DCS_UNKNOWN 0xFF
5380 typedef struct wl_bcmdcs_data
{
5385 /* n-mode support capability */
5386 /* 2x2 includes both 1x1 & 2x2 devices
5387 * reserved #define 2 for future when we want to separate 1x1 & 2x2 and
5388 * control it independently
5390 #define WL_11N_2x2 1
5391 #define WL_11N_3x3 3
5392 #define WL_11N_4x4 4
5394 /* define 11n feature disable flags */
5395 #define WLFEATURE_DISABLE_11N 0x00000001
5396 #define WLFEATURE_DISABLE_11N_STBC_TX 0x00000002
5397 #define WLFEATURE_DISABLE_11N_STBC_RX 0x00000004
5398 #define WLFEATURE_DISABLE_11N_SGI_TX 0x00000008
5399 #define WLFEATURE_DISABLE_11N_SGI_RX 0x00000010
5400 #define WLFEATURE_DISABLE_11N_AMPDU_TX 0x00000020
5401 #define WLFEATURE_DISABLE_11N_AMPDU_RX 0x00000040
5402 #define WLFEATURE_DISABLE_11N_GF 0x00000080
5404 /* Proxy STA modes */
5405 #define PSTA_MODE_DISABLED 0
5406 #define PSTA_MODE_PROXY 1
5407 #define PSTA_MODE_REPEATER 2
5410 /* NAT configuration */
5412 uint32 ipaddr
; /* interface ip address */
5413 uint32 ipaddr_mask
; /* interface ip address mask */
5414 uint32 ipaddr_gateway
; /* gateway ip address */
5415 uint8 mac_gateway
[6]; /* gateway mac address */
5416 uint32 ipaddr_dns
; /* DNS server ip address, valid only for public if */
5417 uint8 mac_dns
[6]; /* DNS server mac address, valid only for public if */
5418 uint8 GUID
[38]; /* interface GUID */
5422 uint op
; /* operation code */
5423 bool pub_if
; /* set for public if, clear for private if */
5424 nat_if_info_t if_info
; /* interface info */
5427 /* op code in nat_cfg */
5428 #define NAT_OP_ENABLE 1 /* enable NAT on given interface */
5429 #define NAT_OP_DISABLE 2 /* disable NAT on given interface */
5430 #define NAT_OP_DISABLE_ALL 3 /* disable NAT on all interfaces */
5433 #define NAT_STATE_ENABLED 1 /* NAT is enabled */
5434 #define NAT_STATE_DISABLED 2 /* NAT is disabled */
5437 int state
; /* NAT state returned */
5440 #ifdef PROP_TXSTATUS
5441 /* Bit definitions for tlv iovar */
5443 * enable RSSI signals:
5444 * WLFC_CTL_TYPE_RSSI
5446 #define WLFC_FLAGS_RSSI_SIGNALS 1
5448 /* enable (if/mac_open, if/mac_close,, mac_add, mac_del) signals:
5450 * WLFC_CTL_TYPE_MAC_OPEN
5451 * WLFC_CTL_TYPE_MAC_CLOSE
5453 * WLFC_CTL_TYPE_INTERFACE_OPEN
5454 * WLFC_CTL_TYPE_INTERFACE_CLOSE
5456 * WLFC_CTL_TYPE_MACDESC_ADD
5457 * WLFC_CTL_TYPE_MACDESC_DEL
5460 #define WLFC_FLAGS_XONXOFF_SIGNALS 2
5462 /* enable (status, fifo_credit, mac_credit) signals
5463 * WLFC_CTL_TYPE_MAC_REQUEST_CREDIT
5464 * WLFC_CTL_TYPE_TXSTATUS
5465 * WLFC_CTL_TYPE_FIFO_CREDITBACK
5467 #define WLFC_FLAGS_CREDIT_STATUS_SIGNALS 4
5469 #define WLFC_FLAGS_HOST_PROPTXSTATUS_ACTIVE 8
5470 #define WLFC_FLAGS_PSQ_GENERATIONFSM_ENABLE 16
5471 #define WLFC_FLAGS_PSQ_ZERO_BUFFER_ENABLE 32
5472 #endif /* PROP_TXSTATUS */
5474 #define BTA_STATE_LOG_SZ 64
5476 /* BTAMP Statemachine states */
5479 HCIReadLocalAMPInfo
,
5480 HCIReadLocalAMPASSOC
,
5481 HCIWriteRemoteAMPASSOC
,
5482 HCICreatePhysicalLink
,
5483 HCIAcceptPhysicalLinkRequest
,
5484 HCIDisconnectPhysicalLink
,
5485 HCICreateLogicalLink
,
5486 HCIAcceptLogicalLink
,
5487 HCIDisconnectLogicalLink
,
5488 HCILogicalLinkCancel
,
5490 HCIWriteLogicalLinkAcceptTimeout
5493 typedef struct flush_txfifo
{
5495 uint32 hwtxfifoflush
;
5496 struct ether_addr ea
;
5499 #define CHANNEL_5G_LOW_START 36 /* 5G low (36..48) CDD enable/disable bit mask */
5500 #define CHANNEL_5G_MID_START 52 /* 5G mid (52..64) CDD enable/disable bit mask */
5501 #define CHANNEL_5G_HIGH_START 100 /* 5G high (100..140) CDD enable/disable bit mask */
5502 #define CHANNEL_5G_UPPER_START 149 /* 5G upper (149..161) CDD enable/disable bit mask */
5505 SPATIAL_MODE_2G_IDX
= 0,
5506 SPATIAL_MODE_5G_LOW_IDX
,
5507 SPATIAL_MODE_5G_MID_IDX
,
5508 SPATIAL_MODE_5G_HIGH_IDX
,
5509 SPATIAL_MODE_5G_UPPER_IDX
,
5510 SPATIAL_MODE_MAX_IDX
5513 #define WLC_TXCORE_MAX 4 /* max number of txcore supports */
5514 #define WLC_SUBBAND_MAX 4 /* max number of sub-band supports */
5516 uint8 band2g
[WLC_TXCORE_MAX
];
5517 uint8 band5g
[WLC_SUBBAND_MAX
][WLC_TXCORE_MAX
];
5520 /* IOVAR "mempool" parameter. Used to retrieve a list of memory pool statistics. */
5521 typedef struct wl_mempool_stats
{
5522 int num
; /* Number of memory pools */
5523 bcm_mp_stats_t s
[1]; /* Variable array of memory pool stats. */
5524 } wl_mempool_stats_t
;
5526 /* Network Offload Engine */
5527 #define NWOE_OL_ENABLE 0x00000001
5531 uint32 ipaddr_netmask
;
5532 uint32 ipaddr_gateway
;
5536 * Traffic management structures/defines.
5539 /* Traffic management bandwidth parameters */
5540 #define TRF_MGMT_MAX_PRIORITIES 3
5542 #define TRF_MGMT_FLAG_ADD_DSCP 0x0001 /* Add DSCP to IP TOS field */
5543 #define TRF_MGMT_FLAG_DISABLE_SHAPING 0x0002 /* Don't shape traffic */
5544 #define TRF_MGMT_FLAG_MANAGE_LOCAL_TRAFFIC 0x0008 /* Manage traffic over our local subnet */
5545 #define TRF_MGMT_FLAG_FILTER_ON_MACADDR 0x0010 /* filter on MAC address */
5546 #define TRF_MGMT_FLAG_NO_RX 0x0020 /* do not apply fiters to rx packets */
5548 #define TRF_FILTER_MAC_ADDR 0x0001 /* L2 filter use dst mac address for filtering */
5549 #define TRF_FILTER_IP_ADDR 0x0002 /* L3 filter use ip ddress for filtering */
5550 #define TRF_FILTER_L4 0x0004 /* L4 filter use tcp/udp for filtering */
5551 #define TRF_FILTER_DWM 0x0008 /* L3 filter use DSCP for filtering */
5552 #define TRF_FILTER_FAVORED 0x0010 /* Tag the packet FAVORED */
5554 /* Traffic management priority classes */
5555 typedef enum trf_mgmt_priority_class
{
5556 trf_mgmt_priority_low
= 0, /* Maps to 802.1p BK */
5557 trf_mgmt_priority_medium
= 1, /* Maps to 802.1p BE */
5558 trf_mgmt_priority_high
= 2, /* Maps to 802.1p VI */
5559 trf_mgmt_priority_nochange
= 3, /* do not update the priority */
5560 trf_mgmt_priority_invalid
= (trf_mgmt_priority_nochange
+ 1)
5561 } trf_mgmt_priority_class_t
;
5563 /* Traffic management configuration parameters */
5564 typedef struct trf_mgmt_config
{
5565 uint32 trf_mgmt_enabled
; /* 0 - disabled, 1 - enabled */
5566 uint32 flags
; /* See TRF_MGMT_FLAG_xxx defines */
5567 uint32 host_ip_addr
; /* My IP address to determine subnet */
5568 uint32 host_subnet_mask
; /* My subnet mask */
5569 uint32 downlink_bandwidth
; /* In units of kbps */
5570 uint32 uplink_bandwidth
; /* In units of kbps */
5571 uint32 min_tx_bandwidth
[TRF_MGMT_MAX_PRIORITIES
]; /* Minimum guaranteed tx bandwidth */
5572 uint32 min_rx_bandwidth
[TRF_MGMT_MAX_PRIORITIES
]; /* Minimum guaranteed rx bandwidth */
5573 } trf_mgmt_config_t
;
5575 /* Traffic management filter */
5576 typedef struct trf_mgmt_filter
{
5577 struct ether_addr dst_ether_addr
; /* His L2 address */
5578 uint32 dst_ip_addr
; /* His IP address */
5579 uint16 dst_port
; /* His L4 port */
5580 uint16 src_port
; /* My L4 port */
5581 uint16 prot
; /* L4 protocol (only TCP or UDP) */
5582 uint16 flags
; /* TBD. For now, this must be zero. */
5583 trf_mgmt_priority_class_t priority
; /* Priority for filtered packets */
5584 uint32 dscp
; /* DSCP */
5585 } trf_mgmt_filter_t
;
5587 /* Traffic management filter list (variable length) */
5588 typedef struct trf_mgmt_filter_list
{
5590 trf_mgmt_filter_t filter
[1];
5591 } trf_mgmt_filter_list_t
;
5593 /* Traffic management global info used for all queues */
5594 typedef struct trf_mgmt_global_info
{
5595 uint32 maximum_bytes_per_second
;
5596 uint32 maximum_bytes_per_sampling_period
;
5597 uint32 total_bytes_consumed_per_second
;
5598 uint32 total_bytes_consumed_per_sampling_period
;
5599 uint32 total_unused_bytes_per_sampling_period
;
5600 } trf_mgmt_global_info_t
;
5602 /* Traffic management shaping info per priority queue */
5603 typedef struct trf_mgmt_shaping_info
{
5604 uint32 gauranteed_bandwidth_percentage
;
5605 uint32 guaranteed_bytes_per_second
;
5606 uint32 guaranteed_bytes_per_sampling_period
;
5607 uint32 num_bytes_produced_per_second
;
5608 uint32 num_bytes_consumed_per_second
;
5609 uint32 num_queued_packets
; /* Number of packets in queue */
5610 uint32 num_queued_bytes
; /* Number of bytes in queue */
5611 } trf_mgmt_shaping_info_t
;
5613 /* Traffic management shaping info array */
5614 typedef struct trf_mgmt_shaping_info_array
{
5615 trf_mgmt_global_info_t tx_global_shaping_info
;
5616 trf_mgmt_shaping_info_t tx_queue_shaping_info
[TRF_MGMT_MAX_PRIORITIES
];
5617 trf_mgmt_global_info_t rx_global_shaping_info
;
5618 trf_mgmt_shaping_info_t rx_queue_shaping_info
[TRF_MGMT_MAX_PRIORITIES
];
5619 } trf_mgmt_shaping_info_array_t
;
5622 /* Traffic management statistical counters */
5623 typedef struct trf_mgmt_stats
{
5624 uint32 num_processed_packets
; /* Number of packets processed */
5625 uint32 num_processed_bytes
; /* Number of bytes processed */
5626 uint32 num_discarded_packets
; /* Number of packets discarded from queue */
5629 /* Traffic management statisics array */
5630 typedef struct trf_mgmt_stats_array
{
5631 trf_mgmt_stats_t tx_queue_stats
[TRF_MGMT_MAX_PRIORITIES
];
5632 trf_mgmt_stats_t rx_queue_stats
[TRF_MGMT_MAX_PRIORITIES
];
5633 } trf_mgmt_stats_array_t
;
5635 typedef struct lpc_params
{
5636 /* LPC Params exposed via IOVAR */
5637 uint8 rate_stab_thresh
; /* Thresh for rate stability based on nupd */
5638 uint8 pwr_stab_thresh
; /* Number of successes before power step down */
5639 uint8 lpc_exp_time
; /* Time lapse for expiry of database */
5640 uint8 pwrup_slow_step
; /* Step size for slow step up */
5641 uint8 pwrup_fast_step
; /* Step size for fast step up */
5642 uint8 pwrdn_slow_step
; /* Step size for slow step down */
5645 /* tx pkt delay statistics */
5646 #define SCB_RETRY_SHORT_DEF 7 /* Default Short retry Limit */
5647 #define WLPKTDLY_HIST_NBINS 16 /* number of bins used in the Delay histogram */
5649 /* structure to store per-AC delay statistics */
5650 typedef struct scb_delay_stats
{
5651 uint32 txmpdu_lost
; /* number of MPDUs lost */
5652 uint32 txmpdu_cnt
[SCB_RETRY_SHORT_DEF
]; /* retry times histogram */
5653 uint32 delay_sum
[SCB_RETRY_SHORT_DEF
]; /* cumulative packet latency */
5654 uint32 delay_min
; /* minimum packet latency observed */
5655 uint32 delay_max
; /* maximum packet latency observed */
5656 uint32 delay_avg
; /* packet latency average */
5657 uint32 delay_hist
[WLPKTDLY_HIST_NBINS
]; /* delay histogram */
5658 } scb_delay_stats_t
;
5660 /* structure for txdelay event */
5661 typedef struct txdelay_event
{
5664 chanim_stats_t chanim_stats
;
5665 scb_delay_stats_t delay_stats
[AC_COUNT
];
5668 /* structure for txdelay parameters */
5669 typedef struct txdelay_params
{
5670 uint16 ratio
; /* Avg Txdelay Delta */
5671 uint8 cnt
; /* Sample cnt */
5672 uint8 period
; /* Sample period */
5673 uint8 tune
; /* Debug */
5676 /* WNM/NPS subfeatures mask */
5677 #define WL_WNM_BSSTRANS 0x00000001
5678 #define WL_WNM_PROXYARP 0x00000002
5679 #define WL_WNM_MAXIDLE 0x00000004
5680 #define WL_WNM_TIMBC 0x00000008
5681 #define WL_WNM_TFS 0x00000010
5682 #define WL_WNM_SLEEP 0x00000020
5683 #define WL_WNM_DMS 0x00000040
5684 #define WL_WNM_FMS 0x00000080
5685 #define WL_WNM_NOTIF 0x00000100
5686 #define WL_WNM_MAX 0x00000200
5689 WNM_SERVICE_DMS
= 1,
5690 WNM_SERVICE_FMS
= 2,
5694 /* Definitions for WNM/NPS TCLAS */
5695 typedef struct wl_tclas
{
5696 uint8 user_priority
;
5698 dot11_tclas_fc_t fc
;
5701 #define WL_TCLAS_FIXED_SIZE OFFSETOF(wl_tclas_t, fc)
5703 typedef struct wl_tclas_list
{
5705 wl_tclas_t tclas
[1];
5708 /* Definitions for WNM/NPS Traffic Filter Service */
5709 typedef struct wl_tfs_filter
{
5710 uint8 status
; /* Status returned by the AP */
5711 uint8 tclas_proc
; /* TCLAS processing value (0:and, 1:or) */
5712 uint8 tclas_cnt
; /* count of all wl_tclas_t in tclas array */
5713 uint8 tclas
[1]; /* VLA of wl_tclas_t */
5715 #define WL_TFS_FILTER_FIXED_SIZE OFFSETOF(wl_tfs_filter_t, tclas)
5717 typedef struct wl_tfs_fset
{
5718 struct ether_addr ea
; /* Address of AP/STA involved with this filter set */
5719 uint8 tfs_id
; /* TFS ID field chosen by STA host */
5720 uint8 status
; /* Internal status TFS_STATUS_xxx */
5721 uint8 actcode
; /* Action code DOT11_TFS_ACTCODE_xxx */
5722 uint8 token
; /* Token used in last request frame */
5723 uint8 notify
; /* Notify frame sent/received because of this set */
5724 uint8 filter_cnt
; /* count of all wl_tfs_filter_t in filter array */
5725 uint8 filter
[1]; /* VLA of wl_tfs_filter_t */
5727 #define WL_TFS_FSET_FIXED_SIZE OFFSETOF(wl_tfs_fset_t, filter)
5730 TFS_STATUS_DISABLED
= 0, /* TFS filter set disabled by user */
5731 TFS_STATUS_DISABLING
= 1, /* Empty request just sent to AP */
5732 TFS_STATUS_VALIDATED
= 2, /* Filter set validated by AP (but maybe not enabled!) */
5733 TFS_STATUS_VALIDATING
= 3, /* Filter set just sent to AP */
5734 TFS_STATUS_NOT_ASSOC
= 4, /* STA not associated */
5735 TFS_STATUS_NOT_SUPPORT
= 5, /* TFS not supported by AP */
5736 TFS_STATUS_DENIED
= 6, /* Filter set refused by AP (=> all sets are disabled!) */
5739 typedef struct wl_tfs_status
{
5740 uint8 fset_cnt
; /* count of all wl_tfs_fset_t in fset array */
5741 wl_tfs_fset_t fset
[1]; /* VLA of wl_tfs_fset_t */
5744 typedef struct wl_tfs_set
{
5745 uint8 send
; /* Immediatly register registered sets on AP side */
5746 uint8 tfs_id
; /* ID of a specific set (existing or new), or 0 for all */
5747 uint8 actcode
; /* Action code for this filter set */
5748 uint8 tclas_proc
; /* TCLAS processing operator for this filter set */
5752 TFS_TERM_SEND_NOW
= 1, /* Send the TFS frame immediatly */
5753 TFS_TERM_DELETE
= 2 /* Also delete set internally */
5756 typedef struct wl_tfs_term
{
5757 uint8 flags
; /* Bitfield of WL_TFS_TERM_xxx */
5758 uint8 tfs_id
; /* ID of a specific set (existing), or 0 for all */
5762 /* Definitions for WNM/NPS Directed Multicast Service */
5764 DMS_STATUS_DISABLED
= 0, /* DMS desc disabled by user */
5765 DMS_STATUS_ACCEPTED
= 1, /* Request accepted by AP */
5766 DMS_STATUS_NOT_ASSOC
= 2, /* STA not associated */
5767 DMS_STATUS_NOT_SUPPORT
= 3, /* DMS not supported by AP */
5768 DMS_STATUS_DENIED
= 4, /* Request denied by AP */
5769 DMS_STATUS_TERM
= 5, /* Request terminated by AP */
5770 DMS_STATUS_REMOVING
= 6, /* Remove request just sent */
5771 DMS_STATUS_ADDING
= 7, /* Add request just sent */
5772 DMS_STATUS_ERROR
= 8 /* Non compliant AP behvior */
5775 typedef struct wl_dms_desc
{
5781 uint8 mac_len
; /* length of all ether_addr in data array, 0 if STA */
5782 uint8 tclas_len
; /* length of all wl_tclas_t in data array */
5783 uint8 data
[1]; /* VLA of 'ether_addr' and 'wl_tclas_t' (in this order ) */
5786 #define WL_DMS_DESC_FIXED_SIZE OFFSETOF(wl_dms_desc_t, data)
5788 typedef struct wl_dms_status
{
5790 wl_dms_desc_t desc
[1];
5793 typedef struct wl_dms_set
{
5799 typedef struct wl_dms_term
{
5804 typedef struct wl_service_term
{
5809 } wl_service_term_t
;
5811 /* Definitions for WNM/NPS BSS Transistion */
5812 typedef struct wl_bsstrans_req
{
5813 uint16 tbtt
; /* time of BSS to end of life, in unit of TBTT */
5814 uint16 dur
; /* time of BSS to keep off, in unit of minute */
5815 uint8 reqmode
; /* request mode of BSS transition request */
5816 uint8 unicast
; /* request by unicast or by broadcast */
5817 } wl_bsstrans_req_t
;
5819 /* Definitions for WNM/NPS TIM Broadcast */
5820 typedef struct wl_timbc_offset
{
5821 int16 offset
; /* offset in us */
5822 uint16 fix_intv
; /* override interval sent from STA */
5823 uint16 rate_override
; /* use rate override to send high rate TIM broadcast frame */
5824 uint8 tsf_present
; /* show timestamp in TIM broadcast frame */
5825 } wl_timbc_offset_t
;
5827 typedef struct wl_timbc_set
{
5828 uint8 interval
; /* Interval in DTIM wished or required. */
5829 uint8 flags
; /* Bitfield described below */
5830 uint16 rate_min
; /* Minimum rate required for High/Low TIM frames. Optionnal */
5831 uint16 rate_max
; /* Maximum rate required for High/Low TIM frames. Optionnal */
5835 WL_TIMBC_SET_TSF_REQUIRED
= 1, /* Enable TIMBC only if TSF in TIM frames */
5836 WL_TIMBC_SET_NO_OVERRIDE
= 2, /* ... if AP does not override interval */
5837 WL_TIMBC_SET_PROXY_ARP
= 4, /* ... if AP support Proxy ARP */
5838 WL_TIMBC_SET_DMS_ACCEPTED
= 8 /* ... if all DMS desc have been accepted */
5841 typedef struct wl_timbc_status
{
5842 uint8 status_sta
; /* Status from internal state machine (check below) */
5843 uint8 status_ap
; /* From AP response frame (check 8.4.2.86 from 802.11) */
5849 } wl_timbc_status_t
;
5852 WL_TIMBC_STATUS_DISABLE
= 0, /* TIMBC disabled by user */
5853 WL_TIMBC_STATUS_REQ_MISMATCH
= 1, /* AP settings do no match user requirements */
5854 WL_TIMBC_STATUS_NOT_ASSOC
= 2, /* STA not associated */
5855 WL_TIMBC_STATUS_NOT_SUPPORT
= 3, /* TIMBC not supported by AP */
5856 WL_TIMBC_STATUS_DENIED
= 4, /* Req to disable TIMBC sent to AP */
5857 WL_TIMBC_STATUS_ENABLE
= 5 /* TIMBC enabled */
5860 #define WL_TIMBC_STATUS_AP_UNKNOWN 255 /* AP status for internal use only */
5862 /* Definitions for PM2 Dynamic Fast Return To Sleep */
5863 typedef struct wl_pm2_sleep_ret_ext
{
5864 uint8 logic
; /* DFRTS logic: see WL_DFRTS_LOGIC_* below */
5865 uint16 low_ms
; /* Low FRTS timeout */
5866 uint16 high_ms
; /* High FRTS timeout */
5867 uint16 rx_pkts_threshold
; /* switching threshold: # rx pkts */
5868 uint16 tx_pkts_threshold
; /* switching threshold: # tx pkts */
5869 uint16 txrx_pkts_threshold
; /* switching threshold: # (tx+rx) pkts */
5870 uint32 rx_bytes_threshold
; /* switching threshold: # rx bytes */
5871 uint32 tx_bytes_threshold
; /* switching threshold: # tx bytes */
5872 uint32 txrx_bytes_threshold
; /* switching threshold: # (tx+rx) bytes */
5873 } wl_pm2_sleep_ret_ext_t
;
5875 #define WL_DFRTS_LOGIC_OFF 0 /* Feature is disabled */
5876 #define WL_DFRTS_LOGIC_OR 1 /* OR all non-zero threshold conditions */
5877 #define WL_DFRTS_LOGIC_AND 2 /* AND all non-zero threshold conditions */
5879 /* Definitions for Reliable Multicast */
5880 #define WL_RELMCAST_MAX_CLIENT 32
5881 #define WL_RELMCAST_FLAG_INBLACKLIST 1
5882 #define WL_RELMCAST_FLAG_ACTIVEACKER 2
5883 #define WL_RELMCAST_FLAG_RELMCAST 4
5885 #define WL_RELMCAST_VER 1
5887 typedef struct wl_relmcast_client
{
5890 struct ether_addr addr
;
5891 } wl_relmcast_client_t
;
5893 typedef struct wl_relmcast_st
{
5896 wl_relmcast_client_t clients
[WL_RELMCAST_MAX_CLIENT
];
5897 } wl_relmcast_status_t
;
5899 /* structures for proximity detection device role */
5900 #define WL_PROXD_MODE_DISABLE 0
5901 #define WL_PROXD_MODE_NEUTRAL 1
5902 #define WL_PROXD_MODE_INITIATOR 2
5903 #define WL_PROXD_MODE_TARGET 3
5904 #define WL_PROXD_RANDOM_WAKEUP 0x8000
5906 typedef struct wl_proxd_iovar
{
5907 uint16 method
; /* Proxmity Detection method */
5908 uint16 mode
; /* Mode (neutral, initiator, target) */
5911 /* structures for proximity detection parameters */
5912 typedef struct wl_proxd_params_rssi_method
{
5913 chanspec_t chanspec
; /* chanspec for home channel */
5914 uint16 interval
; /* interval between neighbor finding attempts (in TU) */
5915 uint16 duration
; /* duration of neighbor finding attempts (in ms) */
5916 int16 rssi_thresh
; /* RSSI threshold (in dBm) */
5917 int16 tx_power
; /* tx power of Proximity Detection frames (in dBm) */
5918 uint16 tx_rate
; /* tx rate of Proximity Detection frames
5919 * (in 500kbps units)
5921 uint16 timeout
; /* state machine wait timeout of the frames (in ms) */
5922 uint16 maxconvergtmo
; /* max wait converge timeout (in ms) */
5923 } wl_proxd_params_rssi_method_t
;
5925 typedef struct wl_proxd_params_iovar
{
5926 uint16 method
; /* Proxmity Detection method */
5928 wl_proxd_params_rssi_method_t rssi_params
;
5929 } u
; /* Method specific optional parameters */
5930 } wl_proxd_params_iovar_t
;
5934 RSSI_REASON_LOWRSSI
,
5941 RSSI_STATE_TPAIRING
,
5942 RSSI_STATE_IPAIRING
,
5943 RSSI_STATE_THANDSHAKE
,
5944 RSSI_STATE_IHANDSHAKE
,
5945 RSSI_STATE_CONFIRMED
,
5946 RSSI_STATE_PIPELINE
,
5952 typedef struct wl_proxd_status_iovar
{
5959 struct ether_addr peer
;
5962 } wl_proxd_status_iovar_t
;
5966 #define NET_DETECT_MAX_WAKE_DATA_SIZE 2048
5967 #define NET_DETECT_MAX_PROFILES 16
5968 #define NET_DETECT_MAX_CHANNELS 50
5970 typedef struct net_detect_adapter_features
{
5972 bool net_detect_enabled
;
5974 } net_detect_adapter_features_t
;
5976 typedef enum net_detect_bss_type
{
5980 } net_detect_bss_type_t
;
5982 typedef struct net_detect_profile
{
5984 net_detect_bss_type_t bss_type
; /* Ignore for now since Phase 1 is only for ESS */
5985 uint32 cipher_type
; /* DOT11_CIPHER_ALGORITHM enumeration values */
5986 uint32 auth_type
; /* DOT11_AUTH_ALGORITHM enumeration values */
5987 } net_detect_profile_t
;
5989 typedef struct net_detect_profile_list
{
5990 uint32 num_nd_profiles
;
5991 net_detect_profile_t nd_profile
[0];
5992 } net_detect_profile_list_t
;
5994 typedef struct net_detect_config
{
5996 uint32 scan_interval
;
5998 bool wake_if_connected
;
5999 bool wake_if_disconnected
;
6000 net_detect_profile_list_t nd_profile_list
;
6001 } net_detect_config_t
;
6003 typedef enum net_detect_wake_reason
{
6008 } net_detect_wake_reason_t
;
6010 typedef struct net_detect_wake_data
{
6011 net_detect_wake_reason_t nd_wake_reason
;
6012 uint32 nd_wake_date_length
;
6013 uint8 nd_wake_data
[0]; /* Wake data (currently unused) */
6014 } net_detect_wake_data_t
;
6016 #endif /* NET_DETECT */
6018 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
6020 typedef struct bcnreq
{
6024 struct ether_addr da
;
6030 typedef struct rrmreq
{
6031 struct ether_addr da
;
6039 typedef struct framereq
{
6040 struct ether_addr da
;
6045 struct ether_addr ta
;
6049 typedef struct statreq
{
6050 struct ether_addr da
;
6051 struct ether_addr peer
;
6058 #define WL_RRM_RPT_VER 0
6059 #define WL_RRM_RPT_MAX_PAYLOAD 64
6060 #define WL_RRM_RPT_MIN_PAYLOAD 7
6061 #define WL_RRM_RPT_FALG_ERR 0
6062 #define WL_RRM_RPT_FALG_OK 1
6064 uint16 ver
; /* version */
6065 struct ether_addr addr
; /* STA MAC addr */
6066 uint32 timestamp
; /* timestamp of the report */
6067 uint16 flag
; /* flag */
6068 uint16 len
; /* length of payload data */
6069 unsigned char data
[WL_RRM_RPT_MAX_PAYLOAD
];
6072 typedef struct wlc_l2keepalive_ol_params
{
6076 } wlc_l2keepalive_ol_params_t
;
6078 typedef struct wlc_dwds_config
{
6080 uint32 mode
; /* STA/AP interface */
6081 struct ether_addr ea
;
6082 } wlc_dwds_config_t
;
6084 /* Video Traffic Interference Monitor config */
6085 #define INTFER_VERSION 1
6086 typedef struct wl_intfer_params
{
6087 uint16 version
; /* version */
6088 uint8 period
; /* sample period */
6089 uint8 cnt
; /* sample cnt */
6090 uint8 txfail_thresh
; /* non-TCP txfail threshold */
6091 uint8 tcptxfail_thresh
; /* tcptxfail threshold */
6092 } wl_intfer_params_t
;
6094 typedef struct wl_staprio_cfg
{
6095 struct ether_addr ea
; /* mac addr */
6096 uint8 prio
; /* scb priority */
6099 typedef enum wl_stamon_cfg_cmd_type
{
6100 STAMON_CFG_CMD_DEL
= 0,
6101 STAMON_CFG_CMD_ADD
= 1,
6102 STAMON_CFG_CMD_ENB
= 2,
6103 STAMON_CFG_CMD_DSB
= 3
6104 } wl_stamon_cfg_cmd_type_t
;
6106 typedef struct wlc_stamon_sta_config
{
6107 wl_stamon_cfg_cmd_type_t cmd
; /* 0 - delete, 1 - add */
6108 struct ether_addr ea
;
6109 } wlc_stamon_sta_config_t
;
6111 /* monitor_promisc_level bits */
6112 #define WL_MONPROMISC_PROMISC 0x0001
6113 #define WL_MONPROMISC_CTRL 0x0002
6114 #define WL_MONPROMISC_FCS 0x0004
6116 typedef struct wl_taf_sta
{
6117 struct ether_addr ea
; /* STA MAC or null for default */
6119 uint32 rules_enabled
; /* Bitfield of rules to enable */
6120 uint32 rule_user_val
; /* Parameter for rule User */
6123 #define WL_TAF_RULE_AID_BIT 0x01
6124 #define WL_TAF_RULE_RSSI_BIT 0x02
6125 #define WL_TAF_RULE_RATE_BIT 0x04
6126 #define WL_TAF_RULE_PRIO_BIT 0x08
6127 #define WL_TAF_RULE_SSID_BIT 0x10
6128 #define WL_TAF_RULE_USER_BIT 0x20
6130 /* WDS net interface types */
6131 #define WL_WDSIFTYPE_NONE 0x0 /* The interface type is neither WDS nor DWDS. */
6132 #define WL_WDSIFTYPE_WDS 0x1 /* The interface is WDS type. */
6133 #define WL_WDSIFTYPE_DWDS 0x2 /* The interface is DWDS type. */
6135 typedef struct wl_bssload_static
{
6140 } wl_bssload_static_t
;
6142 /* Received Beacons lengths information */
6143 #define WL_LAST_BCNS_INFO_FIXED_LEN OFFSETOF(wlc_bcn_len_hist_t, bcnlen_ring)
6144 typedef struct wlc_bcn_len_hist
{
6145 uint16 ver
; /* version field */
6146 uint16 cur_index
; /* current pointed index in ring buffer */
6147 uint32 max_bcnlen
; /* Max beacon length received */
6148 uint32 min_bcnlen
; /* Min beacon length received */
6149 uint32 ringbuff_len
; /* Length of the ring buffer 'bcnlen_ring' */
6150 uint32 bcnlen_ring
[1]; /* ring buffer storing received beacon lengths */
6151 } wlc_bcn_len_hist_t
;
6154 /* Buffer of size WLC_SAMPLECOLLECT_MAXLEN (=10240 for 4345a0 ACPHY)
6155 * gets copied to this, multiple times
6157 typedef enum wl_gpaio_option
{
6164 } wl_gpaio_option_t
;
6165 #endif /* ATE_BUILD */
6167 /* IO Var Operations - the Value of iov_op In wlc_ap_doiovar */
6168 typedef enum wlc_ap_iov_operation
{
6169 WLC_AP_IOV_OP_DELETE
= -1,
6170 WLC_AP_IOV_OP_DISABLE
= 0,
6171 WLC_AP_IOV_OP_ENABLE
= 1,
6172 WLC_AP_IOV_OP_MANUAL_AP_BSSCFG_CREATE
= 2,
6173 WLC_AP_IOV_OP_MANUAL_STA_BSSCFG_CREATE
= 3
6174 } wlc_ap_iov_oper_t
;
6176 uint32 config
; /* MODE: AUTO (-1), Disable (0), Enable (1) */
6177 uint32 status
; /* Current state: Disabled (0), Enabled (1) */
6180 #endif /* _wlioctl_h_ */