2 * Custom OID/ioctl definitions for
3 * Broadcom 802.11abg Networking Device Driver
5 * Definitions subject to change without notice.
7 * Copyright (C) 2011, 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 324203 2012-03-28 09:55:17Z $
28 #include <proto/ethernet.h>
29 #include <proto/bcmeth.h>
30 #include <proto/bcmevent.h>
31 #include <proto/802.11.h>
32 #include <bcmwifi_channels.h>
33 #include <bcmwifi_rates.h>
35 #include <bcm_mpool_pub.h>
38 /* NetBSD 2.0 does not have SIOCDEVPRIVATE. */
39 #define SIOCDEVPRIVATE _IOWR('i', 139, struct ifreq)
43 #define INTF_NAME_SIZ 16
46 /* Used to send ioctls over the transport pipe */
47 typedef struct remote_ioctl
{
51 char intf_name
[INTF_NAME_SIZ
];
54 #define REMOTE_SIZE sizeof(rem_ioctl_t)
56 #define BCMWL_IOCTL_GUID \
57 {0xB4910A35, 0x88C5, 0x4328, { 0x90, 0x08, 0x9F, 0xB2, 0x00, 0x00, 0x0, 0x0 } }
60 #define ACTION_FRAME_SIZE 1800
62 typedef struct wl_action_frame
{
66 uint8 data
[ACTION_FRAME_SIZE
];
69 #define WL_WIFI_ACTION_FRAME_SIZE sizeof(struct wl_action_frame)
71 typedef struct ssid_info
73 uint8 ssid_len
; /* the length of SSID */
74 uint8 ssid
[32]; /* SSID string */
77 typedef struct wl_af_params
{
80 struct ether_addr BSSID
;
81 wl_action_frame_t action_frame
;
84 #define WL_WIFI_AF_PARAMS_SIZE sizeof(struct wl_af_params)
86 #define MFP_TEST_FLAG_NORMAL 0
87 #define MFP_TEST_FLAG_ANY_KEY 1
88 typedef struct wl_sa_query
{
96 /* require default structure packing */
97 #define BWL_DEFAULT_PACKING
98 #include <packed_section_start.h>
101 #ifndef LINUX_POSTMOGRIFY_REMOVAL
102 /* Legacy structure to help keep backward compatible wl tool and tray app */
104 #define LEGACY_WL_BSS_INFO_VERSION 107 /* older version of wl_bss_info struct */
106 typedef struct wl_bss_info_107
{
107 uint32 version
; /* version field */
108 uint32 length
; /* byte length of data in this record,
109 * starting at version and including IEs
111 struct ether_addr BSSID
;
112 uint16 beacon_period
; /* units are Kusec */
113 uint16 capability
; /* Capability information */
117 uint count
; /* # rates in this set */
118 uint8 rates
[16]; /* rates in 500kbps units w/hi bit set if basic */
119 } rateset
; /* supported rates */
120 uint8 channel
; /* Channel no. */
121 uint16 atim_window
; /* units are Kusec */
122 uint8 dtim_period
; /* DTIM period */
123 int16 RSSI
; /* receive signal strength (in dBm) */
124 int8 phy_noise
; /* noise (in dBm) */
125 uint32 ie_length
; /* byte length of Information Elements */
126 /* variable length Information Elements */
128 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
131 * Per-BSS information structure.
134 #define LEGACY2_WL_BSS_INFO_VERSION 108 /* old version of wl_bss_info struct */
136 /* BSS info structure
137 * Applications MUST CHECK ie_offset field and length field to access IEs and
138 * next bss_info structure in a vector (in wl_scan_results_t)
140 typedef struct wl_bss_info_108
{
141 uint32 version
; /* version field */
142 uint32 length
; /* byte length of data in this record,
143 * starting at version and including IEs
145 struct ether_addr BSSID
;
146 uint16 beacon_period
; /* units are Kusec */
147 uint16 capability
; /* Capability information */
151 uint count
; /* # rates in this set */
152 uint8 rates
[16]; /* rates in 500kbps units w/hi bit set if basic */
153 } rateset
; /* supported rates */
154 chanspec_t chanspec
; /* chanspec for bss */
155 uint16 atim_window
; /* units are Kusec */
156 uint8 dtim_period
; /* DTIM period */
157 int16 RSSI
; /* receive signal strength (in dBm) */
158 int8 phy_noise
; /* noise (in dBm) */
160 uint8 n_cap
; /* BSS is 802.11N Capable */
161 uint32 nbss_cap
; /* 802.11N BSS Capabilities (based on HT_CAP_*) */
162 uint8 ctl_ch
; /* 802.11N BSS control channel number */
163 uint32 reserved32
[1]; /* Reserved for expansion of BSS properties */
164 uint8 flags
; /* flags */
165 uint8 reserved
[3]; /* Reserved for expansion of BSS properties */
166 uint8 basic_mcs
[MCSSET_LEN
]; /* 802.11N BSS required MCS set */
168 uint16 ie_offset
; /* offset at which IEs start, from beginning */
169 uint32 ie_length
; /* byte length of Information Elements */
170 /* Add new fields here */
171 /* variable length Information Elements */
174 #define WL_BSS_INFO_VERSION 109 /* current version of wl_bss_info struct */
176 /* BSS info structure
177 * Applications MUST CHECK ie_offset field and length field to access IEs and
178 * next bss_info structure in a vector (in wl_scan_results_t)
180 typedef struct wl_bss_info
{
181 uint32 version
; /* version field */
182 uint32 length
; /* byte length of data in this record,
183 * starting at version and including IEs
185 struct ether_addr BSSID
;
186 uint16 beacon_period
; /* units are Kusec */
187 uint16 capability
; /* Capability information */
191 uint count
; /* # rates in this set */
192 uint8 rates
[16]; /* rates in 500kbps units w/hi bit set if basic */
193 } rateset
; /* supported rates */
194 chanspec_t chanspec
; /* chanspec for bss */
195 uint16 atim_window
; /* units are Kusec */
196 uint8 dtim_period
; /* DTIM period */
197 int16 RSSI
; /* receive signal strength (in dBm) */
198 int8 phy_noise
; /* noise (in dBm) */
200 uint8 n_cap
; /* BSS is 802.11N Capable */
201 uint32 nbss_cap
; /* 802.11N BSS Capabilities (based on HT_CAP_*) */
202 uint8 ctl_ch
; /* 802.11N BSS control channel number */
203 uint16 vht_rxmcsmap
; /* VHT rx mcs map */
204 uint16 vht_txmcsmap
; /* VHT tx mcs map */
205 uint8 flags
; /* flags */
206 uint8 vht_cap
; /* BSS is vht capable */
207 uint8 reserved
[2]; /* Reserved for expansion of BSS properties */
208 uint8 basic_mcs
[MCSSET_LEN
]; /* 802.11N BSS required MCS set */
210 uint16 ie_offset
; /* offset at which IEs start, from beginning */
211 uint32 ie_length
; /* byte length of Information Elements */
212 int16 SNR
; /* average SNR of during frame reception */
213 /* Add new fields here */
214 /* variable length Information Elements */
217 typedef struct wl_bsscfg
{
224 struct ether_addr prev_BSSID
;
225 struct ether_addr BSSID
;
228 typedef struct wl_bss_config
{
230 uint32 beacon_period
;
234 #define DLOAD_HANDLER_VER 1 /* Downloader version */
235 #define DLOAD_FLAG_VER_MASK 0xf000 /* Downloader version mask */
236 #define DLOAD_FLAG_VER_SHIFT 12 /* Downloader version shift */
238 #define DL_CRC_NOT_INUSE 0x0001
240 /* generic download types & flags */
246 /* ucode type values */
253 struct wl_dload_data
{
260 typedef struct wl_dload_data wl_dload_data_t
;
262 struct wl_ucode_info
{
269 typedef struct wl_ucode_info wl_ucode_info_t
;
271 struct wl_clm_dload_info
{
273 uint32 clm_total_len
;
279 typedef struct wl_clm_dload_info wl_clm_dload_info_t
;
281 typedef struct wlc_ssid
{
286 #define MAX_PREFERRED_AP_NUM 5
287 typedef struct wlc_fastssidinfo
{
288 uint32 SSID_channel
[MAX_PREFERRED_AP_NUM
];
289 wlc_ssid_t SSID_info
[MAX_PREFERRED_AP_NUM
];
290 } wlc_fastssidinfo_t
;
292 typedef BWL_PRE_PACKED_STRUCT
struct wnm_url
{
295 } BWL_POST_PACKED_STRUCT wnm_url_t
;
297 #ifndef LINUX_POSTMOGRIFY_REMOVAL
298 typedef struct chan_scandata
{
301 chanspec_t channel
; /* Channel num, bw, ctrl_sb and band */
302 uint32 channel_mintime
;
303 uint32 channel_maxtime
;
306 typedef enum wl_scan_type
{
307 EXTDSCAN_FOREGROUND_SCAN
,
308 EXTDSCAN_BACKGROUND_SCAN
,
309 EXTDSCAN_FORCEDBACKGROUND_SCAN
312 #define WLC_EXTDSCAN_MAX_SSID 5
314 #define WL_BSS_FLAGS_FROM_BEACON 0x01 /* bss_info derived from beacon */
315 #define WL_BSS_FLAGS_FROM_CACHE 0x02 /* bss_info collected from cache */
316 #define WL_BSS_FLAGS_RSSI_ONCHANNEL 0x04 /* rssi info was received on channel (vs offchannel) */
318 typedef struct wl_extdscan_params
{
319 int8 nprobes
; /* 0, passive, otherwise active */
320 int8 split_scan
; /* split scan */
321 int8 band
; /* band */
323 wlc_ssid_t ssid
[WLC_EXTDSCAN_MAX_SSID
]; /* ssid list */
324 uint32 tx_rate
; /* in 500ksec units */
325 wl_scan_type_t scan_type
; /* enum */
327 chan_scandata_t channel_list
[1]; /* list of chandata structs */
328 } wl_extdscan_params_t
;
330 #define WL_EXTDSCAN_PARAMS_FIXED_SIZE (sizeof(wl_extdscan_params_t) - sizeof(chan_scandata_t))
331 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
333 #define WL_BSSTYPE_INFRA 1
334 #define WL_BSSTYPE_INDEP 0
335 #define WL_BSSTYPE_ANY 2
337 /* Bitmask for scan_type */
338 #define WL_SCANFLAGS_PASSIVE 0x01 /* force passive scan */
339 #define WL_SCANFLAGS_RESERVED 0x02 /* Reserved */
340 #define WL_SCANFLAGS_PROHIBITED 0x04 /* allow scanning prohibited channels */
342 #define WL_SCAN_PARAMS_SSID_MAX 10
344 typedef struct wl_scan_params
{
345 wlc_ssid_t ssid
; /* default: {0, ""} */
346 struct ether_addr bssid
; /* default: bcast */
347 int8 bss_type
; /* default: any,
348 * DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT
350 uint8 scan_type
; /* flags, 0 use default */
351 int32 nprobes
; /* -1 use default, number of probes per channel */
352 int32 active_time
; /* -1 use default, dwell time per channel for
355 int32 passive_time
; /* -1 use default, dwell time per channel
356 * for passive scanning
358 int32 home_time
; /* -1 use default, dwell time for the home channel
359 * between channel scans
361 int32 channel_num
; /* count of channels and ssids that follow
363 * low half is count of channels in channel_list, 0
364 * means default (use all available channels)
366 * high half is entries in wlc_ssid_t array that
367 * follows channel_list, aligned for int32 (4 bytes)
368 * meaning an odd channel count implies a 2-byte pad
369 * between end of channel_list and first ssid
371 * if ssid count is zero, single ssid in the fixed
372 * parameter portion is assumed, otherwise ssid in
373 * the fixed portion is ignored
375 uint16 channel_list
[1]; /* list of chanspecs */
378 /* size of wl_scan_params not including variable length array */
379 #define WL_SCAN_PARAMS_FIXED_SIZE 64
381 /* masks for channel and ssid count */
382 #define WL_SCAN_PARAMS_COUNT_MASK 0x0000ffff
383 #define WL_SCAN_PARAMS_NSSID_SHIFT 16
385 #define WL_SCAN_ACTION_START 1
386 #define WL_SCAN_ACTION_CONTINUE 2
387 #define WL_SCAN_ACTION_ABORT 3
389 #define ISCAN_REQ_VERSION 1
391 /* incremental scan struct */
392 typedef struct wl_iscan_params
{
395 uint16 scan_duration
;
396 wl_scan_params_t params
;
399 /* 3 fields + size of wl_scan_params, not including variable length array */
400 #define WL_ISCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_iscan_params_t, params) + sizeof(wlc_ssid_t))
402 typedef struct wl_scan_results
{
406 wl_bss_info_t bss_info
[1];
409 /* size of wl_scan_results not including variable length array */
410 #define WL_SCAN_RESULTS_FIXED_SIZE (sizeof(wl_scan_results_t) - sizeof(wl_bss_info_t))
412 /* wl_iscan_results status values */
413 #define WL_SCAN_RESULTS_SUCCESS 0
414 #define WL_SCAN_RESULTS_PARTIAL 1
415 #define WL_SCAN_RESULTS_PENDING 2
416 #define WL_SCAN_RESULTS_ABORTED 3
417 #define WL_SCAN_RESULTS_NO_MEM 4
419 /* Used in EXT_STA */
420 #define DNGL_RXCTXT_SIZE 45
422 #if defined(SIMPLE_ISCAN)
423 #define ISCAN_RETRY_CNT 5
424 #define ISCAN_STATE_IDLE 0
425 #define ISCAN_STATE_SCANING 1
426 #define ISCAN_STATE_PENDING 2
428 /* the buf lengh can be WLC_IOCTL_MAXLEN (8K) to reduce iteration */
429 #define WLC_IW_ISCAN_MAXLEN 2048
430 typedef struct iscan_buf
{
431 struct iscan_buf
* next
;
432 char iscan_buf
[WLC_IW_ISCAN_MAXLEN
];
434 #endif /* SIMPLE_ISCAN */
436 #define ESCAN_REQ_VERSION 1
438 typedef struct wl_escan_params
{
442 wl_scan_params_t params
;
445 #define WL_ESCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_escan_params_t, params) + sizeof(wlc_ssid_t))
447 typedef struct wl_escan_result
{
452 wl_bss_info_t bss_info
[1];
455 #define WL_ESCAN_RESULTS_FIXED_SIZE (sizeof(wl_escan_result_t) - sizeof(wl_bss_info_t))
457 /* incremental scan results struct */
458 typedef struct wl_iscan_results
{
460 wl_scan_results_t results
;
461 } wl_iscan_results_t
;
463 /* size of wl_iscan_results not including variable length array */
464 #define WL_ISCAN_RESULTS_FIXED_SIZE \
465 (WL_SCAN_RESULTS_FIXED_SIZE + OFFSETOF(wl_iscan_results_t, results))
467 typedef struct wl_probe_params
{
469 struct ether_addr bssid
;
470 struct ether_addr mac
;
473 #define WL_MAXRATES_IN_SET 16 /* max # of rates in a rateset */
474 typedef struct wl_rateset
{
475 uint32 count
; /* # rates in this set */
476 uint8 rates
[WL_MAXRATES_IN_SET
]; /* rates in 500kbps units w/hi bit set if basic */
479 typedef struct wl_rateset_args
{
480 uint32 count
; /* # rates in this set */
481 uint8 rates
[WL_MAXRATES_IN_SET
]; /* rates in 500kbps units w/hi bit set if basic */
482 uint8 mcs
[MCSSET_LEN
]; /* supported mcs index bit map */
486 typedef struct wl_uint32_list
{
487 /* in - # of elements, out - # of entries */
489 /* variable length uint32 list */
493 /* used for association with a specific BSSID and chanspec list */
494 typedef struct wl_assoc_params
{
495 struct ether_addr bssid
; /* 00:00:00:00:00:00: broadcast scan */
496 int32 chanspec_num
; /* 0: all available channels,
497 * otherwise count of chanspecs in chanspec_list
499 chanspec_t chanspec_list
[1]; /* list of chanspecs */
501 #define WL_ASSOC_PARAMS_FIXED_SIZE OFFSETOF(wl_assoc_params_t, chanspec_list)
503 /* used for reassociation/roam to a specific BSSID and channel */
504 typedef wl_assoc_params_t wl_reassoc_params_t
;
505 #define WL_REASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE
507 /* used for association to a specific BSSID and channel */
508 typedef wl_assoc_params_t wl_join_assoc_params_t
;
509 #define WL_JOIN_ASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE
511 /* used for join with or without a specific bssid and channel list */
512 typedef struct wl_join_params
{
514 wl_assoc_params_t params
; /* optional field, but it must include the fixed portion
515 * of the wl_assoc_params_t struct when it does present.
518 #define WL_JOIN_PARAMS_FIXED_SIZE (OFFSETOF(wl_join_params_t, params) + \
519 WL_ASSOC_PARAMS_FIXED_SIZE)
520 /* scan params for extended join */
521 typedef struct wl_join_scan_params
{
522 uint8 scan_type
; /* 0 use default, active or passive scan */
523 int32 nprobes
; /* -1 use default, number of probes per channel */
524 int32 active_time
; /* -1 use default, dwell time per channel for
527 int32 passive_time
; /* -1 use default, dwell time per channel
528 * for passive scanning
530 int32 home_time
; /* -1 use default, dwell time for the home channel
531 * between channel scans
533 } wl_join_scan_params_t
;
535 /* extended join params */
536 typedef struct wl_extjoin_params
{
537 wlc_ssid_t ssid
; /* {0, ""}: wildcard scan */
538 wl_join_scan_params_t scan
;
539 wl_join_assoc_params_t assoc
; /* optional field, but it must include the fixed portion
540 * of the wl_join_assoc_params_t struct when it does
543 } wl_extjoin_params_t
;
544 #define WL_EXTJOIN_PARAMS_FIXED_SIZE (OFFSETOF(wl_extjoin_params_t, assoc) + \
545 WL_JOIN_ASSOC_PARAMS_FIXED_SIZE)
547 /* All builds use the new 11ac ratespec/chanspec */
549 #define D11AC_IOTYPES
551 #ifndef D11AC_IOTYPES
553 /* defines used by the nrate iovar */
554 #define NRATE_MCS_INUSE 0x00000080 /* MSC in use,indicates b0-6 holds an mcs */
555 #define NRATE_RATE_MASK 0x0000007f /* rate/mcs value */
556 #define NRATE_STF_MASK 0x0000ff00 /* stf mode mask: siso, cdd, stbc, sdm */
557 #define NRATE_STF_SHIFT 8 /* stf mode shift */
558 #define NRATE_OVERRIDE 0x80000000 /* bit indicates override both rate & mode */
559 #define NRATE_OVERRIDE_MCS_ONLY 0x40000000 /* bit indicate to override mcs only */
560 #define NRATE_SGI_MASK 0x00800000 /* sgi mode */
561 #define NRATE_SGI_SHIFT 23 /* sgi mode */
562 #define NRATE_LDPC_CODING 0x00400000 /* bit indicates adv coding in use */
563 #define NRATE_LDPC_SHIFT 22 /* ldpc shift */
565 #define NRATE_STF_SISO 0 /* stf mode SISO */
566 #define NRATE_STF_CDD 1 /* stf mode CDD */
567 #define NRATE_STF_STBC 2 /* stf mode STBC */
568 #define NRATE_STF_SDM 3 /* stf mode SDM */
570 #else /* D11AC_IOTYPES */
572 /* WL_RSPEC defines for rate information */
573 #define WL_RSPEC_RATE_MASK 0x000000FF /* rate or HT MCS value */
574 #define WL_RSPEC_VHT_MCS_MASK 0x0000000F /* VHT MCS value */
575 #define WL_RSPEC_VHT_NSS_MASK 0x000000F0 /* VHT Nss value */
576 #define WL_RSPEC_VHT_NSS_SHIFT 4 /* VHT Nss value shift */
577 #define WL_RSPEC_TXEXP_MASK 0x00000300
578 #define WL_RSPEC_TXEXP_SHIFT 8
579 #define WL_RSPEC_BW_MASK 0x00070000 /* bandwidth mask */
580 #define WL_RSPEC_BW_SHIFT 16 /* bandwidth shift */
581 #define WL_RSPEC_STBC 0x00100000 /* STBC encoding, Nsts = 2 x Nss */
582 #define WL_RSPEC_LDPC 0x00400000 /* bit indicates adv coding in use */
583 #define WL_RSPEC_SGI 0x00800000 /* Short GI mode */
584 #define WL_RSPEC_ENCODING_MASK 0x03000000 /* Encoding of Rate/MCS field */
585 #define WL_RSPEC_OVERRIDE_RATE 0x40000000 /* bit indicate to override mcs only */
586 #define WL_RSPEC_OVERRIDE_MODE 0x80000000 /* bit indicates override both rate & mode */
588 /* WL_RSPEC_ENCODING field defs */
589 #define WL_RSPEC_ENCODE_RATE 0x00000000 /* Legacy rate is stored in RSPEC_RATE_MASK */
590 #define WL_RSPEC_ENCODE_HT 0x01000000 /* HT MCS is stored in RSPEC_RATE_MASK */
591 #define WL_RSPEC_ENCODE_VHT 0x02000000 /* VHT MCS and Nss is stored in RSPEC_RATE_MASK */
593 /* WL_RSPEC_BW field defs */
594 #define WL_RSPEC_BW_UNSPECIFIED 0
595 #define WL_RSPEC_BW_20MHZ 0x00010000
596 #define WL_RSPEC_BW_40MHZ 0x00020000
597 #define WL_RSPEC_BW_80MHZ 0x00030000
598 #define WL_RSPEC_BW_160MHZ 0x00040000
600 /* Legacy defines for the nrate iovar */
601 #define OLD_NRATE_MCS_INUSE 0x00000080 /* MSC in use,indicates b0-6 holds an mcs */
602 #define OLD_NRATE_RATE_MASK 0x0000007f /* rate/mcs value */
603 #define OLD_NRATE_STF_MASK 0x0000ff00 /* stf mode mask: siso, cdd, stbc, sdm */
604 #define OLD_NRATE_STF_SHIFT 8 /* stf mode shift */
605 #define OLD_NRATE_OVERRIDE 0x80000000 /* bit indicates override both rate & mode */
606 #define OLD_NRATE_OVERRIDE_MCS_ONLY 0x40000000 /* bit indicate to override mcs only */
607 #define OLD_NRATE_SGI 0x00800000 /* sgi mode */
608 #define OLD_NRATE_LDPC_CODING 0x00400000 /* bit indicates adv coding in use */
610 #define OLD_NRATE_STF_SISO 0 /* stf mode SISO */
611 #define OLD_NRATE_STF_CDD 1 /* stf mode CDD */
612 #define OLD_NRATE_STF_STBC 2 /* stf mode STBC */
613 #define OLD_NRATE_STF_SDM 3 /* stf mode SDM */
615 #endif /* D11AC_IOTYPES */
617 #define ANTENNA_NUM_1 1 /* total number of antennas to be used */
618 #define ANTENNA_NUM_2 2
619 #define ANTENNA_NUM_3 3
620 #define ANTENNA_NUM_4 4
622 #define ANT_SELCFG_AUTO 0x80 /* bit indicates antenna sel AUTO */
623 #define ANT_SELCFG_MASK 0x33 /* antenna configuration mask */
624 #define ANT_SELCFG_MAX 4 /* max number of antenna configurations */
625 #define ANT_SELCFG_TX_UNICAST 0 /* unicast tx antenna configuration */
626 #define ANT_SELCFG_RX_UNICAST 1 /* unicast rx antenna configuration */
627 #define ANT_SELCFG_TX_DEF 2 /* default tx antenna configuration */
628 #define ANT_SELCFG_RX_DEF 3 /* default rx antenna configuration */
630 #define MAX_STREAMS_SUPPORTED 4 /* max number of streams supported */
633 uint8 ant_config
[ANT_SELCFG_MAX
]; /* antenna configuration */
634 uint8 num_antcfg
; /* number of available antenna configurations */
637 #define HIGHEST_SINGLE_STREAM_MCS 7 /* MCS values greater than this enable multiple streams */
639 #define MAX_CCA_CHANNELS 38 /* Max number of 20 Mhz wide channels */
640 #define MAX_CCA_SECS 60 /* CCA keeps this many seconds history */
642 #define IBSS_MED 15 /* Mediom in-bss congestion percentage */
643 #define IBSS_HI 25 /* Hi in-bss congestion percentage */
646 #define INTERFER_MED 5
647 #define INTERFER_HI 10
649 #define CCA_FLAG_2G_ONLY 0x01 /* Return a channel from 2.4 Ghz band */
650 #define CCA_FLAG_5G_ONLY 0x02 /* Return a channel from 2.4 Ghz band */
651 #define CCA_FLAG_IGNORE_DURATION 0x04 /* Ignore dwell time for each channel */
652 #define CCA_FLAGS_PREFER_1_6_11 0x10
653 #define CCA_FLAG_IGNORE_INTERFER 0x20 /* do not exlude channel based on interfer level */
655 #define CCA_ERRNO_BAND 1 /* After filtering for band pref, no choices left */
656 #define CCA_ERRNO_DURATION 2 /* After filtering for duration, no choices left */
657 #define CCA_ERRNO_PREF_CHAN 3 /* After filtering for chan pref, no choices left */
658 #define CCA_ERRNO_INTERFER 4 /* After filtering for interference, no choices left */
659 #define CCA_ERRNO_TOO_FEW 5 /* Only 1 channel was input */
662 uint32 duration
; /* millisecs spent sampling this channel */
663 uint32 congest_ibss
; /* millisecs in our bss (presumably this traffic will */
664 /* move if cur bss moves channels) */
665 uint32 congest_obss
; /* traffic not in our bss */
666 uint32 interference
; /* millisecs detecting a non 802.11 interferer. */
667 uint32 timestamp
; /* second timestamp */
671 chanspec_t chanspec
; /* Which channel? */
672 uint8 num_secs
; /* How many secs worth of data */
673 cca_congest_t secs
[1]; /* Data */
674 } cca_congest_channel_req_t
;
676 /* interference source detection and identification mode */
677 #define ITFR_MODE_DISABLE 0 /* disable feature */
678 #define ITFR_MODE_MANUAL_ENABLE 1 /* enable manual detection */
679 #define ITFR_MODE_AUTO_ENABLE 2 /* enable auto detection */
681 /* interference sources */
682 enum interference_source
{
683 ITFR_NONE
= 0, /* interference */
684 ITFR_PHONE
, /* wireless phone */
685 ITFR_VIDEO_CAMERA
, /* wireless video camera */
686 ITFR_MICROWAVE_OVEN
, /* microwave oven */
687 ITFR_BABY_MONITOR
, /* wireless baby monitor */
688 ITFR_BLUETOOTH
, /* bluetooth */
689 ITFR_VIDEO_CAMERA_OR_BABY_MONITOR
, /* wireless camera or baby monitor */
690 ITFR_BLUETOOTH_OR_BABY_MONITOR
, /* bluetooth or baby monitor */
691 ITFR_VIDEO_CAMERA_OR_PHONE
, /* video camera or phone */
692 ITFR_UNIDENTIFIED
/* interference from unidentified source */
695 /* structure for interference source report */
697 uint32 flags
; /* flags. bit definitions below */
698 uint32 source
; /* last detected interference source */
699 uint32 timestamp
; /* second timestamp on interferenced flag change */
700 } interference_source_rep_t
;
702 /* bit definitions for flags in interference source report */
703 #define ITFR_INTERFERENCED 1 /* interference detected */
704 #define ITFR_HOME_CHANNEL 2 /* home channel has interference */
705 #define ITFR_NOISY_ENVIRONMENT 4 /* noisy environemnt so feature stopped */
707 #define WLC_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NUL */
709 typedef struct wl_country
{
710 char country_abbrev
[WLC_CNTRY_BUF_SZ
]; /* nul-terminated country code used in
713 int32 rev
; /* revision specifier for ccode
714 * on set, -1 indicates unspecified.
717 char ccode
[WLC_CNTRY_BUF_SZ
]; /* nul-terminated built-in country code.
718 * variable length, but fixed size in
719 * struct allows simple allocation for
720 * expected country strings <= 3 chars.
724 typedef struct wl_channels_in_country
{
727 char country_abbrev
[WLC_CNTRY_BUF_SZ
];
730 } wl_channels_in_country_t
;
732 typedef struct wl_country_list
{
737 char country_abbrev
[1];
740 #define WL_NUM_RPI_BINS 8
741 #define WL_RM_TYPE_BASIC 1
742 #define WL_RM_TYPE_CCA 2
743 #define WL_RM_TYPE_RPI 3
745 #define WL_RM_FLAG_PARALLEL (1<<0)
747 #define WL_RM_FLAG_LATE (1<<1)
748 #define WL_RM_FLAG_INCAPABLE (1<<2)
749 #define WL_RM_FLAG_REFUSED (1<<3)
751 typedef struct wl_rm_req_elt
{
755 uint32 token
; /* token for this measurement */
756 uint32 tsf_h
; /* TSF high 32-bits of Measurement start time */
757 uint32 tsf_l
; /* TSF low 32-bits */
758 uint32 dur
; /* TUs */
761 typedef struct wl_rm_req
{
762 uint32 token
; /* overall measurement set token */
763 uint32 count
; /* number of measurement requests */
764 void *cb
; /* completion callback function: may be NULL */
765 void *cb_arg
; /* arg to completion callback function */
766 wl_rm_req_elt_t req
[1]; /* variable length block of requests */
768 #define WL_RM_REQ_FIXED_LEN OFFSETOF(wl_rm_req_t, req)
770 typedef struct wl_rm_rep_elt
{
774 uint32 token
; /* token for this measurement */
775 uint32 tsf_h
; /* TSF high 32-bits of Measurement start time */
776 uint32 tsf_l
; /* TSF low 32-bits */
777 uint32 dur
; /* TUs */
778 uint32 len
; /* byte length of data block */
779 uint8 data
[1]; /* variable length data block */
781 #define WL_RM_REP_ELT_FIXED_LEN 24 /* length excluding data block */
783 #define WL_RPI_REP_BIN_NUM 8
784 typedef struct wl_rm_rpi_rep
{
785 uint8 rpi
[WL_RPI_REP_BIN_NUM
];
786 int8 rpi_max
[WL_RPI_REP_BIN_NUM
];
789 typedef struct wl_rm_rep
{
790 uint32 token
; /* overall measurement set token */
791 uint32 len
; /* length of measurement report block */
792 wl_rm_rep_elt_t rep
[1]; /* variable length block of reports */
794 #define WL_RM_REP_FIXED_LEN 8
797 #if defined(BCMSUP_PSK)
798 typedef enum sup_auth_status
{
799 /* Basic supplicant authentication states */
800 WLC_SUP_DISCONNECTED
= 0,
803 WLC_SUP_AUTHENTICATING
,
804 WLC_SUP_AUTHENTICATED
,
808 WLC_SUP_LAST_BASIC_STATE
,
810 /* Extended supplicant authentication states */
811 /* Waiting to receive handshake msg M1 */
812 WLC_SUP_KEYXCHANGE_WAIT_M1
= WLC_SUP_AUTHENTICATED
,
813 /* Preparing to send handshake msg M2 */
814 WLC_SUP_KEYXCHANGE_PREP_M2
= WLC_SUP_KEYXCHANGE
,
815 /* Waiting to receive handshake msg M3 */
816 WLC_SUP_KEYXCHANGE_WAIT_M3
= WLC_SUP_LAST_BASIC_STATE
,
817 WLC_SUP_KEYXCHANGE_PREP_M4
, /* Preparing to send handshake msg M4 */
818 WLC_SUP_KEYXCHANGE_WAIT_G1
, /* Waiting to receive handshake msg G1 */
819 WLC_SUP_KEYXCHANGE_PREP_G2
/* Preparing to send handshake msg G2 */
823 /* Enumerate crypto algorithms */
824 #define CRYPTO_ALGO_OFF 0
825 #define CRYPTO_ALGO_WEP1 1
826 #define CRYPTO_ALGO_TKIP 2
827 #define CRYPTO_ALGO_WEP128 3
828 #define CRYPTO_ALGO_AES_CCM 4
829 #define CRYPTO_ALGO_AES_OCB_MSDU 5
830 #define CRYPTO_ALGO_AES_OCB_MPDU 6
831 #define CRYPTO_ALGO_NALG 7
832 #define CRYPTO_ALGO_PMK 12 /* for 802.1x supp to set PMK before 4-way */
834 #define WSEC_GEN_MIC_ERROR 0x0001
835 #define WSEC_GEN_REPLAY 0x0002
836 #define WSEC_GEN_ICV_ERROR 0x0004
837 #define WSEC_GEN_MFP_ACT_ERROR 0x0008
838 #define WSEC_GEN_MFP_DISASSOC_ERROR 0x0010
839 #define WSEC_GEN_MFP_DEAUTH_ERROR 0x0020
841 #define WL_SOFT_KEY (1 << 0) /* Indicates this key is using soft encrypt */
842 #define WL_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */
843 #define WL_KF_RES_4 (1 << 4) /* Reserved for backward compat */
844 #define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */
845 #define WL_IBSS_PEER_GROUP_KEY (1 << 6) /* Indicates a group key for a IBSS PEER */
847 typedef struct wl_wsec_key
{
848 uint32 index
; /* key index */
849 uint32 len
; /* key length */
850 uint8 data
[DOT11_MAX_KEY_SIZE
]; /* key data */
852 uint32 algo
; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
853 uint32 flags
; /* misc flags */
856 int iv_initialized
; /* has IV been initialized already? */
860 uint32 hi
; /* upper 32 bits of IV */
861 uint16 lo
; /* lower 16 bits of IV */
864 struct ether_addr ea
; /* per station */
867 #define WSEC_MIN_PSK_LEN 8
868 #define WSEC_MAX_PSK_LEN 64
870 /* Flag for key material needing passhash'ing */
871 #define WSEC_PASSPHRASE (1<<0)
873 /* receptacle for WLC_SET_WSEC_PMK parameter */
875 ushort key_len
; /* octets in key material */
876 ushort flags
; /* key handling qualification */
877 uint8 key
[WSEC_MAX_PSK_LEN
]; /* PMK material */
880 /* wireless security bitvec */
881 #define WEP_ENABLED 0x0001
882 #define TKIP_ENABLED 0x0002
883 #define AES_ENABLED 0x0004
884 #define WSEC_SWFLAG 0x0008
885 #define SES_OW_ENABLED 0x0040 /* to go into transition mode without setting wep */
887 /* wsec macros for operating on the above definitions */
888 #define WSEC_WEP_ENABLED(wsec) ((wsec) & WEP_ENABLED)
889 #define WSEC_TKIP_ENABLED(wsec) ((wsec) & TKIP_ENABLED)
890 #define WSEC_AES_ENABLED(wsec) ((wsec) & AES_ENABLED)
892 #define WSEC_ENABLED(wsec) ((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED))
893 #define WSEC_SES_OW_ENABLED(wsec) ((wsec) & SES_OW_ENABLED)
896 #define MFP_CAPABLE 0x0200
897 #define MFP_REQUIRED 0x0400
898 #define MFP_SHA256 0x0800 /* a special configuration for STA for WIFI test tool */
901 /* WPA authentication mode bitvec */
902 #define WPA_AUTH_DISABLED 0x0000 /* Legacy (i.e., non-WPA) */
903 #define WPA_AUTH_NONE 0x0001 /* none (IBSS) */
904 #define WPA_AUTH_UNSPECIFIED 0x0002 /* over 802.1x */
905 #define WPA_AUTH_PSK 0x0004 /* Pre-shared key */
906 /* #define WPA_AUTH_8021X 0x0020 */ /* 802.1x, reserved */
907 #define WPA2_AUTH_UNSPECIFIED 0x0040 /* over 802.1x */
908 #define WPA2_AUTH_PSK 0x0080 /* Pre-shared key */
909 #define BRCM_AUTH_PSK 0x0100 /* BRCM specific PSK */
910 #define BRCM_AUTH_DPT 0x0200 /* DPT PSK without group keys */
911 #define WPA2_AUTH_MFP 0x1000 /* MFP (11w) in contrast to CCX */
912 #define WPA2_AUTH_TPK 0x2000 /* TDLS Peer Key */
913 #define WPA2_AUTH_FT 0x4000 /* Fast Transition. */
914 #define WPA_AUTH_PFN_ANY 0xffffffff /* for PFN, match only ssid */
919 typedef struct _pmkid
{
920 struct ether_addr BSSID
;
921 uint8 PMKID
[WPA2_PMKID_LEN
];
924 typedef struct _pmkid_list
{
929 typedef struct _pmkid_cand
{
930 struct ether_addr BSSID
;
934 typedef struct _pmkid_cand_list
{
936 pmkid_cand_t pmkid_cand
[1];
939 typedef struct wl_assoc_info
{
943 struct dot11_assoc_req req
;
944 struct ether_addr reassoc_bssid
; /* used in reassoc's */
945 struct dot11_assoc_resp resp
;
949 #define WLC_ASSOC_REQ_IS_REASSOC 0x01 /* assoc req was actually a reassoc */
951 #ifndef LINUX_POSTMOGRIFY_REMOVAL
952 typedef struct wl_led_info
{
953 uint32 index
; /* led index */
959 /* srom read/write struct passed through ioctl */
961 uint byteoff
; /* byte offset */
962 uint nbytes
; /* number of bytes */
966 /* similar cis (srom or otp) struct [iovar: may not be aligned] */
968 uint32 source
; /* cis source */
969 uint32 byteoff
; /* byte offset */
970 uint32 nbytes
; /* number of bytes */
971 /* data follows here */
974 #define WLC_CIS_DEFAULT 0 /* built-in default */
975 #define WLC_CIS_SROM 1 /* source is sprom */
976 #define WLC_CIS_OTP 2 /* source is otp */
978 /* R_REG and W_REG struct passed through ioctl */
980 uint32 byteoff
; /* byte offset of the field in d11regs_t */
981 uint32 val
; /* read/write value of the field */
982 uint32 size
; /* sizeof the field */
983 uint band
; /* band (optional) */
986 /* Structure used by GET/SET_ATTEN ioctls - it controls power in b/g-band */
987 /* PCL - Power Control Loop */
988 /* current gain setting is replaced by user input */
989 #define WL_ATTEN_APP_INPUT_PCL_OFF 0 /* turn off PCL, apply supplied input */
990 #define WL_ATTEN_PCL_ON 1 /* turn on PCL */
991 /* current gain setting is maintained */
992 #define WL_ATTEN_PCL_OFF 2 /* turn off PCL. */
995 uint16 auto_ctrl
; /* WL_ATTEN_XX */
996 uint16 bb
; /* Baseband attenuation */
997 uint16 radio
; /* Radio attenuation */
998 uint16 txctl1
; /* Radio TX_CTL1 value */
1001 /* Per-AC retry parameters */
1002 struct wme_tx_params_s
{
1004 uint8 short_fallback
;
1006 uint8 long_fallback
;
1007 uint16 max_rate
; /* In units of 512 Kbps */
1010 typedef struct wme_tx_params_s wme_tx_params_t
;
1012 #define WL_WME_TX_PARAMS_IO_BYTES (sizeof(wme_tx_params_t) * AC_COUNT)
1014 /* defines used by poweridx iovar - it controls power in a-band */
1015 /* current gain setting is maintained */
1016 #define WL_PWRIDX_PCL_OFF -2 /* turn off PCL. */
1017 #define WL_PWRIDX_PCL_ON -1 /* turn on PCL */
1018 #define WL_PWRIDX_LOWER_LIMIT -2 /* lower limit */
1019 #define WL_PWRIDX_UPPER_LIMIT 63 /* upper limit */
1020 /* value >= 0 causes
1021 * - input to be set to that value
1025 /* Used to get specific link/ac parameters */
1029 struct ether_addr ea
;
1032 #define BCM_MAC_STATUS_INDICATION (0x40010200L)
1033 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
1036 uint16 ver
; /* version of this struct */
1037 uint16 len
; /* length in bytes of this structure */
1038 uint16 cap
; /* sta's advertised capabilities */
1039 uint32 flags
; /* flags defined below */
1040 uint32 idle
; /* time since data pkt rx'd from sta */
1041 struct ether_addr ea
; /* Station address */
1042 wl_rateset_t rateset
; /* rateset in use */
1043 uint32 in
; /* seconds elapsed since associated */
1044 uint32 listen_interval_inms
; /* Min Listen interval in ms for this STA */
1045 uint32 tx_pkts
; /* # of packets transmitted */
1046 uint32 tx_failures
; /* # of packets failed */
1047 uint32 rx_ucast_pkts
; /* # of unicast packets received */
1048 uint32 rx_mcast_pkts
; /* # of multicast packets received */
1049 uint32 tx_rate
; /* Rate of last successful tx frame */
1050 uint32 rx_rate
; /* Rate of last successful rx frame */
1051 uint32 rx_decrypt_succeeds
; /* # of packet decrypted successfully */
1052 uint32 rx_decrypt_failures
; /* # of packet decrypted unsuccessfully */
1055 #define WL_OLD_STAINFO_SIZE OFFSETOF(sta_info_t, tx_pkts)
1057 #define WL_STA_VER 3
1059 /* Flags for sta_info_t indicating properties of STA */
1060 #define WL_STA_BRCM 0x1 /* Running a Broadcom driver */
1061 #define WL_STA_WME 0x2 /* WMM association */
1062 #define WL_STA_UNUSED 0x4
1063 #define WL_STA_AUTHE 0x8 /* Authenticated */
1064 #define WL_STA_ASSOC 0x10 /* Associated */
1065 #define WL_STA_AUTHO 0x20 /* Authorized */
1066 #define WL_STA_WDS 0x40 /* Wireless Distribution System */
1067 #define WL_STA_WDS_LINKUP 0x80 /* WDS traffic/probes flowing properly */
1068 #define WL_STA_PS 0x100 /* STA is in power save mode from AP's viewpoint */
1069 #define WL_STA_APSD_BE 0x200 /* APSD delv/trigger for AC_BE is default enabled */
1070 #define WL_STA_APSD_BK 0x400 /* APSD delv/trigger for AC_BK is default enabled */
1071 #define WL_STA_APSD_VI 0x800 /* APSD delv/trigger for AC_VI is default enabled */
1072 #define WL_STA_APSD_VO 0x1000 /* APSD delv/trigger for AC_VO is default enabled */
1073 #define WL_STA_N_CAP 0x2000 /* STA 802.11n capable */
1074 #define WL_STA_SCBSTATS 0x4000 /* Per STA debug stats */
1076 #define WL_WDS_LINKUP WL_STA_WDS_LINKUP /* deprecated */
1078 /* Values for TX Filter override mode */
1079 #define WLC_TXFILTER_OVERRIDE_DISABLED 0
1080 #define WLC_TXFILTER_OVERRIDE_ENABLED 1
1082 /* Used to get specific STA parameters */
1085 struct ether_addr ea
;
1088 /* Used by iovar versions of some ioctls, i.e. WLC_SCB_AUTHORIZE et al */
1091 scb_val_t ioctl_args
;
1094 /* channel encoding */
1095 typedef struct channel_info
{
1101 /* For ioctls that take a list of MAC addresses */
1103 uint count
; /* number of MAC addresses */
1104 struct ether_addr ea
[1]; /* variable length array of MAC addresses */
1107 /* get pkt count struct passed through ioctl */
1108 typedef struct get_pktcnt
{
1113 uint rx_ocast_good_pkt
; /* unicast packets destined for others */
1117 #define LQ_IDX_MIN 0
1118 #define LQ_IDX_MAX 1
1119 #define LQ_IDX_AVG 2
1120 #define LQ_IDX_SUM 2
1121 #define LQ_IDX_LAST 3
1122 #define LQ_STOP_MONITOR 0
1123 #define LQ_START_MONITOR 1
1125 /* Get averages RSSI, Rx PHY rate and SNR values */
1127 int rssi
[LQ_IDX_LAST
]; /* Array to keep min, max, avg rssi */
1128 int snr
[LQ_IDX_LAST
]; /* Array to keep min, max, avg snr */
1129 int isvalid
; /* Flag indicating whether above data is valid */
1130 } wl_lq_t
; /* Link Quality */
1132 typedef enum wl_wakeup_reason_type
{
1141 /* Unique filter id */
1144 /* stores the reason for the last wake up */
1148 /* Get MAC specific rate histogram command */
1150 struct ether_addr ea
; /* MAC Address */
1151 uint8 ac_cat
; /* Access Category */
1152 uint8 num_pkts
; /* Number of packet entries to be averaged */
1153 } wl_mac_ratehisto_cmd_t
; /* MAC Specific Rate Histogram command */
1155 /* Get MAC rate histogram response */
1157 uint32 rate
[WLC_MAXRATE
+ 1]; /* Rates */
1158 uint32 mcs
[WL_RATESET_SZ_HT_MCS
* WL_TX_CHAINS_MAX
]; /* MCS counts */
1159 uint32 vht
[WL_RATESET_SZ_VHT_MCS
][WL_TX_CHAINS_MAX
]; /* VHT counts */
1160 uint32 tsf_timer
[2][2]; /* Start and End time for 8bytes value */
1161 } wl_mac_ratehisto_res_t
; /* MAC Specific Rate Histogram Response */
1163 /* Values for TX Filter override mode */
1164 #define WLC_TXFILTER_OVERRIDE_DISABLED 0
1165 #define WLC_TXFILTER_OVERRIDE_ENABLED 1
1167 #define WL_IOCTL_ACTION_GET 0x0
1168 #define WL_IOCTL_ACTION_SET 0x1
1169 #define WL_IOCTL_ACTION_OVL_IDX_MASK 0x1e
1170 #define WL_IOCTL_ACTION_OVL_RSV 0x20
1171 #define WL_IOCTL_ACTION_OVL 0x40
1172 #define WL_IOCTL_ACTION_MASK 0x7e
1173 #define WL_IOCTL_ACTION_OVL_SHIFT 1
1175 /* Linux network driver ioctl encoding */
1176 typedef struct wl_ioctl
{
1177 uint cmd
; /* common ioctl definition */
1178 void *buf
; /* pointer to user buffer */
1179 uint len
; /* length of user buffer */
1180 uint8 set
; /* 1=set IOCTL; 0=query IOCTL */
1181 uint used
; /* bytes read or written (optional) */
1182 uint needed
; /* bytes needed (optional) */
1185 /* reference to wl_ioctl_t struct used by usermode driver */
1186 #define ioctl_subtype set /* subtype param */
1187 #define ioctl_pid used /* pid param */
1188 #define ioctl_status needed /* status param */
1191 * Structure for passing hardware and software
1192 * revision info up from the driver.
1194 typedef struct wlc_rev_info
{
1195 uint vendorid
; /* PCI vendor id */
1196 uint deviceid
; /* device id of chip */
1197 uint radiorev
; /* radio revision */
1198 uint chiprev
; /* chip revision */
1199 uint corerev
; /* core revision */
1200 uint boardid
; /* board identifier (usu. PCI sub-device id) */
1201 uint boardvendor
; /* board vendor (usu. PCI sub-vendor id) */
1202 uint boardrev
; /* board revision */
1203 uint driverrev
; /* driver version */
1204 uint ucoderev
; /* microcode version */
1205 uint bus
; /* bus type */
1206 uint chipnum
; /* chip number */
1207 uint phytype
; /* phy type */
1208 uint phyrev
; /* phy revision */
1209 uint anarev
; /* anacore rev */
1210 uint chippkg
; /* chip package info */
1213 #define WL_REV_INFO_LEGACY_LENGTH 48
1215 #define WL_BRAND_MAX 10
1216 typedef struct wl_instance_info
{
1218 char brand
[WL_BRAND_MAX
];
1219 } wl_instance_info_t
;
1221 /* structure to change size of tx fifo */
1222 typedef struct wl_txfifo_sz
{
1227 /* magic pattern used for mismatch driver and wl */
1228 #define WL_TXFIFO_SZ_MAGIC 0xa5a5
1230 /* Transfer info about an IOVar from the driver */
1231 /* Max supported IOV name size in bytes, + 1 for nul termination */
1232 #define WLC_IOV_NAME_LEN 30
1233 typedef struct wlc_iov_trx_s
{
1236 char name
[WLC_IOV_NAME_LEN
];
1239 /* check this magic number */
1240 #define WLC_IOCTL_MAGIC 0x14e46c77
1242 /* bump this number if you change the ioctl interface */
1243 #ifdef D11AC_IOTYPES
1244 #define WLC_IOCTL_VERSION 2
1245 #define WLC_IOCTL_VERSION_LEGACY_IOTYPES 1
1247 #define WLC_IOCTL_VERSION 1
1248 #endif /* D11AC_IOTYPES */
1250 #define WLC_IOCTL_MAXLEN 8192 /* max length ioctl buffer required */
1251 #define WLC_IOCTL_SMLEN 256 /* "small" length ioctl buffer required */
1252 #define WLC_IOCTL_MEDLEN 1536 /* "med" length ioctl buffer required */
1253 #ifdef WLC_HIGH_ONLY
1254 #define WLC_SAMPLECOLLECT_MAXLEN 1024 /* limit sample size for bmac */
1256 #if defined(LCNCONF) || defined(LCN40CONF)
1257 #define WLC_SAMPLECOLLECT_MAXLEN 8192 /* Max Sample Collect buffer */
1259 #define WLC_SAMPLECOLLECT_MAXLEN 10240 /* Max Sample Collect buffer for two cores */
1261 #endif /* WLC_HIGH_ONLY */
1263 /* common ioctl definitions */
1264 #define WLC_GET_MAGIC 0
1265 #define WLC_GET_VERSION 1
1268 #define WLC_GET_LOOP 4
1269 #define WLC_SET_LOOP 5
1271 #define WLC_GET_MSGLEVEL 7
1272 #define WLC_SET_MSGLEVEL 8
1273 #define WLC_GET_PROMISC 9
1274 #define WLC_SET_PROMISC 10
1275 /* #define WLC_OVERLAY_IOCTL 11 */ /* not supported */
1276 #define WLC_GET_RATE 12
1277 #define WLC_GET_MAX_RATE 13
1278 #define WLC_GET_INSTANCE 14
1279 /* #define WLC_GET_FRAG 15 */ /* no longer supported */
1280 /* #define WLC_SET_FRAG 16 */ /* no longer supported */
1281 /* #define WLC_GET_RTS 17 */ /* no longer supported */
1282 /* #define WLC_SET_RTS 18 */ /* no longer supported */
1283 #define WLC_GET_INFRA 19
1284 #define WLC_SET_INFRA 20
1285 #define WLC_GET_AUTH 21
1286 #define WLC_SET_AUTH 22
1287 #define WLC_GET_BSSID 23
1288 #define WLC_SET_BSSID 24
1289 #define WLC_GET_SSID 25
1290 #define WLC_SET_SSID 26
1291 #define WLC_RESTART 27
1292 #define WLC_TERMINATED 28
1293 /* #define WLC_DUMP_SCB 28 */ /* no longer supported */
1294 #define WLC_GET_CHANNEL 29
1295 #define WLC_SET_CHANNEL 30
1296 #define WLC_GET_SRL 31
1297 #define WLC_SET_SRL 32
1298 #define WLC_GET_LRL 33
1299 #define WLC_SET_LRL 34
1300 #define WLC_GET_PLCPHDR 35
1301 #define WLC_SET_PLCPHDR 36
1302 #define WLC_GET_RADIO 37
1303 #define WLC_SET_RADIO 38
1304 #define WLC_GET_PHYTYPE 39
1305 #define WLC_DUMP_RATE 40
1306 #define WLC_SET_RATE_PARAMS 41
1307 #define WLC_GET_FIXRATE 42
1308 #define WLC_SET_FIXRATE 43
1309 /* #define WLC_GET_WEP 42 */ /* no longer supported */
1310 /* #define WLC_SET_WEP 43 */ /* no longer supported */
1311 #define WLC_GET_KEY 44
1312 #define WLC_SET_KEY 45
1313 #define WLC_GET_REGULATORY 46
1314 #define WLC_SET_REGULATORY 47
1315 #define WLC_GET_PASSIVE_SCAN 48
1316 #define WLC_SET_PASSIVE_SCAN 49
1318 #define WLC_SCAN_RESULTS 51
1319 #define WLC_DISASSOC 52
1320 #define WLC_REASSOC 53
1321 #define WLC_GET_ROAM_TRIGGER 54
1322 #define WLC_SET_ROAM_TRIGGER 55
1323 #define WLC_GET_ROAM_DELTA 56
1324 #define WLC_SET_ROAM_DELTA 57
1325 #define WLC_GET_ROAM_SCAN_PERIOD 58
1326 #define WLC_SET_ROAM_SCAN_PERIOD 59
1327 #define WLC_EVM 60 /* diag */
1328 #define WLC_GET_TXANT 61
1329 #define WLC_SET_TXANT 62
1330 #define WLC_GET_ANTDIV 63
1331 #define WLC_SET_ANTDIV 64
1332 /* #define WLC_GET_TXPWR 65 */ /* no longer supported */
1333 /* #define WLC_SET_TXPWR 66 */ /* no longer supported */
1334 #define WLC_GET_CLOSED 67
1335 #define WLC_SET_CLOSED 68
1336 #define WLC_GET_MACLIST 69
1337 #define WLC_SET_MACLIST 70
1338 #define WLC_GET_RATESET 71
1339 #define WLC_SET_RATESET 72
1340 /* #define WLC_GET_LOCALE 73 */ /* no longer supported */
1341 #define WLC_LONGTRAIN 74
1342 #define WLC_GET_BCNPRD 75
1343 #define WLC_SET_BCNPRD 76
1344 #define WLC_GET_DTIMPRD 77
1345 #define WLC_SET_DTIMPRD 78
1346 #define WLC_GET_SROM 79
1347 #define WLC_SET_SROM 80
1348 #define WLC_GET_WEP_RESTRICT 81
1349 #define WLC_SET_WEP_RESTRICT 82
1350 #define WLC_GET_COUNTRY 83
1351 #define WLC_SET_COUNTRY 84
1352 #define WLC_GET_PM 85
1353 #define WLC_SET_PM 86
1354 #define WLC_GET_WAKE 87
1355 #define WLC_SET_WAKE 88
1356 /* #define WLC_GET_D11CNTS 89 */ /* -> "counters" iovar */
1357 #define WLC_GET_FORCELINK 90 /* ndis only */
1358 #define WLC_SET_FORCELINK 91 /* ndis only */
1359 #define WLC_FREQ_ACCURACY 92 /* diag */
1360 #define WLC_CARRIER_SUPPRESS 93 /* diag */
1361 #define WLC_GET_PHYREG 94
1362 #define WLC_SET_PHYREG 95
1363 #define WLC_GET_RADIOREG 96
1364 #define WLC_SET_RADIOREG 97
1365 #define WLC_GET_REVINFO 98
1366 #define WLC_GET_UCANTDIV 99
1367 #define WLC_SET_UCANTDIV 100
1368 #define WLC_R_REG 101
1369 #define WLC_W_REG 102
1370 /* #define WLC_DIAG_LOOPBACK 103 old tray diag */
1371 /* #define WLC_RESET_D11CNTS 104 */ /* -> "reset_d11cnts" iovar */
1372 #define WLC_GET_MACMODE 105
1373 #define WLC_SET_MACMODE 106
1374 #define WLC_GET_MONITOR 107
1375 #define WLC_SET_MONITOR 108
1376 #define WLC_GET_GMODE 109
1377 #define WLC_SET_GMODE 110
1378 #define WLC_GET_LEGACY_ERP 111
1379 #define WLC_SET_LEGACY_ERP 112
1380 #define WLC_GET_RX_ANT 113
1381 #define WLC_GET_CURR_RATESET 114 /* current rateset */
1382 #define WLC_GET_SCANSUPPRESS 115
1383 #define WLC_SET_SCANSUPPRESS 116
1384 #define WLC_GET_AP 117
1385 #define WLC_SET_AP 118
1386 #define WLC_GET_EAP_RESTRICT 119
1387 #define WLC_SET_EAP_RESTRICT 120
1388 #define WLC_SCB_AUTHORIZE 121
1389 #define WLC_SCB_DEAUTHORIZE 122
1390 #define WLC_GET_WDSLIST 123
1391 #define WLC_SET_WDSLIST 124
1392 #define WLC_GET_ATIM 125
1393 #define WLC_SET_ATIM 126
1394 #define WLC_GET_RSSI 127
1395 #define WLC_GET_PHYANTDIV 128
1396 #define WLC_SET_PHYANTDIV 129
1397 #define WLC_AP_RX_ONLY 130
1398 #define WLC_GET_TX_PATH_PWR 131
1399 #define WLC_SET_TX_PATH_PWR 132
1400 #define WLC_GET_WSEC 133
1401 #define WLC_SET_WSEC 134
1402 #define WLC_GET_PHY_NOISE 135
1403 #define WLC_GET_BSS_INFO 136
1404 #define WLC_GET_PKTCNTS 137
1405 #define WLC_GET_LAZYWDS 138
1406 #define WLC_SET_LAZYWDS 139
1407 #define WLC_GET_BANDLIST 140
1408 #define WLC_GET_BAND 141
1409 #define WLC_SET_BAND 142
1410 #define WLC_SCB_DEAUTHENTICATE 143
1411 #define WLC_GET_SHORTSLOT 144
1412 #define WLC_GET_SHORTSLOT_OVERRIDE 145
1413 #define WLC_SET_SHORTSLOT_OVERRIDE 146
1414 #define WLC_GET_SHORTSLOT_RESTRICT 147
1415 #define WLC_SET_SHORTSLOT_RESTRICT 148
1416 #define WLC_GET_GMODE_PROTECTION 149
1417 #define WLC_GET_GMODE_PROTECTION_OVERRIDE 150
1418 #define WLC_SET_GMODE_PROTECTION_OVERRIDE 151
1419 #define WLC_UPGRADE 152
1420 /* #define WLC_GET_MRATE 153 */ /* no longer supported */
1421 /* #define WLC_SET_MRATE 154 */ /* no longer supported */
1422 #define WLC_GET_IGNORE_BCNS 155
1423 #define WLC_SET_IGNORE_BCNS 156
1424 #define WLC_GET_SCB_TIMEOUT 157
1425 #define WLC_SET_SCB_TIMEOUT 158
1426 #define WLC_GET_ASSOCLIST 159
1427 #define WLC_GET_CLK 160
1428 #define WLC_SET_CLK 161
1429 #define WLC_GET_UP 162
1431 #define WLC_GET_WPA_AUTH 164
1432 #define WLC_SET_WPA_AUTH 165
1433 #define WLC_GET_UCFLAGS 166
1434 #define WLC_SET_UCFLAGS 167
1435 #define WLC_GET_PWRIDX 168
1436 #define WLC_SET_PWRIDX 169
1437 #define WLC_GET_TSSI 170
1438 #define WLC_GET_SUP_RATESET_OVERRIDE 171
1439 #define WLC_SET_SUP_RATESET_OVERRIDE 172
1440 /* #define WLC_SET_FAST_TIMER 173 */ /* no longer supported */
1441 /* #define WLC_GET_FAST_TIMER 174 */ /* no longer supported */
1442 /* #define WLC_SET_SLOW_TIMER 175 */ /* no longer supported */
1443 /* #define WLC_GET_SLOW_TIMER 176 */ /* no longer supported */
1444 /* #define WLC_DUMP_PHYREGS 177 */ /* no longer supported */
1445 #define WLC_GET_PROTECTION_CONTROL 178
1446 #define WLC_SET_PROTECTION_CONTROL 179
1447 #define WLC_GET_PHYLIST 180
1448 #define WLC_ENCRYPT_STRENGTH 181 /* ndis only */
1449 #define WLC_DECRYPT_STATUS 182 /* ndis only */
1450 #define WLC_GET_KEY_SEQ 183
1451 #define WLC_GET_SCAN_CHANNEL_TIME 184
1452 #define WLC_SET_SCAN_CHANNEL_TIME 185
1453 #define WLC_GET_SCAN_UNASSOC_TIME 186
1454 #define WLC_SET_SCAN_UNASSOC_TIME 187
1455 #define WLC_GET_SCAN_HOME_TIME 188
1456 #define WLC_SET_SCAN_HOME_TIME 189
1457 #define WLC_GET_SCAN_NPROBES 190
1458 #define WLC_SET_SCAN_NPROBES 191
1459 #define WLC_GET_PRB_RESP_TIMEOUT 192
1460 #define WLC_SET_PRB_RESP_TIMEOUT 193
1461 #define WLC_GET_ATTEN 194
1462 #define WLC_SET_ATTEN 195
1463 #define WLC_GET_SHMEM 196 /* diag */
1464 #define WLC_SET_SHMEM 197 /* diag */
1465 /* #define WLC_GET_GMODE_PROTECTION_CTS 198 */ /* no longer supported */
1466 /* #define WLC_SET_GMODE_PROTECTION_CTS 199 */ /* no longer supported */
1467 #define WLC_SET_WSEC_TEST 200
1468 #define WLC_SCB_DEAUTHENTICATE_FOR_REASON 201
1469 #define WLC_TKIP_COUNTERMEASURES 202
1470 #define WLC_GET_PIOMODE 203
1471 #define WLC_SET_PIOMODE 204
1472 #define WLC_SET_ASSOC_PREFER 205
1473 #define WLC_GET_ASSOC_PREFER 206
1474 #define WLC_SET_ROAM_PREFER 207
1475 #define WLC_GET_ROAM_PREFER 208
1476 #define WLC_SET_LED 209
1477 #define WLC_GET_LED 210
1478 #define WLC_GET_INTERFERENCE_MODE 211
1479 #define WLC_SET_INTERFERENCE_MODE 212
1480 #define WLC_GET_CHANNEL_QA 213
1481 #define WLC_START_CHANNEL_QA 214
1482 #define WLC_GET_CHANNEL_SEL 215
1483 #define WLC_START_CHANNEL_SEL 216
1484 #define WLC_GET_VALID_CHANNELS 217
1485 #define WLC_GET_FAKEFRAG 218
1486 #define WLC_SET_FAKEFRAG 219
1487 #define WLC_GET_PWROUT_PERCENTAGE 220
1488 #define WLC_SET_PWROUT_PERCENTAGE 221
1489 #define WLC_SET_BAD_FRAME_PREEMPT 222
1490 #define WLC_GET_BAD_FRAME_PREEMPT 223
1491 #define WLC_SET_LEAP_LIST 224
1492 #define WLC_GET_LEAP_LIST 225
1493 #define WLC_GET_CWMIN 226
1494 #define WLC_SET_CWMIN 227
1495 #define WLC_GET_CWMAX 228
1496 #define WLC_SET_CWMAX 229
1497 #define WLC_GET_WET 230
1498 #define WLC_SET_WET 231
1499 #define WLC_GET_PUB 232
1500 /* #define WLC_SET_GLACIAL_TIMER 233 */ /* no longer supported */
1501 /* #define WLC_GET_GLACIAL_TIMER 234 */ /* no longer supported */
1502 #define WLC_GET_KEY_PRIMARY 235
1503 #define WLC_SET_KEY_PRIMARY 236
1504 /* #define WLC_DUMP_RADIOREGS 237 */ /* no longer supported */
1505 #define WLC_GET_ACI_ARGS 238
1506 #define WLC_SET_ACI_ARGS 239
1507 #define WLC_UNSET_CALLBACK 240
1508 #define WLC_SET_CALLBACK 241
1509 #define WLC_GET_RADAR 242
1510 #define WLC_SET_RADAR 243
1511 #define WLC_SET_SPECT_MANAGMENT 244
1512 #define WLC_GET_SPECT_MANAGMENT 245
1513 #define WLC_WDS_GET_REMOTE_HWADDR 246 /* handled in wl_linux.c/wl_vx.c */
1514 #define WLC_WDS_GET_WPA_SUP 247
1515 #define WLC_SET_CS_SCAN_TIMER 248
1516 #define WLC_GET_CS_SCAN_TIMER 249
1517 #define WLC_MEASURE_REQUEST 250
1518 #define WLC_INIT 251
1519 #define WLC_SEND_QUIET 252
1520 #define WLC_KEEPALIVE 253
1521 #define WLC_SEND_PWR_CONSTRAINT 254
1522 #define WLC_UPGRADE_STATUS 255
1523 #define WLC_CURRENT_PWR 256
1524 #define WLC_GET_SCAN_PASSIVE_TIME 257
1525 #define WLC_SET_SCAN_PASSIVE_TIME 258
1526 #define WLC_LEGACY_LINK_BEHAVIOR 259
1527 #define WLC_GET_CHANNELS_IN_COUNTRY 260
1528 #define WLC_GET_COUNTRY_LIST 261
1529 #define WLC_GET_VAR 262 /* get value of named variable */
1530 #define WLC_SET_VAR 263 /* set named variable to value */
1531 #define WLC_NVRAM_GET 264 /* deprecated */
1532 #define WLC_NVRAM_SET 265
1533 #define WLC_NVRAM_DUMP 266
1534 #define WLC_REBOOT 267
1535 #define WLC_SET_WSEC_PMK 268
1536 #define WLC_GET_AUTH_MODE 269
1537 #define WLC_SET_AUTH_MODE 270
1538 #define WLC_GET_WAKEENTRY 271
1539 #define WLC_SET_WAKEENTRY 272
1540 #define WLC_NDCONFIG_ITEM 273 /* currently handled in wl_oid.c */
1541 #define WLC_NVOTPW 274
1542 #define WLC_OTPW 275
1543 #define WLC_IOV_BLOCK_GET 276
1544 #define WLC_IOV_MODULES_GET 277
1545 #define WLC_SOFT_RESET 278
1546 #define WLC_GET_ALLOW_MODE 279
1547 #define WLC_SET_ALLOW_MODE 280
1548 #define WLC_GET_DESIRED_BSSID 281
1549 #define WLC_SET_DESIRED_BSSID 282
1550 #define WLC_DISASSOC_MYAP 283
1551 #define WLC_GET_NBANDS 284 /* for Dongle EXT_STA support */
1552 #define WLC_GET_BANDSTATES 285 /* for Dongle EXT_STA support */
1553 #define WLC_GET_WLC_BSS_INFO 286 /* for Dongle EXT_STA support */
1554 #define WLC_GET_ASSOC_INFO 287 /* for Dongle EXT_STA support */
1555 #define WLC_GET_OID_PHY 288 /* for Dongle EXT_STA support */
1556 #define WLC_SET_OID_PHY 289 /* for Dongle EXT_STA support */
1557 #define WLC_SET_ASSOC_TIME 290 /* for Dongle EXT_STA support */
1558 #define WLC_GET_DESIRED_SSID 291 /* for Dongle EXT_STA support */
1559 #define WLC_GET_CHANSPEC 292 /* for Dongle EXT_STA support */
1560 #define WLC_GET_ASSOC_STATE 293 /* for Dongle EXT_STA support */
1561 #define WLC_SET_PHY_STATE 294 /* for Dongle EXT_STA support */
1562 #define WLC_GET_SCAN_PENDING 295 /* for Dongle EXT_STA support */
1563 #define WLC_GET_SCANREQ_PENDING 296 /* for Dongle EXT_STA support */
1564 #define WLC_GET_PREV_ROAM_REASON 297 /* for Dongle EXT_STA support */
1565 #define WLC_SET_PREV_ROAM_REASON 298 /* for Dongle EXT_STA support */
1566 #define WLC_GET_BANDSTATES_PI 299 /* for Dongle EXT_STA support */
1567 #define WLC_GET_PHY_STATE 300 /* for Dongle EXT_STA support */
1568 #define WLC_GET_BSS_WPA_RSN 301 /* for Dongle EXT_STA support */
1569 #define WLC_GET_BSS_WPA2_RSN 302 /* for Dongle EXT_STA support */
1570 #define WLC_GET_BSS_BCN_TS 303 /* for Dongle EXT_STA support */
1571 #define WLC_GET_INT_DISASSOC 304 /* for Dongle EXT_STA support */
1572 #define WLC_SET_NUM_PEERS 305 /* for Dongle EXT_STA support */
1573 #define WLC_GET_NUM_BSS 306 /* for Dongle EXT_STA support */
1574 #define WLC_PHY_SAMPLE_COLLECT 307 /* phy sample collect mode */
1575 /* #define WLC_UM_PRIV 308 */ /* Deprecated: usermode driver */
1576 #define WLC_GET_CMD 309
1577 /* #define WLC_LAST 310 */ /* Never used - can be reused */
1578 #define WLC_SET_INTERFERENCE_OVERRIDE_MODE 311 /* set inter mode override */
1579 #define WLC_GET_INTERFERENCE_OVERRIDE_MODE 312 /* get inter mode override */
1580 /* #define WLC_GET_WAI_RESTRICT 313 */ /* for WAPI, deprecated use iovar instead */
1581 /* #define WLC_SET_WAI_RESTRICT 314 */ /* for WAPI, deprecated use iovar instead */
1582 /* #define WLC_SET_WAI_REKEY 315 */ /* for WAPI, deprecated use iovar instead */
1583 #define WLC_SET_NAT_CONFIG 316 /* for configuring NAT filter driver */
1584 #define WLC_GET_NAT_STATE 317
1585 #define WLC_LAST 318
1587 #ifndef EPICTRL_COOKIE
1588 #define EPICTRL_COOKIE 0xABADCEDE
1591 /* vx wlc ioctl's offset */
1592 #define CMN_IOCTL_OFF 0x180
1595 * custom OID support
1597 * 0xFF - implementation specific OID
1598 * 0xE4 - first byte of Broadcom PCI vendor ID
1599 * 0x14 - second byte of Broadcom PCI vendor ID
1600 * 0xXX - the custom OID number
1603 /* begin 0x1f values beyond the start of the ET driver range. */
1604 #define WL_OID_BASE 0xFFE41420
1606 /* NDIS overrides */
1607 #define OID_WL_GETINSTANCE (WL_OID_BASE + WLC_GET_INSTANCE)
1608 #define OID_WL_GET_FORCELINK (WL_OID_BASE + WLC_GET_FORCELINK)
1609 #define OID_WL_SET_FORCELINK (WL_OID_BASE + WLC_SET_FORCELINK)
1610 #define OID_WL_ENCRYPT_STRENGTH (WL_OID_BASE + WLC_ENCRYPT_STRENGTH)
1611 #define OID_WL_DECRYPT_STATUS (WL_OID_BASE + WLC_DECRYPT_STATUS)
1612 #define OID_LEGACY_LINK_BEHAVIOR (WL_OID_BASE + WLC_LEGACY_LINK_BEHAVIOR)
1613 #define OID_WL_NDCONFIG_ITEM (WL_OID_BASE + WLC_NDCONFIG_ITEM)
1615 /* EXT_STA Dongle suuport */
1616 #define OID_STA_CHANSPEC (WL_OID_BASE + WLC_GET_CHANSPEC)
1617 #define OID_STA_NBANDS (WL_OID_BASE + WLC_GET_NBANDS)
1618 #define OID_STA_GET_PHY (WL_OID_BASE + WLC_GET_OID_PHY)
1619 #define OID_STA_SET_PHY (WL_OID_BASE + WLC_SET_OID_PHY)
1620 #define OID_STA_ASSOC_TIME (WL_OID_BASE + WLC_SET_ASSOC_TIME)
1621 #define OID_STA_DESIRED_SSID (WL_OID_BASE + WLC_GET_DESIRED_SSID)
1622 #define OID_STA_SET_PHY_STATE (WL_OID_BASE + WLC_SET_PHY_STATE)
1623 #define OID_STA_SCAN_PENDING (WL_OID_BASE + WLC_GET_SCAN_PENDING)
1624 #define OID_STA_SCANREQ_PENDING (WL_OID_BASE + WLC_GET_SCANREQ_PENDING)
1625 #define OID_STA_GET_ROAM_REASON (WL_OID_BASE + WLC_GET_PREV_ROAM_REASON)
1626 #define OID_STA_SET_ROAM_REASON (WL_OID_BASE + WLC_SET_PREV_ROAM_REASON)
1627 #define OID_STA_GET_PHY_STATE (WL_OID_BASE + WLC_GET_PHY_STATE)
1628 #define OID_STA_INT_DISASSOC (WL_OID_BASE + WLC_GET_INT_DISASSOC)
1629 #define OID_STA_SET_NUM_PEERS (WL_OID_BASE + WLC_SET_NUM_PEERS)
1630 #define OID_STA_GET_NUM_BSS (WL_OID_BASE + WLC_GET_NUM_BSS)
1632 /* NAT filter driver support */
1633 #define OID_NAT_SET_CONFIG (WL_OID_BASE + WLC_SET_NAT_CONFIG)
1634 #define OID_NAT_GET_STATE (WL_OID_BASE + WLC_GET_NAT_STATE)
1636 #define WL_DECRYPT_STATUS_SUCCESS 1
1637 #define WL_DECRYPT_STATUS_FAILURE 2
1638 #define WL_DECRYPT_STATUS_UNKNOWN 3
1640 /* allows user-mode app to poll the status of USB image upgrade */
1641 #define WLC_UPGRADE_SUCCESS 0
1642 #define WLC_UPGRADE_PENDING 1
1644 #ifdef CONFIG_USBRNDIS_RETAIL
1645 /* struct passed in for WLC_NDCONFIG_ITEM */
1653 /* WLC_GET_AUTH, WLC_SET_AUTH values */
1654 #define WL_AUTH_OPEN_SYSTEM 0 /* d11 open authentication */
1655 #define WL_AUTH_SHARED_KEY 1 /* d11 shared authentication */
1656 #define WL_AUTH_OPEN_SHARED 2 /* try open, then shared if open failed w/rc 13 */
1658 /* Bit masks for radio disabled status - returned by WL_GET_RADIO */
1659 #define WL_RADIO_SW_DISABLE (1<<0)
1660 #define WL_RADIO_HW_DISABLE (1<<1)
1661 #define WL_RADIO_MPC_DISABLE (1<<2)
1662 #define WL_RADIO_COUNTRY_DISABLE (1<<3) /* some countries don't support any channel */
1664 #define WL_SPURAVOID_OFF 0
1665 #define WL_SPURAVOID_ON1 1
1666 #define WL_SPURAVOID_ON2 2
1668 /* Override bit for WLC_SET_TXPWR. if set, ignore other level limits */
1669 #define WL_TXPWR_OVERRIDE (1U<<31)
1670 #define WL_TXPWR_NEG (1U<<30)
1672 #define WL_PHY_PAVARS_LEN 32 /* Phy type, Band range, chain, a1[0], b0[0], b1[0] ... */
1674 #define WL_PHY_PAVARS2_NUM 3 /* a1, b0, b1 */
1675 #define WL_PHY_PAVAR_VER 1 /* pavars version */
1676 typedef struct wl_pavars2
{
1677 uint16 ver
; /* version of this struct */
1678 uint16 len
; /* len of this structure */
1679 uint16 inuse
; /* driver return 1 for a1,b0,b1 in current band range */
1680 uint16 phy_type
; /* phy type */
1683 uint16 inpa
[WL_PHY_PAVARS2_NUM
]; /* phy pavars for one band range */
1686 typedef struct wl_po
{
1687 uint16 phy_type
; /* Phy type */
1694 /* a large TX Power as an init value to factor out of MIN() calculations,
1695 * keep low enough to fit in an int8, units are .25 dBm
1697 #define WLC_TXPWR_MAX (127) /* ~32 dBm = 1,500 mW */
1699 /* "diag" iovar argument and error code */
1700 #define WL_DIAG_INTERRUPT 1 /* d11 loopback interrupt test */
1701 #define WL_DIAG_LOOPBACK 2 /* d11 loopback data test */
1702 #define WL_DIAG_MEMORY 3 /* d11 memory test */
1703 #define WL_DIAG_LED 4 /* LED test */
1704 #define WL_DIAG_REG 5 /* d11/phy register test */
1705 #define WL_DIAG_SROM 6 /* srom read/crc test */
1706 #define WL_DIAG_DMA 7 /* DMA test */
1707 #define WL_DIAG_LOOPBACK_EXT 8 /* enhenced d11 loopback data test */
1709 #define WL_DIAGERR_SUCCESS 0
1710 #define WL_DIAGERR_FAIL_TO_RUN 1 /* unable to run requested diag */
1711 #define WL_DIAGERR_NOT_SUPPORTED 2 /* diag requested is not supported */
1712 #define WL_DIAGERR_INTERRUPT_FAIL 3 /* loopback interrupt test failed */
1713 #define WL_DIAGERR_LOOPBACK_FAIL 4 /* loopback data test failed */
1714 #define WL_DIAGERR_SROM_FAIL 5 /* srom read failed */
1715 #define WL_DIAGERR_SROM_BADCRC 6 /* srom crc failed */
1716 #define WL_DIAGERR_REG_FAIL 7 /* d11/phy register test failed */
1717 #define WL_DIAGERR_MEMORY_FAIL 8 /* d11 memory test failed */
1718 #define WL_DIAGERR_NOMEM 9 /* diag test failed due to no memory */
1719 #define WL_DIAGERR_DMA_FAIL 10 /* DMA test failed */
1721 #define WL_DIAGERR_MEMORY_TIMEOUT 11 /* d11 memory test didn't finish in time */
1722 #define WL_DIAGERR_MEMORY_BADPATTERN 12 /* d11 memory test result in bad pattern */
1725 #define WLC_BAND_AUTO 0 /* auto-select */
1726 #define WLC_BAND_5G 1 /* 5 Ghz */
1727 #define WLC_BAND_2G 2 /* 2.4 Ghz */
1728 #define WLC_BAND_ALL 3 /* all bands */
1730 /* band range returned by band_range iovar */
1731 #define WL_CHAN_FREQ_RANGE_2G 0
1732 #define WL_CHAN_FREQ_RANGE_5GL 1
1733 #define WL_CHAN_FREQ_RANGE_5GM 2
1734 #define WL_CHAN_FREQ_RANGE_5GH 3
1736 #define WL_CHAN_FREQ_RANGE_5GLL_5BAND 4
1737 #define WL_CHAN_FREQ_RANGE_5GLH_5BAND 5
1738 #define WL_CHAN_FREQ_RANGE_5GML_5BAND 6
1739 #define WL_CHAN_FREQ_RANGE_5GMH_5BAND 7
1740 #define WL_CHAN_FREQ_RANGE_5GH_5BAND 8
1742 #define WL_CHAN_FREQ_RANGE_5G_BAND0 1
1743 #define WL_CHAN_FREQ_RANGE_5G_BAND1 2
1744 #define WL_CHAN_FREQ_RANGE_5G_BAND2 3
1745 #define WL_CHAN_FREQ_RANGE_5G_BAND3 4
1747 #define WL_CHAN_FREQ_RANGE_5G_4BAND 5
1749 /* phy types (returned by WLC_GET_PHYTPE) */
1750 #define WLC_PHY_TYPE_A 0
1751 #define WLC_PHY_TYPE_B 1
1752 #define WLC_PHY_TYPE_G 2
1753 #define WLC_PHY_TYPE_N 4
1754 #define WLC_PHY_TYPE_LP 5
1755 #define WLC_PHY_TYPE_SSN 6
1756 #define WLC_PHY_TYPE_HT 7
1757 #define WLC_PHY_TYPE_LCN 8
1758 #define WLC_PHY_TYPE_LCN40 10
1759 #define WLC_PHY_TYPE_AC 11
1760 #define WLC_PHY_TYPE_NULL 0xf
1762 /* MAC list modes */
1763 #define WLC_MACMODE_DISABLED 0 /* MAC list disabled */
1764 #define WLC_MACMODE_DENY 1 /* Deny specified (i.e. allow unspecified) */
1765 #define WLC_MACMODE_ALLOW 2 /* Allow specified (i.e. deny unspecified) */
1768 * 54g modes (basic bits may still be overridden)
1770 * GMODE_LEGACY_B Rateset: 1b, 2b, 5.5, 11
1773 * GMODE_AUTO Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
1774 * Extended Rateset: 6, 9, 12, 48
1777 * GMODE_ONLY Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54
1778 * Extended Rateset: 6b, 9, 12b, 48
1779 * Preamble: Short required
1781 * GMODE_B_DEFERRED Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
1782 * Extended Rateset: 6, 9, 12, 48
1785 * GMODE_PERFORMANCE Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54
1786 * Preamble: Short required
1787 * Shortslot: On and required
1788 * GMODE_LRS Rateset: 1b, 2b, 5.5b, 11b
1789 * Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54
1793 #define GMODE_LEGACY_B 0
1794 #define GMODE_AUTO 1
1795 #define GMODE_ONLY 2
1796 #define GMODE_B_DEFERRED 3
1797 #define GMODE_PERFORMANCE 4
1801 /* values for PLCPHdr_override */
1802 #define WLC_PLCP_AUTO -1
1803 #define WLC_PLCP_SHORT 0
1804 #define WLC_PLCP_LONG 1
1806 /* values for g_protection_override and n_protection_override */
1807 #define WLC_PROTECTION_AUTO -1
1808 #define WLC_PROTECTION_OFF 0
1809 #define WLC_PROTECTION_ON 1
1810 #define WLC_PROTECTION_MMHDR_ONLY 2
1811 #define WLC_PROTECTION_CTS_ONLY 3
1813 /* values for g_protection_control and n_protection_control */
1814 #define WLC_PROTECTION_CTL_OFF 0
1815 #define WLC_PROTECTION_CTL_LOCAL 1
1816 #define WLC_PROTECTION_CTL_OVERLAP 2
1818 /* values for n_protection */
1819 #define WLC_N_PROTECTION_OFF 0
1820 #define WLC_N_PROTECTION_OPTIONAL 1
1821 #define WLC_N_PROTECTION_20IN40 2
1822 #define WLC_N_PROTECTION_MIXEDMODE 3
1824 /* values for n_preamble_type */
1825 #define WLC_N_PREAMBLE_MIXEDMODE 0
1826 #define WLC_N_PREAMBLE_GF 1
1827 #define WLC_N_PREAMBLE_GF_BRCM 2
1829 /* values for band specific 40MHz capabilities (deprecated) */
1830 #define WLC_N_BW_20ALL 0
1831 #define WLC_N_BW_40ALL 1
1832 #define WLC_N_BW_20IN2G_40IN5G 2
1834 #define WLC_BW_20MHZ_BIT (1<<0)
1835 #define WLC_BW_40MHZ_BIT (1<<1)
1836 #define WLC_BW_80MHZ_BIT (1<<2)
1838 /* Bandwidth capabilities */
1839 #define WLC_BW_CAP_20MHZ (WLC_BW_20MHZ_BIT)
1840 #define WLC_BW_CAP_40MHZ (WLC_BW_40MHZ_BIT|WLC_BW_20MHZ_BIT)
1841 #define WLC_BW_CAP_80MHZ (WLC_BW_80MHZ_BIT|WLC_BW_40MHZ_BIT|WLC_BW_20MHZ_BIT)
1842 #define WLC_BW_CAP_UNRESTRICTED 0xFF
1844 #define WL_BW_CAP_20MHZ(bw_cap) (((bw_cap) & WLC_BW_20MHZ_BIT) ? TRUE : FALSE)
1845 #define WL_BW_CAP_40MHZ(bw_cap) (((bw_cap) & WLC_BW_40MHZ_BIT) ? TRUE : FALSE)
1846 #define WL_BW_CAP_80MHZ(bw_cap) (((bw_cap) & WLC_BW_80MHZ_BIT) ? TRUE : FALSE)
1848 /* values to force tx/rx chain */
1849 #define WLC_N_TXRX_CHAIN0 0
1850 #define WLC_N_TXRX_CHAIN1 1
1852 /* bitflags for SGI support (sgi_rx iovar) */
1853 #define WLC_N_SGI_20 0x01
1854 #define WLC_N_SGI_40 0x02
1856 /* when sgi_tx==WLC_SGI_ALL, bypass rate selection, enable sgi for all mcs */
1857 #define WLC_SGI_ALL 0x02
1863 #define PM_FORCE_OFF 3 /* use this bit to force PM off even bt is active */
1865 #define LISTEN_INTERVAL 10
1866 /* interference mitigation options */
1867 #define INTERFERE_OVRRIDE_OFF -1 /* interference override off */
1868 #define INTERFERE_NONE 0 /* off */
1869 #define NON_WLAN 1 /* foreign/non 802.11 interference, no auto detect */
1870 #define WLAN_MANUAL 2 /* ACI: no auto detection */
1871 #define WLAN_AUTO 3 /* ACI: auto detect */
1872 #define WLAN_AUTO_W_NOISE 4 /* ACI: auto - detect and non 802.11 interference */
1873 #define AUTO_ACTIVE (1 << 7) /* Auto is currently active */
1875 typedef struct wl_aci_args
{
1876 int enter_aci_thresh
; /* Trigger level to start detecting ACI */
1877 int exit_aci_thresh
; /* Trigger level to exit ACI mode */
1878 int usec_spin
; /* microsecs to delay between rssi samples */
1879 int glitch_delay
; /* interval between ACI scans when glitch count is consistently high */
1880 uint16 nphy_adcpwr_enter_thresh
; /* ADC power to enter ACI mitigation mode */
1881 uint16 nphy_adcpwr_exit_thresh
; /* ADC power to exit ACI mitigation mode */
1882 uint16 nphy_repeat_ctr
; /* Number of tries per channel to compute power */
1883 uint16 nphy_num_samples
; /* Number of samples to compute power on one channel */
1884 uint16 nphy_undetect_window_sz
; /* num of undetects to exit ACI Mitigation mode */
1885 uint16 nphy_b_energy_lo_aci
; /* low ACI power energy threshold for bphy */
1886 uint16 nphy_b_energy_md_aci
; /* mid ACI power energy threshold for bphy */
1887 uint16 nphy_b_energy_hi_aci
; /* high ACI power energy threshold for bphy */
1888 uint16 nphy_noise_noassoc_glitch_th_up
; /* wl interference 4 */
1889 uint16 nphy_noise_noassoc_glitch_th_dn
;
1890 uint16 nphy_noise_assoc_glitch_th_up
;
1891 uint16 nphy_noise_assoc_glitch_th_dn
;
1892 uint16 nphy_noise_assoc_aci_glitch_th_up
;
1893 uint16 nphy_noise_assoc_aci_glitch_th_dn
;
1894 uint16 nphy_noise_assoc_enter_th
;
1895 uint16 nphy_noise_noassoc_enter_th
;
1896 uint16 nphy_noise_assoc_rx_glitch_badplcp_enter_th
;
1897 uint16 nphy_noise_noassoc_crsidx_incr
;
1898 uint16 nphy_noise_assoc_crsidx_incr
;
1899 uint16 nphy_noise_crsidx_decr
;
1902 #define TRIGGER_NOW 0
1903 #define TRIGGER_CRS 0x01
1904 #define TRIGGER_CRSDEASSERT 0x02
1905 #define TRIGGER_GOODFCS 0x04
1906 #define TRIGGER_BADFCS 0x08
1907 #define TRIGGER_BADPLCP 0x10
1908 #define TRIGGER_CRSGLITCH 0x20
1909 #define WL_ACI_ARGS_LEGACY_LENGTH 16 /* bytes of pre NPHY aci args */
1910 #define WL_SAMPLECOLLECT_T_VERSION 2 /* version of wl_samplecollect_args_t struct */
1911 typedef struct wl_samplecollect_args
{
1912 /* version 0 fields */
1915 /* add'l version 1 fields */
1916 uint16 version
; /* see definition of WL_SAMPLECOLLECT_T_VERSION */
1917 uint16 length
; /* length of entire structure */
1926 bool agc
; /* loop from init gain and going down */
1927 bool filter
; /* override high pass corners to lowest */
1928 /* add'l version 2 fields */
1929 uint8 trigger_state
;
1933 } wl_samplecollect_args_t
;
1935 #define WL_SAMPLEDATA_HEADER_TYPE 1
1936 #define WL_SAMPLEDATA_HEADER_SIZE 80 /* sample collect header size (bytes) */
1937 #define WL_SAMPLEDATA_TYPE 2
1938 #define WL_SAMPLEDATA_SEQ 0xff /* sequence # */
1939 #define WL_SAMPLEDATA_MORE_DATA 0x100 /* more data mask */
1940 #define WL_SAMPLEDATA_T_VERSION 1 /* version of wl_samplecollect_args_t struct */
1941 /* version for unpacked sample data, int16 {(I,Q),Core(0..N)} */
1942 #define WL_SAMPLEDATA_T_VERSION_SPEC_AN 2
1944 typedef struct wl_sampledata
{
1945 uint16 version
; /* structure version */
1946 uint16 size
; /* size of structure */
1947 uint16 tag
; /* Header/Data */
1948 uint16 length
; /* data length */
1949 uint32 flag
; /* bit def */
1952 #ifndef LINUX_POSTMOGRIFY_REMOVAL
1953 /* wl_radar_args_t */
1955 int npulses
; /* required number of pulses at n * t_int */
1956 int ncontig
; /* required number of pulses at t_int */
1957 int min_pw
; /* minimum pulse width (20 MHz clocks) */
1958 int max_pw
; /* maximum pulse width (20 MHz clocks) */
1959 uint16 thresh0
; /* Radar detection, thresh 0 */
1960 uint16 thresh1
; /* Radar detection, thresh 1 */
1961 uint16 blank
; /* Radar detection, blank control */
1962 uint16 fmdemodcfg
; /* Radar detection, fmdemod config */
1963 int npulses_lp
; /* Radar detection, minimum long pulses */
1964 int min_pw_lp
; /* Minimum pulsewidth for long pulses */
1965 int max_pw_lp
; /* Maximum pulsewidth for long pulses */
1966 int min_fm_lp
; /* Minimum fm for long pulses */
1967 int max_span_lp
; /* Maximum deltat for long pulses */
1968 int min_deltat
; /* Minimum spacing between pulses */
1969 int max_deltat
; /* Maximum spacing between pulses */
1970 uint16 autocorr
; /* Radar detection, autocorr on or off */
1971 uint16 st_level_time
; /* Radar detection, start_timing level */
1972 uint16 t2_min
; /* minimum clocks needed to remain in state 2 */
1973 uint32 version
; /* version */
1974 uint32 fra_pulse_err
; /* sample error margin for detecting French radar pulsed */
1975 int npulses_fra
; /* Radar detection, minimum French pulses set */
1976 int npulses_stg2
; /* Radar detection, minimum staggered-2 pulses set */
1977 int npulses_stg3
; /* Radar detection, minimum staggered-3 pulses set */
1978 uint16 percal_mask
; /* defines which period cal is masked from radar detection */
1979 int quant
; /* quantization resolution to pulse positions */
1980 uint32 min_burst_intv_lp
; /* minimum burst to burst interval for bin3 radar */
1981 uint32 max_burst_intv_lp
; /* maximum burst to burst interval for bin3 radar */
1982 int nskip_rst_lp
; /* number of skipped pulses before resetting lp buffer */
1983 int max_pw_tol
; /* maximum tollerance allowed in detected pulse width for radar detection */
1984 uint16 feature_mask
; /* 16-bit mask to specify enabled features */
1987 #define WL_RADAR_ARGS_VERSION 2
1990 uint32 version
; /* version */
1991 uint16 thresh0_20_lo
; /* Radar detection, thresh 0 (range 5250-5350MHz) for BW 20MHz */
1992 uint16 thresh1_20_lo
; /* Radar detection, thresh 1 (range 5250-5350MHz) for BW 20MHz */
1993 uint16 thresh0_40_lo
; /* Radar detection, thresh 0 (range 5250-5350MHz) for BW 40MHz */
1994 uint16 thresh1_40_lo
; /* Radar detection, thresh 1 (range 5250-5350MHz) for BW 40MHz */
1995 uint16 thresh0_80_lo
; /* Radar detection, thresh 0 (range 5250-5350MHz) for BW 80MHz */
1996 uint16 thresh1_80_lo
; /* Radar detection, thresh 1 (range 5250-5350MHz) for BW 80MHz */
1997 uint16 thresh0_160_lo
; /* Radar detection, thresh 0 (range 5250-5350MHz) for BW 160MHz */
1998 uint16 thresh1_160_lo
; /* Radar detection, thresh 1 (range 5250-5350MHz) for BW 160MHz */
1999 uint16 thresh0_20_hi
; /* Radar detection, thresh 0 (range 5470-5725MHz) for BW 20MHz */
2000 uint16 thresh1_20_hi
; /* Radar detection, thresh 1 (range 5470-5725MHz) for BW 20MHz */
2001 uint16 thresh0_40_hi
; /* Radar detection, thresh 0 (range 5470-5725MHz) for BW 40MHz */
2002 uint16 thresh1_40_hi
; /* Radar detection, thresh 1 (range 5470-5725MHz) for BW 40MHz */
2003 uint16 thresh0_80_hi
; /* Radar detection, thresh 0 (range 5470-5725MHz) for BW 80MHz */
2004 uint16 thresh1_80_hi
; /* Radar detection, thresh 1 (range 5470-5725MHz) for BW 80MHz */
2005 uint16 thresh0_160_hi
; /* Radar detection, thresh 0 (range 5470-5725MHz) for BW 160MHz */
2006 uint16 thresh1_160_hi
; /* Radar detection, thresh 1 (range 5470-5725MHz) for BW 160MHz */
2009 #define WL_RADAR_THR_VERSION 2
2010 #define WL_THRESHOLD_LO_BAND 70 /* range from 5250MHz - 5350MHz */
2012 /* radar iovar SET defines */
2013 #define WL_RADAR_DETECTOR_OFF 0 /* radar detector off */
2014 #define WL_RADAR_DETECTOR_ON 1 /* radar detector on */
2015 #define WL_RADAR_SIMULATED 2 /* force radar detector to declare
2018 #define WL_RSSI_ANT_VERSION 1 /* current version of wl_rssi_ant_t */
2019 #define WL_ANT_RX_MAX 2 /* max 2 receive antennas */
2020 #define WL_ANT_HT_RX_MAX 3 /* max 3 receive antennas/cores */
2021 #define WL_ANT_IDX_1 0 /* antenna index 1 */
2022 #define WL_ANT_IDX_2 1 /* antenna index 2 */
2024 #ifndef WL_RSSI_ANT_MAX
2025 #define WL_RSSI_ANT_MAX 4 /* max possible rx antennas */
2026 #elif WL_RSSI_ANT_MAX != 4
2027 #error "WL_RSSI_ANT_MAX does not match"
2030 /* RSSI per antenna */
2032 uint32 version
; /* version field */
2033 uint32 count
; /* number of valid antenna rssi */
2034 int8 rssi_ant
[WL_RSSI_ANT_MAX
]; /* rssi per antenna */
2037 /* dfs_status iovar-related defines */
2039 /* cac - channel availability check,
2040 * ism - in-service monitoring
2041 * csa - channel switching announcement
2044 /* cac state values */
2045 #define WL_DFS_CACSTATE_IDLE 0 /* state for operating in non-radar channel */
2046 #define WL_DFS_CACSTATE_PREISM_CAC 1 /* CAC in progress */
2047 #define WL_DFS_CACSTATE_ISM 2 /* ISM in progress */
2048 #define WL_DFS_CACSTATE_CSA 3 /* csa */
2049 #define WL_DFS_CACSTATE_POSTISM_CAC 4 /* ISM CAC */
2050 #define WL_DFS_CACSTATE_PREISM_OOC 5 /* PREISM OOC */
2051 #define WL_DFS_CACSTATE_POSTISM_OOC 6 /* POSTISM OOC */
2052 #define WL_DFS_CACSTATES 7 /* this many states exist */
2054 /* data structure used in 'dfs_status' wl interface, which is used to query dfs status */
2056 uint state
; /* noted by WL_DFS_CACSTATE_XX. */
2057 uint duration
; /* time spent in ms in state. */
2058 /* as dfs enters ISM state, it removes the operational channel from quiet channel
2059 * list and notes the channel in channel_cleared. set to 0 if no channel is cleared
2061 chanspec_t chanspec_cleared
;
2062 /* chanspec cleared used to be a uint, add another to uint16 to maintain size */
2066 #define NUM_PWRCTRL_RATES 12
2069 uint8 txpwr_band_max
[NUM_PWRCTRL_RATES
]; /* User set target */
2070 uint8 txpwr_limit
[NUM_PWRCTRL_RATES
]; /* reg and local power limit */
2071 uint8 txpwr_local_max
; /* local max according to the AP */
2072 uint8 txpwr_local_constraint
; /* local constraint according to the AP */
2073 uint8 txpwr_chan_reg_max
; /* Regulatory max for this channel */
2074 uint8 txpwr_target
[2][NUM_PWRCTRL_RATES
]; /* Latest target for 2.4 and 5 Ghz */
2075 uint8 txpwr_est_Pout
[2]; /* Latest estimate for 2.4 and 5 Ghz */
2076 uint8 txpwr_opo
[NUM_PWRCTRL_RATES
]; /* On G phy, OFDM power offset */
2077 uint8 txpwr_bphy_cck_max
[NUM_PWRCTRL_RATES
]; /* Max CCK power for this band (SROM) */
2078 uint8 txpwr_bphy_ofdm_max
; /* Max OFDM power for this band (SROM) */
2079 uint8 txpwr_aphy_max
[NUM_PWRCTRL_RATES
]; /* Max power for A band (SROM) */
2080 int8 txpwr_antgain
[2]; /* Ant gain for each band - from SROM */
2081 uint8 txpwr_est_Pout_gofdm
; /* Pwr estimate for 2.4 OFDM */
2082 } tx_power_legacy_t
;
2084 #define WL_TX_POWER_RATES_LEGACY 45
2085 #define WL_TX_POWER_MCS20_FIRST 12
2086 #define WL_TX_POWER_MCS20_NUM 16
2087 #define WL_TX_POWER_MCS40_FIRST 28
2088 #define WL_TX_POWER_MCS40_NUM 17
2092 chanspec_t chanspec
; /* txpwr report for this channel */
2093 chanspec_t local_chanspec
; /* channel on which we are associated */
2094 uint8 local_max
; /* local max according to the AP */
2095 uint8 local_constraint
; /* local constraint according to the AP */
2096 int8 antgain
[2]; /* Ant gain for each band - from SROM */
2097 uint8 rf_cores
; /* count of RF Cores being reported */
2098 uint8 est_Pout
[4]; /* Latest tx power out estimate per RF
2099 * chain without adjustment
2101 uint8 est_Pout_cck
; /* Latest CCK tx power out estimate */
2102 uint8 user_limit
[WL_TX_POWER_RATES_LEGACY
]; /* User limit */
2103 uint8 reg_limit
[WL_TX_POWER_RATES_LEGACY
]; /* Regulatory power limit */
2104 uint8 board_limit
[WL_TX_POWER_RATES_LEGACY
]; /* Max power board can support (SROM) */
2105 uint8 target
[WL_TX_POWER_RATES_LEGACY
]; /* Latest target power */
2106 } tx_power_legacy2_t
;
2108 /* TX Power index defines */
2109 #define WL_NUM_RATES_CCK 4 /* 1, 2, 5.5, 11 Mbps */
2110 #define WL_NUM_RATES_OFDM 8 /* 6, 9, 12, 18, 24, 36, 48, 54 Mbps SISO/CDD */
2111 #define WL_NUM_RATES_MCS_1STREAM 8 /* MCS 0-7 1-stream rates - SISO/CDD/STBC/MCS */
2112 #define WL_NUM_RATES_EXTRA_VHT 2 /* Additional VHT 11AC rates */
2113 #define WL_NUM_RATES_VHT 10
2114 #define WL_NUM_RATES_MCS32 1
2116 #define WLC_NUM_RATES_CCK WL_NUM_RATES_CCK
2117 #define WLC_NUM_RATES_OFDM WL_NUM_RATES_OFDM
2118 #define WLC_NUM_RATES_MCS_1_STREAM WL_NUM_RATES_MCS_1STREAM
2119 #define WLC_NUM_RATES_MCS_2_STREAM WL_NUM_RATES_MCS_1STREAM
2120 #define WLC_NUM_RATES_MCS32 WL_NUM_RATES_MCS32
2121 #define WL_TX_POWER_CCK_NUM WL_NUM_RATES_CCK
2122 #define WL_TX_POWER_OFDM_NUM WL_NUM_RATES_OFDM
2123 #define WL_TX_POWER_MCS_1_STREAM_NUM WL_NUM_RATES_MCS_1STREAM
2124 #define WL_TX_POWER_MCS_2_STREAM_NUM WL_NUM_RATES_MCS_1STREAM
2125 #define WL_TX_POWER_MCS_32_NUM WL_NUM_RATES_MCS32
2127 #define WL_NUM_2x2_ELEMENTS 4
2128 #define WL_NUM_3x3_ELEMENTS 6
2130 typedef struct txppr
{
2131 /* start of 20MHz tx power limits */
2132 uint8 b20_1x1dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2133 uint8 b20_1x1ofdm
[WL_NUM_RATES_OFDM
]; /* Legacy OFDM transmission */
2134 uint8 b20_1x1mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* SISO MCS 0-7 */
2136 uint8 b20_1x2dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2137 uint8 b20_1x2cdd_ofdm
[WL_NUM_RATES_OFDM
]; /* Legacy OFDM CDD transmission */
2138 uint8 b20_1x2cdd_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* CDD MCS 0-7 */
2139 uint8 b20_2x2stbc_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* STBC MCS 0-7 */
2140 uint8 b20_2x2sdm_mcs8
[WL_NUM_RATES_MCS_1STREAM
]; /* MCS 8-15 */
2142 uint8 b20_1x3dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2143 uint8 b20_1x3cdd_ofdm
[WL_NUM_RATES_OFDM
]; /* Legacy OFDM CDD transmission */
2144 uint8 b20_1x3cdd_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* 1 Nsts to 3 Tx Chain */
2145 uint8 b20_2x3stbc_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* STBC MCS 0-7 */
2146 uint8 b20_2x3sdm_mcs8
[WL_NUM_RATES_MCS_1STREAM
]; /* 2 Nsts to 3 Tx Chain */
2147 uint8 b20_3x3sdm_mcs16
[WL_NUM_RATES_MCS_1STREAM
]; /* 3 Nsts to 3 Tx Chain */
2149 uint8 b20_1x1vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1 */
2150 uint8 b20_1x2cdd_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_CDD1 */
2151 uint8 b20_2x2stbc_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_STBC */
2152 uint8 b20_2x2sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS2 */
2153 uint8 b20_1x3cdd_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_CDD2 */
2154 uint8 b20_2x3stbc_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_STBC_SPEXP1 */
2155 uint8 b20_2x3sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS2_SPEXP1 */
2156 uint8 b20_3x3sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS3 */
2158 /* start of 40MHz tx power limits */
2159 uint8 b40_dummy1x1dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2160 uint8 b40_1x1ofdm
[WL_NUM_RATES_OFDM
]; /* Legacy OFDM transmission */
2161 uint8 b40_1x1mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* SISO MCS 0-7 */
2163 uint8 b40_dummy1x2dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2164 uint8 b40_1x2cdd_ofdm
[WL_NUM_RATES_OFDM
]; /* Legacy OFDM CDD transmission */
2165 uint8 b40_1x2cdd_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* CDD MCS 0-7 */
2166 uint8 b40_2x2stbc_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* STBC MCS 0-7 */
2167 uint8 b40_2x2sdm_mcs8
[WL_NUM_RATES_MCS_1STREAM
]; /* MCS 8-15 */
2169 uint8 b40_dummy1x3dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2170 uint8 b40_1x3cdd_ofdm
[WL_NUM_RATES_OFDM
]; /* Legacy OFDM CDD transmission */
2171 uint8 b40_1x3cdd_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* 1 Nsts to 3 Tx Chain */
2172 uint8 b40_2x3stbc_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* STBC MCS 0-7 */
2173 uint8 b40_2x3sdm_mcs8
[WL_NUM_RATES_MCS_1STREAM
]; /* 2 Nsts to 3 Tx Chain */
2174 uint8 b40_3x3sdm_mcs16
[WL_NUM_RATES_MCS_1STREAM
]; /* 3 Nsts to 3 Tx Chain */
2176 uint8 b40_1x1vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1 */
2177 uint8 b40_1x2cdd_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_CDD1 */
2178 uint8 b40_2x2stbc_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_STBC */
2179 uint8 b40_2x2sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS2 */
2180 uint8 b40_1x3cdd_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_CDD2 */
2181 uint8 b40_2x3stbc_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_STBC_SPEXP1 */
2182 uint8 b40_2x3sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS2_SPEXP1 */
2183 uint8 b40_3x3sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS3 */
2185 /* start of 20in40MHz tx power limits */
2186 uint8 b20in40_1x1dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2187 uint8 b20in40_1x1ofdm
[WL_NUM_RATES_OFDM
]; /* Legacy OFDM transmission */
2188 uint8 b20in40_1x1mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* SISO MCS 0-7 */
2190 uint8 b20in40_1x2dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2191 uint8 b20in40_1x2cdd_ofdm
[WL_NUM_RATES_OFDM
]; /* Legacy OFDM CDD transmission */
2192 uint8 b20in40_1x2cdd_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* CDD MCS 0-7 */
2193 uint8 b20in40_2x2stbc_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* STBC MCS 0-7 */
2194 uint8 b20in40_2x2sdm_mcs8
[WL_NUM_RATES_MCS_1STREAM
]; /* MCS 8-15 */
2196 uint8 b20in40_1x3dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2197 uint8 b20in40_1x3cdd_ofdm
[WL_NUM_RATES_OFDM
]; /* 20 in 40 MHz Legacy OFDM CDD */
2198 uint8 b20in40_1x3cdd_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* 1 Nsts to 3 Tx Chain */
2199 uint8 b20in40_2x3stbc_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* STBC MCS 0-7 */
2200 uint8 b20in40_2x3sdm_mcs8
[WL_NUM_RATES_MCS_1STREAM
]; /* 2 Nsts to 3 Tx Chain */
2201 uint8 b20in40_3x3sdm_mcs16
[WL_NUM_RATES_MCS_1STREAM
]; /* 3 Nsts to 3 Tx Chain */
2203 uint8 b20in40_1x1vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1 */
2204 uint8 b20in40_1x2cdd_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_CDD1 */
2205 uint8 b20in40_2x2stbc_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_STBC */
2206 uint8 b20in40_2x2sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS2 */
2207 uint8 b20in40_1x3cdd_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_CDD2 */
2208 uint8 b20in40_2x3stbc_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_STBC_SPEXP1 */
2209 uint8 b20in40_2x3sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS2_SPEXP1 */
2210 uint8 b20in40_3x3sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS3 */
2212 /* start of 80MHz tx power limits */
2213 uint8 b80_dummy1x1dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2214 uint8 b80_1x1ofdm
[WL_NUM_RATES_OFDM
]; /* Legacy OFDM transmission */
2215 uint8 b80_1x1mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* SISO MCS 0-7 */
2217 uint8 b80_dummy1x2dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2218 uint8 b80_1x2cdd_ofdm
[WL_NUM_RATES_OFDM
]; /* Legacy OFDM CDD transmission */
2219 uint8 b80_1x2cdd_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* CDD MCS 0-7 */
2220 uint8 b80_2x2stbc_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* STBC MCS 0-7 */
2221 uint8 b80_2x2sdm_mcs8
[WL_NUM_RATES_MCS_1STREAM
]; /* MCS 8-15 */
2223 uint8 b80_dummy1x3dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2224 uint8 b80_1x3cdd_ofdm
[WL_NUM_RATES_OFDM
]; /* Legacy OFDM CDD transmission */
2225 uint8 b80_1x3cdd_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* 1 Nsts to 3 Tx Chain */
2226 uint8 b80_2x3stbc_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* STBC MCS 0-7 */
2227 uint8 b80_2x3sdm_mcs8
[WL_NUM_RATES_MCS_1STREAM
]; /* 2 Nsts to 3 Tx Chain */
2228 uint8 b80_3x3sdm_mcs16
[WL_NUM_RATES_MCS_1STREAM
]; /* 3 Nsts to 3 Tx Chain */
2230 uint8 b80_1x1vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1 */
2231 uint8 b80_1x2cdd_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_CDD1 */
2232 uint8 b80_2x2stbc_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_STBC */
2233 uint8 b80_2x2sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS2 */
2234 uint8 b80_1x3cdd_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_CDD2 */
2235 uint8 b80_2x3stbc_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_STBC_SPEXP1 */
2236 uint8 b80_2x3sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS2_SPEXP1 */
2237 uint8 b80_3x3sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS3 */
2239 /* start of 20in80MHz tx power limits */
2240 uint8 b20in80_1x1dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2241 uint8 b20in80_1x1ofdm
[WL_NUM_RATES_OFDM
]; /* Legacy OFDM transmission */
2242 uint8 b20in80_1x1mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* SISO MCS 0-7 */
2244 uint8 b20in80_1x2dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2245 uint8 b20in80_1x2cdd_ofdm
[WL_NUM_RATES_OFDM
]; /* Legacy OFDM CDD transmission */
2246 uint8 b20in80_1x2cdd_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* CDD MCS 0-7 */
2247 uint8 b20in80_2x2stbc_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* STBC MCS 0-7 */
2248 uint8 b20in80_2x2sdm_mcs8
[WL_NUM_RATES_MCS_1STREAM
]; /* MCS 8-15 */
2250 uint8 b20in80_1x3dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2251 uint8 b20in80_1x3cdd_ofdm
[WL_NUM_RATES_OFDM
]; /* Legacy OFDM CDD transmission */
2252 uint8 b20in80_1x3cdd_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* 1 Nsts to 3 Tx Chain */
2253 uint8 b20in80_2x3stbc_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* STBC MCS 0-7 */
2254 uint8 b20in80_2x3sdm_mcs8
[WL_NUM_RATES_MCS_1STREAM
]; /* 2 Nsts to 3 Tx Chain */
2255 uint8 b20in80_3x3sdm_mcs16
[WL_NUM_RATES_MCS_1STREAM
]; /* 3 Nsts to 3 Tx Chain */
2257 uint8 b20in80_1x1vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1 */
2258 uint8 b20in80_1x2cdd_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_CDD1 */
2259 uint8 b20in80_2x2stbc_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_STBC */
2260 uint8 b20in80_2x2sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS2 */
2261 uint8 b20in80_1x3cdd_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_CDD2 */
2262 uint8 b20in80_2x3stbc_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_STBC_SPEXP1 */
2263 uint8 b20in80_2x3sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS2_SPEXP1 */
2264 uint8 b20in80_3x3sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS3 */
2266 /* start of 40in80MHz tx power limits */
2267 uint8 b40in80_dummy1x1dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2268 uint8 b40in80_1x1ofdm
[WL_NUM_RATES_OFDM
]; /* Legacy OFDM transmission */
2269 uint8 b40in80_1x1mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* SISO MCS 0-7 */
2271 uint8 b40in80_dummy1x2dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2272 uint8 b40in80_1x2cdd_ofdm
[WL_NUM_RATES_OFDM
]; /* Legacy OFDM CDD transmission */
2273 uint8 b40in80_1x2cdd_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* CDD MCS 0-7 */
2274 uint8 b40in80_2x2stbc_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* STBC MCS 0-7 */
2275 uint8 b40in80_2x2sdm_mcs8
[WL_NUM_RATES_MCS_1STREAM
]; /* MCS 8-15 */
2277 uint8 b40in80_dummy1x3dsss
[WL_NUM_RATES_CCK
]; /* Legacy CCK/DSSS */
2278 uint8 b40in80_1x3cdd_ofdm
[WL_NUM_RATES_OFDM
]; /* MHz Legacy OFDM CDD */
2279 uint8 b40in80_1x3cdd_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* 1 Nsts to 3 Tx Chain */
2280 uint8 b40in80_2x3stbc_mcs0
[WL_NUM_RATES_MCS_1STREAM
]; /* STBC MCS 0-7 */
2281 uint8 b40in80_2x3sdm_mcs8
[WL_NUM_RATES_MCS_1STREAM
]; /* 2 Nsts to 3 Tx Chain */
2282 uint8 b40in80_3x3sdm_mcs16
[WL_NUM_RATES_MCS_1STREAM
]; /* 3 Nsts to 3 Tx Chain */
2284 uint8 b40in80_1x1vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1 */
2285 uint8 b40in80_1x2cdd_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_CDD1 */
2286 uint8 b40in80_2x2stbc_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_STBC */
2287 uint8 b40in80_2x2sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS2 */
2288 uint8 b40in80_1x3cdd_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_CDD2 */
2289 uint8 b40in80_2x3stbc_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS1_STBC_SPEXP1 */
2290 uint8 b40in80_2x3sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS2_SPEXP1 */
2291 uint8 b40in80_3x3sdm_vht
[WL_NUM_RATES_EXTRA_VHT
]; /* VHT8_9SS3 */
2293 uint8 mcs32
; /* C_CHECK - THIS NEEDS TO BE REMOVED THROUGHOUT THE CODE */
2297 #define WL_TX_POWER_CCK_FIRST OFFSETOF(txppr_t, b20_1x1dsss)
2298 #define WL_TX_POWER_OFDM20_FIRST OFFSETOF(txppr_t, b20_1x1ofdm)
2299 #define WL_TX_POWER_MCS20_SISO_FIRST OFFSETOF(txppr_t, b20_1x1mcs0)
2300 #define WL_TX_POWER_20_S1x1_FIRST OFFSETOF(txppr_t, b20_1x1mcs0)
2302 #define WL_TX_POWER_CCK_CDD_S1x2_FIRST OFFSETOF(txppr_t, b20_1x2dsss)
2303 #define WL_TX_POWER_OFDM20_CDD_FIRST OFFSETOF(txppr_t, b20_1x2cdd_ofdm)
2304 #define WL_TX_POWER_MCS20_CDD_FIRST OFFSETOF(txppr_t, b20_1x2cdd_mcs0)
2305 #define WL_TX_POWER_20_S1x2_FIRST OFFSETOF(txppr_t, b20_1x2cdd_mcs0)
2306 #define WL_TX_POWER_MCS20_STBC_FIRST OFFSETOF(txppr_t, b20_2x2stbc_mcs0)
2307 #define WL_TX_POWER_MCS20_SDM_FIRST OFFSETOF(txppr_t, b20_2x2sdm_mcs8)
2308 #define WL_TX_POWER_20_S2x2_FIRST OFFSETOF(txppr_t, b20_2x2sdm_mcs8)
2310 #define WL_TX_POWER_CCK_CDD_S1x3_FIRST OFFSETOF(txppr_t, b20_1x3dsss)
2311 #define WL_TX_POWER_OFDM20_CDD_S1x3_FIRST OFFSETOF(txppr_t, b20_1x3cdd_ofdm)
2312 #define WL_TX_POWER_20_S1x3_FIRST OFFSETOF(txppr_t, b20_1x3cdd_mcs0)
2313 #define WL_TX_POWER_20_STBC_S2x3_FIRST OFFSETOF(txppr_t, b20_2x3stbc_mcs0)
2314 #define WL_TX_POWER_20_S2x3_FIRST OFFSETOF(txppr_t, b20_2x3sdm_mcs8)
2315 #define WL_TX_POWER_20_S3x3_FIRST OFFSETOF(txppr_t, b20_3x3sdm_mcs16)
2317 #define WL_TX_POWER_20_S1X1_VHT OFFSETOF(txppr_t, b20_1x1vht)
2318 #define WL_TX_POWER_20_S1X2_CDD_VHT OFFSETOF(txppr_t, b20_1x2cdd_vht)
2319 #define WL_TX_POWER_20_S2X2_STBC_VHT OFFSETOF(txppr_t, b20_2x2stbc_vht)
2320 #define WL_TX_POWER_20_S2X2_VHT OFFSETOF(txppr_t, b20_2x2sdm_vht)
2321 #define WL_TX_POWER_20_S1X3_CDD_VHT OFFSETOF(txppr_t, b20_1x3cdd_vht)
2322 #define WL_TX_POWER_20_S2X3_STBC_VHT OFFSETOF(txppr_t, b20_2x3stbc_vht)
2323 #define WL_TX_POWER_20_S2X3_VHT OFFSETOF(txppr_t, b20_2x3sdm_vht)
2324 #define WL_TX_POWER_20_S3X3_VHT OFFSETOF(txppr_t, b20_3x3sdm_vht)
2327 #define WL_TX_POWER_40_DUMMY_CCK_FIRST OFFSETOF(txppr_t, b40_dummy1x1dsss)
2328 #define WL_TX_POWER_OFDM40_FIRST OFFSETOF(txppr_t, b40_1x1ofdm)
2329 #define WL_TX_POWER_MCS40_SISO_FIRST OFFSETOF(txppr_t, b40_1x1mcs0)
2330 #define WL_TX_POWER_40_S1x1_FIRST OFFSETOF(txppr_t, b40_1x1mcs0)
2332 #define WL_TX_POWER_40_DUMMY_CCK_CDD_S1x2_FIRST OFFSETOF(txppr_t, b40_dummy1x2dsss)
2333 #define WL_TX_POWER_OFDM40_CDD_FIRST OFFSETOF(txppr_t, b40_1x2cdd_ofdm)
2334 #define WL_TX_POWER_MCS40_CDD_FIRST OFFSETOF(txppr_t, b40_1x2cdd_mcs0)
2335 #define WL_TX_POWER_40_S1x2_FIRST OFFSETOF(txppr_t, b40_1x2cdd_mcs0)
2336 #define WL_TX_POWER_MCS40_STBC_FIRST OFFSETOF(txppr_t, b40_2x2stbc_mcs0)
2337 #define WL_TX_POWER_MCS40_SDM_FIRST OFFSETOF(txppr_t, b40_2x2sdm_mcs8)
2338 #define WL_TX_POWER_40_S2x2_FIRST OFFSETOF(txppr_t, b40_2x2sdm_mcs8)
2340 #define WL_TX_POWER_40_DUMMY_CCK_CDD_S1x3_FIRST OFFSETOF(txppr_t, b40_dummy1x3dsss)
2341 #define WL_TX_POWER_OFDM40_CDD_S1x3_FIRST OFFSETOF(txppr_t, b40_1x3cdd_ofdm)
2342 #define WL_TX_POWER_40_S1x3_FIRST OFFSETOF(txppr_t, b40_1x3cdd_mcs0)
2343 #define WL_TX_POWER_40_STBC_S2x3_FIRST OFFSETOF(txppr_t, b40_2x3stbc_mcs0)
2344 #define WL_TX_POWER_40_S2x3_FIRST OFFSETOF(txppr_t, b40_2x3sdm_mcs8)
2345 #define WL_TX_POWER_40_S3x3_FIRST OFFSETOF(txppr_t, b40_3x3sdm_mcs16)
2347 #define WL_TX_POWER_40_S1X1_VHT OFFSETOF(txppr_t, b40_1x1vht)
2348 #define WL_TX_POWER_40_S1X2_CDD_VHT OFFSETOF(txppr_t, b40_1x2cdd_vht)
2349 #define WL_TX_POWER_40_S2X2_STBC_VHT OFFSETOF(txppr_t, b40_2x2stbc_vht)
2350 #define WL_TX_POWER_40_S2X2_VHT OFFSETOF(txppr_t, b40_2x2sdm_vht)
2351 #define WL_TX_POWER_40_S1X3_CDD_VHT OFFSETOF(txppr_t, b40_1x3cdd_vht)
2352 #define WL_TX_POWER_40_S2X3_STBC_VHT OFFSETOF(txppr_t, b40_2x3stbc_vht)
2353 #define WL_TX_POWER_40_S2X3_VHT OFFSETOF(txppr_t, b40_2x3sdm_vht)
2354 #define WL_TX_POWER_40_S3X3_VHT OFFSETOF(txppr_t, b40_3x3sdm_vht)
2357 #define WL_TX_POWER_20UL_CCK_FIRST OFFSETOF(txppr_t, b20in40_1x1dsss)
2358 #define WL_TX_POWER_20UL_OFDM_FIRST OFFSETOF(txppr_t, b20in40_1x1ofdm)
2359 #define WL_TX_POWER_20UL_S1x1_FIRST OFFSETOF(txppr_t, b20in40_1x1mcs0)
2361 #define WL_TX_POWER_CCK_20U_CDD_S1x2_FIRST OFFSETOF(txppr_t, b20in40_1x2dsss)
2362 #define WL_TX_POWER_20UL_OFDM_CDD_FIRST OFFSETOF(txppr_t, b20in40_1x2cdd_ofdm)
2363 #define WL_TX_POWER_20UL_S1x2_FIRST OFFSETOF(txppr_t, b20in40_1x2cdd_mcs0)
2364 #define WL_TX_POWER_20UL_STBC_S2x2_FIRST OFFSETOF(txppr_t, b20in40_2x2stbc_mcs0)
2365 #define WL_TX_POWER_20UL_S2x2_FIRST OFFSETOF(txppr_t, b20in40_2x2sdm_mcs8)
2367 #define WL_TX_POWER_CCK_20U_CDD_S1x3_FIRST OFFSETOF(txppr_t, b20in40_1x3dsss)
2368 #define WL_TX_POWER_20UL_OFDM_CDD_S1x3_FIRST OFFSETOF(txppr_t, b20in40_1x3cdd_ofdm)
2369 #define WL_TX_POWER_20UL_S1x3_FIRST OFFSETOF(txppr_t, b20in40_1x3cdd_mcs0)
2370 #define WL_TX_POWER_20UL_STBC_S2x3_FIRST OFFSETOF(txppr_t, b20in40_2x3stbc_mcs0)
2371 #define WL_TX_POWER_20UL_S2x3_FIRST OFFSETOF(txppr_t, b20in40_2x3sdm_mcs8)
2372 #define WL_TX_POWER_20UL_S3x3_FIRST OFFSETOF(txppr_t, b20in40_3x3sdm_mcs16)
2374 #define WL_TX_POWER_20UL_S1X1_VHT OFFSETOF(txppr_t, b20in40_1x1vht)
2375 #define WL_TX_POWER_20UL_S1X2_CDD_VHT OFFSETOF(txppr_t, b20in40_1x2cdd_vht)
2376 #define WL_TX_POWER_20UL_S2X2_STBC_VHT OFFSETOF(txppr_t, b20in40_2x2stbc_vht)
2377 #define WL_TX_POWER_20UL_S2X2_VHT OFFSETOF(txppr_t, b20in40_2x2sdm_vht)
2378 #define WL_TX_POWER_20UL_S1X3_CDD_VHT OFFSETOF(txppr_t, b20in40_1x3cdd_vht)
2379 #define WL_TX_POWER_20UL_S2X3_STBC_VHT OFFSETOF(txppr_t, b20in40_2x3stbc_vht)
2380 #define WL_TX_POWER_20UL_S2X3_VHT OFFSETOF(txppr_t, b20in40_2x3sdm_vht)
2381 #define WL_TX_POWER_20UL_S3X3_VHT OFFSETOF(txppr_t, b20in40_3x3sdm_vht)
2384 #define WL_TX_POWER_80_DUMMY_CCK_FIRST OFFSETOF(txppr_t, b80_dummy1x1dsss)
2385 #define WL_TX_POWER_OFDM80_FIRST OFFSETOF(txppr_t, b80_1x1ofdm)
2386 #define WL_TX_POWER_MCS80_SISO_FIRST OFFSETOF(txppr_t, b80_1x1mcs0)
2387 #define WL_TX_POWER_80_S1x1_FIRST OFFSETOF(txppr_t, b80_1x1mcs0)
2389 #define WL_TX_POWER_80_DUMMY_CCK_CDD_S1x2_FIRST OFFSETOF(txppr_t, b80_dummy1x2dsss)
2390 #define WL_TX_POWER_OFDM80_CDD_FIRST OFFSETOF(txppr_t, b80_1x2cdd_ofdm)
2391 #define WL_TX_POWER_MCS80_CDD_FIRST OFFSETOF(txppr_t, b80_1x2cdd_mcs0)
2392 #define WL_TX_POWER_80_S1x2_FIRST OFFSETOF(txppr_t, b80_1x2cdd_mcs0)
2393 #define WL_TX_POWER_MCS80_STBC_FIRST OFFSETOF(txppr_t, b80_2x2stbc_mcs0)
2394 #define WL_TX_POWER_MCS80_SDM_FIRST OFFSETOF(txppr_t, b80_2x2sdm_mcs8)
2395 #define WL_TX_POWER_80_S2x2_FIRST OFFSETOF(txppr_t, b80_2x2sdm_mcs8)
2397 #define WL_TX_POWER_80_DUMMY_CCK_CDD_S1x3_FIRST OFFSETOF(txppr_t, b80_dummy1x3dsss)
2398 #define WL_TX_POWER_OFDM80_CDD_S1x3_FIRST OFFSETOF(txppr_t, b80_1x3cdd_ofdm)
2399 #define WL_TX_POWER_80_S1x3_FIRST OFFSETOF(txppr_t, b80_1x3cdd_mcs0)
2400 #define WL_TX_POWER_80_STBC_S2x3_FIRST OFFSETOF(txppr_t, b80_2x3stbc_mcs0)
2401 #define WL_TX_POWER_80_S2x3_FIRST OFFSETOF(txppr_t, b80_2x3sdm_mcs8)
2402 #define WL_TX_POWER_80_S3x3_FIRST OFFSETOF(txppr_t, b80_3x3sdm_mcs16)
2404 #define WL_TX_POWER_80_S1X1_VHT OFFSETOF(txppr_t, b80_1x1vht)
2405 #define WL_TX_POWER_80_S1X2_CDD_VHT OFFSETOF(txppr_t, b80_1x2cdd_vht)
2406 #define WL_TX_POWER_80_S2X2_STBC_VHT OFFSETOF(txppr_t, b80_2x2stbc_vht)
2407 #define WL_TX_POWER_80_S2X2_VHT OFFSETOF(txppr_t, b80_2x2sdm_vht)
2408 #define WL_TX_POWER_80_S1X3_CDD_VHT OFFSETOF(txppr_t, b80_1x3cdd_vht)
2409 #define WL_TX_POWER_80_S2X3_STBC_VHT OFFSETOF(txppr_t, b80_2x3stbc_vht)
2410 #define WL_TX_POWER_80_S2X3_VHT OFFSETOF(txppr_t, b80_2x3sdm_vht)
2411 #define WL_TX_POWER_80_S3X3_VHT OFFSETOF(txppr_t, b80_3x3sdm_vht)
2414 #define WL_TX_POWER_20UUL_CCK_FIRST OFFSETOF(txppr_t, b20in80_1x1dsss)
2415 #define WL_TX_POWER_20UUL_OFDM_FIRST OFFSETOF(txppr_t, b20in80_1x1ofdm)
2416 #define WL_TX_POWER_20UUL_S1x1_FIRST OFFSETOF(txppr_t, b20in80_1x1mcs0)
2418 #define WL_TX_POWER_CCK_20UU_CDD_S1x2_FIRST OFFSETOF(txppr_t, b20in80_1x2dsss)
2419 #define WL_TX_POWER_20UUL_OFDM_CDD_FIRST OFFSETOF(txppr_t, b20in80_1x2cdd_ofdm)
2420 #define WL_TX_POWER_20UUL_S1x2_FIRST OFFSETOF(txppr_t, b20in80_1x2cdd_mcs0)
2421 #define WL_TX_POWER_20UUL_STBC_S2x2_FIRST OFFSETOF(txppr_t, b20in80_2x2stbc_mcs0)
2422 #define WL_TX_POWER_20UUL_S2x2_FIRST OFFSETOF(txppr_t, b20in80_2x2sdm_mcs8)
2424 #define WL_TX_POWER_CCK_20UU_CDD_S1x3_FIRST OFFSETOF(txppr_t, b20in80_1x3dsss)
2425 #define WL_TX_POWER_20UUL_OFDM_CDD_S1x3_FIRST OFFSETOF(txppr_t, b20in80_1x3cdd_ofdm)
2426 #define WL_TX_POWER_20UUL_S1x3_FIRST OFFSETOF(txppr_t, b20in80_1x3cdd_mcs0)
2427 #define WL_TX_POWER_20UUL_STBC_S2x3_FIRST OFFSETOF(txppr_t, b20in80_2x3stbc_mcs0)
2428 #define WL_TX_POWER_20UUL_S2x3_FIRST OFFSETOF(txppr_t, b20in80_2x3sdm_mcs8)
2429 #define WL_TX_POWER_20UUL_S3x3_FIRST OFFSETOF(txppr_t, b20in80_3x3sdm_mcs16)
2431 #define WL_TX_POWER_20UUL_S1X1_VHT OFFSETOF(txppr_t, b20in80_1x1vht)
2432 #define WL_TX_POWER_20UUL_S1X2_CDD_VHT OFFSETOF(txppr_t, b20in80_1x2cdd_vht)
2433 #define WL_TX_POWER_20UUL_S2X2_STBC_VHT OFFSETOF(txppr_t, b20in80_2x2stbc_vht)
2434 #define WL_TX_POWER_20UUL_S2X2_VHT OFFSETOF(txppr_t, b20in80_2x2sdm_vht)
2435 #define WL_TX_POWER_20UUL_S1X3_CDD_VHT OFFSETOF(txppr_t, b20in80_1x3cdd_vht)
2436 #define WL_TX_POWER_20UUL_S2X3_STBC_VHT OFFSETOF(txppr_t, b20in80_2x3stbc_vht)
2437 #define WL_TX_POWER_20UUL_S2X3_VHT OFFSETOF(txppr_t, b20in80_2x3sdm_vht)
2438 #define WL_TX_POWER_20UUL_S3X3_VHT OFFSETOF(txppr_t, b20in80_3x3sdm_vht)
2441 #define WL_TX_POWER_40UUL_DUMMY_CCK_FIRST OFFSETOF(txppr_t, b40in80_dummy1x1dsss)
2442 #define WL_TX_POWER_40UUL_OFDM_FIRST OFFSETOF(txppr_t, b40in80_1x1ofdm)
2443 #define WL_TX_POWER_40UUL_S1x1_FIRST OFFSETOF(txppr_t, b40in80_1x1mcs0)
2445 #define WL_TX_POWER_CCK_40UU_DUMMY_CDD_S1x2_FIRST OFFSETOF(txppr_t, b40in80_dummy1x2dsss)
2446 #define WL_TX_POWER_40UUL_OFDM_CDD_FIRST OFFSETOF(txppr_t, b40in80_1x2cdd_ofdm)
2447 #define WL_TX_POWER_40UUL_S1x2_FIRST OFFSETOF(txppr_t, b40in80_1x2cdd_mcs0)
2448 #define WL_TX_POWER_40UUL_STBC_S2x2_FIRST OFFSETOF(txppr_t, b40in80_2x2stbc_mcs0)
2449 #define WL_TX_POWER_40UUL_S2x2_FIRST OFFSETOF(txppr_t, b40in80_2x2sdm_mcs8)
2451 #define WL_TX_POWER_CCK_40UU_DUMMY_CDD_S1x3_FIRST OFFSETOF(txppr_t, b40in80_dummy1x3dsss)
2452 #define WL_TX_POWER_40UUL_OFDM_CDD_S1x3_FIRST OFFSETOF(txppr_t, b40in80_1x3cdd_ofdm)
2453 #define WL_TX_POWER_40UUL_S1x3_FIRST OFFSETOF(txppr_t, b40in80_1x3cdd_mcs0)
2454 #define WL_TX_POWER_40UUL_STBC_S2x3_FIRST OFFSETOF(txppr_t, b40in80_2x3stbc_mcs0)
2455 #define WL_TX_POWER_40UUL_S2x3_FIRST OFFSETOF(txppr_t, b40in80_2x3sdm_mcs8)
2456 #define WL_TX_POWER_40UUL_S3x3_FIRST OFFSETOF(txppr_t, b40in80_3x3sdm_mcs16)
2458 #define WL_TX_POWER_40UUL_S1X1_VHT OFFSETOF(txppr_t, b40in80_1x1vht)
2459 #define WL_TX_POWER_40UUL_S1X2_CDD_VHT OFFSETOF(txppr_t, b40in80_1x2cdd_vht)
2460 #define WL_TX_POWER_40UUL_S2X2_STBC_VHT OFFSETOF(txppr_t, b40in80_2x2stbc_vht)
2461 #define WL_TX_POWER_40UUL_S2X2_VHT OFFSETOF(txppr_t, b40in80_2x2sdm_vht)
2462 #define WL_TX_POWER_40UUL_S1X3_CDD_VHT OFFSETOF(txppr_t, b40in80_1x3cdd_vht)
2463 #define WL_TX_POWER_40UUL_S2X3_STBC_VHT OFFSETOF(txppr_t, b40in80_2x3stbc_vht)
2464 #define WL_TX_POWER_40UUL_S2X3_VHT OFFSETOF(txppr_t, b40in80_2x3sdm_vht)
2465 #define WL_TX_POWER_40UUL_S3X3_VHT OFFSETOF(txppr_t, b40in80_3x3sdm_vht)
2467 #define WL_TX_POWER_MCS_32 OFFSETOF(txppr_t, mcs32) /* C_CHECK remove later */
2469 #define WL_TX_POWER_RATES sizeof(struct txppr)
2471 /* sslpnphy specifics */
2472 #define WL_TX_POWER_MCS20_SISO_FIRST_SSN WL_TX_POWER_MCS20_SISO_FIRST
2473 #define WL_TX_POWER_MCS40_SISO_FIRST_SSN WL_TX_POWER_MCS40_SISO_FIRST
2476 uint16 ver
; /* version of this struct */
2477 uint16 len
; /* length in bytes of this structure */
2479 chanspec_t chanspec
; /* txpwr report for this channel */
2480 chanspec_t local_chanspec
; /* channel on which we are associated */
2481 uint8 ppr
[WL_TX_POWER_RATES
]; /* Latest target power */
2484 #define WL_TXPPR_VERSION 0
2485 #define WL_TXPPR_LENGTH (sizeof(wl_txppr_t))
2486 #define TX_POWER_T_VERSION 43
2488 /* Defines used with channel_bandwidth for curpower */
2489 #define WL_BW_20MHZ 0
2490 #define WL_BW_40MHZ 1
2491 #define WL_BW_80MHZ 2
2493 /* tx_power_t.flags bits */
2495 #define WL_TX_POWER2_F_ENABLED 1
2496 #define WL_TX_POWER2_F_HW 2
2497 #define WL_TX_POWER2_F_MIMO 4
2498 #define WL_TX_POWER2_F_SISO 8
2499 #define WL_TX_POWER2_F_HT 0x10
2501 #define WL_TX_POWER_F_ENABLED 1
2502 #define WL_TX_POWER_F_HW 2
2503 #define WL_TX_POWER_F_MIMO 4
2504 #define WL_TX_POWER_F_SISO 8
2505 #define WL_TX_POWER_F_HT 0x10
2510 chanspec_t chanspec
; /* txpwr report for this channel */
2511 chanspec_t local_chanspec
; /* channel on which we are associated */
2512 uint8 local_max
; /* local max according to the AP */
2513 uint8 local_constraint
; /* local constraint according to the AP */
2514 int8 antgain
[2]; /* Ant gain for each band - from SROM */
2515 uint8 rf_cores
; /* count of RF Cores being reported */
2516 uint8 est_Pout
[4]; /* Latest tx power out estimate per RF chain */
2517 uint8 est_Pout_act
[4]; /* Latest tx power out estimate per RF chain w/o adjustment */
2518 uint8 est_Pout_cck
; /* Latest CCK tx power out estimate */
2519 uint8 tx_power_max
[4]; /* Maximum target power among all rates */
2520 uint tx_power_max_rate_ind
[4]; /* Index of the rate with the max target power */
2521 uint8 user_limit
[WL_TX_POWER_RATES
]; /* User limit */
2522 int8 board_limit
[WL_TX_POWER_RATES
]; /* Max power board can support (SROM) */
2523 int8 target
[WL_TX_POWER_RATES
]; /* Latest target power */
2524 int8 clm_limits
[WL_NUMRATES
]; /* regulatory limits - 20, 40 or 80MHz */
2525 int8 clm_limits_subchan1
[WL_NUMRATES
]; /* regulatory limits - 20in40 or 40in80 */
2526 int8 clm_limits_subchan2
[WL_NUMRATES
]; /* regulatory limits - 20in80MHz */
2527 int8 sar
; /* SAR limit for display by wl executable */
2528 int8 channel_bandwidth
; /* 20, 40 or 80 MHz bandwidth? */
2529 uint8 version
; /* Version of the data format wlu <--> driver */
2530 uint8 display_core
; /* Displayed curpower core */
2537 typedef struct tx_inst_power
{
2538 uint8 txpwr_est_Pout
[2]; /* Latest estimate for 2.4 and 5 Ghz */
2539 uint8 txpwr_est_Pout_gofdm
; /* Pwr estimate for 2.4 OFDM */
2545 chanspec_t chanspec
; /* txpwr report for this channel */
2546 chanspec_t local_chanspec
; /* channel on which we are associated */
2547 uint8 local_max
; /* local max according to the AP */
2548 uint8 local_constraint
; /* local constraint according to the AP */
2549 int8 antgain
[2]; /* Ant gain for each band - from SROM */
2550 uint8 rf_cores
; /* count of RF Cores being reported */
2551 uint8 est_Pout
[4]; /* Latest tx power out estimate per RF chain */
2552 uint8 est_Pout_act
[4]; /* Latest tx power out estimate per RF chain
2553 * without adjustment
2555 uint8 est_Pout_cck
; /* Latest CCK tx power out estimate */
2556 uint8 tx_power_max
[4]; /* Maximum target power among all rates */
2557 uint tx_power_max_rate_ind
[4]; /* Index of the rate with the max target power */
2558 txppr_t user_limit
; /* User limit */
2559 txppr_t reg_limit
; /* Regulatory power limit */
2560 txppr_t board_limit
; /* Max power board can support (SROM) */
2561 txppr_t target
; /* Latest target power */
2564 #define WL_NUM_TXCHAIN_MAX 4
2565 typedef struct wl_txchain_pwr_offsets
{
2566 int8 offset
[WL_NUM_TXCHAIN_MAX
]; /* quarter dBm signed offset for each chain */
2567 } wl_txchain_pwr_offsets_t
;
2569 /* 802.11h measurement types */
2570 #define WLC_MEASURE_TPC 1
2571 #define WLC_MEASURE_CHANNEL_BASIC 2
2572 #define WLC_MEASURE_CHANNEL_CCA 3
2573 #define WLC_MEASURE_CHANNEL_RPI 4
2575 /* regulatory enforcement levels */
2576 #define SPECT_MNGMT_OFF 0 /* both 11h and 11d disabled */
2577 #define SPECT_MNGMT_LOOSE_11H 1 /* allow non-11h APs in scan lists */
2578 #define SPECT_MNGMT_STRICT_11H 2 /* prune out non-11h APs from scan list */
2579 #define SPECT_MNGMT_STRICT_11D 3 /* switch to 802.11D mode */
2580 /* SPECT_MNGMT_LOOSE_11H_D - same as SPECT_MNGMT_LOOSE with the exception that Country IE
2581 * adoption is done regardless of capability spectrum_management
2583 #define SPECT_MNGMT_LOOSE_11H_D 4 /* operation defined above */
2585 #define WL_CHAN_VALID_HW (1 << 0) /* valid with current HW */
2586 #define WL_CHAN_VALID_SW (1 << 1) /* valid with current country setting */
2587 #define WL_CHAN_BAND_5G (1 << 2) /* 5GHz-band channel */
2588 #define WL_CHAN_RADAR (1 << 3) /* radar sensitive channel */
2589 #define WL_CHAN_INACTIVE (1 << 4) /* temporarily inactive due to radar */
2590 #define WL_CHAN_PASSIVE (1 << 5) /* channel is in passive mode */
2591 #define WL_CHAN_RESTRICTED (1 << 6) /* restricted use channel */
2593 /* BTC mode used by "btc_mode" iovar */
2594 #define WL_BTC_DISABLE 0 /* disable BT coexistence */
2595 #define WL_BTC_FULLTDM 1 /* full TDM COEX */
2596 #define WL_BTC_ENABLE 1 /* full TDM COEX to maintain backward compatiblity */
2597 #define WL_BTC_PREMPT 2 /* full TDM COEX with preemption */
2598 #define WL_BTC_LITE 3 /* light weight coex for large isolation platform */
2599 #define WL_BTC_PARALLEL 4 /* BT and WLAN run in parallel with separate antenna */
2600 #define WL_BTC_HYBRID 5 /* hybrid coex, only ack is allowed to transmit in BT slot */
2601 #define WL_BTC_DEFAULT 8 /* set the default mode for the device */
2602 #define WL_INF_BTC_DISABLE 0
2603 #define WL_INF_BTC_ENABLE 1
2604 #define WL_INF_BTC_AUTO 3
2606 /* BTC wire used by "btc_wire" iovar */
2607 #define WL_BTC_DEFWIRE 0 /* use default wire setting */
2608 #define WL_BTC_2WIRE 2 /* use 2-wire BTC */
2609 #define WL_BTC_3WIRE 3 /* use 3-wire BTC */
2610 #define WL_BTC_4WIRE 4 /* use 4-wire BTC */
2612 /* BTC flags: BTC configuration that can be set by host */
2613 #define WL_BTC_FLAG_PREMPT (1 << 0)
2614 #define WL_BTC_FLAG_BT_DEF (1 << 1)
2615 #define WL_BTC_FLAG_ACTIVE_PROT (1 << 2)
2616 #define WL_BTC_FLAG_SIM_RSP (1 << 3)
2617 #define WL_BTC_FLAG_PS_PROTECT (1 << 4)
2618 #define WL_BTC_FLAG_SIM_TX_LP (1 << 5)
2619 #define WL_BTC_FLAG_ECI (1 << 6)
2620 #define WL_BTC_FLAG_LIGHT (1 << 7)
2621 #define WL_BTC_FLAG_PARALLEL (1 << 8)
2622 #endif /* !defined(LINUX_POSTMOGRIFY_REMOVAL) */
2624 /* Message levels */
2625 #define WL_ERROR_VAL 0x00000001
2626 #define WL_TRACE_VAL 0x00000002
2627 #define WL_PRHDRS_VAL 0x00000004
2628 #define WL_PRPKT_VAL 0x00000008
2629 #define WL_INFORM_VAL 0x00000010
2630 #define WL_TMP_VAL 0x00000020
2631 #define WL_OID_VAL 0x00000040
2632 #define WL_RATE_VAL 0x00000080
2633 #define WL_ASSOC_VAL 0x00000100
2634 #define WL_PRUSR_VAL 0x00000200
2635 #define WL_PS_VAL 0x00000400
2636 #define WL_TXPWR_VAL 0x00000800 /* retired in TOT on 6/10/2009 */
2637 #define WL_PORT_VAL 0x00001000
2638 #define WL_DUAL_VAL 0x00002000
2639 #define WL_WSEC_VAL 0x00004000
2640 #define WL_WSEC_DUMP_VAL 0x00008000
2641 #define WL_LOG_VAL 0x00010000
2642 #define WL_NRSSI_VAL 0x00020000 /* retired in TOT on 6/10/2009 */
2643 #define WL_LOFT_VAL 0x00040000 /* retired in TOT on 6/10/2009 */
2644 #define WL_REGULATORY_VAL 0x00080000
2645 #define WL_PHYCAL_VAL 0x00100000 /* retired in TOT on 6/10/2009 */
2646 #define WL_RADAR_VAL 0x00200000 /* retired in TOT on 6/10/2009 */
2647 #define WL_MPC_VAL 0x00400000
2648 #define WL_APSTA_VAL 0x00800000
2649 #define WL_DFS_VAL 0x01000000
2650 #define WL_BA_VAL 0x02000000 /* retired in TOT on 6/14/2010 */
2651 #define WL_ACI_VAL 0x04000000
2652 #define WL_MBSS_VAL 0x04000000
2653 #define WL_CAC_VAL 0x08000000
2654 #define WL_AMSDU_VAL 0x10000000
2655 #define WL_AMPDU_VAL 0x20000000
2656 #define WL_FFPLD_VAL 0x40000000
2658 /* wl_msg_level is full. For new bits take the next one and AND with
2659 * wl_msg_level2 in wl_dbg.h
2661 #define WL_DPT_VAL 0x00000001
2662 #define WL_SCAN_VAL 0x00000002
2663 #define WL_WOWL_VAL 0x00000004
2664 #define WL_COEX_VAL 0x00000008
2665 #define WL_RTDC_VAL 0x00000010
2666 #define WL_PROTO_VAL 0x00000020
2667 #define WL_BTA_VAL 0x00000040
2668 #define WL_CHANINT_VAL 0x00000080
2669 #define WL_THERMAL_VAL 0x00000100 /* retired in TOT on 6/10/2009 */
2670 #define WL_P2P_VAL 0x00000200
2671 #define WL_ITFR_VAL 0x00000400
2672 #define WL_MCHAN_VAL 0x00000800
2673 #define WL_TDLS_VAL 0x00001000
2674 #define WL_MCNX_VAL 0x00002000
2675 #define WL_PROT_VAL 0x00004000
2676 #define WL_PSTA_VAL 0x00008000
2677 #define WL_TSO_VAL 0x00010000
2678 /* use top-bit for WL_TIME_STAMP_VAL because this is a modifier
2679 * rather than a message-type of its own
2681 #define WL_TIMESTAMP_VAL 0x80000000
2683 /* max # of leds supported by GPIO (gpio pin# == led index#) */
2684 #define WL_LED_NUMGPIO 32 /* gpio 0-31 */
2686 /* led per-pin behaviors */
2687 #define WL_LED_OFF 0 /* always off */
2688 #define WL_LED_ON 1 /* always on */
2689 #define WL_LED_ACTIVITY 2 /* activity */
2690 #define WL_LED_RADIO 3 /* radio enabled */
2691 #define WL_LED_ARADIO 4 /* 5 Ghz radio enabled */
2692 #define WL_LED_BRADIO 5 /* 2.4Ghz radio enabled */
2693 #define WL_LED_BGMODE 6 /* on if gmode, off if bmode */
2694 #define WL_LED_WI1 7
2695 #define WL_LED_WI2 8
2696 #define WL_LED_WI3 9
2697 #define WL_LED_ASSOC 10 /* associated state indicator */
2698 #define WL_LED_INACTIVE 11 /* null behavior (clears default behavior) */
2699 #define WL_LED_ASSOCACT 12 /* on when associated; blink fast for activity */
2700 #define WL_LED_WI4 13
2701 #define WL_LED_WI5 14
2702 #define WL_LED_BLINKSLOW 15 /* blink slow */
2703 #define WL_LED_BLINKMED 16 /* blink med */
2704 #define WL_LED_BLINKFAST 17 /* blink fast */
2705 #define WL_LED_BLINKCUSTOM 18 /* blink custom */
2706 #define WL_LED_BLINKPERIODIC 19 /* blink periodic (custom 1000ms / off 400ms) */
2707 #define WL_LED_ASSOC_WITH_SEC 20 /* when connected with security */
2708 /* keep on for 300 sec */
2709 #define WL_LED_START_OFF 21 /* off upon boot, could be turned on later */
2710 #define WL_LED_NUMBEHAVIOR 22
2712 /* led behavior numeric value format */
2713 #define WL_LED_BEH_MASK 0x7f /* behavior mask */
2714 #define WL_LED_AL_MASK 0x80 /* activelow (polarity) bit */
2716 /* maximum channels returned by the get valid channels iovar */
2717 #define WL_NUMCHANNELS 64
2719 /* max number of chanspecs (used by the iovar to calc. buf space) */
2720 #define WL_NUMCHANSPECS 110
2722 /* WDS link local endpoint WPA role */
2723 #define WL_WDS_WPA_ROLE_AUTH 0 /* authenticator */
2724 #define WL_WDS_WPA_ROLE_SUP 1 /* supplicant */
2725 #define WL_WDS_WPA_ROLE_AUTO 255 /* auto, based on mac addr value */
2727 /* number of bytes needed to define a 128-bit mask for MAC event reporting */
2728 #define WL_EVENTING_MASK_LEN 16
2731 * Join preference iovar value is an array of tuples. Each tuple has a one-byte type,
2732 * a one-byte length, and a variable length value. RSSI type tuple must be present
2735 * Types are defined in "join preference types" section.
2737 * Length is the value size in octets. It is reserved for WL_JOIN_PREF_WPA type tuple
2738 * and must be set to zero.
2740 * Values are defined below.
2742 * 1. RSSI - 2 octets
2743 * offset 0: reserved
2744 * offset 1: reserved
2746 * 2. WPA - 2 + 12 * n octets (n is # tuples defined below)
2747 * offset 0: reserved
2748 * offset 1: # of tuples
2750 * offset 14: tuple 2
2752 * offset 2 + 12 * (n - 1) octets: tuple n
2754 * struct wpa_cfg_tuple {
2755 * uint8 akm[DOT11_OUI_LEN+1]; akm suite
2756 * uint8 ucipher[DOT11_OUI_LEN+1]; unicast cipher suite
2757 * uint8 mcipher[DOT11_OUI_LEN+1]; multicast cipher suite
2760 * multicast cipher suite can be specified as a specific cipher suite or WL_WPA_ACP_MCS_ANY.
2762 * 3. BAND - 2 octets
2763 * offset 0: reserved
2764 * offset 1: see "band preference" and "band types"
2766 * 4. BAND RSSI - 2 octets
2767 * offset 0: band types
2768 * offset 1: +ve RSSI boost balue in dB
2771 /* join preference types */
2772 #define WL_JOIN_PREF_RSSI 1 /* by RSSI */
2773 #define WL_JOIN_PREF_WPA 2 /* by akm and ciphers */
2774 #define WL_JOIN_PREF_BAND 3 /* by 802.11 band */
2775 #define WL_JOIN_PREF_RSSI_DELTA 4 /* by 802.11 band only if RSSI delta condition matches */
2776 #define WL_JOIN_PREF_TRANS_PREF 5 /* defined by requesting AP */
2778 /* band preference */
2779 #define WLJP_BAND_ASSOC_PREF 255 /* use what WLC_SET_ASSOC_PREFER ioctl specifies */
2781 /* any multicast cipher suite */
2782 #define WL_WPA_ACP_MCS_ANY "\x00\x00\x00\x00"
2788 #define NFIFO 6 /* # tx/rx fifopairs */
2790 #define WL_CNT_T_VERSION 8 /* current version of wl_cnt_t struct */
2793 uint16 version
; /* see definition of WL_CNT_T_VERSION */
2794 uint16 length
; /* length of entire structure */
2796 /* transmit stat counters */
2797 uint32 txframe
; /* tx data frames */
2798 uint32 txbyte
; /* tx data bytes */
2799 uint32 txretrans
; /* tx mac retransmits */
2800 uint32 txerror
; /* tx data errors (derived: sum of others) */
2801 uint32 txctl
; /* tx management frames */
2802 uint32 txprshort
; /* tx short preamble frames */
2803 uint32 txserr
; /* tx status errors */
2804 uint32 txnobuf
; /* tx out of buffers errors */
2805 uint32 txnoassoc
; /* tx discard because we're not associated */
2806 uint32 txrunt
; /* tx runt frames */
2807 uint32 txchit
; /* tx header cache hit (fastpath) */
2808 uint32 txcmiss
; /* tx header cache miss (slowpath) */
2810 /* transmit chip error counters */
2811 uint32 txuflo
; /* tx fifo underflows */
2812 uint32 txphyerr
; /* tx phy errors (indicated in tx status) */
2815 /* receive stat counters */
2816 uint32 rxframe
; /* rx data frames */
2817 uint32 rxbyte
; /* rx data bytes */
2818 uint32 rxerror
; /* rx data errors (derived: sum of others) */
2819 uint32 rxctl
; /* rx management frames */
2820 uint32 rxnobuf
; /* rx out of buffers errors */
2821 uint32 rxnondata
; /* rx non data frames in the data channel errors */
2822 uint32 rxbadds
; /* rx bad DS errors */
2823 uint32 rxbadcm
; /* rx bad control or management frames */
2824 uint32 rxfragerr
; /* rx fragmentation errors */
2825 uint32 rxrunt
; /* rx runt frames */
2826 uint32 rxgiant
; /* rx giant frames */
2827 uint32 rxnoscb
; /* rx no scb error */
2828 uint32 rxbadproto
; /* rx invalid frames */
2829 uint32 rxbadsrcmac
; /* rx frames with Invalid Src Mac */
2830 uint32 rxbadda
; /* rx frames tossed for invalid da */
2831 uint32 rxfilter
; /* rx frames filtered out */
2833 /* receive chip error counters */
2834 uint32 rxoflo
; /* rx fifo overflow errors */
2835 uint32 rxuflo
[NFIFO
]; /* rx dma descriptor underflow errors */
2837 uint32 d11cnt_txrts_off
; /* d11cnt txrts value when reset d11cnt */
2838 uint32 d11cnt_rxcrc_off
; /* d11cnt rxcrc value when reset d11cnt */
2839 uint32 d11cnt_txnocts_off
; /* d11cnt txnocts value when reset d11cnt */
2842 uint32 dmade
; /* tx/rx dma descriptor errors */
2843 uint32 dmada
; /* tx/rx dma data errors */
2844 uint32 dmape
; /* tx/rx dma descriptor protocol errors */
2845 uint32 reset
; /* reset count */
2846 uint32 tbtt
; /* cnts the TBTT int's */
2848 uint32 pkt_callback_reg_fail
; /* callbacks register failure */
2850 /* MAC counters: 32-bit version of d11.h's macstat_t */
2851 uint32 txallfrm
; /* total number of frames sent, incl. Data, ACK, RTS, CTS,
2852 * Control Management (includes retransmissions)
2854 uint32 txrtsfrm
; /* number of RTS sent out by the MAC */
2855 uint32 txctsfrm
; /* number of CTS sent out by the MAC */
2856 uint32 txackfrm
; /* number of ACK frames sent out */
2857 uint32 txdnlfrm
; /* Not used */
2858 uint32 txbcnfrm
; /* beacons transmitted */
2859 uint32 txfunfl
[8]; /* per-fifo tx underflows */
2860 uint32 txtplunfl
; /* Template underflows (mac was too slow to transmit ACK/CTS
2863 uint32 txphyerror
; /* Transmit phy error, type of error is reported in tx-status for
2864 * driver enqueued frames
2866 uint32 rxfrmtoolong
; /* Received frame longer than legal limit (2346 bytes) */
2867 uint32 rxfrmtooshrt
; /* Received frame did not contain enough bytes for its frame type */
2868 uint32 rxinvmachdr
; /* Either the protocol version != 0 or frame type not
2869 * data/control/management
2871 uint32 rxbadfcs
; /* number of frames for which the CRC check failed in the MAC */
2872 uint32 rxbadplcp
; /* parity check of the PLCP header failed */
2873 uint32 rxcrsglitch
; /* PHY was able to correlate the preamble but not the header */
2874 uint32 rxstrt
; /* Number of received frames with a good PLCP
2875 * (i.e. passing parity check)
2877 uint32 rxdfrmucastmbss
; /* Number of received DATA frames with good FCS and matching RA */
2878 uint32 rxmfrmucastmbss
; /* number of received mgmt frames with good FCS and matching RA */
2879 uint32 rxcfrmucast
; /* number of received CNTRL frames with good FCS and matching RA */
2880 uint32 rxrtsucast
; /* number of unicast RTS addressed to the MAC (good FCS) */
2881 uint32 rxctsucast
; /* number of unicast CTS addressed to the MAC (good FCS) */
2882 uint32 rxackucast
; /* number of ucast ACKS received (good FCS) */
2883 uint32 rxdfrmocast
; /* number of received DATA frames (good FCS and not matching RA) */
2884 uint32 rxmfrmocast
; /* number of received MGMT frames (good FCS and not matching RA) */
2885 uint32 rxcfrmocast
; /* number of received CNTRL frame (good FCS and not matching RA) */
2886 uint32 rxrtsocast
; /* number of received RTS not addressed to the MAC */
2887 uint32 rxctsocast
; /* number of received CTS not addressed to the MAC */
2888 uint32 rxdfrmmcast
; /* number of RX Data multicast frames received by the MAC */
2889 uint32 rxmfrmmcast
; /* number of RX Management multicast frames received by the MAC */
2890 uint32 rxcfrmmcast
; /* number of RX Control multicast frames received by the MAC
2891 * (unlikely to see these)
2893 uint32 rxbeaconmbss
; /* beacons received from member of BSS */
2894 uint32 rxdfrmucastobss
; /* number of unicast frames addressed to the MAC from
2895 * other BSS (WDS FRAME)
2897 uint32 rxbeaconobss
; /* beacons received from other BSS */
2898 uint32 rxrsptmout
; /* Number of response timeouts for transmitted frames
2899 * expecting a response
2901 uint32 bcntxcancl
; /* transmit beacons canceled due to receipt of beacon (IBSS) */
2902 uint32 rxf0ovfl
; /* Number of receive fifo 0 overflows */
2903 uint32 rxf1ovfl
; /* Number of receive fifo 1 overflows (obsolete) */
2904 uint32 rxf2ovfl
; /* Number of receive fifo 2 overflows (obsolete) */
2905 uint32 txsfovfl
; /* Number of transmit status fifo overflows (obsolete) */
2906 uint32 pmqovfl
; /* Number of PMQ overflows */
2907 uint32 rxcgprqfrm
; /* Number of received Probe requests that made it into
2910 uint32 rxcgprsqovfl
; /* Rx Probe Request Que overflow in the AP */
2911 uint32 txcgprsfail
; /* Tx Probe Response Fail. AP sent probe response but did
2914 uint32 txcgprssuc
; /* Tx Probe Response Success (ACK was received) */
2915 uint32 prs_timeout
; /* Number of probe requests that were dropped from the PRQ
2916 * fifo because a probe response could not be sent out within
2917 * the time limit defined in M_PRS_MAXTIME
2919 uint32 rxnack
; /* obsolete */
2920 uint32 frmscons
; /* obsolete */
2921 uint32 txnack
; /* obsolete */
2922 uint32 txglitch_nack
; /* obsolete */
2923 uint32 txburst
; /* obsolete */
2925 /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
2926 uint32 txfrag
; /* dot11TransmittedFragmentCount */
2927 uint32 txmulti
; /* dot11MulticastTransmittedFrameCount */
2928 uint32 txfail
; /* dot11FailedCount */
2929 uint32 txretry
; /* dot11RetryCount */
2930 uint32 txretrie
; /* dot11MultipleRetryCount */
2931 uint32 rxdup
; /* dot11FrameduplicateCount */
2932 uint32 txrts
; /* dot11RTSSuccessCount */
2933 uint32 txnocts
; /* dot11RTSFailureCount */
2934 uint32 txnoack
; /* dot11ACKFailureCount */
2935 uint32 rxfrag
; /* dot11ReceivedFragmentCount */
2936 uint32 rxmulti
; /* dot11MulticastReceivedFrameCount */
2937 uint32 rxcrc
; /* dot11FCSErrorCount */
2938 uint32 txfrmsnt
; /* dot11TransmittedFrameCount (bogus MIB?) */
2939 uint32 rxundec
; /* dot11WEPUndecryptableCount */
2941 /* WPA2 counters (see rxundec for DecryptFailureCount) */
2942 uint32 tkipmicfaill
; /* TKIPLocalMICFailures */
2943 uint32 tkipcntrmsr
; /* TKIPCounterMeasuresInvoked */
2944 uint32 tkipreplay
; /* TKIPReplays */
2945 uint32 ccmpfmterr
; /* CCMPFormatErrors */
2946 uint32 ccmpreplay
; /* CCMPReplays */
2947 uint32 ccmpundec
; /* CCMPDecryptErrors */
2948 uint32 fourwayfail
; /* FourWayHandshakeFailures */
2949 uint32 wepundec
; /* dot11WEPUndecryptableCount */
2950 uint32 wepicverr
; /* dot11WEPICVErrorCount */
2951 uint32 decsuccess
; /* DecryptSuccessCount */
2952 uint32 tkipicverr
; /* TKIPICVErrorCount */
2953 uint32 wepexcluded
; /* dot11WEPExcludedCount */
2955 uint32 txchanrej
; /* Tx frames suppressed due to channel rejection */
2956 uint32 psmwds
; /* Count PSM watchdogs */
2957 uint32 phywatchdog
; /* Count Phy watchdogs (triggered by ucode) */
2959 /* MBSS counters, AP only */
2960 uint32 prq_entries_handled
; /* PRQ entries read in */
2961 uint32 prq_undirected_entries
; /* which were bcast bss & ssid */
2962 uint32 prq_bad_entries
; /* which could not be translated to info */
2963 uint32 atim_suppress_count
; /* TX suppressions on ATIM fifo */
2964 uint32 bcn_template_not_ready
; /* Template marked in use on send bcn ... */
2965 uint32 bcn_template_not_ready_done
; /* ...but "DMA done" interrupt rcvd */
2966 uint32 late_tbtt_dpc
; /* TBTT DPC did not happen in time */
2968 /* per-rate receive stat counters */
2969 uint32 rx1mbps
; /* packets rx at 1Mbps */
2970 uint32 rx2mbps
; /* packets rx at 2Mbps */
2971 uint32 rx5mbps5
; /* packets rx at 5.5Mbps */
2972 uint32 rx6mbps
; /* packets rx at 6Mbps */
2973 uint32 rx9mbps
; /* packets rx at 9Mbps */
2974 uint32 rx11mbps
; /* packets rx at 11Mbps */
2975 uint32 rx12mbps
; /* packets rx at 12Mbps */
2976 uint32 rx18mbps
; /* packets rx at 18Mbps */
2977 uint32 rx24mbps
; /* packets rx at 24Mbps */
2978 uint32 rx36mbps
; /* packets rx at 36Mbps */
2979 uint32 rx48mbps
; /* packets rx at 48Mbps */
2980 uint32 rx54mbps
; /* packets rx at 54Mbps */
2981 uint32 rx108mbps
; /* packets rx at 108mbps */
2982 uint32 rx162mbps
; /* packets rx at 162mbps */
2983 uint32 rx216mbps
; /* packets rx at 216 mbps */
2984 uint32 rx270mbps
; /* packets rx at 270 mbps */
2985 uint32 rx324mbps
; /* packets rx at 324 mbps */
2986 uint32 rx378mbps
; /* packets rx at 378 mbps */
2987 uint32 rx432mbps
; /* packets rx at 432 mbps */
2988 uint32 rx486mbps
; /* packets rx at 486 mbps */
2989 uint32 rx540mbps
; /* packets rx at 540 mbps */
2991 /* pkteng rx frame stats */
2992 uint32 pktengrxducast
; /* unicast frames rxed by the pkteng code */
2993 uint32 pktengrxdmcast
; /* multicast frames rxed by the pkteng code */
2995 uint32 rfdisable
; /* count of radio disables */
2996 uint32 bphy_rxcrsglitch
; /* PHY count of bphy glitches */
2998 uint32 txexptime
; /* Tx frames suppressed due to timer expiration */
3000 uint32 txmpdu_sgi
; /* count for sgi transmit */
3001 uint32 rxmpdu_sgi
; /* count for sgi received */
3002 uint32 txmpdu_stbc
; /* count for stbc transmit */
3003 uint32 rxmpdu_stbc
; /* count for stbc received */
3005 uint32 rxundec_mcst
; /* dot11WEPUndecryptableCount */
3007 /* WPA2 counters (see rxundec for DecryptFailureCount) */
3008 uint32 tkipmicfaill_mcst
; /* TKIPLocalMICFailures */
3009 uint32 tkipcntrmsr_mcst
; /* TKIPCounterMeasuresInvoked */
3010 uint32 tkipreplay_mcst
; /* TKIPReplays */
3011 uint32 ccmpfmterr_mcst
; /* CCMPFormatErrors */
3012 uint32 ccmpreplay_mcst
; /* CCMPReplays */
3013 uint32 ccmpundec_mcst
; /* CCMPDecryptErrors */
3014 uint32 fourwayfail_mcst
; /* FourWayHandshakeFailures */
3015 uint32 wepundec_mcst
; /* dot11WEPUndecryptableCount */
3016 uint32 wepicverr_mcst
; /* dot11WEPICVErrorCount */
3017 uint32 decsuccess_mcst
; /* DecryptSuccessCount */
3018 uint32 tkipicverr_mcst
; /* TKIPICVErrorCount */
3019 uint32 wepexcluded_mcst
; /* dot11WEPExcludedCount */
3021 uint32 dma_hang
; /* count for dma hang */
3022 uint32 reinit
; /* count for reinit */
3024 uint32 pstatxucast
; /* count of ucast frames xmitted on all psta assoc */
3025 uint32 pstatxnoassoc
; /* count of txnoassoc frames xmitted on all psta assoc */
3026 uint32 pstarxucast
; /* count of ucast frames received on all psta assoc */
3027 uint32 pstarxbcmc
; /* count of bcmc frames received on all psta */
3028 uint32 pstatxbcmc
; /* count of bcmc frames transmitted on all psta */
3030 uint32 cso_passthrough
; /* hw cso required but passthrough */
3031 uint32 cso_normal
; /* hw cso hdr for normal process */
3032 uint32 chained
; /* number of frames chained */
3033 uint32 chainedsz1
; /* number of chain size 1 frames */
3034 uint32 unchained
; /* number of frames not chained */
3035 uint32 maxchainsz
; /* max chain size so far */
3036 uint32 currchainsz
; /* current chain size */
3040 uint16 version
; /* see definition of WL_CNT_T_VERSION */
3041 uint16 length
; /* length of entire structure */
3043 /* transmit stat counters */
3044 uint32 txframe
; /* tx data frames */
3045 uint32 txbyte
; /* tx data bytes */
3046 uint32 txretrans
; /* tx mac retransmits */
3047 uint32 txerror
; /* tx data errors (derived: sum of others) */
3048 uint32 txctl
; /* tx management frames */
3049 uint32 txprshort
; /* tx short preamble frames */
3050 uint32 txserr
; /* tx status errors */
3051 uint32 txnobuf
; /* tx out of buffers errors */
3052 uint32 txnoassoc
; /* tx discard because we're not associated */
3053 uint32 txrunt
; /* tx runt frames */
3054 uint32 txchit
; /* tx header cache hit (fastpath) */
3055 uint32 txcmiss
; /* tx header cache miss (slowpath) */
3057 /* transmit chip error counters */
3058 uint32 txuflo
; /* tx fifo underflows */
3059 uint32 txphyerr
; /* tx phy errors (indicated in tx status) */
3062 /* receive stat counters */
3063 uint32 rxframe
; /* rx data frames */
3064 uint32 rxbyte
; /* rx data bytes */
3065 uint32 rxerror
; /* rx data errors (derived: sum of others) */
3066 uint32 rxctl
; /* rx management frames */
3067 uint32 rxnobuf
; /* rx out of buffers errors */
3068 uint32 rxnondata
; /* rx non data frames in the data channel errors */
3069 uint32 rxbadds
; /* rx bad DS errors */
3070 uint32 rxbadcm
; /* rx bad control or management frames */
3071 uint32 rxfragerr
; /* rx fragmentation errors */
3072 uint32 rxrunt
; /* rx runt frames */
3073 uint32 rxgiant
; /* rx giant frames */
3074 uint32 rxnoscb
; /* rx no scb error */
3075 uint32 rxbadproto
; /* rx invalid frames */
3076 uint32 rxbadsrcmac
; /* rx frames with Invalid Src Mac */
3077 uint32 rxbadda
; /* rx frames tossed for invalid da */
3078 uint32 rxfilter
; /* rx frames filtered out */
3080 /* receive chip error counters */
3081 uint32 rxoflo
; /* rx fifo overflow errors */
3082 uint32 rxuflo
[NFIFO
]; /* rx dma descriptor underflow errors */
3084 uint32 d11cnt_txrts_off
; /* d11cnt txrts value when reset d11cnt */
3085 uint32 d11cnt_rxcrc_off
; /* d11cnt rxcrc value when reset d11cnt */
3086 uint32 d11cnt_txnocts_off
; /* d11cnt txnocts value when reset d11cnt */
3089 uint32 dmade
; /* tx/rx dma descriptor errors */
3090 uint32 dmada
; /* tx/rx dma data errors */
3091 uint32 dmape
; /* tx/rx dma descriptor protocol errors */
3092 uint32 reset
; /* reset count */
3093 uint32 tbtt
; /* cnts the TBTT int's */
3095 uint32 pkt_callback_reg_fail
; /* callbacks register failure */
3097 /* MAC counters: 32-bit version of d11.h's macstat_t */
3098 uint32 txallfrm
; /* total number of frames sent, incl. Data, ACK, RTS, CTS,
3099 * Control Management (includes retransmissions)
3101 uint32 txrtsfrm
; /* number of RTS sent out by the MAC */
3102 uint32 txctsfrm
; /* number of CTS sent out by the MAC */
3103 uint32 txackfrm
; /* number of ACK frames sent out */
3104 uint32 txdnlfrm
; /* Not used */
3105 uint32 txbcnfrm
; /* beacons transmitted */
3106 uint32 txfunfl
[8]; /* per-fifo tx underflows */
3107 uint32 txtplunfl
; /* Template underflows (mac was too slow to transmit ACK/CTS
3110 uint32 txphyerror
; /* Transmit phy error, type of error is reported in tx-status for
3111 * driver enqueued frames
3113 uint32 rxfrmtoolong
; /* Received frame longer than legal limit (2346 bytes) */
3114 uint32 rxfrmtooshrt
; /* Received frame did not contain enough bytes for its frame type */
3115 uint32 rxinvmachdr
; /* Either the protocol version != 0 or frame type not
3116 * data/control/management
3118 uint32 rxbadfcs
; /* number of frames for which the CRC check failed in the MAC */
3119 uint32 rxbadplcp
; /* parity check of the PLCP header failed */
3120 uint32 rxcrsglitch
; /* PHY was able to correlate the preamble but not the header */
3121 uint32 rxstrt
; /* Number of received frames with a good PLCP
3122 * (i.e. passing parity check)
3124 uint32 rxdfrmucastmbss
; /* Number of received DATA frames with good FCS and matching RA */
3125 uint32 rxmfrmucastmbss
; /* number of received mgmt frames with good FCS and matching RA */
3126 uint32 rxcfrmucast
; /* number of received CNTRL frames with good FCS and matching RA */
3127 uint32 rxrtsucast
; /* number of unicast RTS addressed to the MAC (good FCS) */
3128 uint32 rxctsucast
; /* number of unicast CTS addressed to the MAC (good FCS) */
3129 uint32 rxackucast
; /* number of ucast ACKS received (good FCS) */
3130 uint32 rxdfrmocast
; /* number of received DATA frames (good FCS and not matching RA) */
3131 uint32 rxmfrmocast
; /* number of received MGMT frames (good FCS and not matching RA) */
3132 uint32 rxcfrmocast
; /* number of received CNTRL frame (good FCS and not matching RA) */
3133 uint32 rxrtsocast
; /* number of received RTS not addressed to the MAC */
3134 uint32 rxctsocast
; /* number of received CTS not addressed to the MAC */
3135 uint32 rxdfrmmcast
; /* number of RX Data multicast frames received by the MAC */
3136 uint32 rxmfrmmcast
; /* number of RX Management multicast frames received by the MAC */
3137 uint32 rxcfrmmcast
; /* number of RX Control multicast frames received by the MAC
3138 * (unlikely to see these)
3140 uint32 rxbeaconmbss
; /* beacons received from member of BSS */
3141 uint32 rxdfrmucastobss
; /* number of unicast frames addressed to the MAC from
3142 * other BSS (WDS FRAME)
3144 uint32 rxbeaconobss
; /* beacons received from other BSS */
3145 uint32 rxrsptmout
; /* Number of response timeouts for transmitted frames
3146 * expecting a response
3148 uint32 bcntxcancl
; /* transmit beacons canceled due to receipt of beacon (IBSS) */
3149 uint32 rxf0ovfl
; /* Number of receive fifo 0 overflows */
3150 uint32 rxf1ovfl
; /* Number of receive fifo 1 overflows (obsolete) */
3151 uint32 rxf2ovfl
; /* Number of receive fifo 2 overflows (obsolete) */
3152 uint32 txsfovfl
; /* Number of transmit status fifo overflows (obsolete) */
3153 uint32 pmqovfl
; /* Number of PMQ overflows */
3154 uint32 rxcgprqfrm
; /* Number of received Probe requests that made it into
3157 uint32 rxcgprsqovfl
; /* Rx Probe Request Que overflow in the AP */
3158 uint32 txcgprsfail
; /* Tx Probe Response Fail. AP sent probe response but did
3161 uint32 txcgprssuc
; /* Tx Probe Response Success (ACK was received) */
3162 uint32 prs_timeout
; /* Number of probe requests that were dropped from the PRQ
3163 * fifo because a probe response could not be sent out within
3164 * the time limit defined in M_PRS_MAXTIME
3169 uint32 txglitch_nack
; /* obsolete */
3170 uint32 txburst
; /* obsolete */
3172 /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
3173 uint32 txfrag
; /* dot11TransmittedFragmentCount */
3174 uint32 txmulti
; /* dot11MulticastTransmittedFrameCount */
3175 uint32 txfail
; /* dot11FailedCount */
3176 uint32 txretry
; /* dot11RetryCount */
3177 uint32 txretrie
; /* dot11MultipleRetryCount */
3178 uint32 rxdup
; /* dot11FrameduplicateCount */
3179 uint32 txrts
; /* dot11RTSSuccessCount */
3180 uint32 txnocts
; /* dot11RTSFailureCount */
3181 uint32 txnoack
; /* dot11ACKFailureCount */
3182 uint32 rxfrag
; /* dot11ReceivedFragmentCount */
3183 uint32 rxmulti
; /* dot11MulticastReceivedFrameCount */
3184 uint32 rxcrc
; /* dot11FCSErrorCount */
3185 uint32 txfrmsnt
; /* dot11TransmittedFrameCount (bogus MIB?) */
3186 uint32 rxundec
; /* dot11WEPUndecryptableCount */
3188 /* WPA2 counters (see rxundec for DecryptFailureCount) */
3189 uint32 tkipmicfaill
; /* TKIPLocalMICFailures */
3190 uint32 tkipcntrmsr
; /* TKIPCounterMeasuresInvoked */
3191 uint32 tkipreplay
; /* TKIPReplays */
3192 uint32 ccmpfmterr
; /* CCMPFormatErrors */
3193 uint32 ccmpreplay
; /* CCMPReplays */
3194 uint32 ccmpundec
; /* CCMPDecryptErrors */
3195 uint32 fourwayfail
; /* FourWayHandshakeFailures */
3196 uint32 wepundec
; /* dot11WEPUndecryptableCount */
3197 uint32 wepicverr
; /* dot11WEPICVErrorCount */
3198 uint32 decsuccess
; /* DecryptSuccessCount */
3199 uint32 tkipicverr
; /* TKIPICVErrorCount */
3200 uint32 wepexcluded
; /* dot11WEPExcludedCount */
3202 uint32 rxundec_mcst
; /* dot11WEPUndecryptableCount */
3204 /* WPA2 counters (see rxundec for DecryptFailureCount) */
3205 uint32 tkipmicfaill_mcst
; /* TKIPLocalMICFailures */
3206 uint32 tkipcntrmsr_mcst
; /* TKIPCounterMeasuresInvoked */
3207 uint32 tkipreplay_mcst
; /* TKIPReplays */
3208 uint32 ccmpfmterr_mcst
; /* CCMPFormatErrors */
3209 uint32 ccmpreplay_mcst
; /* CCMPReplays */
3210 uint32 ccmpundec_mcst
; /* CCMPDecryptErrors */
3211 uint32 fourwayfail_mcst
; /* FourWayHandshakeFailures */
3212 uint32 wepundec_mcst
; /* dot11WEPUndecryptableCount */
3213 uint32 wepicverr_mcst
; /* dot11WEPICVErrorCount */
3214 uint32 decsuccess_mcst
; /* DecryptSuccessCount */
3215 uint32 tkipicverr_mcst
; /* TKIPICVErrorCount */
3216 uint32 wepexcluded_mcst
; /* dot11WEPExcludedCount */
3218 uint32 txchanrej
; /* Tx frames suppressed due to channel rejection */
3219 uint32 txexptime
; /* Tx frames suppressed due to timer expiration */
3220 uint32 psmwds
; /* Count PSM watchdogs */
3221 uint32 phywatchdog
; /* Count Phy watchdogs (triggered by ucode) */
3223 /* MBSS counters, AP only */
3224 uint32 prq_entries_handled
; /* PRQ entries read in */
3225 uint32 prq_undirected_entries
; /* which were bcast bss & ssid */
3226 uint32 prq_bad_entries
; /* which could not be translated to info */
3227 uint32 atim_suppress_count
; /* TX suppressions on ATIM fifo */
3228 uint32 bcn_template_not_ready
; /* Template marked in use on send bcn ... */
3229 uint32 bcn_template_not_ready_done
; /* ...but "DMA done" interrupt rcvd */
3230 uint32 late_tbtt_dpc
; /* TBTT DPC did not happen in time */
3232 /* per-rate receive stat counters */
3233 uint32 rx1mbps
; /* packets rx at 1Mbps */
3234 uint32 rx2mbps
; /* packets rx at 2Mbps */
3235 uint32 rx5mbps5
; /* packets rx at 5.5Mbps */
3236 uint32 rx6mbps
; /* packets rx at 6Mbps */
3237 uint32 rx9mbps
; /* packets rx at 9Mbps */
3238 uint32 rx11mbps
; /* packets rx at 11Mbps */
3239 uint32 rx12mbps
; /* packets rx at 12Mbps */
3240 uint32 rx18mbps
; /* packets rx at 18Mbps */
3241 uint32 rx24mbps
; /* packets rx at 24Mbps */
3242 uint32 rx36mbps
; /* packets rx at 36Mbps */
3243 uint32 rx48mbps
; /* packets rx at 48Mbps */
3244 uint32 rx54mbps
; /* packets rx at 54Mbps */
3245 uint32 rx108mbps
; /* packets rx at 108mbps */
3246 uint32 rx162mbps
; /* packets rx at 162mbps */
3247 uint32 rx216mbps
; /* packets rx at 216 mbps */
3248 uint32 rx270mbps
; /* packets rx at 270 mbps */
3249 uint32 rx324mbps
; /* packets rx at 324 mbps */
3250 uint32 rx378mbps
; /* packets rx at 378 mbps */
3251 uint32 rx432mbps
; /* packets rx at 432 mbps */
3252 uint32 rx486mbps
; /* packets rx at 486 mbps */
3253 uint32 rx540mbps
; /* packets rx at 540 mbps */
3255 /* pkteng rx frame stats */
3256 uint32 pktengrxducast
; /* unicast frames rxed by the pkteng code */
3257 uint32 pktengrxdmcast
; /* multicast frames rxed by the pkteng code */
3259 uint32 rfdisable
; /* count of radio disables */
3260 uint32 bphy_rxcrsglitch
; /* PHY count of bphy glitches */
3262 uint32 txmpdu_sgi
; /* count for sgi transmit */
3263 uint32 rxmpdu_sgi
; /* count for sgi received */
3264 uint32 txmpdu_stbc
; /* count for stbc transmit */
3265 uint32 rxmpdu_stbc
; /* count for stbc received */
3269 #ifndef LINUX_POSTMOGRIFY_REMOVAL
3270 #define WL_DELTA_STATS_T_VERSION 1 /* current version of wl_delta_stats_t struct */
3273 uint16 version
; /* see definition of WL_DELTA_STATS_T_VERSION */
3274 uint16 length
; /* length of entire structure */
3276 /* transmit stat counters */
3277 uint32 txframe
; /* tx data frames */
3278 uint32 txbyte
; /* tx data bytes */
3279 uint32 txretrans
; /* tx mac retransmits */
3280 uint32 txfail
; /* tx failures */
3282 /* receive stat counters */
3283 uint32 rxframe
; /* rx data frames */
3284 uint32 rxbyte
; /* rx data bytes */
3286 /* per-rate receive stat counters */
3287 uint32 rx1mbps
; /* packets rx at 1Mbps */
3288 uint32 rx2mbps
; /* packets rx at 2Mbps */
3289 uint32 rx5mbps5
; /* packets rx at 5.5Mbps */
3290 uint32 rx6mbps
; /* packets rx at 6Mbps */
3291 uint32 rx9mbps
; /* packets rx at 9Mbps */
3292 uint32 rx11mbps
; /* packets rx at 11Mbps */
3293 uint32 rx12mbps
; /* packets rx at 12Mbps */
3294 uint32 rx18mbps
; /* packets rx at 18Mbps */
3295 uint32 rx24mbps
; /* packets rx at 24Mbps */
3296 uint32 rx36mbps
; /* packets rx at 36Mbps */
3297 uint32 rx48mbps
; /* packets rx at 48Mbps */
3298 uint32 rx54mbps
; /* packets rx at 54Mbps */
3299 uint32 rx108mbps
; /* packets rx at 108mbps */
3300 uint32 rx162mbps
; /* packets rx at 162mbps */
3301 uint32 rx216mbps
; /* packets rx at 216 mbps */
3302 uint32 rx270mbps
; /* packets rx at 270 mbps */
3303 uint32 rx324mbps
; /* packets rx at 324 mbps */
3304 uint32 rx378mbps
; /* packets rx at 378 mbps */
3305 uint32 rx432mbps
; /* packets rx at 432 mbps */
3306 uint32 rx486mbps
; /* packets rx at 486 mbps */
3307 uint32 rx540mbps
; /* packets rx at 540 mbps */
3309 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
3311 #define WL_WME_CNT_VERSION 1 /* current version of wl_wme_cnt_t */
3316 } wl_traffic_stats_t
;
3319 uint16 version
; /* see definition of WL_WME_CNT_VERSION */
3320 uint16 length
; /* length of entire structure */
3322 wl_traffic_stats_t tx
[AC_COUNT
]; /* Packets transmitted */
3323 wl_traffic_stats_t tx_failed
[AC_COUNT
]; /* Packets dropped or failed to transmit */
3324 wl_traffic_stats_t rx
[AC_COUNT
]; /* Packets received */
3325 wl_traffic_stats_t rx_failed
[AC_COUNT
]; /* Packets failed to receive */
3327 wl_traffic_stats_t forward
[AC_COUNT
]; /* Packets forwarded by AP */
3329 wl_traffic_stats_t tx_expired
[AC_COUNT
]; /* packets dropped due to lifetime expiry */
3333 struct wl_msglevel2
{
3338 typedef struct wl_mkeep_alive_pkt
{
3339 uint16 version
; /* Version for mkeep_alive */
3340 uint16 length
; /* length of fixed parameters in the structure */
3343 uint8 keep_alive_id
; /* 0 - 3 for N = 4 */
3345 } wl_mkeep_alive_pkt_t
;
3347 #define WL_MKEEP_ALIVE_VERSION 1
3348 #define WL_MKEEP_ALIVE_FIXED_LEN OFFSETOF(wl_mkeep_alive_pkt_t, data)
3349 #define WL_MKEEP_ALIVE_PRECISION 500
3351 #ifndef LINUX_POSTMOGRIFY_REMOVAL
3354 #define WLC_BA_CNT_VERSION 1 /* current version of wlc_ba_cnt_t */
3356 /* block ack related stats */
3357 typedef struct wlc_ba_cnt
{
3358 uint16 version
; /* WLC_BA_CNT_VERSION */
3359 uint16 length
; /* length of entire structure */
3361 /* transmit stat counters */
3362 uint32 txpdu
; /* pdus sent */
3363 uint32 txsdu
; /* sdus sent */
3364 uint32 txfc
; /* tx side flow controlled packets */
3365 uint32 txfci
; /* tx side flow control initiated */
3366 uint32 txretrans
; /* retransmitted pdus */
3367 uint32 txbatimer
; /* ba resend due to timer */
3368 uint32 txdrop
; /* dropped packets */
3369 uint32 txaddbareq
; /* addba req sent */
3370 uint32 txaddbaresp
; /* addba resp sent */
3371 uint32 txdelba
; /* delba sent */
3372 uint32 txba
; /* ba sent */
3373 uint32 txbar
; /* bar sent */
3374 uint32 txpad
[4]; /* future */
3376 /* receive side counters */
3377 uint32 rxpdu
; /* pdus recd */
3378 uint32 rxqed
; /* pdus buffered before sending up */
3379 uint32 rxdup
; /* duplicate pdus */
3380 uint32 rxnobuf
; /* pdus discarded due to no buf */
3381 uint32 rxaddbareq
; /* addba req recd */
3382 uint32 rxaddbaresp
; /* addba resp recd */
3383 uint32 rxdelba
; /* delba recd */
3384 uint32 rxba
; /* ba recd */
3385 uint32 rxbar
; /* bar recd */
3386 uint32 rxinvba
; /* invalid ba recd */
3387 uint32 rxbaholes
; /* ba recd with holes */
3388 uint32 rxunexp
; /* unexpected packets */
3389 uint32 rxpad
[4]; /* future */
3393 /* structure for per-tid ampdu control */
3394 struct ampdu_tid_control
{
3395 uint8 tid
; /* tid */
3396 uint8 enable
; /* enable/disable */
3399 /* structure for identifying ea/tid for sending addba/delba */
3400 struct ampdu_ea_tid
{
3401 struct ether_addr ea
; /* Station address */
3402 uint8 tid
; /* tid */
3404 /* structure for identifying retry/tid for retry_limit_tid/rr_retry_limit_tid */
3405 struct ampdu_retry_tid
{
3406 uint8 tid
; /* tid */
3407 uint8 retry
; /* retry value */
3410 /* Different discovery modes for dpt */
3411 #define DPT_DISCOVERY_MANUAL 0x01 /* manual discovery mode */
3412 #define DPT_DISCOVERY_AUTO 0x02 /* auto discovery mode */
3413 #define DPT_DISCOVERY_SCAN 0x04 /* scan-based discovery mode */
3415 /* different path selection values */
3416 #define DPT_PATHSEL_AUTO 0 /* auto mode for path selection */
3417 #define DPT_PATHSEL_DIRECT 1 /* always use direct DPT path */
3418 #define DPT_PATHSEL_APPATH 2 /* always use AP path */
3420 /* different ops for deny list */
3421 #define DPT_DENY_LIST_ADD 1 /* add to dpt deny list */
3422 #define DPT_DENY_LIST_REMOVE 2 /* remove from dpt deny list */
3424 /* different ops for manual end point */
3425 #define DPT_MANUAL_EP_CREATE 1 /* create manual dpt endpoint */
3426 #define DPT_MANUAL_EP_MODIFY 2 /* modify manual dpt endpoint */
3427 #define DPT_MANUAL_EP_DELETE 3 /* delete manual dpt endpoint */
3429 /* structure for dpt iovars */
3430 typedef struct dpt_iovar
{
3431 struct ether_addr ea
; /* Station address */
3432 uint8 mode
; /* mode: depends on iovar */
3433 uint32 pad
; /* future */
3436 /* flags to indicate DPT status */
3437 #define DPT_STATUS_ACTIVE 0x01 /* link active (though may be suspended) */
3438 #define DPT_STATUS_AES 0x02 /* link secured through AES encryption */
3439 #define DPT_STATUS_FAILED 0x04 /* DPT link failed */
3441 #define DPT_FNAME_LEN 48 /* Max length of friendly name */
3443 typedef struct dpt_status
{
3444 uint8 status
; /* flags to indicate status */
3445 uint8 fnlen
; /* length of friendly name */
3446 uchar name
[DPT_FNAME_LEN
]; /* friendly name */
3447 uint32 rssi
; /* RSSI of the link */
3448 sta_info_t sta
; /* sta info */
3451 /* structure for dpt list */
3452 typedef struct dpt_list
{
3453 uint32 num
; /* number of entries in struct */
3454 dpt_status_t status
[1]; /* per station info */
3457 /* structure for dpt friendly name */
3458 typedef struct dpt_fname
{
3459 uint8 len
; /* length of friendly name */
3460 uchar name
[DPT_FNAME_LEN
]; /* friendly name */
3463 #define BDD_FNAME_LEN 32 /* Max length of friendly name */
3464 typedef struct bdd_fname
{
3465 uint8 len
; /* length of friendly name */
3466 uchar name
[BDD_FNAME_LEN
]; /* friendly name */
3469 /* structure for addts arguments */
3470 /* For ioctls that take a list of TSPEC */
3472 int count
; /* number of tspecs */
3473 struct tsinfo_arg tsinfo
[1]; /* variable length array of tsinfo */
3477 /* different ops for manual end point */
3478 #define TDLS_MANUAL_EP_CREATE 1 /* create manual dpt endpoint */
3479 #define TDLS_MANUAL_EP_MODIFY 2 /* modify manual dpt endpoint */
3480 #define TDLS_MANUAL_EP_DELETE 3 /* delete manual dpt endpoint */
3481 #define TDLS_MANUAL_EP_PM 4 /* put dpt endpoint in PM mode */
3482 #define TDLS_MANUAL_EP_WAKE 5 /* wake up dpt endpoint from PM */
3483 #define TDLS_MANUAL_EP_DISCOVERY 6 /* discover if endpoint is TDLS capable */
3484 #define TDLS_MANUAL_EP_CHSW 7 /* channel switch */
3486 /* structure for tdls iovars */
3487 typedef struct tdls_iovar
{
3488 struct ether_addr ea
; /* Station address */
3489 uint8 mode
; /* mode: depends on iovar */
3490 chanspec_t chanspec
;
3491 uint32 pad
; /* future */
3495 /* structure for addts/delts arguments */
3496 typedef struct tspec_arg
{
3497 uint16 version
; /* see definition of TSPEC_ARG_VERSION */
3498 uint16 length
; /* length of entire structure */
3499 uint flag
; /* bit field */
3500 /* TSPEC Arguments */
3501 struct tsinfo_arg tsinfo
; /* TS Info bit field */
3502 uint16 nom_msdu_size
; /* (Nominal or fixed) MSDU Size (bytes) */
3503 uint16 max_msdu_size
; /* Maximum MSDU Size (bytes) */
3504 uint min_srv_interval
; /* Minimum Service Interval (us) */
3505 uint max_srv_interval
; /* Maximum Service Interval (us) */
3506 uint inactivity_interval
; /* Inactivity Interval (us) */
3507 uint suspension_interval
; /* Suspension Interval (us) */
3508 uint srv_start_time
; /* Service Start Time (us) */
3509 uint min_data_rate
; /* Minimum Data Rate (bps) */
3510 uint mean_data_rate
; /* Mean Data Rate (bps) */
3511 uint peak_data_rate
; /* Peak Data Rate (bps) */
3512 uint max_burst_size
; /* Maximum Burst Size (bytes) */
3513 uint delay_bound
; /* Delay Bound (us) */
3514 uint min_phy_rate
; /* Minimum PHY Rate (bps) */
3515 uint16 surplus_bw
; /* Surplus Bandwidth Allowance (range 1.0 to 8.0) */
3516 uint16 medium_time
; /* Medium Time (32 us/s periods) */
3517 uint8 dialog_token
; /* dialog token */
3520 /* tspec arg for desired station */
3521 typedef struct tspec_per_sta_arg
{
3522 struct ether_addr ea
;
3523 struct tspec_arg ts
;
3524 } tspec_per_sta_arg_t
;
3526 /* structure for max bandwidth for each access category */
3527 typedef struct wme_max_bandwidth
{
3528 uint32 ac
[AC_COUNT
]; /* max bandwidth for each access category */
3529 } wme_max_bandwidth_t
;
3531 #define WL_WME_MBW_PARAMS_IO_BYTES (sizeof(wme_max_bandwidth_t))
3533 /* current version of wl_tspec_arg_t struct */
3534 #define TSPEC_ARG_VERSION 2 /* current version of wl_tspec_arg_t struct */
3535 #define TSPEC_ARG_LENGTH 55 /* argument length from tsinfo to medium_time */
3536 #define TSPEC_DEFAULT_DIALOG_TOKEN 42 /* default dialog token */
3537 #define TSPEC_DEFAULT_SBW_FACTOR 0x3000 /* default surplus bw */
3540 #define WL_WOWL_KEEPALIVE_MAX_PACKET_SIZE 80
3541 #define WLC_WOWL_MAX_KEEPALIVE 2
3543 /* define for flag */
3544 #define TSPEC_PENDING 0 /* TSPEC pending */
3545 #define TSPEC_ACCEPTED 1 /* TSPEC accepted */
3546 #define TSPEC_REJECTED 2 /* TSPEC rejected */
3547 #define TSPEC_UNKNOWN 3 /* TSPEC unknown */
3548 #define TSPEC_STATUS_MASK 7 /* TSPEC status mask */
3551 /* Software feature flag defines used by wlfeatureflag */
3552 #ifdef WLAFTERBURNER
3553 #define WL_SWFL_ABBFL 0x0001 /* Allow Afterburner on systems w/o hardware BFL */
3554 #define WL_SWFL_ABENCORE 0x0002 /* Allow AB on non-4318E chips */
3555 #endif /* WLAFTERBURNER */
3556 #define WL_SWFL_NOHWRADIO 0x0004
3557 #define WL_SWFL_FLOWCONTROL 0x0008 /* Enable backpressure to OS stack */
3558 #define WL_SWFL_WLBSSSORT 0x0010 /* Per-port supports sorting of BSS */
3560 #define WL_LIFETIME_MAX 0xFFFF /* Max value in ms */
3562 /* Packet lifetime configuration per ac */
3563 typedef struct wl_lifetime
{
3564 uint32 ac
; /* access class */
3565 uint32 lifetime
; /* Packet lifetime value in ms */
3568 /* Channel Switch Announcement param */
3569 typedef struct wl_chan_switch
{
3570 uint8 mode
; /* value 0 or 1 */
3571 uint8 count
; /* count # of beacons before switching */
3572 chanspec_t chspec
; /* chanspec */
3573 uint8 reg
; /* regulatory class */
3575 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
3577 /* Roaming trigger definitions for WLC_SET_ROAM_TRIGGER.
3579 * (-100 < value < 0) value is used directly as a roaming trigger in dBm
3580 * (0 <= value) value specifies a logical roaming trigger level from
3583 * WLC_GET_ROAM_TRIGGER always returns roaming trigger value in dBm, never
3584 * the logical roam trigger value.
3586 #define WLC_ROAM_TRIGGER_DEFAULT 0 /* default roaming trigger */
3587 #define WLC_ROAM_TRIGGER_BANDWIDTH 1 /* optimize for bandwidth roaming trigger */
3588 #define WLC_ROAM_TRIGGER_DISTANCE 2 /* optimize for distance roaming trigger */
3589 #define WLC_ROAM_TRIGGER_AUTO 3 /* auto-detect environment */
3590 #define WLC_ROAM_TRIGGER_MAX_VALUE 3 /* max. valid value */
3592 #define WLC_ROAM_NEVER_ROAM_TRIGGER (-100) /* Avoid Roaming by setting a large value */
3594 /* Preferred Network Offload (PNO, formerly PFN) defines */
3595 #define WPA_AUTH_PFN_ANY 0xffffffff /* for PFN, match only ssid */
3614 #define SORT_CRITERIA_BIT 0
3615 #define AUTO_NET_SWITCH_BIT 1
3616 #define ENABLE_BKGRD_SCAN_BIT 2
3617 #define IMMEDIATE_SCAN_BIT 3
3618 #define AUTO_CONNECT_BIT 4
3619 #define ENABLE_BD_SCAN_BIT 5
3620 #define ENABLE_ADAPTSCAN_BIT 6
3621 #define IMMEDIATE_EVENT_BIT 8
3623 #define SORT_CRITERIA_MASK 0x0001
3624 #define AUTO_NET_SWITCH_MASK 0x0002
3625 #define ENABLE_BKGRD_SCAN_MASK 0x0004
3626 #define IMMEDIATE_SCAN_MASK 0x0008
3627 #define AUTO_CONNECT_MASK 0x0010
3629 #define ENABLE_BD_SCAN_MASK 0x0020
3630 #define ENABLE_ADAPTSCAN_MASK 0x00c0
3631 #define IMMEDIATE_EVENT_MASK 0x0100
3633 #define PFN_VERSION 2
3634 #define PFN_SCANRESULT_VERSION 1
3635 #define MAX_PFN_LIST_COUNT 16
3637 #define PFN_COMPLETE 1
3638 #define PFN_INCOMPLETE 0
3640 #define DEFAULT_BESTN 2
3641 #define DEFAULT_MSCAN 0
3642 #define DEFAULT_REPEAT 10
3643 #define DEFAULT_EXP 2
3645 /* PFN network info structure */
3646 typedef struct wl_pfn_subnet_info
{
3647 struct ether_addr BSSID
;
3648 uint8 channel
; /* channel number only */
3651 } wl_pfn_subnet_info_t
;
3653 typedef struct wl_pfn_net_info
{
3654 wl_pfn_subnet_info_t pfnsubnet
;
3655 int16 RSSI
; /* receive signal strength (in dBm) */
3656 uint16 timestamp
; /* age in seconds */
3657 } wl_pfn_net_info_t
;
3659 typedef struct wl_pfn_scanresults
{
3663 wl_pfn_net_info_t netinfo
[1];
3664 } wl_pfn_scanresults_t
;
3666 /* PFN data structure */
3667 typedef struct wl_pfn_param
{
3668 int32 version
; /* PNO parameters version */
3669 int32 scan_freq
; /* Scan frequency */
3670 int32 lost_network_timeout
; /* Timeout in sec. to declare
3671 * discovered network as lost
3673 int16 flags
; /* Bit field to control features
3674 * of PFN such as sort criteria auto
3675 * enable switch and background scan
3677 int16 rssi_margin
; /* Margin to avoid jitter for choosing a
3678 * PFN based on RSSI sort criteria
3680 uint8 bestn
; /* number of best networks in each scan */
3681 uint8 mscan
; /* number of scans recorded */
3682 uint8 repeat
; /* Minimum number of scan intervals
3683 *before scan frequency changes in adaptive scan
3685 uint8 exp
; /* Exponent of 2 for maximum scan interval */
3686 #if !defined(WLC_PATCH) || !defined(BCM43362A2)
3687 int32 slow_freq
; /* slow scan period */
3688 #endif /* !WLC_PATCH || !BCM43362A2 */
3691 typedef struct wl_pfn
{
3692 wlc_ssid_t ssid
; /* ssid name and its length */
3693 int32 bss_type
; /* IBSS or infrastructure */
3694 int32 infra
; /* BSS Vs IBSS */
3695 int32 auth
; /* Open Vs Closed */
3696 int32 wpa_auth
; /* WPA type */
3697 int32 wsec
; /* wsec value */
3699 #define WL_PFN_HIDDEN_BIT 2
3700 #define PNO_SCAN_MAX_FW 508*1000 /* max time scan time in msec */
3701 #define PNO_SCAN_MAX_FW_SEC PNO_SCAN_MAX_FW/1000 /* max time scan time in SEC */
3702 #define PNO_SCAN_MIN_FW_SEC 10 /* min time scan time in SEC */
3703 #define WL_PFN_HIDDEN_MASK 0x4
3705 /* TCP Checksum Offload defines */
3706 #define TOE_TX_CSUM_OL 0x00000001
3707 #define TOE_RX_CSUM_OL 0x00000002
3709 /* TCP Checksum Offload error injection for testing */
3710 #define TOE_ERRTEST_TX_CSUM 0x00000001
3711 #define TOE_ERRTEST_RX_CSUM 0x00000002
3712 #define TOE_ERRTEST_RX_CSUM2 0x00000004
3714 struct toe_ol_stats_t
{
3715 /* Num of tx packets that don't need to be checksummed */
3718 /* Num of tx packets where checksum is filled by offload engine */
3722 uint32 tx_icmp_fill
;
3724 /* Num of rx packets where toe finds out if checksum is good or bad */
3731 uint32 rx_icmp_good
;
3734 /* Num of tx packets in which csum error is injected */
3735 uint32 tx_tcp_errinj
;
3736 uint32 tx_udp_errinj
;
3737 uint32 tx_icmp_errinj
;
3739 /* Num of rx packets in which csum error is injected */
3740 uint32 rx_tcp_errinj
;
3741 uint32 rx_udp_errinj
;
3742 uint32 rx_icmp_errinj
;
3745 /* ARP Offload feature flags for arp_ol iovar */
3746 #define ARP_OL_AGENT 0x00000001
3747 #define ARP_OL_SNOOP 0x00000002
3748 #define ARP_OL_HOST_AUTO_REPLY 0x00000004
3749 #define ARP_OL_PEER_AUTO_REPLY 0x00000008
3751 /* ARP Offload error injection */
3752 #define ARP_ERRTEST_REPLY_PEER 0x1
3753 #define ARP_ERRTEST_REPLY_HOST 0x2
3755 #define ARP_MULTIHOMING_MAX 8 /* Maximum local host IP addresses */
3756 #define ND_MULTIHOMING_MAX 8 /* Maximum local host IP addresses */
3758 /* Arp offload statistic counts */
3759 struct arp_ol_stats_t
{
3760 uint32 host_ip_entries
; /* Host IP table addresses (more than one if multihomed) */
3761 uint32 host_ip_overflow
; /* Host IP table additions skipped due to overflow */
3763 uint32 arp_table_entries
; /* ARP table entries */
3764 uint32 arp_table_overflow
; /* ARP table additions skipped due to overflow */
3766 uint32 host_request
; /* ARP requests from host */
3767 uint32 host_reply
; /* ARP replies from host */
3768 uint32 host_service
; /* ARP requests from host serviced by ARP Agent */
3770 uint32 peer_request
; /* ARP requests received from network */
3771 uint32 peer_request_drop
; /* ARP requests from network that were dropped */
3772 uint32 peer_reply
; /* ARP replies received from network */
3773 uint32 peer_reply_drop
; /* ARP replies from network that were dropped */
3774 uint32 peer_service
; /* ARP request from host serviced by ARP Agent */
3777 /* NS offload statistic counts */
3778 struct nd_ol_stats_t
{
3779 uint32 host_ip_entries
; /* Host IP table addresses (more than one if multihomed) */
3780 uint32 host_ip_overflow
; /* Host IP table additions skipped due to overflow */
3781 uint32 peer_request
; /* NS requests received from network */
3782 uint32 peer_request_drop
; /* NS requests from network that were dropped */
3783 uint32 peer_reply_drop
; /* NA replies from network that were dropped */
3784 uint32 peer_service
; /* NS request from host serviced by firmware */
3788 * Keep-alive packet offloading.
3791 /* NAT keep-alive packets format: specifies the re-transmission period, the packet
3792 * length, and packet contents.
3794 typedef struct wl_keep_alive_pkt
{
3795 uint32 period_msec
; /* Retransmission period (0 to disable packet re-transmits) */
3796 uint16 len_bytes
; /* Size of packet to transmit (0 to disable packet re-transmits) */
3797 uint8 data
[1]; /* Variable length packet to transmit. Contents should include
3798 * entire ethernet packet (enet header, IP header, UDP header,
3799 * and UDP payload) in network byte order.
3801 } wl_keep_alive_pkt_t
;
3803 #define WL_KEEP_ALIVE_FIXED_LEN OFFSETOF(wl_keep_alive_pkt_t, data)
3806 * Dongle pattern matching filter.
3809 /* Packet filter types. Currently, only pattern matching is supported. */
3810 typedef enum wl_pkt_filter_type
{
3811 WL_PKT_FILTER_TYPE_PATTERN_MATCH
/* Pattern matching filter */
3812 } wl_pkt_filter_type_t
;
3814 #define WL_PKT_FILTER_TYPE wl_pkt_filter_type_t
3816 /* Pattern matching filter. Specifies an offset within received packets to
3817 * start matching, the pattern to match, the size of the pattern, and a bitmask
3818 * that indicates which bits within the pattern should be matched.
3820 typedef struct wl_pkt_filter_pattern
{
3821 uint32 offset
; /* Offset within received packet to start pattern matching.
3822 * Offset '0' is the first byte of the ethernet header.
3824 uint32 size_bytes
; /* Size of the pattern. Bitmask must be the same size. */
3825 uint8 mask_and_pattern
[1]; /* Variable length mask and pattern data. mask starts
3826 * at offset 0. Pattern immediately follows mask.
3828 } wl_pkt_filter_pattern_t
;
3830 /* IOVAR "pkt_filter_add" parameter. Used to install packet filters. */
3831 typedef struct wl_pkt_filter
{
3832 uint32 id
; /* Unique filter id, specified by app. */
3833 uint32 type
; /* Filter type (WL_PKT_FILTER_TYPE_xxx). */
3834 uint32 negate_match
; /* Negate the result of filter matches */
3835 union { /* Filter definitions */
3836 wl_pkt_filter_pattern_t pattern
; /* Pattern matching filter */
3840 #define WL_PKT_FILTER_FIXED_LEN OFFSETOF(wl_pkt_filter_t, u)
3841 #define WL_PKT_FILTER_PATTERN_FIXED_LEN OFFSETOF(wl_pkt_filter_pattern_t, mask_and_pattern)
3843 /* IOVAR "pkt_filter_enable" parameter. */
3844 typedef struct wl_pkt_filter_enable
{
3845 uint32 id
; /* Unique filter id */
3846 uint32 enable
; /* Enable/disable bool */
3847 } wl_pkt_filter_enable_t
;
3849 /* IOVAR "pkt_filter_list" parameter. Used to retrieve a list of installed filters. */
3850 typedef struct wl_pkt_filter_list
{
3851 uint32 num
; /* Number of installed packet filters */
3852 wl_pkt_filter_t filter
[1]; /* Variable array of packet filters. */
3853 } wl_pkt_filter_list_t
;
3855 #define WL_PKT_FILTER_LIST_FIXED_LEN OFFSETOF(wl_pkt_filter_list_t, filter)
3857 /* IOVAR "pkt_filter_stats" parameter. Used to retrieve debug statistics. */
3858 typedef struct wl_pkt_filter_stats
{
3859 uint32 num_pkts_matched
; /* # filter matches for specified filter id */
3860 uint32 num_pkts_forwarded
; /* # packets fwded from dongle to host for all filters */
3861 uint32 num_pkts_discarded
; /* # packets discarded by dongle for all filters */
3862 } wl_pkt_filter_stats_t
;
3864 /* Sequential Commands ioctl */
3865 typedef struct wl_seq_cmd_ioctl
{
3866 uint32 cmd
; /* common ioctl definition */
3867 uint32 len
; /* length of user buffer */
3868 } wl_seq_cmd_ioctl_t
;
3870 #define WL_SEQ_CMD_ALIGN_BYTES 4
3872 /* These are the set of get IOCTLs that should be allowed when using
3873 * IOCTL sequence commands. These are issued implicitly by wl.exe each time
3874 * it is invoked. We never want to buffer these, or else wl.exe will stop working.
3876 #define WL_SEQ_CMDS_GET_IOCTL_FILTER(cmd) \
3877 (((cmd) == WLC_GET_MAGIC) || \
3878 ((cmd) == WLC_GET_VERSION) || \
3879 ((cmd) == WLC_GET_AP) || \
3880 ((cmd) == WLC_GET_INSTANCE))
3883 * Packet engine interface
3886 #define WL_PKTENG_PER_TX_START 0x01
3887 #define WL_PKTENG_PER_TX_STOP 0x02
3888 #define WL_PKTENG_PER_RX_START 0x04
3889 #define WL_PKTENG_PER_RX_WITH_ACK_START 0x05
3890 #define WL_PKTENG_PER_TX_WITH_ACK_START 0x06
3891 #define WL_PKTENG_PER_RX_STOP 0x08
3892 #define WL_PKTENG_PER_MASK 0xff
3894 #define WL_PKTENG_SYNCHRONOUS 0x100 /* synchronous flag */
3896 typedef struct wl_pkteng
{
3898 uint32 delay
; /* Inter-packet delay */
3899 uint32 nframes
; /* Number of frames */
3900 uint32 length
; /* Packet length */
3901 uint8 seqno
; /* Enable/disable sequence no. */
3902 struct ether_addr dest
; /* Destination address */
3903 struct ether_addr src
; /* Source address */
3906 #define NUM_80211b_RATES 4
3907 #define NUM_80211ag_RATES 8
3908 #define NUM_80211n_RATES 32
3909 #define NUM_80211_RATES (NUM_80211b_RATES+NUM_80211ag_RATES+NUM_80211n_RATES)
3910 typedef struct wl_pkteng_stats
{
3911 uint32 lostfrmcnt
; /* RX PER test: no of frames lost (skip seqno) */
3912 int32 rssi
; /* RSSI */
3913 int32 snr
; /* signal to noise ratio */
3914 uint16 rxpktcnt
[NUM_80211_RATES
+1];
3915 } wl_pkteng_stats_t
;
3917 typedef struct wl_sslpnphy_papd_debug_data
{
3925 } wl_sslpnphy_papd_debug_data_t
;
3926 typedef struct wl_sslpnphy_debug_data
{
3927 int16 papdcompRe
[64];
3928 int16 papdcompIm
[64];
3929 } wl_sslpnphy_debug_data_t
;
3930 typedef struct wl_sslpnphy_spbdump_data
{
3934 } wl_sslpnphy_spbdump_data_t
;
3935 typedef struct wl_sslpnphy_percal_debug_data
{
3943 int32 last_cal_volt
;
3948 } wl_sslpnphy_percal_debug_data_t
;
3950 #define WL_WOWL_MAGIC (1 << 0) /* Wakeup on Magic packet */
3951 #define WL_WOWL_NET (1 << 1) /* Wakeup on Netpattern */
3952 #define WL_WOWL_DIS (1 << 2) /* Wakeup on loss-of-link due to Disassoc/Deauth */
3953 #define WL_WOWL_RETR (1 << 3) /* Wakeup on retrograde TSF */
3954 #define WL_WOWL_BCN (1 << 4) /* Wakeup on loss of beacon */
3955 #define WL_WOWL_TST (1 << 5) /* Wakeup after test */
3956 #define WL_WOWL_M1 (1 << 6) /* Wakeup after PTK refresh */
3957 #define WL_WOWL_EAPID (1 << 7) /* Wakeup after receipt of EAP-Identity Req */
3958 #define WL_WOWL_PME_GPIO (1 << 8) /* Wakeind via PME(0) or GPIO(1) */
3959 #define WL_WOWL_NEEDTKIP1 (1 << 9) /* need tkip phase 1 key to be updated by the driver */
3960 #define WL_WOWL_GTK_FAILURE (1 << 10) /* enable wakeup if GTK fails */
3961 #define WL_WOWL_EXTMAGPAT (1 << 11) /* support extended magic packets */
3962 #define WL_WOWL_ARPOFFLOAD (1 << 12) /* support ARP/NS/keepalive offloading */
3963 #define WL_WOWL_WPA2 (1 << 13) /* read protocol version for EAPOL frames */
3964 #define WL_WOWL_KEYROT (1 << 14) /* If the bit is set, use key rotaton */
3965 #define WL_WOWL_BCAST (1 << 15) /* If the bit is set, frm received was bcast frame */
3967 #define MAGIC_PKT_MINLEN 102 /* Magic pkt min length is 6 * 0xFF + 16 * ETHER_ADDR_LEN */
3969 #define WOWL_PATTEN_TYPE_ARP (1 << 0) /* ARP offload Pattern */
3970 #define WOWL_PATTEN_TYPE_NA (1 << 1) /* NA offload Pattern */
3973 uint32 masksize
; /* Size of the mask in #of bytes */
3974 uint32 offset
; /* Offset to start looking for the packet in # of bytes */
3975 uint32 patternoffset
; /* Offset of start of pattern in the structure */
3976 uint32 patternsize
; /* Size of the pattern itself in #of bytes */
3978 uint32 reasonsize
; /* Size of the wakeup reason code */
3979 uint32 flags
; /* Flags to tell the pattern type and other properties */
3980 /* Mask follows the structure above */
3981 /* Pattern follows the mask is at 'patternoffset' from the start */
3982 } wl_wowl_pattern_t
;
3986 wl_wowl_pattern_t pattern
[1];
3987 } wl_wowl_pattern_list_t
;
3990 uint8 pci_wakeind
; /* Whether PCI PMECSR PMEStatus bit was set */
3991 uint16 ucode_wakeind
; /* What wakeup-event indication was set by ucode */
3992 } wl_wowl_wakeind_t
;
3995 /* per AC rate control related data structure */
3996 typedef struct wl_txrate_class
{
4000 } wl_txrate_class_t
;
4003 #if defined(DSLCPE_DELAY)
4004 #define WL_DELAYMODE_DEFER 0 /* defer by scheduler's choice, make this driver default */
4005 #define WL_DELAYMODE_FORCE 1 /* force, this is driver default */
4006 #define WL_DELAYMODE_AUTO 2 /* defer if no sta associated, force if sta associated */
4009 /* Overlap BSS Scan parameters default, minimum, maximum */
4010 #define WLC_OBSS_SCAN_PASSIVE_DWELL_DEFAULT 20 /* unit TU */
4011 #define WLC_OBSS_SCAN_PASSIVE_DWELL_MIN 5 /* unit TU */
4012 #define WLC_OBSS_SCAN_PASSIVE_DWELL_MAX 1000 /* unit TU */
4013 #define WLC_OBSS_SCAN_ACTIVE_DWELL_DEFAULT 10 /* unit TU */
4014 #define WLC_OBSS_SCAN_ACTIVE_DWELL_MIN 10 /* unit TU */
4015 #define WLC_OBSS_SCAN_ACTIVE_DWELL_MAX 1000 /* unit TU */
4016 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_DEFAULT 300 /* unit Sec */
4017 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MIN 10 /* unit Sec */
4018 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MAX 900 /* unit Sec */
4019 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_DEFAULT 5
4020 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MIN 5
4021 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MAX 100
4022 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_DEFAULT 200 /* unit TU */
4023 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MIN 200 /* unit TU */
4024 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MAX 10000 /* unit TU */
4025 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_DEFAULT 20 /* unit TU */
4026 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MIN 20 /* unit TU */
4027 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MAX 10000 /* unit TU */
4028 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_DEFAULT 25 /* unit percent */
4029 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MIN 0 /* unit percent */
4030 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MAX 100 /* unit percent */
4032 /* structure for Overlap BSS scan arguments */
4033 typedef struct wl_obss_scan_arg
{
4034 int16 passive_dwell
;
4036 int16 bss_widthscan_interval
;
4037 int16 passive_total
;
4039 int16 chanwidth_transition_delay
;
4040 int16 activity_threshold
;
4041 } wl_obss_scan_arg_t
;
4043 #define WL_OBSS_SCAN_PARAM_LEN sizeof(wl_obss_scan_arg_t)
4044 #define WL_MIN_NUM_OBSS_SCAN_ARG 7 /* minimum number of arguments required for OBSS Scan */
4046 #define WL_COEX_INFO_MASK 0x07
4047 #define WL_COEX_INFO_REQ 0x01
4048 #define WL_COEX_40MHZ_INTOLERANT 0x02
4049 #define WL_COEX_WIDTH20 0x04
4051 #define WLC_RSSI_INVALID 0 /* invalid RSSI value */
4053 #define MAX_RSSI_LEVELS 8
4055 /* RSSI event notification configuration. */
4056 typedef struct wl_rssi_event
{
4057 uint32 rate_limit_msec
; /* # of events posted to application will be limited to
4058 * one per specified period (0 to disable rate limit).
4060 uint8 num_rssi_levels
; /* Number of entries in rssi_levels[] below */
4061 int8 rssi_levels
[MAX_RSSI_LEVELS
]; /* Variable number of RSSI levels. An event
4062 * will be posted each time the RSSI of received
4063 * beacons/packets crosses a level.
4067 typedef struct wl_action_obss_coex_req
{
4071 } wl_action_obss_coex_req_t
;
4074 /* IOVar parameter block for small MAC address array with type indicator */
4075 #define WL_IOV_MAC_PARAM_LEN 4
4077 #define WL_IOV_PKTQ_LOG_PRECS 16
4081 char addr_type
[WL_IOV_MAC_PARAM_LEN
];
4082 struct ether_addr ea
[WL_IOV_MAC_PARAM_LEN
];
4083 } wl_iov_mac_params_t
;
4086 /* Parameter block for PKTQ_LOG statistics */
4088 uint32 requested
; /* packets requested to be stored */
4089 uint32 stored
; /* packets stored */
4090 uint32 saved
; /* packets saved,
4091 because a lowest priority queue has given away one packet
4093 uint32 selfsaved
; /* packets saved,
4094 because an older packet from the same queue has been dropped
4096 uint32 full_dropped
; /* packets dropped,
4097 because pktq is full with higher precedence packets
4099 uint32 dropped
; /* packets dropped because pktq per that precedence is full */
4100 uint32 sacrificed
; /* packets dropped,
4101 in order to save one from a queue of a highest priority
4103 uint32 busy
; /* packets droped because of hardware/transmission error */
4104 uint32 retry
; /* packets re-sent because they were not received */
4105 uint32 ps_retry
; /* packets retried again prior to moving power save mode */
4106 uint32 retry_drop
; /* packets finally dropped after retry limit */
4107 uint32 max_avail
; /* the high-water mark of the queue capacity for packets -
4108 goes to zero as queue fills
4110 uint32 max_used
; /* the high-water mark of the queue utilisation for packets -
4111 increases with use ('inverse' of max_avail)
4113 uint32 queue_capacity
; /* the maximum capacity of the queue */
4114 } pktq_log_counters_v01_t
;
4116 #define sacrified sacrificed
4119 uint8 num_prec
[WL_IOV_MAC_PARAM_LEN
];
4120 pktq_log_counters_v01_t counters
[WL_IOV_MAC_PARAM_LEN
][WL_IOV_PKTQ_LOG_PRECS
];
4122 } pktq_log_format_v01_t
;
4127 wl_iov_mac_params_t params
;
4129 pktq_log_format_v01_t v01
;
4131 } wl_iov_pktq_log_t
;
4134 /* **** EXTLOG **** */
4135 #define EXTLOG_CUR_VER 0x0100
4137 #define MAX_ARGSTR_LEN 18 /* At least big enough for storing ETHER_ADDR_STR_LEN */
4139 /* log modules (bitmap) */
4140 #define LOG_MODULE_COMMON 0x0001
4141 #define LOG_MODULE_ASSOC 0x0002
4142 #define LOG_MODULE_EVENT 0x0004
4143 #define LOG_MODULE_MAX 3 /* Update when adding module */
4146 #define WL_LOG_LEVEL_DISABLE 0
4147 #define WL_LOG_LEVEL_ERR 1
4148 #define WL_LOG_LEVEL_WARN 2
4149 #define WL_LOG_LEVEL_INFO 3
4150 #define WL_LOG_LEVEL_MAX WL_LOG_LEVEL_INFO /* Update when adding level */
4153 #define LOG_FLAG_EVENT 1
4156 #define LOG_ARGTYPE_NULL 0
4157 #define LOG_ARGTYPE_STR 1 /* %s */
4158 #define LOG_ARGTYPE_INT 2 /* %d */
4159 #define LOG_ARGTYPE_INT_STR 3 /* %d...%s */
4160 #define LOG_ARGTYPE_STR_INT 4 /* %s...%d */
4162 typedef struct wlc_extlog_cfg
{
4164 uint16 module
; /* bitmap */
4170 typedef struct log_record
{
4178 char str
[MAX_ARGSTR_LEN
];
4181 typedef struct wlc_extlog_req
{
4186 typedef struct wlc_extlog_results
{
4190 log_record_t logs
[1];
4191 } wlc_extlog_results_t
;
4193 typedef struct log_idstr
{
4197 const char *fmt_str
;
4200 #define FMTSTRF_USER 1
4202 /* flat ID definitions
4203 * New definitions HAVE TO BE ADDED at the end of the table. Otherwise, it will
4204 * affect backward compatibility with pre-existing apps
4207 FMTSTR_DRIVER_UP_ID
= 0,
4208 FMTSTR_DRIVER_DOWN_ID
= 1,
4209 FMTSTR_SUSPEND_MAC_FAIL_ID
= 2,
4210 FMTSTR_NO_PROGRESS_ID
= 3,
4211 FMTSTR_RFDISABLE_ID
= 4,
4212 FMTSTR_REG_PRINT_ID
= 5,
4213 FMTSTR_EXPTIME_ID
= 6,
4214 FMTSTR_JOIN_START_ID
= 7,
4215 FMTSTR_JOIN_COMPLETE_ID
= 8,
4216 FMTSTR_NO_NETWORKS_ID
= 9,
4217 FMTSTR_SECURITY_MISMATCH_ID
= 10,
4218 FMTSTR_RATE_MISMATCH_ID
= 11,
4219 FMTSTR_AP_PRUNED_ID
= 12,
4220 FMTSTR_KEY_INSERTED_ID
= 13,
4221 FMTSTR_DEAUTH_ID
= 14,
4222 FMTSTR_DISASSOC_ID
= 15,
4223 FMTSTR_LINK_UP_ID
= 16,
4224 FMTSTR_LINK_DOWN_ID
= 17,
4225 FMTSTR_RADIO_HW_OFF_ID
= 18,
4226 FMTSTR_RADIO_HW_ON_ID
= 19,
4227 FMTSTR_EVENT_DESC_ID
= 20,
4228 FMTSTR_PNP_SET_POWER_ID
= 21,
4229 FMTSTR_RADIO_SW_OFF_ID
= 22,
4230 FMTSTR_RADIO_SW_ON_ID
= 23,
4231 FMTSTR_PWD_MISMATCH_ID
= 24,
4232 FMTSTR_FATAL_ERROR_ID
= 25,
4233 FMTSTR_AUTH_FAIL_ID
= 26,
4234 FMTSTR_ASSOC_FAIL_ID
= 27,
4235 FMTSTR_IBSS_FAIL_ID
= 28,
4236 FMTSTR_EXTAP_FAIL_ID
= 29,
4240 #ifdef DONGLEOVERLAYS
4242 uint32 flags_idx
; /* lower 8 bits: overlay index; upper 24 bits: flags */
4243 uint32 offset
; /* offset into overlay region to write code */
4244 uint32 len
; /* overlay code len */
4245 /* overlay code follows this struct */
4246 } wl_ioctl_overlay_t
;
4248 #define OVERLAY_IDX_MASK 0x000000ff
4249 #define OVERLAY_IDX_SHIFT 0
4250 #define OVERLAY_FLAGS_MASK 0xffffff00
4251 #define OVERLAY_FLAGS_SHIFT 8
4252 /* overlay written to device memory immediately after loading the base image */
4253 #define OVERLAY_FLAG_POSTLOAD 0x100
4254 /* defer overlay download until the device responds w/WLC_E_OVL_DOWNLOAD event */
4255 #define OVERLAY_FLAG_DEFER_DL 0x200
4256 /* overlay downloaded prior to the host going to sleep */
4257 #define OVERLAY_FLAG_PRESLEEP 0x400
4259 #define OVERLAY_DOWNLOAD_CHUNKSIZE 1024
4260 #endif /* DONGLEOVERLAYS */
4262 /* no default structure packing */
4263 #include <packed_section_end.h>
4265 /* require strict packing */
4266 #include <packed_section_start.h>
4267 /* Structures and constants used for "vndr_ie" IOVar interface */
4268 #define VNDR_IE_CMD_LEN 4 /* length of the set command string:
4269 * "add", "del" (+ NUL)
4272 /* 802.11 Mgmt Packet flags */
4273 #define VNDR_IE_BEACON_FLAG 0x1
4274 #define VNDR_IE_PRBRSP_FLAG 0x2
4275 #define VNDR_IE_ASSOCRSP_FLAG 0x4
4276 #define VNDR_IE_AUTHRSP_FLAG 0x8
4277 #define VNDR_IE_PRBREQ_FLAG 0x10
4278 #define VNDR_IE_ASSOCREQ_FLAG 0x20
4279 #define VNDR_IE_IWAPID_FLAG 0x40 /* vendor IE in IW advertisement protocol ID field */
4280 #define VNDR_IE_CUSTOM_FLAG 0x100 /* allow custom IE id */
4282 #define VNDR_IE_INFO_HDR_LEN (sizeof(uint32))
4284 typedef BWL_PRE_PACKED_STRUCT
struct {
4285 uint32 pktflag
; /* bitmask indicating which packet(s) contain this IE */
4286 vndr_ie_t vndr_ie_data
; /* vendor IE data */
4287 } BWL_POST_PACKED_STRUCT vndr_ie_info_t
;
4289 typedef BWL_PRE_PACKED_STRUCT
struct {
4290 int iecount
; /* number of entries in the vndr_ie_list[] array */
4291 vndr_ie_info_t vndr_ie_list
[1]; /* variable size list of vndr_ie_info_t structs */
4292 } BWL_POST_PACKED_STRUCT vndr_ie_buf_t
;
4294 typedef BWL_PRE_PACKED_STRUCT
struct {
4295 char cmd
[VNDR_IE_CMD_LEN
]; /* vndr_ie IOVar set command : "add", "del" + NUL */
4296 vndr_ie_buf_t vndr_ie_buffer
; /* buffer containing Vendor IE list information */
4297 } BWL_POST_PACKED_STRUCT vndr_ie_setbuf_t
;
4299 /* tag_ID/length/value_buffer tuple */
4300 typedef BWL_PRE_PACKED_STRUCT
struct {
4304 } BWL_POST_PACKED_STRUCT tlv_t
;
4306 typedef BWL_PRE_PACKED_STRUCT
struct {
4307 uint32 pktflag
; /* bitmask indicating which packet(s) contain this IE */
4308 tlv_t ie_data
; /* IE data */
4309 } BWL_POST_PACKED_STRUCT ie_info_t
;
4311 typedef BWL_PRE_PACKED_STRUCT
struct {
4312 int iecount
; /* number of entries in the ie_list[] array */
4313 ie_info_t ie_list
[1]; /* variable size list of ie_info_t structs */
4314 } BWL_POST_PACKED_STRUCT ie_buf_t
;
4316 typedef BWL_PRE_PACKED_STRUCT
struct {
4317 char cmd
[VNDR_IE_CMD_LEN
]; /* ie IOVar set command : "add" + NUL */
4318 ie_buf_t ie_buffer
; /* buffer containing IE list information */
4319 } BWL_POST_PACKED_STRUCT ie_setbuf_t
;
4321 typedef BWL_PRE_PACKED_STRUCT
struct {
4322 uint32 pktflag
; /* bitmask indicating which packet(s) contain this IE */
4323 uint8 id
; /* IE type */
4324 } BWL_POST_PACKED_STRUCT ie_getbuf_t
;
4326 /* structures used to define format of wps ie data from probe requests */
4327 /* passed up to applications via iovar "prbreq_wpsie" */
4328 typedef BWL_PRE_PACKED_STRUCT
struct sta_prbreq_wps_ie_hdr
{
4329 struct ether_addr staAddr
;
4331 } BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_hdr_t
;
4333 typedef BWL_PRE_PACKED_STRUCT
struct sta_prbreq_wps_ie_data
{
4334 sta_prbreq_wps_ie_hdr_t hdr
;
4336 } BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_data_t
;
4338 typedef BWL_PRE_PACKED_STRUCT
struct sta_prbreq_wps_ie_list
{
4340 uint8 ieDataList
[1];
4341 } BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_list_t
;
4344 #ifdef WLMEDIA_TXFAILEVENT
4345 typedef BWL_PRE_PACKED_STRUCT
struct {
4346 char dest
[ETHER_ADDR_LEN
]; /* destination MAC */
4347 uint8 prio
; /* Packet Priority */
4348 uint8 flags
; /* Flags */
4349 uint32 tsf_l
; /* TSF timer low */
4350 uint32 tsf_h
; /* TSF timer high */
4351 uint16 rates
; /* Main Rates */
4352 uint16 txstatus
; /* TX Status */
4353 } BWL_POST_PACKED_STRUCT txfailinfo_t
;
4354 #endif /* WLMEDIA_TXFAILEVENT */
4356 /* no strict structure packing */
4357 #include <packed_section_end.h>
4359 /* Global ASSERT Logging */
4360 #define ASSERTLOG_CUR_VER 0x0100
4361 #define MAX_ASSRTSTR_LEN 64
4363 typedef struct assert_record
{
4366 char str
[MAX_ASSRTSTR_LEN
];
4369 typedef struct assertlog_results
{
4373 assert_record_t logs
[1];
4374 } assertlog_results_t
;
4376 #define LOGRRC_FIX_LEN 8
4377 #define IOBUF_ALLOWED_NUM_OF_LOGREC(type, len) ((len - LOGRRC_FIX_LEN)/sizeof(type))
4380 /* channel interference measurement (chanim) related defines */
4383 #define CHANIM_DISABLE 0 /* disabled */
4384 #define CHANIM_DETECT 1 /* detection only */
4385 #define CHANIM_EXT 2 /* external state machine */
4386 #define CHANIM_ACT 3 /* full internal state machine, detect + act */
4387 #define CHANIM_MODE_MAX 4
4389 /* define for apcs reason code */
4391 #define APCS_IOCTL 1
4392 #define APCS_CHANIM 2
4393 #define APCS_CSTIMER 3
4396 /* number of ACS record entries */
4397 #define CHANIM_ACS_RECORD 10
4400 #define CCASTATS_TXDUR 0
4401 #define CCASTATS_INBSS 1
4402 #define CCASTATS_OBSS 2
4403 #define CCASTATS_NOCTG 3
4404 #define CCASTATS_NOPKT 4
4405 #define CCASTATS_DOZE 5
4406 #define CCASTATS_TXOP 6
4407 #define CCASTATS_GDTXDUR 7
4408 #define CCASTATS_BDTXDUR 8
4409 #define CCASTATS_MAX 9
4411 /* chanim acs record */
4415 chanspec_t selected_chspc
;
4420 } chanim_acs_record_t
;
4423 chanim_acs_record_t acs_record
[CHANIM_ACS_RECORD
];
4428 typedef struct chanim_stats
{
4429 uint32 glitchcnt
; /* normalized as per second count */
4430 uint32 badplcp
; /* normalized as per second count */
4431 uint8 ccastats
[CCASTATS_MAX
]; /* normalized as 0-255 */
4432 int8 bgnoise
; /* background noise level (in dBm) */
4433 chanspec_t chanspec
;
4437 #define WL_CHANIM_STATS_VERSION 1
4438 #define WL_CHANIM_COUNT_ALL 0xff
4439 #define WL_CHANIM_COUNT_ONE 0x1
4445 chanim_stats_t stats
[1];
4446 } wl_chanim_stats_t
;
4448 #define WL_CHANIM_STATS_FIXED_LEN OFFSETOF(wl_chanim_stats_t, stats)
4450 /* Noise measurement metrics. */
4451 #define NOISE_MEASURE_KNOISE 0x1
4453 /* scb probe parameter */
4456 uint32 scb_activity_time
;
4457 uint32 scb_max_probe
;
4461 #define AP_TPC_OFF 0
4462 #define AP_TPC_BSS_PWR 1 /* BSS power control */
4463 #define AP_TPC_AP_PWR 2 /* AP power control */
4464 #define AP_TPC_AP_BSS_PWR 3 /* Both AP and BSS power control */
4465 #define AP_TPC_MAX_LINK_MARGIN 127
4467 /* structure/defines for selective mgmt frame (smf) stats support */
4469 #define SMFS_VERSION 1
4470 /* selected mgmt frame (smf) stats element */
4471 typedef struct wl_smfs_elem
{
4473 uint16 code
; /* SC or RC code */
4476 typedef struct wl_smf_stats
{
4478 uint16 length
; /* reserved for future usage */
4482 uint32 malformed_cnt
;
4483 uint32 count_total
; /* count included the interested group */
4484 wl_smfs_elem_t elem
[1];
4487 #define WL_SMFSTATS_FIXED_LEN OFFSETOF(wl_smf_stats_t, elem);
4494 /* reuse two number in the sc/rc space */
4495 #define SMFS_CODE_MALFORMED 0xFFFE
4496 #define SMFS_CODE_IGNORED 0xFFFD
4498 typedef enum smfs_type
{
4502 SMFS_TYPE_DISASSOC_TX
,
4503 SMFS_TYPE_DISASSOC_RX
,
4504 SMFS_TYPE_DEAUTH_TX
,
4505 SMFS_TYPE_DEAUTH_RX
,
4511 #define PHYMON_VERSION 1
4513 typedef struct wl_phycal_core_state
{
4514 /* Tx IQ/LO calibration coeffs */
4526 /* Rx IQ calibration coeffs */
4530 uint8 tx_iqlocal_pwridx
; /* Tx Power Index for Tx IQ/LO calibration */
4531 uint32 papd_epsilon_table
[64]; /* PAPD epsilon table */
4532 int16 papd_epsilon_offset
; /* PAPD epsilon offset */
4533 uint8 curr_tx_pwrindex
; /* Tx power index */
4534 int8 idle_tssi
; /* Idle TSSI */
4535 int8 est_tx_pwr
; /* Estimated Tx Power (dB) */
4536 int8 est_rx_pwr
; /* Estimated Rx Power (dB) from RSSI */
4537 uint16 rx_gaininfo
; /* Rx gain applied on last Rx pkt */
4538 uint16 init_gaincode
; /* initgain required for ACI */
4542 } wl_phycal_core_state_t
;
4544 typedef struct wl_phycal_state
{
4546 int8 num_phy_cores
; /* number of cores */
4547 int8 curr_temperature
; /* on-chip temperature sensor reading */
4548 chanspec_t chspec
; /* channspec for this state */
4549 bool aci_state
; /* ACI state: ON/OFF */
4550 uint16 crsminpower
; /* crsminpower required for ACI */
4551 uint16 crsminpowerl
; /* crsminpowerl required for ACI */
4552 uint16 crsminpoweru
; /* crsminpoweru required for ACI */
4553 wl_phycal_core_state_t phycal_core
[1];
4554 } wl_phycal_state_t
;
4556 #define WL_PHYCAL_STAT_FIXED_LEN OFFSETOF(wl_phycal_state_t, phycal_core)
4559 /* discovery state */
4560 typedef struct wl_p2p_disc_st
{
4561 uint8 state
; /* see state */
4562 chanspec_t chspec
; /* valid in listen state */
4563 uint16 dwell
; /* valid in listen state, in ms */
4567 #define WL_P2P_DISC_ST_SCAN 0
4568 #define WL_P2P_DISC_ST_LISTEN 1
4569 #define WL_P2P_DISC_ST_SEARCH 2
4572 typedef struct wl_p2p_scan
{
4573 uint8 type
; /* 'S' for WLC_SCAN, 'E' for "escan" */
4575 /* scan or escan parms... */
4579 typedef struct wl_p2p_if
{
4580 struct ether_addr addr
;
4581 uint8 type
; /* see i/f type */
4582 chanspec_t chspec
; /* for p2p_ifadd GO */
4586 #define WL_P2P_IF_CLIENT 0
4587 #define WL_P2P_IF_GO 1
4588 #define WL_P2P_IF_DYNBCN_GO 2
4589 #define WL_P2P_IF_DEV 3
4592 typedef struct wl_p2p_ifq
{
4594 char ifname
[BCM_MSG_IFNAME_MAX
];
4597 /* OppPS & CTWindow */
4598 typedef struct wl_p2p_ops
{
4599 uint8 ops
; /* 0: disable 1: enable */
4600 uint8 ctw
; /* >= 10 */
4603 /* absence and presence request */
4604 typedef struct wl_p2p_sched_desc
{
4608 uint32 count
; /* see count */
4609 } wl_p2p_sched_desc_t
;
4612 #define WL_P2P_SCHED_RSVD 0
4613 #define WL_P2P_SCHED_REPEAT 255 /* anything > 255 will be treated as 255 */
4615 typedef struct wl_p2p_sched
{
4616 uint8 type
; /* see schedule type */
4617 uint8 action
; /* see schedule action */
4618 uint8 option
; /* see schedule option */
4619 wl_p2p_sched_desc_t desc
[1];
4621 #define WL_P2P_SCHED_FIXED_LEN 3
4624 #define WL_P2P_SCHED_TYPE_ABS 0 /* Scheduled Absence */
4625 #define WL_P2P_SCHED_TYPE_REQ_ABS 1 /* Requested Absence */
4627 /* schedule action during absence periods (for WL_P2P_SCHED_ABS type) */
4628 #define WL_P2P_SCHED_ACTION_NONE 0 /* no action */
4629 #define WL_P2P_SCHED_ACTION_DOZE 1 /* doze */
4630 /* schedule option - WL_P2P_SCHED_TYPE_REQ_ABS */
4631 #define WL_P2P_SCHED_ACTION_GOOFF 2 /* turn off GO beacon/prbrsp functions */
4632 /* schedule option - WL_P2P_SCHED_TYPE_XXX */
4633 #define WL_P2P_SCHED_ACTION_RESET 255 /* reset */
4635 /* schedule option - WL_P2P_SCHED_TYPE_ABS */
4636 #define WL_P2P_SCHED_OPTION_NORMAL 0 /* normal start/interval/duration/count */
4637 #define WL_P2P_SCHED_OPTION_BCNPCT 1 /* percentage of beacon interval */
4638 /* schedule option - WL_P2P_SCHED_TYPE_REQ_ABS */
4639 #define WL_P2P_SCHED_OPTION_TSFOFS 2 /* normal start/internal/duration/count with
4640 * start being an offset of the 'current' TSF
4644 #define WL_P2P_FEAT_GO_CSA (1 << 0) /* GO moves with the STA using CSA method */
4645 #define WL_P2P_FEAT_GO_NOLEGACY (1 << 1) /* GO does not probe respond to non-p2p probe
4648 #define WL_P2P_FEAT_RESTRICT_DEV_RESP (1 << 2) /* Restrict p2p dev interface from responding */
4651 #define BCM_ACTION_RFAWARE 0x77
4652 #define BCM_ACTION_RFAWARE_DCS 0x01
4654 /* DCS reason code define */
4655 #define BCM_DCS_IOVAR 0x1
4656 #define BCM_DCS_UNKNOWN 0xFF
4658 typedef struct wl_bcmdcs_data
{
4663 /* n-mode support capability */
4664 /* 2x2 includes both 1x1 & 2x2 devices
4665 * reserved #define 2 for future when we want to separate 1x1 & 2x2 and
4666 * control it independently
4668 #define WL_11N_2x2 1
4669 #define WL_11N_3x3 3
4670 #define WL_11N_4x4 4
4672 /* define 11n feature disable flags */
4673 #define WLFEATURE_DISABLE_11N 0x00000001
4674 #define WLFEATURE_DISABLE_11N_STBC_TX 0x00000002
4675 #define WLFEATURE_DISABLE_11N_STBC_RX 0x00000004
4676 #define WLFEATURE_DISABLE_11N_SGI_TX 0x00000008
4677 #define WLFEATURE_DISABLE_11N_SGI_RX 0x00000010
4678 #define WLFEATURE_DISABLE_11N_AMPDU_TX 0x00000020
4679 #define WLFEATURE_DISABLE_11N_AMPDU_RX 0x00000040
4680 #define WLFEATURE_DISABLE_11N_GF 0x00000080
4682 /* Proxy STA modes */
4683 #define PSTA_MODE_DISABLED 0
4684 #define PSTA_MODE_PROXY 1
4685 #define PSTA_MODE_REPEATER 2
4688 /* NAT configuration */
4690 uint32 ipaddr
; /* interface ip address */
4691 uint32 ipaddr_mask
; /* interface ip address mask */
4692 uint32 ipaddr_gateway
; /* gateway ip address */
4693 uint8 mac_gateway
[6]; /* gateway mac address */
4694 uint32 ipaddr_dns
; /* DNS server ip address, valid only for public if */
4695 uint8 mac_dns
[6]; /* DNS server mac address, valid only for public if */
4696 uint8 GUID
[38]; /* interface GUID */
4700 uint op
; /* operation code */
4701 bool pub_if
; /* set for public if, clear for private if */
4702 nat_if_info_t if_info
; /* interface info */
4705 /* op code in nat_cfg */
4706 #define NAT_OP_ENABLE 1 /* enable NAT on given interface */
4707 #define NAT_OP_DISABLE 2 /* disable NAT on given interface */
4708 #define NAT_OP_DISABLE_ALL 3 /* disable NAT on all interfaces */
4711 #define NAT_STATE_ENABLED 1 /* NAT is enabled */
4712 #define NAT_STATE_DISABLED 2 /* NAT is disabled */
4715 int state
; /* NAT state returned */
4718 #ifdef PROP_TXSTATUS
4719 /* Bit definitions for tlv iovar */
4721 * enable RSSI signals:
4722 * WLFC_CTL_TYPE_RSSI
4724 #define WLFC_FLAGS_RSSI_SIGNALS 1
4726 /* enable (if/mac_open, if/mac_close,, mac_add, mac_del) signals:
4728 * WLFC_CTL_TYPE_MAC_OPEN
4729 * WLFC_CTL_TYPE_MAC_CLOSE
4731 * WLFC_CTL_TYPE_INTERFACE_OPEN
4732 * WLFC_CTL_TYPE_INTERFACE_CLOSE
4734 * WLFC_CTL_TYPE_MACDESC_ADD
4735 * WLFC_CTL_TYPE_MACDESC_DEL
4738 #define WLFC_FLAGS_XONXOFF_SIGNALS 2
4740 /* enable (status, fifo_credit, mac_credit) signals
4741 * WLFC_CTL_TYPE_MAC_REQUEST_CREDIT
4742 * WLFC_CTL_TYPE_TXSTATUS
4743 * WLFC_CTL_TYPE_FIFO_CREDITBACK
4745 #define WLFC_FLAGS_CREDIT_STATUS_SIGNALS 4
4747 #define WLFC_FLAGS_HOST_PROPTXSTATUS_ACTIVE 8
4748 #define WLFC_FLAGS_PSQ_GENERATIONFSM_ENABLE 16
4749 #define WLFC_FLAGS_PSQ_ZERO_BUFFER_ENABLE 32
4750 #endif /* PROP_TXSTATUS */
4752 #define BTA_STATE_LOG_SZ 64
4754 /* BTAMP Statemachine states */
4757 HCIReadLocalAMPInfo
,
4758 HCIReadLocalAMPASSOC
,
4759 HCIWriteRemoteAMPASSOC
,
4760 HCICreatePhysicalLink
,
4761 HCIAcceptPhysicalLinkRequest
,
4762 HCIDisconnectPhysicalLink
,
4763 HCICreateLogicalLink
,
4764 HCIAcceptLogicalLink
,
4765 HCIDisconnectLogicalLink
,
4766 HCILogicalLinkCancel
,
4768 HCIWriteLogicalLinkAcceptTimeout
4771 typedef struct flush_txfifo
{
4773 uint32 hwtxfifoflush
;
4774 struct ether_addr ea
;
4777 #define CHANNEL_5G_LOW_START 36 /* 5G low (36..48) CDD enable/disable bit mask */
4778 #define CHANNEL_5G_MID_START 52 /* 5G mid (52..64) CDD enable/disable bit mask */
4779 #define CHANNEL_5G_HIGH_START 100 /* 5G high (100..140) CDD enable/disable bit mask */
4780 #define CHANNEL_5G_UPPER_START 149 /* 5G upper (149..161) CDD enable/disable bit mask */
4783 SPATIAL_MODE_2G_IDX
= 0,
4784 SPATIAL_MODE_5G_LOW_IDX
,
4785 SPATIAL_MODE_5G_MID_IDX
,
4786 SPATIAL_MODE_5G_HIGH_IDX
,
4787 SPATIAL_MODE_5G_UPPER_IDX
,
4788 SPATIAL_MODE_MAX_IDX
4791 /* IOVAR "mempool" parameter. Used to retrieve a list of memory pool statistics. */
4792 typedef struct wl_mempool_stats
{
4793 int num
; /* Number of memory pools */
4794 bcm_mp_stats_t s
[1]; /* Variable array of memory pool stats. */
4795 } wl_mempool_stats_t
;
4797 /* Network Offload Engine */
4798 #define NWOE_OL_ENABLE 0x00000001
4802 uint32 ipaddr_netmask
;
4803 uint32 ipaddr_gateway
;
4807 * Traffic management structures/defines.
4810 /* Traffic management bandwidth parameters */
4811 #define TRF_MGMT_MAX_PRIORITIES 3
4813 #define TRF_MGMT_FLAG_ADD_DSCP 0x0001 /* Add DSCP to IP TOS field */
4814 #define TRF_MGMT_FLAG_DISABLE_SHAPING 0x0002 /* Only support traffic clasification */
4817 /* Traffic management priority classes */
4818 typedef enum trf_mgmt_priority_class
{
4819 trf_mgmt_priority_low
= 0, /* Maps to 802.1p BK */
4820 trf_mgmt_priority_medium
= 1, /* Maps to 802.1p BE */
4821 trf_mgmt_priority_high
= 2, /* Maps to 802.1p VI */
4822 trf_mgmt_priority_invalid
= (trf_mgmt_priority_high
+ 1)
4823 } trf_mgmt_priority_class_t
;
4825 /* Traffic management configuration parameters */
4826 typedef struct trf_mgmt_config
{
4827 uint32 trf_mgmt_enabled
; /* 0 - disabled, 1 - enabled */
4828 uint32 flags
; /* See TRF_MGMT_FLAG_xxx defines */
4829 uint32 host_ip_addr
;
4830 uint32 host_subnet_mask
;
4831 uint32 downlink_bandwidth
; /* In units of kbps */
4832 uint32 uplink_bandwidth
; /* In units of kbps */
4833 uint32 min_tx_bandwidth
[TRF_MGMT_MAX_PRIORITIES
];
4834 uint32 min_rx_bandwidth
[TRF_MGMT_MAX_PRIORITIES
];
4835 } trf_mgmt_config_t
;
4837 /* Traffic management filter */
4838 typedef struct trf_mgmt_filter
{
4839 uint32 dst_ip_addr
; /* His IP address */
4840 uint16 dst_port
; /* His L4 port */
4841 uint16 src_port
; /* My L4 port */
4842 uint16 prot
; /* L4 protocol (only TCP or UDP protocols) */
4843 uint16 flags
; /* TBD. For now, this must be zero. */
4844 trf_mgmt_priority_class_t priority
; /* 802.1p priority for filtered packets */
4845 } trf_mgmt_filter_t
;
4847 /* Traffic management filter list (variable length) */
4848 typedef struct trf_mgmt_filter_list
{
4850 trf_mgmt_filter_t filter
[1];
4851 } trf_mgmt_filter_list_t
;
4853 /* Traffic management shaping info */
4854 typedef struct trf_mgmt_shaping_info
{
4855 uint32 max_bps
; /* Max bytes consumed or produced per second */
4856 uint32 max_bytes_per_sampling_period
; /* Max bytes consumed or produced per sample */
4857 uint32 shaping_delay_threshold
; /* Theshold for starting traffic delays */
4858 uint32 num_bytes_produced_per_sec
; /* Bytes produced over the sampling period */
4859 uint32 num_bytes_consumed_per_sec
; /* Bytes consumed over the sampling period */
4860 } trf_mgmt_shaping_info_t
;
4862 /* Traffic management shaping info array */
4863 typedef struct trf_mgmt_shaping_info_array
{
4864 trf_mgmt_shaping_info_t tx_queue_shaping_info
[TRF_MGMT_MAX_PRIORITIES
];
4865 trf_mgmt_shaping_info_t rx_queue_shaping_info
[TRF_MGMT_MAX_PRIORITIES
];
4866 } trf_mgmt_shaping_info_array_t
;
4869 /* Traffic management statistical counters */
4870 typedef struct trf_mgmt_stats
{
4871 uint32 num_processed_packets
; /* Number of packets processed */
4872 uint32 num_processed_bytes
; /* Number of bytes processed */
4873 uint32 num_queued_packets
; /* Number of packets in queue */
4874 uint32 num_queued_bytes
; /* Number of bytes in queue */
4875 uint32 num_discarded_packets
; /* Number of packets discarded from queue */
4878 /* Traffic management statisics array */
4879 typedef struct trf_mgmt_stats_array
{
4880 trf_mgmt_stats_t tx_queue_stats
[TRF_MGMT_MAX_PRIORITIES
];
4881 trf_mgmt_stats_t rx_queue_stats
[TRF_MGMT_MAX_PRIORITIES
];
4882 } trf_mgmt_stats_array_t
;
4884 #endif /* _wlioctl_h_ */