K2.6 patches and update.
[tomato.git] / release / src-rt / include / wlioctl.h
bloba37b7deb95acf2093528e1a590ca39bcf5e871bc
1 /*
2 * Custom OID/ioctl definitions for
3 * Broadcom 802.11abg Networking Device Driver
5 * Definitions subject to change without notice.
7 * Copyright (C) 2010, Broadcom Corporation. All Rights Reserved.
8 *
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,v 1.782.2.56 2011-02-01 15:54:35 Exp $
24 #ifndef _wlioctl_h_
25 #define _wlioctl_h_
27 #include <typedefs.h>
28 #include <proto/ethernet.h>
29 #include <proto/bcmeth.h>
30 #include <proto/bcmevent.h>
31 #include <proto/802.11.h>
32 #include <bcmwifi.h>
33 #include <bcmcdc.h>
35 #ifdef __NetBSD__
36 /* NetBSD 2.0 does not have SIOCDEVPRIVATE. */
37 #define SIOCDEVPRIVATE _IOWR('i', 139, struct ifreq)
38 #endif
40 #ifndef INTF_NAME_SIZ
41 #define INTF_NAME_SIZ 16
42 #endif
44 /* Used to send ioctls over the transport pipe */
45 typedef struct remote_ioctl {
46 cdc_ioctl_t msg;
47 uint data_len;
48 char intf_name[INTF_NAME_SIZ];
49 } rem_ioctl_t;
50 #define REMOTE_SIZE sizeof(rem_ioctl_t)
51 #ifdef EFI
52 #define BCMWL_IOCTL_GUID \
53 {0xB4910A35, 0x88C5, 0x4328, 0x90, 0x08, 0x9F, 0xB2, 0x00, 0x00, 0x0, 0x0}
54 #endif /* EFI */
56 /* Driver seems to have some issue above this size.. set it to this for now */
57 #define ACTION_FRAME_SIZE 1800
59 typedef struct wl_action_frame {
60 struct ether_addr da;
61 uint16 len;
62 uint32 packetId;
63 uint8 data[ACTION_FRAME_SIZE];
64 } wl_action_frame_t;
66 #define WL_WIFI_ACTION_FRAME_SIZE sizeof(struct wl_action_frame)
68 typedef struct wl_af_params {
69 uint32 channel;
70 int32 dwell_time;
71 struct ether_addr BSSID;
72 wl_action_frame_t action_frame;
73 } wl_af_params_t;
75 #define WL_WIFI_AF_PARAMS_SIZE sizeof(struct wl_af_params)
77 #define MFP_TEST_FLAG_NORMAL 0
78 #define MFP_TEST_FLAG_ANY_KEY 1
79 typedef struct wl_sa_query {
80 uint32 flag;
81 uint8 action;
82 uint16 id;
83 struct ether_addr da;
84 } wl_sa_query_t;
86 /* require default structure packing */
87 #define BWL_DEFAULT_PACKING
88 #include <packed_section_start.h>
91 #ifndef LINUX_POSTMOGRIFY_REMOVAL
92 /* Legacy structure to help keep backward compatible wl tool and tray app */
94 #define LEGACY_WL_BSS_INFO_VERSION 107 /* older version of wl_bss_info struct */
96 typedef struct wl_bss_info_107 {
97 uint32 version; /* version field */
98 uint32 length; /* byte length of data in this record,
99 * starting at version and including IEs
101 struct ether_addr BSSID;
102 uint16 beacon_period; /* units are Kusec */
103 uint16 capability; /* Capability information */
104 uint8 SSID_len;
105 uint8 SSID[32];
106 struct {
107 uint count; /* # rates in this set */
108 uint8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */
109 } rateset; /* supported rates */
110 uint8 channel; /* Channel no. */
111 uint16 atim_window; /* units are Kusec */
112 uint8 dtim_period; /* DTIM period */
113 int16 RSSI; /* receive signal strength (in dBm) */
114 int8 phy_noise; /* noise (in dBm) */
115 uint32 ie_length; /* byte length of Information Elements */
116 /* variable length Information Elements */
117 } wl_bss_info_107_t;
118 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
121 * Per-BSS information structure.
124 #define LEGACY2_WL_BSS_INFO_VERSION 108 /* old version of wl_bss_info struct */
126 /* BSS info structure
127 * Applications MUST CHECK ie_offset field and length field to access IEs and
128 * next bss_info structure in a vector (in wl_scan_results_t)
130 typedef struct wl_bss_info_108 {
131 uint32 version; /* version field */
132 uint32 length; /* byte length of data in this record,
133 * starting at version and including IEs
135 struct ether_addr BSSID;
136 uint16 beacon_period; /* units are Kusec */
137 uint16 capability; /* Capability information */
138 uint8 SSID_len;
139 uint8 SSID[32];
140 struct {
141 uint count; /* # rates in this set */
142 uint8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */
143 } rateset; /* supported rates */
144 chanspec_t chanspec; /* chanspec for bss */
145 uint16 atim_window; /* units are Kusec */
146 uint8 dtim_period; /* DTIM period */
147 int16 RSSI; /* receive signal strength (in dBm) */
148 int8 phy_noise; /* noise (in dBm) */
150 uint8 n_cap; /* BSS is 802.11N Capable */
151 uint32 nbss_cap; /* 802.11N BSS Capabilities (based on HT_CAP_*) */
152 uint8 ctl_ch; /* 802.11N BSS control channel number */
153 uint32 reserved32[1]; /* Reserved for expansion of BSS properties */
154 uint8 flags; /* flags */
155 uint8 reserved[3]; /* Reserved for expansion of BSS properties */
156 uint8 basic_mcs[MCSSET_LEN]; /* 802.11N BSS required MCS set */
158 uint16 ie_offset; /* offset at which IEs start, from beginning */
159 uint32 ie_length; /* byte length of Information Elements */
160 /* Add new fields here */
161 /* variable length Information Elements */
162 } wl_bss_info_108_t;
164 #define WL_BSS_INFO_VERSION 109 /* current version of wl_bss_info struct */
166 /* BSS info structure
167 * Applications MUST CHECK ie_offset field and length field to access IEs and
168 * next bss_info structure in a vector (in wl_scan_results_t)
170 typedef struct wl_bss_info {
171 uint32 version; /* version field */
172 uint32 length; /* byte length of data in this record,
173 * starting at version and including IEs
175 struct ether_addr BSSID;
176 uint16 beacon_period; /* units are Kusec */
177 uint16 capability; /* Capability information */
178 uint8 SSID_len;
179 uint8 SSID[32];
180 struct {
181 uint count; /* # rates in this set */
182 uint8 rates[16]; /* rates in 500kbps units w/hi bit set if basic */
183 } rateset; /* supported rates */
184 chanspec_t chanspec; /* chanspec for bss */
185 uint16 atim_window; /* units are Kusec */
186 uint8 dtim_period; /* DTIM period */
187 int16 RSSI; /* receive signal strength (in dBm) */
188 int8 phy_noise; /* noise (in dBm) */
190 uint8 n_cap; /* BSS is 802.11N Capable */
191 uint32 nbss_cap; /* 802.11N BSS Capabilities (based on HT_CAP_*) */
192 uint8 ctl_ch; /* 802.11N BSS control channel number */
193 uint32 reserved32[1]; /* Reserved for expansion of BSS properties */
194 uint8 flags; /* flags */
195 uint8 reserved[3]; /* Reserved for expansion of BSS properties */
196 uint8 basic_mcs[MCSSET_LEN]; /* 802.11N BSS required MCS set */
198 uint16 ie_offset; /* offset at which IEs start, from beginning */
199 uint32 ie_length; /* byte length of Information Elements */
200 int16 SNR; /* average SNR of during frame reception */
201 /* Add new fields here */
202 /* variable length Information Elements */
203 } wl_bss_info_t;
205 typedef struct wl_bsscfg {
206 uint32 wsec;
207 uint32 WPA_auth;
208 uint32 wsec_index;
209 uint32 associated;
210 uint32 BSS;
211 uint32 phytest_on;
212 struct ether_addr prev_BSSID;
213 struct ether_addr BSSID;
214 } wl_bsscfg_t;
216 typedef struct wl_bss_config {
217 uint32 atim_window;
218 uint32 beacon_period;
219 uint32 chanspec;
220 } wl_bss_config_t;
222 #ifdef DONGLEOVERLAYS
223 typedef struct {
224 uint32 flags_idx; /* lower 8 bits: overlay index; upper 24 bits: flags */
225 uint32 offset; /* offset into overlay region to write code */
226 uint32 len; /* overlay code len */
227 /* overlay code follows this struct */
228 } wl_ioctl_overlay_t;
230 #define OVERLAY_IDX_MASK 0x000000ff
231 #define OVERLAY_IDX_SHIFT 0
232 #define OVERLAY_FLAGS_MASK 0xffffff00
233 #define OVERLAY_FLAGS_SHIFT 8
235 #define OVERLAY_DOWNLOAD_CHUNKSIZE 1024
236 #endif /* DONGLEOVERLAYS */
238 typedef struct wlc_ssid {
239 uint32 SSID_len;
240 uchar SSID[32];
241 } wlc_ssid_t;
243 #ifndef LINUX_POSTMOGRIFY_REMOVAL
244 typedef struct chan_scandata {
245 uint8 txpower;
246 uint8 pad;
247 chanspec_t channel; /* Channel num, bw, ctrl_sb and band */
248 uint32 channel_mintime;
249 uint32 channel_maxtime;
250 } chan_scandata_t;
252 typedef enum wl_scan_type {
253 EXTDSCAN_FOREGROUND_SCAN,
254 EXTDSCAN_BACKGROUND_SCAN,
255 EXTDSCAN_FORCEDBACKGROUND_SCAN
256 } wl_scan_type_t;
258 #define WLC_EXTDSCAN_MAX_SSID 5
260 #define WL_BSS_FLAGS_FROM_BEACON 0x01 /* bss_info derived from beacon */
261 #define WL_BSS_FLAGS_FROM_CACHE 0x02 /* bss_info collected from cache */
262 #define WL_BSS_FLAGS_RSSI_ONCHANNEL 0x04 /* rssi info was received on channel (vs offchannel) */
264 typedef struct wl_extdscan_params {
265 int8 nprobes; /* 0, passive, otherwise active */
266 int8 split_scan; /* split scan */
267 int8 band; /* band */
268 int8 pad;
269 wlc_ssid_t ssid[WLC_EXTDSCAN_MAX_SSID]; /* ssid list */
270 uint32 tx_rate; /* in 500ksec units */
271 wl_scan_type_t scan_type; /* enum */
272 int32 channel_num;
273 chan_scandata_t channel_list[1]; /* list of chandata structs */
274 } wl_extdscan_params_t;
276 #define WL_EXTDSCAN_PARAMS_FIXED_SIZE (sizeof(wl_extdscan_params_t) - sizeof(chan_scandata_t))
277 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
279 #define WL_BSSTYPE_INFRA 1
280 #define WL_BSSTYPE_INDEP 0
281 #define WL_BSSTYPE_ANY 2
283 #ifndef LINUX_POSTMOGRIFY_REMOVAL
285 /* Bitmask for scan_type */
286 #define WL_SCANFLAGS_PASSIVE 0x01 /* force passive scan */
287 #define WL_SCANFLAGS_RESERVED 0x02 /* Reserved */
288 #define WL_SCANFLAGS_PROHIBITED 0x04 /* allow scanning prohibited channels */
290 typedef struct wl_scan_params {
291 wlc_ssid_t ssid; /* default: {0, ""} */
292 struct ether_addr bssid; /* default: bcast */
293 int8 bss_type; /* default: any,
294 * DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT
296 uint8 scan_type; /* flags, 0 use default */
297 int32 nprobes; /* -1 use default, number of probes per channel */
298 int32 active_time; /* -1 use default, dwell time per channel for
299 * active scanning
301 int32 passive_time; /* -1 use default, dwell time per channel
302 * for passive scanning
304 int32 home_time; /* -1 use default, dwell time for the home channel
305 * between channel scans
307 int32 channel_num; /* count of channels and ssids that follow
309 * low half is count of channels in channel_list, 0
310 * means default (use all available channels)
312 * high half is entries in wlc_ssid_t array that
313 * follows channel_list, aligned for int32 (4 bytes)
314 * meaning an odd channel count implies a 2-byte pad
315 * between end of channel_list and first ssid
317 * if ssid count is zero, single ssid in the fixed
318 * parameter portion is assumed, otherwise ssid in
319 * the fixed portion is ignored
321 uint16 channel_list[1]; /* list of chanspecs */
322 } wl_scan_params_t;
324 /* size of wl_scan_params not including variable length array */
325 #define WL_SCAN_PARAMS_FIXED_SIZE 64
327 /* masks for channel and ssid count */
328 #define WL_SCAN_PARAMS_COUNT_MASK 0x0000ffff
329 #define WL_SCAN_PARAMS_NSSID_SHIFT 16
331 #define WL_SCAN_ACTION_START 1
332 #define WL_SCAN_ACTION_CONTINUE 2
333 #define WL_SCAN_ACTION_ABORT 3
335 #define ISCAN_REQ_VERSION 1
337 /* incremental scan struct */
338 typedef struct wl_iscan_params {
339 uint32 version;
340 uint16 action;
341 uint16 scan_duration;
342 wl_scan_params_t params;
343 } wl_iscan_params_t;
345 /* 3 fields + size of wl_scan_params, not including variable length array */
346 #define WL_ISCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_iscan_params_t, params) + sizeof(wlc_ssid_t))
347 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
349 typedef struct wl_scan_results {
350 uint32 buflen;
351 uint32 version;
352 uint32 count;
353 wl_bss_info_t bss_info[1];
354 } wl_scan_results_t;
356 /* size of wl_scan_results not including variable length array */
357 #define WL_SCAN_RESULTS_FIXED_SIZE (sizeof(wl_scan_results_t) - sizeof(wl_bss_info_t))
359 /* wl_iscan_results status values */
360 #define WL_SCAN_RESULTS_SUCCESS 0
361 #define WL_SCAN_RESULTS_PARTIAL 1
362 #define WL_SCAN_RESULTS_PENDING 2
363 #define WL_SCAN_RESULTS_ABORTED 3
365 #ifndef LINUX_POSTMOGRIFY_REMOVAL
366 #define ESCAN_REQ_VERSION 1
368 typedef struct wl_escan_params {
369 uint32 version;
370 uint16 action;
371 uint16 sync_id;
372 wl_scan_params_t params;
373 } wl_escan_params_t;
375 #define WL_ESCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_escan_params_t, params) + sizeof(wlc_ssid_t))
377 typedef struct wl_escan_result {
378 uint32 buflen;
379 uint32 version;
380 uint16 sync_id;
381 uint16 bss_count;
382 wl_bss_info_t bss_info[1];
383 } wl_escan_result_t;
385 #define WL_ESCAN_RESULTS_FIXED_SIZE (sizeof(wl_escan_result_t) - sizeof(wl_bss_info_t))
387 /* incremental scan results struct */
388 typedef struct wl_iscan_results {
389 uint32 status;
390 wl_scan_results_t results;
391 } wl_iscan_results_t;
393 /* size of wl_iscan_results not including variable length array */
394 #define WL_ISCAN_RESULTS_FIXED_SIZE \
395 (WL_SCAN_RESULTS_FIXED_SIZE + OFFSETOF(wl_iscan_results_t, results))
396 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
398 typedef struct wl_probe_params {
399 wlc_ssid_t ssid;
400 struct ether_addr bssid;
401 struct ether_addr mac;
402 } wl_probe_params_t;
404 #define WL_NUMRATES 16 /* max # of rates in a rateset */
405 typedef struct wl_rateset {
406 uint32 count; /* # rates in this set */
407 uint8 rates[WL_NUMRATES]; /* rates in 500kbps units w/hi bit set if basic */
408 } wl_rateset_t;
410 typedef struct wl_rateset_args {
411 uint32 count; /* # rates in this set */
412 uint8 rates[WL_NUMRATES]; /* rates in 500kbps units w/hi bit set if basic */
413 uint8 mcs[MCSSET_LEN]; /* supported mcs index bit map */
414 } wl_rateset_args_t;
416 /* uint32 list */
417 typedef struct wl_uint32_list {
418 /* in - # of elements, out - # of entries */
419 uint32 count;
420 /* variable length uint32 list */
421 uint32 element[1];
422 } wl_uint32_list_t;
424 #ifndef LINUX_POSTMOGRIFY_REMOVAL
425 /* used for association with a specific BSSID and chanspec list */
426 typedef struct wl_assoc_params {
427 struct ether_addr bssid; /* 00:00:00:00:00:00: broadcast scan */
428 int32 chanspec_num; /* 0: all available channels,
429 * otherwise count of chanspecs in chanspec_list
431 chanspec_t chanspec_list[1]; /* list of chanspecs */
432 } wl_assoc_params_t;
433 #define WL_ASSOC_PARAMS_FIXED_SIZE OFFSETOF(wl_assoc_params_t, chanspec_list)
435 /* used for reassociation/roam to a specific BSSID and channel */
436 typedef wl_assoc_params_t wl_reassoc_params_t;
437 #define WL_REASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE
439 /* used for association to a specific BSSID and channel */
440 typedef wl_assoc_params_t wl_join_assoc_params_t;
441 #define WL_JOIN_ASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE
443 /* used for join with or without a specific bssid and channel list */
444 typedef struct wl_join_params {
445 wlc_ssid_t ssid;
446 wl_assoc_params_t params; /* optional field, but it must include the fixed portion
447 * of the wl_assoc_params_t struct when it does present.
449 } wl_join_params_t;
450 #define WL_JOIN_PARAMS_FIXED_SIZE (OFFSETOF(wl_join_params_t, params) + \
451 WL_ASSOC_PARAMS_FIXED_SIZE)
452 /* scan params for extended join */
453 typedef struct wl_join_scan_params {
454 uint8 scan_type; /* 0 use default, active or passive scan */
455 int32 nprobes; /* -1 use default, number of probes per channel */
456 int32 active_time; /* -1 use default, dwell time per channel for
457 * active scanning
459 int32 passive_time; /* -1 use default, dwell time per channel
460 * for passive scanning
462 int32 home_time; /* -1 use default, dwell time for the home channel
463 * between channel scans
465 } wl_join_scan_params_t;
467 /* extended join params */
468 typedef struct wl_extjoin_params {
469 wlc_ssid_t ssid; /* {0, ""}: wildcard scan */
470 wl_join_scan_params_t scan;
471 wl_join_assoc_params_t assoc; /* optional field, but it must include the fixed portion
472 * of the wl_join_assoc_params_t struct when it does
473 * present.
475 } wl_extjoin_params_t;
476 #define WL_EXTJOIN_PARAMS_FIXED_SIZE (OFFSETOF(wl_extjoin_params_t, assoc) + \
477 WL_JOIN_ASSOC_PARAMS_FIXED_SIZE)
479 /* defines used by the nrate iovar */
480 #define NRATE_MCS_INUSE 0x00000080 /* MSC in use,indicates b0-6 holds an mcs */
481 #define NRATE_RATE_MASK 0x0000007f /* rate/mcs value */
482 #define NRATE_STF_MASK 0x0000ff00 /* stf mode mask: siso, cdd, stbc, sdm */
483 #define NRATE_STF_SHIFT 8 /* stf mode shift */
484 #define NRATE_OVERRIDE 0x80000000 /* bit indicates override both rate & mode */
485 #define NRATE_OVERRIDE_MCS_ONLY 0x40000000 /* bit indicate to override mcs only */
486 #define NRATE_SGI_MASK 0x00800000 /* sgi mode */
487 #define NRATE_SGI_SHIFT 23 /* sgi mode */
488 #define NRATE_LDPC_CODING 0x00400000 /* bit indicates adv coding in use */
489 #define NRATE_LDPC_SHIFT 22 /* ldpc shift */
491 #define NRATE_STF_SISO 0 /* stf mode SISO */
492 #define NRATE_STF_CDD 1 /* stf mode CDD */
493 #define NRATE_STF_STBC 2 /* stf mode STBC */
494 #define NRATE_STF_SDM 3 /* stf mode SDM */
496 #define ANTENNA_NUM_1 1 /* total number of antennas to be used */
497 #define ANTENNA_NUM_2 2
498 #define ANTENNA_NUM_3 3
499 #define ANTENNA_NUM_4 4
501 #define ANT_SELCFG_AUTO 0x80 /* bit indicates antenna sel AUTO */
502 #define ANT_SELCFG_MASK 0x33 /* antenna configuration mask */
503 #define ANT_SELCFG_MAX 4 /* max number of antenna configurations */
504 #define ANT_SELCFG_TX_UNICAST 0 /* unicast tx antenna configuration */
505 #define ANT_SELCFG_RX_UNICAST 1 /* unicast rx antenna configuration */
506 #define ANT_SELCFG_TX_DEF 2 /* default tx antenna configuration */
507 #define ANT_SELCFG_RX_DEF 3 /* default rx antenna configuration */
509 #define MAX_STREAMS_SUPPORTED 4 /* max number of streams supported */
511 typedef struct {
512 uint8 ant_config[ANT_SELCFG_MAX]; /* antenna configuration */
513 uint8 num_antcfg; /* number of available antenna configurations */
514 } wlc_antselcfg_t;
516 #define HIGHEST_SINGLE_STREAM_MCS 7 /* MCS values greater than this enable multiple streams */
518 #define MAX_CCA_CHANNELS 38 /* Max number of 20 Mhz wide channels */
519 #define MAX_CCA_SECS 60 /* CCA keeps this many seconds history */
521 #define IBSS_MED 15 /* Mediom in-bss congestion percentage */
522 #define IBSS_HI 25 /* Hi in-bss congestion percentage */
523 #define OBSS_MED 12
524 #define OBSS_HI 25
525 #define INTERFER_MED 5
526 #define INTERFER_HI 10
528 #define CCA_FLAG_2G_ONLY 0x01 /* Return a channel from 2.4 Ghz band */
529 #define CCA_FLAG_5G_ONLY 0x02 /* Return a channel from 2.4 Ghz band */
530 #define CCA_FLAG_IGNORE_DURATION 0x04 /* Ignore dwell time for each channel */
531 #define CCA_FLAGS_PREFER_1_6_11 0x10
532 #define CCA_FLAG_IGNORE_INTERFER 0x20 /* do not exlude channel based on interfer level */
534 #define CCA_ERRNO_BAND 1 /* After filtering for band pref, no choices left */
535 #define CCA_ERRNO_DURATION 2 /* After filtering for duration, no choices left */
536 #define CCA_ERRNO_PREF_CHAN 3 /* After filtering for chan pref, no choices left */
537 #define CCA_ERRNO_INTERFER 4 /* After filtering for interference, no choices left */
538 #define CCA_ERRNO_TOO_FEW 5 /* Only 1 channel was input */
540 typedef struct {
541 uint32 duration; /* millisecs spent sampling this channel */
542 uint32 congest_ibss; /* millisecs in our bss (presumably this traffic will */
543 /* move if cur bss moves channels) */
544 uint32 congest_obss; /* traffic not in our bss */
545 uint32 interference; /* millisecs detecting a non 802.11 interferer. */
546 uint32 timestamp; /* second timestamp */
547 } cca_congest_t;
549 typedef struct {
550 chanspec_t chanspec; /* Which channel? */
551 uint8 num_secs; /* How many secs worth of data */
552 cca_congest_t secs[1]; /* Data */
553 } cca_congest_channel_req_t;
555 /* interference source detection and identification mode */
556 #define ITFR_MODE_DISABLE 0 /* disable feature */
557 #define ITFR_MODE_MANUAL_ENABLE 1 /* enable manual detection */
558 #define ITFR_MODE_AUTO_ENABLE 2 /* enable auto detection */
560 /* interference sources */
561 enum interference_source {
562 ITFR_NONE = 0, /* interference */
563 ITFR_PHONE, /* wireless phone */
564 ITFR_VIDEO_CAMERA, /* wireless video camera */
565 ITFR_MICROWAVE_OVEN, /* microwave oven */
566 ITFR_BABY_MONITOR, /* wireless baby monitor */
567 ITFR_BLUETOOTH, /* bluetooth */
568 ITFR_VIDEO_CAMERA_OR_BABY_MONITOR, /* wireless camera or baby monitor */
569 ITFR_BLUETOOTH_OR_BABY_MONITOR, /* bluetooth or baby monitor */
570 ITFR_VIDEO_CAMERA_OR_PHONE, /* video camera or phone */
571 ITFR_UNIDENTIFIED /* interference from unidentified source */
574 /* structure for interference source report */
575 typedef struct {
576 uint32 flags; /* flags. bit definitions below */
577 uint32 source; /* last detected interference source */
578 uint32 timestamp; /* second timestamp on interferenced flag change */
579 } interference_source_rep_t;
581 /* bit definitions for flags in interference source report */
582 #define ITFR_INTERFERENCED 1 /* interference detected */
583 #define ITFR_HOME_CHANNEL 2 /* home channel has interference */
584 #define ITFR_NOISY_ENVIRONMENT 4 /* noisy environemnt so feature stopped */
586 #define WLC_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NUL */
588 typedef struct wl_country {
589 char country_abbrev[WLC_CNTRY_BUF_SZ]; /* nul-terminated country code used in
590 * the Country IE
592 int32 rev; /* revision specifier for ccode
593 * on set, -1 indicates unspecified.
594 * on get, rev >= 0
596 char ccode[WLC_CNTRY_BUF_SZ]; /* nul-terminated built-in country code.
597 * variable length, but fixed size in
598 * struct allows simple allocation for
599 * expected country strings <= 3 chars.
601 } wl_country_t;
603 typedef struct wl_channels_in_country {
604 uint32 buflen;
605 uint32 band;
606 char country_abbrev[WLC_CNTRY_BUF_SZ];
607 uint32 count;
608 uint32 channel[1];
609 } wl_channels_in_country_t;
611 typedef struct wl_country_list {
612 uint32 buflen;
613 uint32 band_set;
614 uint32 band;
615 uint32 count;
616 char country_abbrev[1];
617 } wl_country_list_t;
619 #define WL_NUM_RPI_BINS 8
620 #define WL_RM_TYPE_BASIC 1
621 #define WL_RM_TYPE_CCA 2
622 #define WL_RM_TYPE_RPI 3
624 #define WL_RM_FLAG_PARALLEL (1<<0)
626 #define WL_RM_FLAG_LATE (1<<1)
627 #define WL_RM_FLAG_INCAPABLE (1<<2)
628 #define WL_RM_FLAG_REFUSED (1<<3)
630 typedef struct wl_rm_req_elt {
631 int8 type;
632 int8 flags;
633 chanspec_t chanspec;
634 uint32 token; /* token for this measurement */
635 uint32 tsf_h; /* TSF high 32-bits of Measurement start time */
636 uint32 tsf_l; /* TSF low 32-bits */
637 uint32 dur; /* TUs */
638 } wl_rm_req_elt_t;
640 typedef struct wl_rm_req {
641 uint32 token; /* overall measurement set token */
642 uint32 count; /* number of measurement requests */
643 void *cb; /* completion callback function: may be NULL */
644 void *cb_arg; /* arg to completion callback function */
645 wl_rm_req_elt_t req[1]; /* variable length block of requests */
646 } wl_rm_req_t;
647 #define WL_RM_REQ_FIXED_LEN OFFSETOF(wl_rm_req_t, req)
649 typedef struct wl_rm_rep_elt {
650 int8 type;
651 int8 flags;
652 chanspec_t chanspec;
653 uint32 token; /* token for this measurement */
654 uint32 tsf_h; /* TSF high 32-bits of Measurement start time */
655 uint32 tsf_l; /* TSF low 32-bits */
656 uint32 dur; /* TUs */
657 uint32 len; /* byte length of data block */
658 uint8 data[1]; /* variable length data block */
659 } wl_rm_rep_elt_t;
660 #define WL_RM_REP_ELT_FIXED_LEN 24 /* length excluding data block */
662 #define WL_RPI_REP_BIN_NUM 8
663 typedef struct wl_rm_rpi_rep {
664 uint8 rpi[WL_RPI_REP_BIN_NUM];
665 int8 rpi_max[WL_RPI_REP_BIN_NUM];
666 } wl_rm_rpi_rep_t;
668 typedef struct wl_rm_rep {
669 uint32 token; /* overall measurement set token */
670 uint32 len; /* length of measurement report block */
671 wl_rm_rep_elt_t rep[1]; /* variable length block of reports */
672 } wl_rm_rep_t;
673 #define WL_RM_REP_FIXED_LEN 8
674 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
677 #if defined(BCMSUP_PSK)
678 typedef enum sup_auth_status {
679 /* Basic supplicant authentication states */
680 WLC_SUP_DISCONNECTED = 0,
681 WLC_SUP_CONNECTING,
682 WLC_SUP_IDREQUIRED,
683 WLC_SUP_AUTHENTICATING,
684 WLC_SUP_AUTHENTICATED,
685 WLC_SUP_KEYXCHANGE,
686 WLC_SUP_KEYED,
687 WLC_SUP_TIMEOUT,
688 WLC_SUP_LAST_BASIC_STATE,
690 /* Extended supplicant authentication states */
691 WLC_SUP_KEYXCHANGE_WAIT_M1 = WLC_SUP_AUTHENTICATED,
692 /* Waiting to receive handshake msg M1 */
693 WLC_SUP_KEYXCHANGE_PREP_M2 = WLC_SUP_KEYXCHANGE,
694 /* Preparing to send handshake msg M2 */
695 WLC_SUP_KEYXCHANGE_WAIT_M3 = WLC_SUP_LAST_BASIC_STATE,
696 /* Waiting to receive handshake msg M3 */
697 WLC_SUP_KEYXCHANGE_PREP_M4, /* Preparing to send handshake msg M4 */
698 WLC_SUP_KEYXCHANGE_WAIT_G1, /* Waiting to receive handshake msg G1 */
699 WLC_SUP_KEYXCHANGE_PREP_G2 /* Preparing to send handshake msg G2 */
700 } sup_auth_status_t;
701 #endif
703 /* Enumerate crypto algorithms */
704 #define CRYPTO_ALGO_OFF 0
705 #define CRYPTO_ALGO_WEP1 1
706 #define CRYPTO_ALGO_TKIP 2
707 #define CRYPTO_ALGO_WEP128 3
708 #define CRYPTO_ALGO_AES_CCM 4
709 #define CRYPTO_ALGO_AES_OCB_MSDU 5
710 #define CRYPTO_ALGO_AES_OCB_MPDU 6
711 #if !defined(BCMEXTCCX)
712 #define CRYPTO_ALGO_NALG 7
713 #else
714 #define CRYPTO_ALGO_CKIP 7
715 #define CRYPTO_ALGO_CKIP_MMH 8
716 #define CRYPTO_ALGO_WEP_MMH 9
717 #define CRYPTO_ALGO_NALG 10
718 #endif
719 #ifdef BCMWAPI_WPI
720 #define CRYPTO_ALGO_SMS4 11
721 #endif /* BCMWAPI_WPI */
722 #define CRYPTO_ALGO_PMK 12 /* for 802.1x supp to set PMK before 4-way */
724 #define WSEC_GEN_MIC_ERROR 0x0001
725 #define WSEC_GEN_REPLAY 0x0002
726 #define WSEC_GEN_ICV_ERROR 0x0004
727 #define WSEC_GEN_MFP_ACT_ERROR 0x0008
728 #define WSEC_GEN_MFP_DISASSOC_ERROR 0x0010
729 #define WSEC_GEN_MFP_DEAUTH_ERROR 0x0020
731 #define WL_SOFT_KEY (1 << 0) /* Indicates this key is using soft encrypt */
732 #define WL_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */
733 #if defined(BCMEXTCCX)
734 #define WL_CKIP_KP (1 << 4) /* CMIC */
735 #define WL_CKIP_MMH (1 << 5) /* CKIP */
736 #else
737 #define WL_KF_RES_4 (1 << 4) /* Reserved for backward compat */
738 #define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */
739 #endif
740 #define WL_IBSS_PEER_GROUP_KEY (1 << 6) /* Indicates a group key for a IBSS PEER */
742 typedef struct wl_wsec_key {
743 uint32 index; /* key index */
744 uint32 len; /* key length */
745 uint8 data[DOT11_MAX_KEY_SIZE]; /* key data */
746 uint32 pad_1[18];
747 uint32 algo; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
748 uint32 flags; /* misc flags */
749 uint32 pad_2[2];
750 int pad_3;
751 int iv_initialized; /* has IV been initialized already? */
752 int pad_4;
753 /* Rx IV */
754 struct {
755 uint32 hi; /* upper 32 bits of IV */
756 uint16 lo; /* lower 16 bits of IV */
757 } rxiv;
758 uint32 pad_5[2];
759 struct ether_addr ea; /* per station */
760 } wl_wsec_key_t;
762 #define WSEC_MIN_PSK_LEN 8
763 #define WSEC_MAX_PSK_LEN 64
765 /* Flag for key material needing passhash'ing */
766 #define WSEC_PASSPHRASE (1<<0)
768 /* receptacle for WLC_SET_WSEC_PMK parameter */
769 typedef struct {
770 ushort key_len; /* octets in key material */
771 ushort flags; /* key handling qualification */
772 uint8 key[WSEC_MAX_PSK_LEN]; /* PMK material */
773 } wsec_pmk_t;
775 /* wireless security bitvec */
776 #define WEP_ENABLED 0x0001
777 #define TKIP_ENABLED 0x0002
778 #define AES_ENABLED 0x0004
779 #define WSEC_SWFLAG 0x0008
780 #define SES_OW_ENABLED 0x0040 /* to go into transition mode without setting wep */
781 #ifdef BCMWAPI_WPI
782 #define SMS4_ENABLED 0x0100
783 #endif /* BCMWAPI_WPI */
784 #ifdef MFP
785 #define MFP_CAPABLE 0x0200
786 #define MFP_REQUIRED 0x0400
787 #define MFP_SHA256 0x0800 /* a special configuration for STA for WIFI test tool */
788 #endif /* MFP */
790 /* WPA authentication mode bitvec */
791 #define WPA_AUTH_DISABLED 0x0000 /* Legacy (i.e., non-WPA) */
792 #define WPA_AUTH_NONE 0x0001 /* none (IBSS) */
793 #define WPA_AUTH_UNSPECIFIED 0x0002 /* over 802.1x */
794 #define WPA_AUTH_PSK 0x0004 /* Pre-shared key */
795 #if defined(BCMEXTCCX)
796 #define WPA_AUTH_CCKM 0x0008 /* CCKM */
797 #define WPA2_AUTH_CCKM 0x0010 /* CCKM2 */
798 #endif
799 /* #define WPA_AUTH_8021X 0x0020 */ /* 802.1x, reserved */
800 #define WPA2_AUTH_UNSPECIFIED 0x0040 /* over 802.1x */
801 #define WPA2_AUTH_PSK 0x0080 /* Pre-shared key */
802 #ifndef LINUX_POSTMOGRIFY_REMOVAL
803 #define BRCM_AUTH_PSK 0x0100 /* BRCM specific PSK */
804 #define BRCM_AUTH_DPT 0x0200 /* DPT PSK without group keys */
805 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
806 #define WPA2_AUTH_MFP 0x1000 /* MFP (11w) in contrast to CCX */
808 #define WPA_AUTH_PFN_ANY 0xffffffff /* for PFN, match only ssid */
810 /* pmkid */
811 #define MAXPMKID 16
813 typedef struct _pmkid {
814 struct ether_addr BSSID;
815 uint8 PMKID[WPA2_PMKID_LEN];
816 } pmkid_t;
818 typedef struct _pmkid_list {
819 uint32 npmkid;
820 pmkid_t pmkid[1];
821 } pmkid_list_t;
823 typedef struct _pmkid_cand {
824 struct ether_addr BSSID;
825 uint8 preauth;
826 } pmkid_cand_t;
828 typedef struct _pmkid_cand_list {
829 uint32 npmkid_cand;
830 pmkid_cand_t pmkid_cand[1];
831 } pmkid_cand_list_t;
833 #ifndef LINUX_POSTMOGRIFY_REMOVAL
834 typedef struct wl_led_info {
835 uint32 index; /* led index */
836 uint32 behavior;
837 uint8 activehi;
838 } wl_led_info_t;
840 typedef struct wl_assoc_info {
841 uint32 req_len;
842 uint32 resp_len;
843 uint32 flags;
844 struct dot11_assoc_req req;
845 struct ether_addr reassoc_bssid; /* used in reassoc's */
846 struct dot11_assoc_resp resp;
847 } wl_assoc_info_t;
849 /* flags */
850 #define WLC_ASSOC_REQ_IS_REASSOC 0x01 /* assoc req was actually a reassoc */
852 /* srom read/write struct passed through ioctl */
853 typedef struct {
854 uint byteoff; /* byte offset */
855 uint nbytes; /* number of bytes */
856 uint16 buf[1];
857 } srom_rw_t;
859 /* similar cis (srom or otp) struct [iovar: may not be aligned] */
860 typedef struct {
861 uint32 source; /* cis source */
862 uint32 byteoff; /* byte offset */
863 uint32 nbytes; /* number of bytes */
864 /* data follows here */
865 } cis_rw_t;
867 #define WLC_CIS_DEFAULT 0 /* built-in default */
868 #define WLC_CIS_SROM 1 /* source is sprom */
869 #define WLC_CIS_OTP 2 /* source is otp */
871 /* R_REG and W_REG struct passed through ioctl */
872 typedef struct {
873 uint32 byteoff; /* byte offset of the field in d11regs_t */
874 uint32 val; /* read/write value of the field */
875 uint32 size; /* sizeof the field */
876 uint band; /* band (optional) */
877 } rw_reg_t;
879 /* Structure used by GET/SET_ATTEN ioctls - it controls power in b/g-band */
880 /* PCL - Power Control Loop */
881 /* current gain setting is replaced by user input */
882 #define WL_ATTEN_APP_INPUT_PCL_OFF 0 /* turn off PCL, apply supplied input */
883 #define WL_ATTEN_PCL_ON 1 /* turn on PCL */
884 /* current gain setting is maintained */
885 #define WL_ATTEN_PCL_OFF 2 /* turn off PCL. */
887 typedef struct {
888 uint16 auto_ctrl; /* WL_ATTEN_XX */
889 uint16 bb; /* Baseband attenuation */
890 uint16 radio; /* Radio attenuation */
891 uint16 txctl1; /* Radio TX_CTL1 value */
892 } atten_t;
894 /* Per-AC retry parameters */
895 struct wme_tx_params_s {
896 uint8 short_retry;
897 uint8 short_fallback;
898 uint8 long_retry;
899 uint8 long_fallback;
900 uint16 max_rate; /* In units of 512 Kbps */
903 typedef struct wme_tx_params_s wme_tx_params_t;
905 #define WL_WME_TX_PARAMS_IO_BYTES (sizeof(wme_tx_params_t) * AC_COUNT)
907 /* defines used by poweridx iovar - it controls power in a-band */
908 /* current gain setting is maintained */
909 #define WL_PWRIDX_PCL_OFF -2 /* turn off PCL. */
910 #define WL_PWRIDX_PCL_ON -1 /* turn on PCL */
911 #define WL_PWRIDX_LOWER_LIMIT -2 /* lower limit */
912 #define WL_PWRIDX_UPPER_LIMIT 63 /* upper limit */
913 /* value >= 0 causes
914 * - input to be set to that value
915 * - PCL to be off
918 /* Used to get specific link/ac parameters */
919 typedef struct {
920 int ac;
921 uint8 val;
922 struct ether_addr ea;
923 } link_val_t;
925 #define BCM_MAC_STATUS_INDICATION (0x40010200L)
927 typedef struct {
928 uint16 ver; /* version of this struct */
929 uint16 len; /* length in bytes of this structure */
930 uint16 cap; /* sta's advertised capabilities */
931 uint32 flags; /* flags defined below */
932 uint32 idle; /* time since data pkt rx'd from sta */
933 struct ether_addr ea; /* Station address */
934 wl_rateset_t rateset; /* rateset in use */
935 uint32 in; /* seconds elapsed since associated */
936 uint32 listen_interval_inms; /* Min Listen interval in ms for this STA */
937 uint32 tx_pkts; /* # of packets transmitted */
938 uint32 tx_failures; /* # of packets failed */
939 uint32 rx_ucast_pkts; /* # of unicast packets received */
940 uint32 rx_mcast_pkts; /* # of multicast packets received */
941 uint32 tx_rate; /* Rate of last successful tx frame */
942 uint32 rx_rate; /* Rate of last successful rx frame */
943 uint32 rx_decrypt_succeeds; /* # of packet decrypted successfully */
944 uint32 rx_decrypt_failures; /* # of packet decrypted unsuccessfully */
945 } sta_info_t;
947 #define WL_OLD_STAINFO_SIZE OFFSETOF(sta_info_t, tx_pkts)
949 #define WL_STA_VER 3
951 /* Flags for sta_info_t indicating properties of STA */
952 #define WL_STA_BRCM 0x1 /* Running a Broadcom driver */
953 #define WL_STA_WME 0x2 /* WMM association */
954 #define WL_STA_ABCAP 0x4
955 #define WL_STA_AUTHE 0x8 /* Authenticated */
956 #define WL_STA_ASSOC 0x10 /* Associated */
957 #define WL_STA_AUTHO 0x20 /* Authorized */
958 #define WL_STA_WDS 0x40 /* Wireless Distribution System */
959 #define WL_STA_WDS_LINKUP 0x80 /* WDS traffic/probes flowing properly */
960 #define WL_STA_PS 0x100 /* STA is in power save mode from AP's viewpoint */
961 #define WL_STA_APSD_BE 0x200 /* APSD delv/trigger for AC_BE is default enabled */
962 #define WL_STA_APSD_BK 0x400 /* APSD delv/trigger for AC_BK is default enabled */
963 #define WL_STA_APSD_VI 0x800 /* APSD delv/trigger for AC_VI is default enabled */
964 #define WL_STA_APSD_VO 0x1000 /* APSD delv/trigger for AC_VO is default enabled */
965 #define WL_STA_N_CAP 0x2000 /* STA 802.11n capable */
966 #define WL_STA_SCBSTATS 0x4000 /* Per STA debug stats */
968 #define WL_WDS_LINKUP WL_STA_WDS_LINKUP /* deprecated */
969 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
971 /* Used to get specific STA parameters */
972 typedef struct {
973 uint32 val;
974 struct ether_addr ea;
975 } scb_val_t;
977 /* Used by iovar versions of some ioctls, i.e. WLC_SCB_AUTHORIZE et al */
978 typedef struct {
979 uint32 code;
980 scb_val_t ioctl_args;
981 } authops_t;
983 /* channel encoding */
984 typedef struct channel_info {
985 int hw_channel;
986 int target_channel;
987 int scan_channel;
988 } channel_info_t;
990 /* For ioctls that take a list of MAC addresses */
991 struct maclist {
992 uint count; /* number of MAC addresses */
993 struct ether_addr ea[1]; /* variable length array of MAC addresses */
996 /* get pkt count struct passed through ioctl */
997 typedef struct get_pktcnt {
998 uint rx_good_pkt;
999 uint rx_bad_pkt;
1000 uint tx_good_pkt;
1001 uint tx_bad_pkt;
1002 uint rx_ocast_good_pkt; /* unicast packets destined for others */
1003 } get_pktcnt_t;
1005 /* NINTENDO2 */
1006 #define LQ_IDX_MIN 0
1007 #define LQ_IDX_MAX 1
1008 #define LQ_IDX_AVG 2
1009 #define LQ_IDX_SUM 2
1010 #define LQ_IDX_LAST 3
1011 #define LQ_STOP_MONITOR 0
1012 #define LQ_START_MONITOR 1
1014 /* Get averages RSSI, Rx PHY rate and SNR values */
1015 typedef struct {
1016 int rssi[LQ_IDX_LAST]; /* Array to keep min, max, avg rssi */
1017 int snr[LQ_IDX_LAST]; /* Array to keep min, max, avg snr */
1018 int isvalid; /* Flag indicating whether above data is valid */
1019 } wl_lq_t; /* Link Quality */
1021 /* Values for TX Filter override mode */
1022 #define WLC_TXFILTER_OVERRIDE_DISABLED 0
1023 #define WLC_TXFILTER_OVERRIDE_ENABLED 1
1024 /* Linux network driver ioctl encoding */
1025 typedef struct wl_ioctl {
1026 uint cmd; /* common ioctl definition */
1027 void *buf; /* pointer to user buffer */
1028 uint len; /* length of user buffer */
1029 uint8 set; /* get or set request (optional) */
1030 uint used; /* bytes read or written (optional) */
1031 uint needed; /* bytes needed (optional) */
1032 } wl_ioctl_t;
1034 /* reference to wl_ioctl_t struct used by usermode driver */
1035 #define ioctl_subtype set /* subtype param */
1036 #define ioctl_pid used /* pid param */
1037 #define ioctl_status needed /* status param */
1039 #ifndef LINUX_POSTMOGRIFY_REMOVAL
1041 * Structure for passing hardware and software
1042 * revision info up from the driver.
1044 typedef struct wlc_rev_info {
1045 uint vendorid; /* PCI vendor id */
1046 uint deviceid; /* device id of chip */
1047 uint radiorev; /* radio revision */
1048 uint chiprev; /* chip revision */
1049 uint corerev; /* core revision */
1050 uint boardid; /* board identifier (usu. PCI sub-device id) */
1051 uint boardvendor; /* board vendor (usu. PCI sub-vendor id) */
1052 uint boardrev; /* board revision */
1053 uint driverrev; /* driver version */
1054 uint ucoderev; /* microcode version */
1055 uint bus; /* bus type */
1056 uint chipnum; /* chip number */
1057 uint phytype; /* phy type */
1058 uint phyrev; /* phy revision */
1059 uint anarev; /* anacore rev */
1060 uint chippkg; /* chip package info */
1061 } wlc_rev_info_t;
1063 #define WL_REV_INFO_LEGACY_LENGTH 48
1065 #define WL_BRAND_MAX 10
1066 typedef struct wl_instance_info {
1067 uint instance;
1068 char brand[WL_BRAND_MAX];
1069 } wl_instance_info_t;
1071 /* structure to change size of tx fifo */
1072 typedef struct wl_txfifo_sz {
1073 uint16 magic;
1074 uint16 fifo;
1075 uint16 size;
1076 } wl_txfifo_sz_t;
1077 /* magic pattern used for mismatch driver and wl */
1078 #define WL_TXFIFO_SZ_MAGIC 0xa5a5
1080 /* Transfer info about an IOVar from the driver */
1081 /* Max supported IOV name size in bytes, + 1 for nul termination */
1082 #define WLC_IOV_NAME_LEN 30
1083 typedef struct wlc_iov_trx_s {
1084 uint8 module;
1085 uint8 type;
1086 char name[WLC_IOV_NAME_LEN];
1087 } wlc_iov_trx_t;
1089 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
1090 /* check this magic number */
1091 #define WLC_IOCTL_MAGIC 0x14e46c77
1093 /* bump this number if you change the ioctl interface */
1094 #define WLC_IOCTL_VERSION 1
1096 #define WLC_IOCTL_MAXLEN 8192 /* max length ioctl buffer required */
1097 #define WLC_IOCTL_SMLEN 256 /* "small" length ioctl buffer required */
1098 #define WLC_IOCTL_MEDLEN 1536 /* "med" length ioctl buffer required */
1099 #ifdef WLC_HIGH_ONLY
1100 #define WLC_SAMPLECOLLECT_MAXLEN 1024 /* limit sample size for bmac */
1101 #else
1102 #define WLC_SAMPLECOLLECT_MAXLEN 10240 /* Max Sample Collect buffer for two cores */
1103 #endif /* WLC_HIGH_ONLY */
1105 /* common ioctl definitions */
1106 #define WLC_GET_MAGIC 0
1107 #define WLC_GET_VERSION 1
1108 #define WLC_UP 2
1109 #define WLC_DOWN 3
1110 #define WLC_GET_LOOP 4
1111 #define WLC_SET_LOOP 5
1112 #define WLC_DUMP 6
1113 #define WLC_GET_MSGLEVEL 7
1114 #define WLC_SET_MSGLEVEL 8
1115 #define WLC_GET_PROMISC 9
1116 #define WLC_SET_PROMISC 10
1117 #define WLC_OVERLAY_IOCTL 11
1118 #define WLC_GET_RATE 12
1119 #define WLC_GET_MAX_RATE 13
1120 #define WLC_GET_INSTANCE 14
1121 /* #define WLC_GET_FRAG 15 */ /* no longer supported */
1122 /* #define WLC_SET_FRAG 16 */ /* no longer supported */
1123 /* #define WLC_GET_RTS 17 */ /* no longer supported */
1124 /* #define WLC_SET_RTS 18 */ /* no longer supported */
1125 #define WLC_GET_INFRA 19
1126 #define WLC_SET_INFRA 20
1127 #define WLC_GET_AUTH 21
1128 #define WLC_SET_AUTH 22
1129 #define WLC_GET_BSSID 23
1130 #define WLC_SET_BSSID 24
1131 #define WLC_GET_SSID 25
1132 #define WLC_SET_SSID 26
1133 #define WLC_RESTART 27
1134 /* #define WLC_DUMP_SCB 28 */ /* no longer supported */
1135 #define WLC_GET_CHANNEL 29
1136 #define WLC_SET_CHANNEL 30
1137 #define WLC_GET_SRL 31
1138 #define WLC_SET_SRL 32
1139 #define WLC_GET_LRL 33
1140 #define WLC_SET_LRL 34
1141 #define WLC_GET_PLCPHDR 35
1142 #define WLC_SET_PLCPHDR 36
1143 #define WLC_GET_RADIO 37
1144 #define WLC_SET_RADIO 38
1145 #define WLC_GET_PHYTYPE 39
1146 #define WLC_DUMP_RATE 40
1147 #define WLC_SET_RATE_PARAMS 41
1148 #define WLC_GET_FIXRATE 42
1149 #define WLC_SET_FIXRATE 43
1150 /* #define WLC_GET_WEP 42 */ /* no longer supported */
1151 /* #define WLC_SET_WEP 43 */ /* no longer supported */
1152 #define WLC_GET_KEY 44
1153 #define WLC_SET_KEY 45
1154 #define WLC_GET_REGULATORY 46
1155 #define WLC_SET_REGULATORY 47
1156 #define WLC_GET_PASSIVE_SCAN 48
1157 #define WLC_SET_PASSIVE_SCAN 49
1158 #define WLC_SCAN 50
1159 #define WLC_SCAN_RESULTS 51
1160 #define WLC_DISASSOC 52
1161 #define WLC_REASSOC 53
1162 #define WLC_GET_ROAM_TRIGGER 54
1163 #define WLC_SET_ROAM_TRIGGER 55
1164 #define WLC_GET_ROAM_DELTA 56
1165 #define WLC_SET_ROAM_DELTA 57
1166 #define WLC_GET_ROAM_SCAN_PERIOD 58
1167 #define WLC_SET_ROAM_SCAN_PERIOD 59
1168 #define WLC_EVM 60 /* diag */
1169 #define WLC_GET_TXANT 61
1170 #define WLC_SET_TXANT 62
1171 #define WLC_GET_ANTDIV 63
1172 #define WLC_SET_ANTDIV 64
1173 /* #define WLC_GET_TXPWR 65 */ /* no longer supported */
1174 /* #define WLC_SET_TXPWR 66 */ /* no longer supported */
1175 #define WLC_GET_CLOSED 67
1176 #define WLC_SET_CLOSED 68
1177 #define WLC_GET_MACLIST 69
1178 #define WLC_SET_MACLIST 70
1179 #define WLC_GET_RATESET 71
1180 #define WLC_SET_RATESET 72
1181 /* #define WLC_GET_LOCALE 73 */ /* no longer supported */
1182 #define WLC_LONGTRAIN 74
1183 #define WLC_GET_BCNPRD 75
1184 #define WLC_SET_BCNPRD 76
1185 #define WLC_GET_DTIMPRD 77
1186 #define WLC_SET_DTIMPRD 78
1187 #define WLC_GET_SROM 79
1188 #define WLC_SET_SROM 80
1189 #define WLC_GET_WEP_RESTRICT 81
1190 #define WLC_SET_WEP_RESTRICT 82
1191 #define WLC_GET_COUNTRY 83
1192 #define WLC_SET_COUNTRY 84
1193 #define WLC_GET_PM 85
1194 #define WLC_SET_PM 86
1195 #define WLC_GET_WAKE 87
1196 #define WLC_SET_WAKE 88
1197 /* #define WLC_GET_D11CNTS 89 */ /* -> "counters" iovar */
1198 #define WLC_GET_FORCELINK 90 /* ndis only */
1199 #define WLC_SET_FORCELINK 91 /* ndis only */
1200 #define WLC_FREQ_ACCURACY 92 /* diag */
1201 #define WLC_CARRIER_SUPPRESS 93 /* diag */
1202 #define WLC_GET_PHYREG 94
1203 #define WLC_SET_PHYREG 95
1204 #define WLC_GET_RADIOREG 96
1205 #define WLC_SET_RADIOREG 97
1206 #define WLC_GET_REVINFO 98
1207 #define WLC_GET_UCANTDIV 99
1208 #define WLC_SET_UCANTDIV 100
1209 #define WLC_R_REG 101
1210 #define WLC_W_REG 102
1211 /* #define WLC_DIAG_LOOPBACK 103 old tray diag */
1212 /* #define WLC_RESET_D11CNTS 104 */ /* -> "reset_d11cnts" iovar */
1213 #define WLC_GET_MACMODE 105
1214 #define WLC_SET_MACMODE 106
1215 #define WLC_GET_MONITOR 107
1216 #define WLC_SET_MONITOR 108
1217 #define WLC_GET_GMODE 109
1218 #define WLC_SET_GMODE 110
1219 #define WLC_GET_LEGACY_ERP 111
1220 #define WLC_SET_LEGACY_ERP 112
1221 #define WLC_GET_RX_ANT 113
1222 #define WLC_GET_CURR_RATESET 114 /* current rateset */
1223 #define WLC_GET_SCANSUPPRESS 115
1224 #define WLC_SET_SCANSUPPRESS 116
1225 #define WLC_GET_AP 117
1226 #define WLC_SET_AP 118
1227 #define WLC_GET_EAP_RESTRICT 119
1228 #define WLC_SET_EAP_RESTRICT 120
1229 #define WLC_SCB_AUTHORIZE 121
1230 #define WLC_SCB_DEAUTHORIZE 122
1231 #define WLC_GET_WDSLIST 123
1232 #define WLC_SET_WDSLIST 124
1233 #define WLC_GET_ATIM 125
1234 #define WLC_SET_ATIM 126
1235 #define WLC_GET_RSSI 127
1236 #define WLC_GET_PHYANTDIV 128
1237 #define WLC_SET_PHYANTDIV 129
1238 #define WLC_AP_RX_ONLY 130
1239 #define WLC_GET_TX_PATH_PWR 131
1240 #define WLC_SET_TX_PATH_PWR 132
1241 #define WLC_GET_WSEC 133
1242 #define WLC_SET_WSEC 134
1243 #define WLC_GET_PHY_NOISE 135
1244 #define WLC_GET_BSS_INFO 136
1245 #define WLC_GET_PKTCNTS 137
1246 #define WLC_GET_LAZYWDS 138
1247 #define WLC_SET_LAZYWDS 139
1248 #define WLC_GET_BANDLIST 140
1249 #define WLC_GET_BAND 141
1250 #define WLC_SET_BAND 142
1251 #define WLC_SCB_DEAUTHENTICATE 143
1252 #define WLC_GET_SHORTSLOT 144
1253 #define WLC_GET_SHORTSLOT_OVERRIDE 145
1254 #define WLC_SET_SHORTSLOT_OVERRIDE 146
1255 #define WLC_GET_SHORTSLOT_RESTRICT 147
1256 #define WLC_SET_SHORTSLOT_RESTRICT 148
1257 #define WLC_GET_GMODE_PROTECTION 149
1258 #define WLC_GET_GMODE_PROTECTION_OVERRIDE 150
1259 #define WLC_SET_GMODE_PROTECTION_OVERRIDE 151
1260 #define WLC_UPGRADE 152
1261 /* #define WLC_GET_MRATE 153 */ /* no longer supported */
1262 /* #define WLC_SET_MRATE 154 */ /* no longer supported */
1263 #define WLC_GET_IGNORE_BCNS 155
1264 #define WLC_SET_IGNORE_BCNS 156
1265 #define WLC_GET_SCB_TIMEOUT 157
1266 #define WLC_SET_SCB_TIMEOUT 158
1267 #define WLC_GET_ASSOCLIST 159
1268 #define WLC_GET_CLK 160
1269 #define WLC_SET_CLK 161
1270 #define WLC_GET_UP 162
1271 #define WLC_OUT 163
1272 #define WLC_GET_WPA_AUTH 164
1273 #define WLC_SET_WPA_AUTH 165
1274 #define WLC_GET_UCFLAGS 166
1275 #define WLC_SET_UCFLAGS 167
1276 #define WLC_GET_PWRIDX 168
1277 #define WLC_SET_PWRIDX 169
1278 #define WLC_GET_TSSI 170
1279 #define WLC_GET_SUP_RATESET_OVERRIDE 171
1280 #define WLC_SET_SUP_RATESET_OVERRIDE 172
1281 /* #define WLC_SET_FAST_TIMER 173 */ /* no longer supported */
1282 /* #define WLC_GET_FAST_TIMER 174 */ /* no longer supported */
1283 /* #define WLC_SET_SLOW_TIMER 175 */ /* no longer supported */
1284 /* #define WLC_GET_SLOW_TIMER 176 */ /* no longer supported */
1285 /* #define WLC_DUMP_PHYREGS 177 */ /* no longer supported */
1286 #define WLC_GET_PROTECTION_CONTROL 178
1287 #define WLC_SET_PROTECTION_CONTROL 179
1288 #define WLC_GET_PHYLIST 180
1289 #define WLC_ENCRYPT_STRENGTH 181 /* ndis only */
1290 #define WLC_DECRYPT_STATUS 182 /* ndis only */
1291 #define WLC_GET_KEY_SEQ 183
1292 #define WLC_GET_SCAN_CHANNEL_TIME 184
1293 #define WLC_SET_SCAN_CHANNEL_TIME 185
1294 #define WLC_GET_SCAN_UNASSOC_TIME 186
1295 #define WLC_SET_SCAN_UNASSOC_TIME 187
1296 #define WLC_GET_SCAN_HOME_TIME 188
1297 #define WLC_SET_SCAN_HOME_TIME 189
1298 #define WLC_GET_SCAN_NPROBES 190
1299 #define WLC_SET_SCAN_NPROBES 191
1300 #define WLC_GET_PRB_RESP_TIMEOUT 192
1301 #define WLC_SET_PRB_RESP_TIMEOUT 193
1302 #define WLC_GET_ATTEN 194
1303 #define WLC_SET_ATTEN 195
1304 #define WLC_GET_SHMEM 196 /* diag */
1305 #define WLC_SET_SHMEM 197 /* diag */
1306 /* #define WLC_GET_GMODE_PROTECTION_CTS 198 */ /* no longer supported */
1307 /* #define WLC_SET_GMODE_PROTECTION_CTS 199 */ /* no longer supported */
1308 #define WLC_SET_WSEC_TEST 200
1309 #define WLC_SCB_DEAUTHENTICATE_FOR_REASON 201
1310 #define WLC_TKIP_COUNTERMEASURES 202
1311 #define WLC_GET_PIOMODE 203
1312 #define WLC_SET_PIOMODE 204
1313 #define WLC_SET_ASSOC_PREFER 205
1314 #define WLC_GET_ASSOC_PREFER 206
1315 #define WLC_SET_ROAM_PREFER 207
1316 #define WLC_GET_ROAM_PREFER 208
1317 #define WLC_SET_LED 209
1318 #define WLC_GET_LED 210
1319 #define WLC_GET_INTERFERENCE_MODE 211
1320 #define WLC_SET_INTERFERENCE_MODE 212
1321 #define WLC_GET_CHANNEL_QA 213
1322 #define WLC_START_CHANNEL_QA 214
1323 #define WLC_GET_CHANNEL_SEL 215
1324 #define WLC_START_CHANNEL_SEL 216
1325 #define WLC_GET_VALID_CHANNELS 217
1326 #define WLC_GET_FAKEFRAG 218
1327 #define WLC_SET_FAKEFRAG 219
1328 #define WLC_GET_PWROUT_PERCENTAGE 220
1329 #define WLC_SET_PWROUT_PERCENTAGE 221
1330 #define WLC_SET_BAD_FRAME_PREEMPT 222
1331 #define WLC_GET_BAD_FRAME_PREEMPT 223
1332 #define WLC_SET_LEAP_LIST 224
1333 #define WLC_GET_LEAP_LIST 225
1334 #define WLC_GET_CWMIN 226
1335 #define WLC_SET_CWMIN 227
1336 #define WLC_GET_CWMAX 228
1337 #define WLC_SET_CWMAX 229
1338 #define WLC_GET_WET 230
1339 #define WLC_SET_WET 231
1340 #define WLC_GET_PUB 232
1341 /* #define WLC_SET_GLACIAL_TIMER 233 */ /* no longer supported */
1342 /* #define WLC_GET_GLACIAL_TIMER 234 */ /* no longer supported */
1343 #define WLC_GET_KEY_PRIMARY 235
1344 #define WLC_SET_KEY_PRIMARY 236
1345 /* #define WLC_DUMP_RADIOREGS 237 */ /* no longer supported */
1346 #define WLC_GET_ACI_ARGS 238
1347 #define WLC_SET_ACI_ARGS 239
1348 #define WLC_UNSET_CALLBACK 240
1349 #define WLC_SET_CALLBACK 241
1350 #define WLC_GET_RADAR 242
1351 #define WLC_SET_RADAR 243
1352 #define WLC_SET_SPECT_MANAGMENT 244
1353 #define WLC_GET_SPECT_MANAGMENT 245
1354 #define WLC_WDS_GET_REMOTE_HWADDR 246 /* handled in wl_linux.c/wl_vx.c */
1355 #define WLC_WDS_GET_WPA_SUP 247
1356 #define WLC_SET_CS_SCAN_TIMER 248
1357 #define WLC_GET_CS_SCAN_TIMER 249
1358 #define WLC_MEASURE_REQUEST 250
1359 #define WLC_INIT 251
1360 #define WLC_SEND_QUIET 252
1361 #define WLC_KEEPALIVE 253
1362 #define WLC_SEND_PWR_CONSTRAINT 254
1363 #define WLC_UPGRADE_STATUS 255
1364 #define WLC_CURRENT_PWR 256
1365 #define WLC_GET_SCAN_PASSIVE_TIME 257
1366 #define WLC_SET_SCAN_PASSIVE_TIME 258
1367 #define WLC_LEGACY_LINK_BEHAVIOR 259
1368 #define WLC_GET_CHANNELS_IN_COUNTRY 260
1369 #define WLC_GET_COUNTRY_LIST 261
1370 #define WLC_GET_VAR 262 /* get value of named variable */
1371 #define WLC_SET_VAR 263 /* set named variable to value */
1372 #define WLC_NVRAM_GET 264 /* deprecated */
1373 #define WLC_NVRAM_SET 265
1374 #define WLC_NVRAM_DUMP 266
1375 #define WLC_REBOOT 267
1376 #define WLC_SET_WSEC_PMK 268
1377 #define WLC_GET_AUTH_MODE 269
1378 #define WLC_SET_AUTH_MODE 270
1379 #define WLC_GET_WAKEENTRY 271
1380 #define WLC_SET_WAKEENTRY 272
1381 #define WLC_NDCONFIG_ITEM 273 /* currently handled in wl_oid.c */
1382 #define WLC_NVOTPW 274
1383 #define WLC_OTPW 275
1384 #define WLC_IOV_BLOCK_GET 276
1385 #define WLC_IOV_MODULES_GET 277
1386 #define WLC_SOFT_RESET 278
1387 #define WLC_GET_ALLOW_MODE 279
1388 #define WLC_SET_ALLOW_MODE 280
1389 #define WLC_GET_DESIRED_BSSID 281
1390 #define WLC_SET_DESIRED_BSSID 282
1391 #define WLC_DISASSOC_MYAP 283
1392 #define WLC_GET_NBANDS 284 /* for Dongle EXT_STA support */
1393 #define WLC_GET_BANDSTATES 285 /* for Dongle EXT_STA support */
1394 #define WLC_GET_WLC_BSS_INFO 286 /* for Dongle EXT_STA support */
1395 #define WLC_GET_ASSOC_INFO 287 /* for Dongle EXT_STA support */
1396 #define WLC_GET_OID_PHY 288 /* for Dongle EXT_STA support */
1397 #define WLC_SET_OID_PHY 289 /* for Dongle EXT_STA support */
1398 #define WLC_SET_ASSOC_TIME 290 /* for Dongle EXT_STA support */
1399 #define WLC_GET_DESIRED_SSID 291 /* for Dongle EXT_STA support */
1400 #define WLC_GET_CHANSPEC 292 /* for Dongle EXT_STA support */
1401 #define WLC_GET_ASSOC_STATE 293 /* for Dongle EXT_STA support */
1402 #define WLC_SET_PHY_STATE 294 /* for Dongle EXT_STA support */
1403 #define WLC_GET_SCAN_PENDING 295 /* for Dongle EXT_STA support */
1404 #define WLC_GET_SCANREQ_PENDING 296 /* for Dongle EXT_STA support */
1405 #define WLC_GET_PREV_ROAM_REASON 297 /* for Dongle EXT_STA support */
1406 #define WLC_SET_PREV_ROAM_REASON 298 /* for Dongle EXT_STA support */
1407 #define WLC_GET_BANDSTATES_PI 299 /* for Dongle EXT_STA support */
1408 #define WLC_GET_PHY_STATE 300 /* for Dongle EXT_STA support */
1409 #define WLC_GET_BSS_WPA_RSN 301 /* for Dongle EXT_STA support */
1410 #define WLC_GET_BSS_WPA2_RSN 302 /* for Dongle EXT_STA support */
1411 #define WLC_GET_BSS_BCN_TS 303 /* for Dongle EXT_STA support */
1412 #define WLC_GET_INT_DISASSOC 304 /* for Dongle EXT_STA support */
1413 #define WLC_SET_NUM_PEERS 305 /* for Dongle EXT_STA support */
1414 #define WLC_GET_NUM_BSS 306 /* for Dongle EXT_STA support */
1415 #define WLC_PHY_SAMPLE_COLLECT 307 /* Nphy sample collect mode */
1416 #define WLC_UM_PRIV 308 /* for usermode driver private ioctl */
1417 #define WLC_GET_CMD 309
1418 /* #define WLC_LAST 310 */ /* Never used - can be reused */
1419 #define WLC_SET_INTERFERENCE_OVERRIDE_MODE 311 /* set inter mode override */
1420 #define WLC_GET_INTERFERENCE_OVERRIDE_MODE 312 /* get inter mode override */
1421 #define WLC_GET_WAI_RESTRICT 313 /* for WAPI */
1422 #define WLC_SET_WAI_RESTRICT 314 /* for WAPI */
1423 #define WLC_SET_WAI_REKEY 315 /* for WAPI */
1424 #define WLC_SET_NAT_CONFIG 316 /* for configuring NAT filter driver */
1425 #define WLC_GET_NAT_STATE 317
1426 #define WLC_LAST 318
1428 #ifndef LINUX_POSTMOGRIFY_REMOVAL
1429 #ifndef EPICTRL_COOKIE
1430 #define EPICTRL_COOKIE 0xABADCEDE
1431 #endif
1433 /* vx wlc ioctl's offset */
1434 #define CMN_IOCTL_OFF 0x180
1437 * custom OID support
1439 * 0xFF - implementation specific OID
1440 * 0xE4 - first byte of Broadcom PCI vendor ID
1441 * 0x14 - second byte of Broadcom PCI vendor ID
1442 * 0xXX - the custom OID number
1445 /* begin 0x1f values beyond the start of the ET driver range. */
1446 #define WL_OID_BASE 0xFFE41420
1448 /* NDIS overrides */
1449 #define OID_WL_GETINSTANCE (WL_OID_BASE + WLC_GET_INSTANCE)
1450 #define OID_WL_GET_FORCELINK (WL_OID_BASE + WLC_GET_FORCELINK)
1451 #define OID_WL_SET_FORCELINK (WL_OID_BASE + WLC_SET_FORCELINK)
1452 #define OID_WL_ENCRYPT_STRENGTH (WL_OID_BASE + WLC_ENCRYPT_STRENGTH)
1453 #define OID_WL_DECRYPT_STATUS (WL_OID_BASE + WLC_DECRYPT_STATUS)
1454 #define OID_LEGACY_LINK_BEHAVIOR (WL_OID_BASE + WLC_LEGACY_LINK_BEHAVIOR)
1455 #define OID_WL_NDCONFIG_ITEM (WL_OID_BASE + WLC_NDCONFIG_ITEM)
1457 /* EXT_STA Dongle suuport */
1458 #define OID_STA_CHANSPEC (WL_OID_BASE + WLC_GET_CHANSPEC)
1459 #define OID_STA_NBANDS (WL_OID_BASE + WLC_GET_NBANDS)
1460 #define OID_STA_GET_PHY (WL_OID_BASE + WLC_GET_OID_PHY)
1461 #define OID_STA_SET_PHY (WL_OID_BASE + WLC_SET_OID_PHY)
1462 #define OID_STA_ASSOC_TIME (WL_OID_BASE + WLC_SET_ASSOC_TIME)
1463 #define OID_STA_DESIRED_SSID (WL_OID_BASE + WLC_GET_DESIRED_SSID)
1464 #define OID_STA_SET_PHY_STATE (WL_OID_BASE + WLC_SET_PHY_STATE)
1465 #define OID_STA_SCAN_PENDING (WL_OID_BASE + WLC_GET_SCAN_PENDING)
1466 #define OID_STA_SCANREQ_PENDING (WL_OID_BASE + WLC_GET_SCANREQ_PENDING)
1467 #define OID_STA_GET_ROAM_REASON (WL_OID_BASE + WLC_GET_PREV_ROAM_REASON)
1468 #define OID_STA_SET_ROAM_REASON (WL_OID_BASE + WLC_SET_PREV_ROAM_REASON)
1469 #define OID_STA_GET_PHY_STATE (WL_OID_BASE + WLC_GET_PHY_STATE)
1470 #define OID_STA_INT_DISASSOC (WL_OID_BASE + WLC_GET_INT_DISASSOC)
1471 #define OID_STA_SET_NUM_PEERS (WL_OID_BASE + WLC_SET_NUM_PEERS)
1472 #define OID_STA_GET_NUM_BSS (WL_OID_BASE + WLC_GET_NUM_BSS)
1474 /* NAT filter driver support */
1475 #define OID_NAT_SET_CONFIG (WL_OID_BASE + WLC_SET_NAT_CONFIG)
1476 #define OID_NAT_GET_STATE (WL_OID_BASE + WLC_GET_NAT_STATE)
1478 #define WL_DECRYPT_STATUS_SUCCESS 1
1479 #define WL_DECRYPT_STATUS_FAILURE 2
1480 #define WL_DECRYPT_STATUS_UNKNOWN 3
1482 /* allows user-mode app to poll the status of USB image upgrade */
1483 #define WLC_UPGRADE_SUCCESS 0
1484 #define WLC_UPGRADE_PENDING 1
1486 #ifdef CONFIG_USBRNDIS_RETAIL
1487 /* struct passed in for WLC_NDCONFIG_ITEM */
1488 typedef struct {
1489 char *name;
1490 void *param;
1491 } ndconfig_item_t;
1492 #endif
1494 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
1496 /* WLC_GET_AUTH, WLC_SET_AUTH values */
1497 #define WL_AUTH_OPEN_SYSTEM 0 /* d11 open authentication */
1498 #define WL_AUTH_SHARED_KEY 1 /* d11 shared authentication */
1499 #define WL_AUTH_OPEN_SHARED 3 /* try open, then shared if open failed w/rc 13 */
1501 /* Bit masks for radio disabled status - returned by WL_GET_RADIO */
1502 #define WL_RADIO_SW_DISABLE (1<<0)
1503 #define WL_RADIO_HW_DISABLE (1<<1)
1504 #define WL_RADIO_MPC_DISABLE (1<<2)
1505 #define WL_RADIO_COUNTRY_DISABLE (1<<3) /* some countries don't support any channel */
1507 #define WL_SPURAVOID_OFF 0
1508 #define WL_SPURAVOID_ON1 1
1509 #define WL_SPURAVOID_ON2 2
1511 /* Override bit for WLC_SET_TXPWR. if set, ignore other level limits */
1512 #define WL_TXPWR_OVERRIDE (1U<<31)
1513 #define WL_TXPWR_NEG (1U<<30)
1516 #define WL_PHY_PAVARS_LEN 6 /* Phy type, Band range, chain, a1, b0, b1 */
1518 #define WL_PHY_PAVARS2_NUM 3 /* a1, b0, b1 */
1519 #define WL_PHY_PAVAR_VER 1 /* pavars version */
1520 typedef struct wl_pavars2 {
1521 uint16 ver; /* version of this struct */
1522 uint16 len; /* len of this structure */
1523 uint16 inuse; /* driver return 1 for a1,b0,b1 in current band range */
1524 uint16 phy_type; /* phy type */
1525 uint16 bandrange;
1526 uint16 chain;
1527 uint16 inpa[WL_PHY_PAVARS2_NUM]; /* phy pavars for one band range */
1528 } wl_pavars2_t;
1530 typedef struct wl_po {
1531 uint16 phy_type; /* Phy type */
1532 uint16 band;
1533 uint16 cckpo;
1534 uint32 ofdmpo;
1535 uint16 mcspo[8];
1536 } wl_po_t;
1538 /* a large TX Power as an init value to factor out of MIN() calculations,
1539 * keep low enough to fit in an int8, units are .25 dBm
1541 #define WLC_TXPWR_MAX (127) /* ~32 dBm = 1,500 mW */
1543 /* "diag" iovar argument and error code */
1544 #define WL_DIAG_INTERRUPT 1 /* d11 loopback interrupt test */
1545 #define WL_DIAG_LOOPBACK 2 /* d11 loopback data test */
1546 #define WL_DIAG_MEMORY 3 /* d11 memory test */
1547 #define WL_DIAG_LED 4 /* LED test */
1548 #define WL_DIAG_REG 5 /* d11/phy register test */
1549 #define WL_DIAG_SROM 6 /* srom read/crc test */
1550 #define WL_DIAG_DMA 7 /* DMA test */
1552 #define WL_DIAGERR_SUCCESS 0
1553 #define WL_DIAGERR_FAIL_TO_RUN 1 /* unable to run requested diag */
1554 #define WL_DIAGERR_NOT_SUPPORTED 2 /* diag requested is not supported */
1555 #define WL_DIAGERR_INTERRUPT_FAIL 3 /* loopback interrupt test failed */
1556 #define WL_DIAGERR_LOOPBACK_FAIL 4 /* loopback data test failed */
1557 #define WL_DIAGERR_SROM_FAIL 5 /* srom read failed */
1558 #define WL_DIAGERR_SROM_BADCRC 6 /* srom crc failed */
1559 #define WL_DIAGERR_REG_FAIL 7 /* d11/phy register test failed */
1560 #define WL_DIAGERR_MEMORY_FAIL 8 /* d11 memory test failed */
1561 #define WL_DIAGERR_NOMEM 9 /* diag test failed due to no memory */
1562 #define WL_DIAGERR_DMA_FAIL 10 /* DMA test failed */
1564 #define WL_DIAGERR_MEMORY_TIMEOUT 11 /* d11 memory test didn't finish in time */
1565 #define WL_DIAGERR_MEMORY_BADPATTERN 12 /* d11 memory test result in bad pattern */
1567 /* band types */
1568 #define WLC_BAND_AUTO 0 /* auto-select */
1569 #define WLC_BAND_5G 1 /* 5 Ghz */
1570 #define WLC_BAND_2G 2 /* 2.4 Ghz */
1571 #define WLC_BAND_ALL 3 /* all bands */
1573 /* band range returned by band_range iovar */
1574 #define WL_CHAN_FREQ_RANGE_2G 0
1575 #define WL_CHAN_FREQ_RANGE_5GL 1
1576 #define WL_CHAN_FREQ_RANGE_5GM 2
1577 #define WL_CHAN_FREQ_RANGE_5GH 3
1579 #define WL_CHAN_FREQ_RANGE_5GLL_5BAND 4
1580 #define WL_CHAN_FREQ_RANGE_5GLH_5BAND 5
1581 #define WL_CHAN_FREQ_RANGE_5GML_5BAND 6
1582 #define WL_CHAN_FREQ_RANGE_5GMH_5BAND 7
1583 #define WL_CHAN_FREQ_RANGE_5GH_5BAND 8
1585 /* phy types (returned by WLC_GET_PHYTPE) */
1586 #define WLC_PHY_TYPE_A 0
1587 #define WLC_PHY_TYPE_B 1
1588 #define WLC_PHY_TYPE_G 2
1589 #define WLC_PHY_TYPE_N 4
1590 #define WLC_PHY_TYPE_LP 5
1591 #define WLC_PHY_TYPE_SSN 6
1592 #define WLC_PHY_TYPE_HT 7
1593 #define WLC_PHY_TYPE_LCN 8
1594 #define WLC_PHY_TYPE_NULL 0xf
1596 /* MAC list modes */
1597 #define WLC_MACMODE_DISABLED 0 /* MAC list disabled */
1598 #define WLC_MACMODE_DENY 1 /* Deny specified (i.e. allow unspecified) */
1599 #define WLC_MACMODE_ALLOW 2 /* Allow specified (i.e. deny unspecified) */
1602 * 54g modes (basic bits may still be overridden)
1604 * GMODE_LEGACY_B Rateset: 1b, 2b, 5.5, 11
1605 * Preamble: Long
1606 * Shortslot: Off
1607 * GMODE_AUTO Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
1608 * Extended Rateset: 6, 9, 12, 48
1609 * Preamble: Long
1610 * Shortslot: Auto
1611 * GMODE_ONLY Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54
1612 * Extended Rateset: 6b, 9, 12b, 48
1613 * Preamble: Short required
1614 * Shortslot: Auto
1615 * GMODE_B_DEFERRED Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
1616 * Extended Rateset: 6, 9, 12, 48
1617 * Preamble: Long
1618 * Shortslot: On
1619 * GMODE_PERFORMANCE Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54
1620 * Preamble: Short required
1621 * Shortslot: On and required
1622 * GMODE_LRS Rateset: 1b, 2b, 5.5b, 11b
1623 * Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54
1624 * Preamble: Long
1625 * Shortslot: Auto
1627 #define GMODE_LEGACY_B 0
1628 #define GMODE_AUTO 1
1629 #define GMODE_ONLY 2
1630 #define GMODE_B_DEFERRED 3
1631 #define GMODE_PERFORMANCE 4
1632 #define GMODE_LRS 5
1633 #define GMODE_MAX 6
1635 /* values for PLCPHdr_override */
1636 #define WLC_PLCP_AUTO -1
1637 #define WLC_PLCP_SHORT 0
1638 #define WLC_PLCP_LONG 1
1640 /* values for g_protection_override and n_protection_override */
1641 #define WLC_PROTECTION_AUTO -1
1642 #define WLC_PROTECTION_OFF 0
1643 #define WLC_PROTECTION_ON 1
1644 #define WLC_PROTECTION_MMHDR_ONLY 2
1645 #define WLC_PROTECTION_CTS_ONLY 3
1647 /* values for g_protection_control and n_protection_control */
1648 #define WLC_PROTECTION_CTL_OFF 0
1649 #define WLC_PROTECTION_CTL_LOCAL 1
1650 #define WLC_PROTECTION_CTL_OVERLAP 2
1652 /* values for n_protection */
1653 #define WLC_N_PROTECTION_OFF 0
1654 #define WLC_N_PROTECTION_OPTIONAL 1
1655 #define WLC_N_PROTECTION_20IN40 2
1656 #define WLC_N_PROTECTION_MIXEDMODE 3
1658 /* values for n_preamble_type */
1659 #define WLC_N_PREAMBLE_MIXEDMODE 0
1660 #define WLC_N_PREAMBLE_GF 1
1661 #define WLC_N_PREAMBLE_GF_BRCM 2
1663 /* values for band specific 40MHz capabilities */
1664 #define WLC_N_BW_20ALL 0
1665 #define WLC_N_BW_40ALL 1
1666 #define WLC_N_BW_20IN2G_40IN5G 2
1668 /* values to force tx/rx chain */
1669 #define WLC_N_TXRX_CHAIN0 0
1670 #define WLC_N_TXRX_CHAIN1 1
1672 /* bitflags for SGI support (sgi_rx iovar) */
1673 #define WLC_N_SGI_20 0x01
1674 #define WLC_N_SGI_40 0x02
1676 /* when sgi_tx==WLC_SGI_ALL, bypass rate selection, enable sgi for all mcs */
1677 #define WLC_SGI_ALL 0x02
1679 /* Values for PM */
1680 #define PM_OFF 0
1681 #define PM_MAX 1
1682 #define PM_FAST 2
1683 #define PM_FORCE_OFF 3 /* use this bit to force PM off even bt is active */
1685 /* interference mitigation options */
1686 #define INTERFERE_OVRRIDE_OFF -1 /* interference override off */
1687 #define INTERFERE_NONE 0 /* off */
1688 #define NON_WLAN 1 /* foreign/non 802.11 interference, no auto detect */
1689 #define WLAN_MANUAL 2 /* ACI: no auto detection */
1690 #define WLAN_AUTO 3 /* ACI: auto detect */
1691 #define WLAN_AUTO_W_NOISE 4 /* ACI: auto - detect and non 802.11 interference */
1692 #define AUTO_ACTIVE (1 << 7) /* Auto is currently active */
1694 typedef struct wl_aci_args {
1695 int enter_aci_thresh; /* Trigger level to start detecting ACI */
1696 int exit_aci_thresh; /* Trigger level to exit ACI mode */
1697 int usec_spin; /* microsecs to delay between rssi samples */
1698 int glitch_delay; /* interval between ACI scans when glitch count is consistently high */
1699 uint16 nphy_adcpwr_enter_thresh; /* ADC power to enter ACI mitigation mode */
1700 uint16 nphy_adcpwr_exit_thresh; /* ADC power to exit ACI mitigation mode */
1701 uint16 nphy_repeat_ctr; /* Number of tries per channel to compute power */
1702 uint16 nphy_num_samples; /* Number of samples to compute power on one channel */
1703 uint16 nphy_undetect_window_sz; /* num of undetects to exit ACI Mitigation mode */
1704 uint16 nphy_b_energy_lo_aci; /* low ACI power energy threshold for bphy */
1705 uint16 nphy_b_energy_md_aci; /* mid ACI power energy threshold for bphy */
1706 uint16 nphy_b_energy_hi_aci; /* high ACI power energy threshold for bphy */
1707 uint16 nphy_noise_noassoc_glitch_th_up; /* wl interference 4 */
1708 uint16 nphy_noise_noassoc_glitch_th_dn;
1709 uint16 nphy_noise_assoc_glitch_th_up;
1710 uint16 nphy_noise_assoc_glitch_th_dn;
1711 uint16 nphy_noise_assoc_aci_glitch_th_up;
1712 uint16 nphy_noise_assoc_aci_glitch_th_dn;
1713 uint16 nphy_noise_assoc_enter_th;
1714 uint16 nphy_noise_noassoc_enter_th;
1715 uint16 nphy_noise_assoc_rx_glitch_badplcp_enter_th;
1716 uint16 nphy_noise_noassoc_crsidx_incr;
1717 uint16 nphy_noise_assoc_crsidx_incr;
1718 uint16 nphy_noise_crsidx_decr;
1719 } wl_aci_args_t;
1721 #define TRIGGER_NOW 0
1722 #define TRIGGER_CRS 0x01
1723 #define TRIGGER_CRSDEASSERT 0x02
1724 #define TRIGGER_GOODFCS 0x04
1725 #define TRIGGER_BADFCS 0x08
1726 #define TRIGGER_BADPLCP 0x10
1727 #define TRIGGER_CRSGLITCH 0x20
1728 #define WL_ACI_ARGS_LEGACY_LENGTH 16 /* bytes of pre NPHY aci args */
1729 #define WL_SAMPLECOLLECT_T_VERSION 1 /* version of wl_samplecollect_args_t struct */
1730 typedef struct wl_samplecollect_args {
1731 /* version 0 fields */
1732 uint8 coll_us;
1733 int cores;
1734 /* add'l version 1 fields */
1735 uint16 version; /* see definition of WL_SAMPLECOLLECT_T_VERSION */
1736 uint16 length; /* length of entire structure */
1737 uint8 trigger;
1738 uint16 timeout;
1739 uint16 mode;
1740 uint32 pre_dur;
1741 uint32 post_dur;
1742 uint8 gpio_sel;
1743 bool downsamp;
1744 bool be_deaf;
1745 bool agc; /* loop from init gain and going down */
1746 bool filter; /* override high pass corners to lowest */
1747 } wl_samplecollect_args_t;
1749 #define WL_SAMPLEDATA_HEADER_TYPE 1
1750 #define WL_SAMPLEDATA_HEADER_SIZE 80 /* sample collect header size (bytes) */
1751 #define WL_SAMPLEDATA_TYPE 2
1752 #define WL_SAMPLEDATA_SEQ 0xff /* sequence # */
1753 #define WL_SAMPLEDATA_MORE_DATA 0x100 /* more data mask */
1754 #define WL_SAMPLEDATA_T_VERSION 1 /* version of wl_samplecollect_args_t struct */
1755 #define WL_SAMPLEDATA_T_VERSION_SPEC_AN 2 /* version for unpacked sample data, */
1756 /* int16 {(I,Q),Core(0..N)} */
1758 typedef struct wl_sampledata {
1759 uint16 version; /* structure version */
1760 uint16 size; /* size of structure */
1761 uint16 tag; /* Header/Data */
1762 uint16 length; /* data length */
1763 uint32 flag; /* bit def */
1764 } wl_sampledata_t;
1766 #ifndef LINUX_POSTMOGRIFY_REMOVAL
1767 /* wl_radar_args_t */
1768 typedef struct {
1769 int npulses; /* required number of pulses at n * t_int */
1770 int ncontig; /* required number of pulses at t_int */
1771 int min_pw; /* minimum pulse width (20 MHz clocks) */
1772 int max_pw; /* maximum pulse width (20 MHz clocks) */
1773 uint16 thresh0; /* Radar detection, thresh 0 */
1774 uint16 thresh1; /* Radar detection, thresh 1 */
1775 uint16 blank; /* Radar detection, blank control */
1776 uint16 fmdemodcfg; /* Radar detection, fmdemod config */
1777 int npulses_lp; /* Radar detection, minimum long pulses */
1778 int min_pw_lp; /* Minimum pulsewidth for long pulses */
1779 int max_pw_lp; /* Maximum pulsewidth for long pulses */
1780 int min_fm_lp; /* Minimum fm for long pulses */
1781 int max_span_lp; /* Maximum deltat for long pulses */
1782 int min_deltat; /* Minimum spacing between pulses */
1783 int max_deltat; /* Maximum spacing between pulses */
1784 uint16 autocorr; /* Radar detection, autocorr on or off */
1785 uint16 st_level_time; /* Radar detection, start_timing level */
1786 uint16 t2_min; /* minimum clocks needed to remain in state 2 */
1787 uint32 version; /* version */
1788 uint32 fra_pulse_err; /* sample error margin for detecting French radar pulsed */
1789 int npulses_fra; /* Radar detection, minimum French pulses set */
1790 int npulses_stg2; /* Radar detection, minimum staggered-2 pulses set */
1791 int npulses_stg3; /* Radar detection, minimum staggered-3 pulses set */
1792 uint16 percal_mask; /* defines which period cal is masked from radar detection */
1793 int quant; /* quantization resolution to pulse positions */
1794 uint32 min_burst_intv_lp; /* minimum burst to burst interval for bin3 radar */
1795 uint32 max_burst_intv_lp; /* maximum burst to burst interval for bin3 radar */
1796 int nskip_rst_lp; /* number of skipped pulses before resetting lp buffer */
1797 int max_pw_tol; /* maximum tollerance allowed in detected pulse width for radar detection */
1798 uint16 feature_mask; /* 16-bit mask to specify enabled features */
1799 } wl_radar_args_t;
1801 #define WL_RADAR_ARGS_VERSION 2
1803 typedef struct {
1804 uint32 version; /* version */
1805 uint16 thresh0_20_lo; /* Radar detection, thresh 0 (range 5250-5350MHz) for BW 20MHz */
1806 uint16 thresh1_20_lo; /* Radar detection, thresh 1 (range 5250-5350MHz) for BW 20MHz */
1807 uint16 thresh0_40_lo; /* Radar detection, thresh 0 (range 5250-5350MHz) for BW 40MHz */
1808 uint16 thresh1_40_lo; /* Radar detection, thresh 1 (range 5250-5350MHz) for BW 40MHz */
1809 uint16 thresh0_20_hi; /* Radar detection, thresh 0 (range 5470-5725MHz) for BW 20MHz */
1810 uint16 thresh1_20_hi; /* Radar detection, thresh 1 (range 5470-5725MHz) for BW 20MHz */
1811 uint16 thresh0_40_hi; /* Radar detection, thresh 0 (range 5470-5725MHz) for BW 40MHz */
1812 uint16 thresh1_40_hi; /* Radar detection, thresh 1 (range 5470-5725MHz) for BW 40MHz */
1813 } wl_radar_thr_t;
1815 #define WL_RADAR_THR_VERSION 1
1816 #define WL_THRESHOLD_LO_BAND 70 /* range from 5250MHz - 5350MHz */
1818 /* radar iovar SET defines */
1819 #define WL_RADAR_DETECTOR_OFF 0 /* radar detector off */
1820 #define WL_RADAR_DETECTOR_ON 1 /* radar detector on */
1821 #define WL_RADAR_SIMULATED 2 /* force radar detector to declare
1822 * detection once
1824 #define WL_RSSI_ANT_VERSION 1 /* current version of wl_rssi_ant_t */
1825 #define WL_ANT_RX_MAX 2 /* max 2 receive antennas */
1826 #define WL_ANT_HT_RX_MAX 3 /* max 3 receive antennas/cores */
1827 #define WL_ANT_IDX_1 0 /* antenna index 1 */
1828 #define WL_ANT_IDX_2 1 /* antenna index 2 */
1830 #ifndef WL_RSSI_ANT_MAX
1831 #define WL_RSSI_ANT_MAX 4 /* max possible rx antennas */
1832 #elif WL_RSSI_ANT_MAX != 4
1833 #error "WL_RSSI_ANT_MAX does not match"
1834 #endif
1836 /* RSSI per antenna */
1837 typedef struct {
1838 uint32 version; /* version field */
1839 uint32 count; /* number of valid antenna rssi */
1840 int8 rssi_ant[WL_RSSI_ANT_MAX]; /* rssi per antenna */
1841 } wl_rssi_ant_t;
1843 /* dfs_status iovar-related defines */
1845 /* cac - channel availability check,
1846 * ism - in-service monitoring
1847 * csa - channel switching announcement
1850 /* cac state values */
1851 #define WL_DFS_CACSTATE_IDLE 0 /* state for operating in non-radar channel */
1852 #define WL_DFS_CACSTATE_PREISM_CAC 1 /* CAC in progress */
1853 #define WL_DFS_CACSTATE_ISM 2 /* ISM in progress */
1854 #define WL_DFS_CACSTATE_CSA 3 /* csa */
1855 #define WL_DFS_CACSTATE_POSTISM_CAC 4 /* ISM CAC */
1856 #define WL_DFS_CACSTATE_PREISM_OOC 5 /* PREISM OOC */
1857 #define WL_DFS_CACSTATE_POSTISM_OOC 6 /* POSTISM OOC */
1858 #define WL_DFS_CACSTATES 7 /* this many states exist */
1860 /* data structure used in 'dfs_status' wl interface, which is used to query dfs status */
1861 typedef struct {
1862 uint state; /* noted by WL_DFS_CACSTATE_XX. */
1863 uint duration; /* time spent in ms in state. */
1864 /* as dfs enters ISM state, it removes the operational channel from quiet channel
1865 * list and notes the channel in channel_cleared. set to 0 if no channel is cleared
1867 chanspec_t chanspec_cleared;
1868 /* chanspec cleared used to be a uint, add another to uint16 to maintain size */
1869 uint16 pad;
1870 } wl_dfs_status_t;
1872 #define NUM_PWRCTRL_RATES 12
1874 typedef struct {
1875 uint8 txpwr_band_max[NUM_PWRCTRL_RATES]; /* User set target */
1876 uint8 txpwr_limit[NUM_PWRCTRL_RATES]; /* reg and local power limit */
1877 uint8 txpwr_local_max; /* local max according to the AP */
1878 uint8 txpwr_local_constraint; /* local constraint according to the AP */
1879 uint8 txpwr_chan_reg_max; /* Regulatory max for this channel */
1880 uint8 txpwr_target[2][NUM_PWRCTRL_RATES]; /* Latest target for 2.4 and 5 Ghz */
1881 uint8 txpwr_est_Pout[2]; /* Latest estimate for 2.4 and 5 Ghz */
1882 uint8 txpwr_opo[NUM_PWRCTRL_RATES]; /* On G phy, OFDM power offset */
1883 uint8 txpwr_bphy_cck_max[NUM_PWRCTRL_RATES]; /* Max CCK power for this band (SROM) */
1884 uint8 txpwr_bphy_ofdm_max; /* Max OFDM power for this band (SROM) */
1885 uint8 txpwr_aphy_max[NUM_PWRCTRL_RATES]; /* Max power for A band (SROM) */
1886 int8 txpwr_antgain[2]; /* Ant gain for each band - from SROM */
1887 uint8 txpwr_est_Pout_gofdm; /* Pwr estimate for 2.4 OFDM */
1888 } tx_power_legacy_t;
1890 /* Legacy TX Power defines and structure */
1891 #define WL_TX_POWER_RATES_LEGACY 45
1892 #define WL_TX_POWER_MCS20_FIRST 12
1893 #define WL_TX_POWER_MCS20_NUM 16
1894 #define WL_TX_POWER_MCS40_FIRST 28
1895 #define WL_TX_POWER_MCS40_NUM 17
1897 typedef struct {
1898 uint32 flags;
1899 chanspec_t chanspec; /* txpwr report for this channel */
1900 chanspec_t local_chanspec; /* channel on which we are associated */
1901 uint8 local_max; /* local max according to the AP */
1902 uint8 local_constraint; /* local constraint according to the AP */
1903 int8 antgain[2]; /* Ant gain for each band - from SROM */
1904 uint8 rf_cores; /* count of RF Cores being reported */
1905 uint8 est_Pout[4]; /* Latest tx power out estimate per RF
1906 * chain without adjustment
1908 uint8 est_Pout_cck; /* Latest CCK tx power out estimate */
1909 uint8 user_limit[WL_TX_POWER_RATES_LEGACY]; /* User limit */
1910 uint8 reg_limit[WL_TX_POWER_RATES_LEGACY]; /* Regulatory power limit */
1911 uint8 board_limit[WL_TX_POWER_RATES_LEGACY]; /* Max power board can support (SROM) */
1912 uint8 target[WL_TX_POWER_RATES_LEGACY]; /* Latest target power */
1913 } tx_power_legacy2_t;
1915 /* TX Power index defines */
1916 #define WL_NUM_RATES_CCK 4 /* 1, 2, 5.5, 11 Mbps */
1917 #define WL_NUM_RATES_OFDM 8 /* 6, 9, 12, 18, 24, 36, 48, 54 Mbps SISO/CDD */
1918 #define WL_NUM_RATES_MCS_1STREAM 8 /* MCS 0-7 1-stream rates - SISO/CDD/STBC/MCS */
1919 #define WL_NUM_RATES_MCS32 1
1921 typedef struct cck {
1922 uint8 s1x2[WL_NUM_RATES_CCK]; /* Legacy CCK to 2 Tx Chain */
1923 uint8 s1x3[WL_NUM_RATES_CCK]; /* Legacy CCK to 3 Tx Chain */
1924 } cck_t;
1926 typedef struct ofdm {
1927 uint8 s1x1[WL_NUM_RATES_OFDM]; /* Legacy OFDM to 1 Tx Chain */
1928 uint8 s1x2[WL_NUM_RATES_OFDM]; /* Legacy OFDM to 2 Tx Chain */
1929 uint8 s1x3[WL_NUM_RATES_OFDM]; /* Legacy OFDM to 3 Tx Chain */
1930 } ofdm_t;
1932 typedef struct stbc {
1933 uint8 s2x2[WL_NUM_RATES_MCS_1STREAM]; /* STBC 20MHz to 2 Tx Chain */
1934 uint8 s2x3[WL_NUM_RATES_MCS_1STREAM]; /* STBC 20MHz to 3 Tx Chain */
1935 uint8 u40_s2x2[WL_NUM_RATES_MCS_1STREAM]; /* STBC 40MHz to 2 Tx Chain */
1936 uint8 u40_s2x3[WL_NUM_RATES_MCS_1STREAM]; /* STBC 40MHz to 3 Tx Chain */
1937 uint8 ul20_s2x2[WL_NUM_RATES_MCS_1STREAM]; /* STBC 20in40MHz to 2 Tx Chain */
1938 uint8 ul20_s2x3[WL_NUM_RATES_MCS_1STREAM]; /* STBC 20in40MHz to 3 Tx Chain */
1939 } stbc_t;
1941 typedef struct n2x2 {
1942 uint8 siso[WL_NUM_RATES_MCS_1STREAM]; /* SISO MCS 0-7 */
1943 uint8 cdd[WL_NUM_RATES_MCS_1STREAM]; /* CDD MCS 0-7 */
1944 uint8 stbc[WL_NUM_RATES_MCS_1STREAM]; /* STBC MCS 0-7 */
1945 uint8 sdm[WL_NUM_RATES_MCS_1STREAM]; /* MCS 8-15 */
1946 } n2x2_t;
1948 typedef struct n3x3 {
1949 uint8 s1x1[WL_NUM_RATES_MCS_1STREAM]; /* 1 Nsts to 1 Tx Chain */
1950 uint8 s1x2[WL_NUM_RATES_MCS_1STREAM]; /* 1 Nsts to 2 Tx Chain */
1951 uint8 s2x2[WL_NUM_RATES_MCS_1STREAM]; /* 2 Nsts to 2 Tx Chain */
1952 uint8 s3x3[WL_NUM_RATES_MCS_1STREAM]; /* 3 Nsts to 3 Tx Chain */
1953 } n3x3_t;
1955 typedef struct n3x3a {
1956 uint8 u20s1x3[WL_NUM_RATES_MCS_1STREAM]; /* 20 MHz 1 Nsts to 3 Tx Chain */
1957 uint8 u20s2x3[WL_NUM_RATES_MCS_1STREAM]; /* 20 MHz 2 Nsts to 3 Tx Chain */
1958 uint8 u40s1x3[WL_NUM_RATES_MCS_1STREAM]; /* 40 MHz 1 Nsts to 3 Tx Chain */
1959 uint8 u40s2x3[WL_NUM_RATES_MCS_1STREAM]; /* 40 MHz 2 Nsts to 3 Tx Chain */
1960 uint8 ul20s1x3[WL_NUM_RATES_MCS_1STREAM]; /* 20ul 1 Nsts to 3 Tx Chain */
1961 uint8 ul20s2x3[WL_NUM_RATES_MCS_1STREAM]; /* 20ul 2 Nsts to 3 Tx Chain */
1962 } n3x3a_t;
1964 #define WL_NUM_2x2_ELEMENTS 4
1965 #define WL_NUM_3x3_ELEMENTS 6
1967 typedef struct txppr {
1968 /* start of 20MHz tx power limits */
1969 uint8 cck[WL_NUM_RATES_CCK]; /* Legacy CCK/DSSS */
1970 uint8 ofdm[WL_NUM_RATES_OFDM]; /* 20 MHz Legacy OFDM transmission */
1971 uint8 ofdm_cdd[WL_NUM_RATES_OFDM]; /* 20 MHz Legacy OFDM CDD transmission */
1972 union {
1973 struct n2x2 n; /* nphy MCS rates */
1974 struct n3x3 ht; /* htphy MCS rates */
1975 } u20;
1976 /* start of 40MHz tx power limits */
1977 uint8 ofdm_40[WL_NUM_RATES_OFDM]; /* 40 MHz Legacy OFDM transmission */
1978 uint8 ofdm_40_cdd[WL_NUM_RATES_OFDM]; /* 40 MHz Legacy OFDM CDD transmission */
1979 union {
1980 struct n2x2 n;
1981 struct n3x3 ht;
1982 } u40;
1983 /* MCS32 tx power limits */
1984 uint8 mcs32;
1985 /* start of 20in40MHz tx power limits */
1986 uint8 cck_20ul[WL_NUM_RATES_CCK]; /* 20 in 40MHz Legacy CCK/DSSS */
1987 uint8 ofdm_20ul[WL_NUM_RATES_OFDM]; /* 20 in 40MHz Legacy OFDM transmission */
1988 uint8 ofdm_20ul_cdd[WL_NUM_RATES_OFDM]; /* 20 in 40MHz Legacy OFDM CDD transmission */
1989 n3x3_t ht20ul; /* 20 in 40MHz MCS rates */
1990 n3x3a_t ht; /* 1 & 2 Nsts to 3 Tx chain rates */
1991 cck_t cck_cdd; /* 20 MHz CCK CDD 2 and 3 Tx chains */
1992 cck_t cck_20ul_cdd; /* 20 in 40MHz CCK CDD 2 and 3 Tx chains */
1993 #ifdef NOT_YET
1994 stbc_t stbc; /* 20/40/20in40 MHz 2 and 3 Tx chains */
1995 #endif
1996 } txppr_t;
1998 /* SROM 8 TX Power defines */
1999 /* 20MHz */
2000 #define WL_TX_POWER_CCK_FIRST OFFSETOF(txppr_t, cck) /* CCK */
2001 #define WL_TX_POWER_CCK_CDD_S1x2_FIRST OFFSETOF(txppr_t, cck_cdd.s1x2) /* CCK CDD 1x2 rate */
2002 #define WL_TX_POWER_CCK_CDD_S1x3_FIRST OFFSETOF(txppr_t, cck_cdd.s1x3) /* CCK CDD 1x3 rate */
2003 #define WL_TX_POWER_OFDM20_FIRST OFFSETOF(txppr_t, ofdm) /* OFDM SISO */
2004 #define WL_TX_POWER_OFDM20_CDD_FIRST OFFSETOF(txppr_t, ofdm_cdd) /* OFDM CDD rate */
2005 #define WL_TX_POWER_MCS20_SISO_FIRST OFFSETOF(txppr_t, u20.n.siso) /* MCS SISO rate */
2006 #define WL_TX_POWER_MCS20_CDD_FIRST OFFSETOF(txppr_t, u20.n.cdd) /* MCS CDD rate */
2007 #define WL_TX_POWER_MCS20_STBC_FIRST OFFSETOF(txppr_t, u20.n.stbc) /* MCS STBC rate */
2008 #define WL_TX_POWER_MCS20_SDM_FIRST OFFSETOF(txppr_t, u20.n.sdm) /* MCS SDM rate */
2010 #define WL_TX_POWER_20_S1x1_FIRST OFFSETOF(txppr_t, u20.ht.s1x1) /* MCS 0-7 rate */
2011 #define WL_TX_POWER_20_S1x2_FIRST OFFSETOF(txppr_t, u20.ht.s1x2) /* MCS 0-7 rate */
2012 #define WL_TX_POWER_20_S1x3_FIRST OFFSETOF(txppr_t, ht.u20s1x3) /* MCS 0-7 rate */
2013 #define WL_TX_POWER_20_S2x2_FIRST OFFSETOF(txppr_t, u20.ht.s2x2) /* MCS 8-15 rate */
2014 #define WL_TX_POWER_20_S2x3_FIRST OFFSETOF(txppr_t, ht.u20s2x3) /* MCS 8-15 rate */
2015 #define WL_TX_POWER_20_S3x3_FIRST OFFSETOF(txppr_t, u20.ht.s3x3) /* MCS 16-23 rate */
2017 #ifdef NOT_YET
2018 #define WL_TX_POWER_HT_STBC_S2x2_FIRST OFFSETOF(txppr_t, stbc.s2x2) /* HT STBC 2x2 rate */
2019 #define WL_TX_POWER_HT_STBC_S2x3_FIRST OFFSETOF(txppr_t, stbc.s2x3) /* HT STBC 2x3 rate */
2020 #endif
2022 /* 40MHz */
2023 #define WL_TX_POWER_OFDM40_FIRST OFFSETOF(txppr_t, ofdm_40) /* OFDM SISO rate */
2024 #define WL_TX_POWER_OFDM40_CDD_FIRST OFFSETOF(txppr_t, ofdm_40_cdd) /* OFDM CDD rate */
2025 #define WL_TX_POWER_MCS40_SISO_FIRST OFFSETOF(txppr_t, u40.n.siso) /* MCS SISO rate */
2026 #define WL_TX_POWER_MCS40_CDD_FIRST OFFSETOF(txppr_t, u40.n.cdd) /* MCS CDD rate */
2027 #define WL_TX_POWER_MCS40_STBC_FIRST OFFSETOF(txppr_t, u40.n.stbc) /* MCS STBC rate */
2028 #define WL_TX_POWER_MCS40_SDM_FIRST OFFSETOF(txppr_t, u40.n.sdm) /* MCS SDM rate */
2030 #define WL_TX_POWER_40_S1x1_FIRST OFFSETOF(txppr_t, u40.ht.s1x1) /* MCS 0-7 rate */
2031 #define WL_TX_POWER_40_S1x2_FIRST OFFSETOF(txppr_t, u40.ht.s1x2) /* MCS 0-7 rate */
2032 #define WL_TX_POWER_40_S1x3_FIRST OFFSETOF(txppr_t, ht.u40s1x3) /* MCS 0-7 rate */
2033 #define WL_TX_POWER_40_S2x2_FIRST OFFSETOF(txppr_t, u40.ht.s2x2) /* MCS 8-15 rate */
2034 #define WL_TX_POWER_40_S2x3_FIRST OFFSETOF(txppr_t, ht.u40s2x3) /* MCS 8-15 rate */
2035 #define WL_TX_POWER_40_S3x3_FIRST OFFSETOF(txppr_t, u40.ht.s3x3) /* MCS 16-23 rate */
2036 #define WL_TX_POWER_MCS_32 OFFSETOF(txppr_t, mcs32) /* MCS 32 rate */
2038 #ifdef NOT_YET
2039 #define WL_TX_POWER_HT_STBC_40_S2x2_FIRST OFFSETOF(txppr_t, stbc.u40_s2x2) /* HT STBC 2x2 rate */
2040 #define WL_TX_POWER_HT_STBC_40_S2x3_FIRST OFFSETOF(txppr_t, stbc.u40_s2x3) /* HT STBC 2x3 rate */
2041 #endif
2043 /* 20 in 40MHz */
2044 #define WL_TX_POWER_20UL_CCK_FIRST OFFSETOF(txppr_t, cck_20ul)
2045 /* CCK CDD 20in40 1x2 rate */
2046 #define WL_TX_POWER_CCK_20U_CDD_S1x2_FIRST OFFSETOF(txppr_t, cck_20ul_cdd.s1x2)
2047 /* CCK CDD 20in40 1x3 rate */
2048 #define WL_TX_POWER_CCK_20U_CDD_S1x3_FIRST OFFSETOF(txppr_t, cck_20ul_cdd.s1x3)
2049 #define WL_TX_POWER_20UL_OFDM_FIRST OFFSETOF(txppr_t, ofdm_20ul)
2050 #define WL_TX_POWER_20UL_OFDM_CDD_FIRST OFFSETOF(txppr_t, ofdm_20ul_cdd)
2051 #define WL_TX_POWER_20UL_S1x1_FIRST OFFSETOF(txppr_t, ht20ul.s1x1) /* MCS 0-7 rate */
2052 #define WL_TX_POWER_20UL_S1x2_FIRST OFFSETOF(txppr_t, ht20ul.s1x2) /* MCS 0-7 rate */
2053 #define WL_TX_POWER_20UL_S1x3_FIRST OFFSETOF(txppr_t, ht.ul20s1x3) /* MCS 0-7 rate */
2054 #define WL_TX_POWER_20UL_S2x2_FIRST OFFSETOF(txppr_t, ht20ul.s2x2) /* MCS 8-15 rate */
2055 #define WL_TX_POWER_20UL_S2x3_FIRST OFFSETOF(txppr_t, ht.ul20s2x3) /* MCS 8-15 rate */
2056 #define WL_TX_POWER_20UL_S3x3_FIRST OFFSETOF(txppr_t, ht20ul.s3x3) /* MCS 16-23 rate */
2058 #ifdef NOT_YET
2059 /* HT STBC 2x2 rate */
2060 #define WL_TX_POWER_HT_STBC_UL20_S2x2_FIRST OFFSETOF(txppr_t, stbc.ul20_s2x2)
2061 /* HT STBC 2x3 rate */
2062 #define WL_TX_POWER_HT_STBC_UL20_S2x3_FIRST OFFSETOF(txppr_t, stbc.ul20_s2x3)
2063 #endif
2064 #define WL_TX_POWER_RATES sizeof(struct txppr)
2066 /* sslpnphy specifics */
2067 #define WL_TX_POWER_MCS20_SISO_FIRST_SSN 12 /* Index for first 20MHz MCS SISO rate */
2069 /* tx_power_t.flags bits */
2070 #define WL_TX_POWER_F_ENABLED 1
2071 #define WL_TX_POWER_F_HW 2
2072 #define WL_TX_POWER_F_MIMO 4
2073 #define WL_TX_POWER_F_SISO 8
2074 #define WL_TX_POWER_F_HT 0x10
2076 typedef struct {
2077 uint16 ver; /* version of this struct */
2078 uint16 len; /* length in bytes of this structure */
2079 uint32 flags;
2080 chanspec_t chanspec; /* txpwr report for this channel */
2081 chanspec_t local_chanspec; /* channel on which we are associated */
2082 uint8 ppr[WL_TX_POWER_RATES]; /* Latest target power */
2083 } wl_txppr_t;
2084 #define WL_TXPPR_VERSION 0
2085 #define WL_TXPPR_LENGTH (sizeof(wl_txppr_t))
2087 typedef struct {
2088 uint32 flags;
2089 chanspec_t chanspec; /* txpwr report for this channel */
2090 chanspec_t local_chanspec; /* channel on which we are associated */
2091 uint8 local_max; /* local max according to the AP */
2092 uint8 local_constraint; /* local constraint according to the AP */
2093 int8 antgain[2]; /* Ant gain for each band - from SROM */
2094 uint8 rf_cores; /* count of RF Cores being reported */
2095 uint8 est_Pout[4]; /* Latest tx power out estimate per RF chain */
2096 uint8 est_Pout_act[4]; /* Latest tx power out estimate per RF chain
2097 * without adjustment
2099 uint8 est_Pout_cck; /* Latest CCK tx power out estimate */
2100 uint8 tx_power_max[4]; /* Maximum target power among all rates */
2101 uint8 tx_power_max_rate_ind[4]; /* Index of the rate with the max target power */
2102 uint8 user_limit[WL_TX_POWER_RATES]; /* User limit */
2103 uint8 reg_limit[WL_TX_POWER_RATES]; /* Regulatory power limit */
2104 uint8 board_limit[WL_TX_POWER_RATES]; /* Max power board can support (SROM) */
2105 uint8 target[WL_TX_POWER_RATES]; /* Latest target power */
2106 } tx_power_t;
2108 typedef struct tx_inst_power {
2109 uint8 txpwr_est_Pout[2]; /* Latest estimate for 2.4 and 5 Ghz */
2110 uint8 txpwr_est_Pout_gofdm; /* Pwr estimate for 2.4 OFDM */
2111 } tx_inst_power_t;
2114 typedef struct {
2115 uint32 flags;
2116 chanspec_t chanspec; /* txpwr report for this channel */
2117 chanspec_t local_chanspec; /* channel on which we are associated */
2118 uint8 local_max; /* local max according to the AP */
2119 uint8 local_constraint; /* local constraint according to the AP */
2120 int8 antgain[2]; /* Ant gain for each band - from SROM */
2121 uint8 rf_cores; /* count of RF Cores being reported */
2122 uint8 est_Pout[4]; /* Latest tx power out estimate per RF chain */
2123 uint8 est_Pout_act[4]; /* Latest tx power out estimate per RF chain
2124 * without adjustment
2126 uint8 est_Pout_cck; /* Latest CCK tx power out estimate */
2127 uint8 tx_power_max[4]; /* Maximum target power among all rates */
2128 uint8 tx_power_max_rate_ind[4]; /* Index of the rate with the max target power */
2129 txppr_t user_limit; /* User limit */
2130 txppr_t reg_limit; /* Regulatory power limit */
2131 txppr_t board_limit; /* Max power board can support (SROM) */
2132 txppr_t target; /* Latest target power */
2133 } wl_txpwr_t;
2135 #define WL_NUM_TXCHAIN_MAX 4
2136 typedef struct wl_txchain_pwr_offsets {
2137 int8 offset[WL_NUM_TXCHAIN_MAX]; /* quarter dBm signed offset for each chain */
2138 } wl_txchain_pwr_offsets_t;
2140 /* 802.11h measurement types */
2141 #define WLC_MEASURE_TPC 1
2142 #define WLC_MEASURE_CHANNEL_BASIC 2
2143 #define WLC_MEASURE_CHANNEL_CCA 3
2144 #define WLC_MEASURE_CHANNEL_RPI 4
2146 /* regulatory enforcement levels */
2147 #define SPECT_MNGMT_OFF 0 /* both 11h and 11d disabled */
2148 #define SPECT_MNGMT_LOOSE_11H 1 /* allow non-11h APs in scan lists */
2149 #define SPECT_MNGMT_STRICT_11H 2 /* prune out non-11h APs from scan list */
2150 #define SPECT_MNGMT_STRICT_11D 3 /* switch to 802.11D mode */
2151 /* SPECT_MNGMT_LOOSE_11H_D - same as SPECT_MNGMT_LOOSE with the exception that Country IE
2152 * adoption is done regardless of capability spectrum_management
2154 #define SPECT_MNGMT_LOOSE_11H_D 4 /* operation defined above */
2156 #define WL_CHAN_VALID_HW (1 << 0) /* valid with current HW */
2157 #define WL_CHAN_VALID_SW (1 << 1) /* valid with current country setting */
2158 #define WL_CHAN_BAND_5G (1 << 2) /* 5GHz-band channel */
2159 #define WL_CHAN_RADAR (1 << 3) /* radar sensitive channel */
2160 #define WL_CHAN_INACTIVE (1 << 4) /* temporarily inactive due to radar */
2161 #define WL_CHAN_PASSIVE (1 << 5) /* channel is in passive mode */
2162 #define WL_CHAN_RESTRICTED (1 << 6) /* restricted use channel */
2164 /* BTC mode used by "btc_mode" iovar */
2165 #define WL_BTC_DISABLE 0 /* disable BT coexistence */
2166 #define WL_BTC_FULLTDM 1 /* full TDM COEX */
2167 #define WL_BTC_ENABLE 1 /* full TDM COEX to maintain backward compatiblity */
2168 #define WL_BTC_PREMPT 2 /* full TDM COEX with preemption */
2169 #define WL_BTC_LITE 3 /* light weight coex for large isolation platform */
2170 #define WL_BTC_PARALLEL 4 /* BT and WLAN run in parallel with separate antenna */
2171 #define WL_BTC_HYBRID 5 /* hybrid coex, only ack is allowed to transmit in BT slot */
2172 #define WL_BTC_DEFAULT 8 /* set the default mode for the device */
2173 #define WL_INF_BTC_DISABLE 0
2174 #define WL_INF_BTC_ENABLE 1
2175 #define WL_INF_BTC_AUTO 3
2177 /* BTC wire used by "btc_wire" iovar */
2178 #define WL_BTC_DEFWIRE 0 /* use default wire setting */
2179 #define WL_BTC_2WIRE 2 /* use 2-wire BTC */
2180 #define WL_BTC_3WIRE 3 /* use 3-wire BTC */
2181 #define WL_BTC_4WIRE 4 /* use 4-wire BTC */
2183 /* BTC flags: BTC configuration that can be set by host */
2184 #define WL_BTC_FLAG_PREMPT (1 << 0)
2185 #define WL_BTC_FLAG_BT_DEF (1 << 1)
2186 #define WL_BTC_FLAG_ACTIVE_PROT (1 << 2)
2187 #define WL_BTC_FLAG_SIM_RSP (1 << 3)
2188 #define WL_BTC_FLAG_PS_PROTECT (1 << 4)
2189 #define WL_BTC_FLAG_SIM_TX_LP (1 << 5)
2190 #define WL_BTC_FLAG_ECI (1 << 6)
2191 #define WL_BTC_FLAG_LIGHT (1 << 7)
2192 #define WL_BTC_FLAG_PARALLEL (1 << 8)
2193 #endif /* !defined(ESTA_POSTMOGRIFY_REMOVAL) */
2195 /* Message levels */
2196 #define WL_ERROR_VAL 0x00000001
2197 #define WL_TRACE_VAL 0x00000002
2198 #define WL_PRHDRS_VAL 0x00000004
2199 #define WL_PRPKT_VAL 0x00000008
2200 #define WL_INFORM_VAL 0x00000010
2201 #define WL_TMP_VAL 0x00000020
2202 #define WL_OID_VAL 0x00000040
2203 #define WL_RATE_VAL 0x00000080
2204 #define WL_ASSOC_VAL 0x00000100
2205 #define WL_PRUSR_VAL 0x00000200
2206 #define WL_PS_VAL 0x00000400
2207 #define WL_TXPWR_VAL 0x00000800 /* retired in TOT on 6/10/2009 */
2208 #define WL_PORT_VAL 0x00001000
2209 #define WL_DUAL_VAL 0x00002000
2210 #define WL_WSEC_VAL 0x00004000
2211 #define WL_WSEC_DUMP_VAL 0x00008000
2212 #define WL_LOG_VAL 0x00010000
2213 #define WL_NRSSI_VAL 0x00020000 /* retired in TOT on 6/10/2009 */
2214 #define WL_LOFT_VAL 0x00040000 /* retired in TOT on 6/10/2009 */
2215 #define WL_REGULATORY_VAL 0x00080000
2216 #define WL_PHYCAL_VAL 0x00100000 /* retired in TOT on 6/10/2009 */
2217 #define WL_RADAR_VAL 0x00200000 /* retired in TOT on 6/10/2009 */
2218 #define WL_MPC_VAL 0x00400000
2219 #define WL_APSTA_VAL 0x00800000
2220 #define WL_DFS_VAL 0x01000000
2221 #define WL_BA_VAL 0x02000000
2222 #define WL_ACI_VAL 0x04000000
2223 #define WL_MBSS_VAL 0x04000000
2224 #define WL_CAC_VAL 0x08000000
2225 #define WL_AMSDU_VAL 0x10000000
2226 #define WL_AMPDU_VAL 0x20000000
2227 #define WL_FFPLD_VAL 0x40000000
2229 /* wl_msg_level is full. For new bits take the next one and AND with
2230 * wl_msg_level2 in wl_dbg.h
2232 #define WL_DPT_VAL 0x00000001
2233 #define WL_SCAN_VAL 0x00000002
2234 #define WL_WOWL_VAL 0x00000004
2235 #define WL_COEX_VAL 0x00000008
2236 #define WL_RTDC_VAL 0x00000010
2237 #define WL_PROTO_VAL 0x00000020
2238 #define WL_BTA_VAL 0x00000040
2239 #define WL_CHANINT_VAL 0x00000080
2240 #define WL_THERMAL_VAL 0x00000100 /* retired in TOT on 6/10/2009 */
2241 #define WL_P2P_VAL 0x00000200
2242 #define WL_ITFR_VAL 0x00000400
2243 #define WL_MCHAN_VAL 0x00000800
2245 /* max # of leds supported by GPIO (gpio pin# == led index#) */
2246 #define WL_LED_NUMGPIO 32 /* gpio 0-31 */
2248 /* led per-pin behaviors */
2249 #define WL_LED_OFF 0 /* always off */
2250 #define WL_LED_ON 1 /* always on */
2251 #define WL_LED_ACTIVITY 2 /* activity */
2252 #define WL_LED_RADIO 3 /* radio enabled */
2253 #define WL_LED_ARADIO 4 /* 5 Ghz radio enabled */
2254 #define WL_LED_BRADIO 5 /* 2.4Ghz radio enabled */
2255 #define WL_LED_BGMODE 6 /* on if gmode, off if bmode */
2256 #define WL_LED_WI1 7
2257 #define WL_LED_WI2 8
2258 #define WL_LED_WI3 9
2259 #define WL_LED_ASSOC 10 /* associated state indicator */
2260 #define WL_LED_INACTIVE 11 /* null behavior (clears default behavior) */
2261 #define WL_LED_ASSOCACT 12 /* on when associated; blink fast for activity */
2262 #define WL_LED_WI4 13
2263 #define WL_LED_WI5 14
2264 #define WL_LED_BLINKSLOW 15 /* blink slow */
2265 #define WL_LED_BLINKMED 16 /* blink med */
2266 #define WL_LED_BLINKFAST 17 /* blink fast */
2267 #define WL_LED_BLINKCUSTOM 18 /* blink custom */
2268 #define WL_LED_BLINKPERIODIC 19 /* blink periodic (custom 1000ms / off 400ms) */
2269 #define WL_LED_ASSOC_WITH_SEC 20 /* when connected with security */
2270 /* keep on for 300 sec */
2271 #define WL_LED_START_OFF 21 /* off upon boot, could be turned on later */
2272 #define WL_LED_NUMBEHAVIOR 22
2274 /* led behavior numeric value format */
2275 #define WL_LED_BEH_MASK 0x7f /* behavior mask */
2276 #define WL_LED_AL_MASK 0x80 /* activelow (polarity) bit */
2278 /* maximum channels returned by the get valid channels iovar */
2279 #define WL_NUMCHANNELS 64
2280 #define WL_NUMCHANSPECS 100
2282 /* WDS link local endpoint WPA role */
2283 #define WL_WDS_WPA_ROLE_AUTH 0 /* authenticator */
2284 #define WL_WDS_WPA_ROLE_SUP 1 /* supplicant */
2285 #define WL_WDS_WPA_ROLE_AUTO 255 /* auto, based on mac addr value */
2287 /* number of bytes needed to define a 128-bit mask for MAC event reporting */
2288 #define WL_EVENTING_MASK_LEN 16
2291 * Join preference iovar value is an array of tuples. Each tuple has a one-byte type,
2292 * a one-byte length, and a variable length value. RSSI type tuple must be present
2293 * in the array.
2295 * Types are defined in "join preference types" section.
2297 * Length is the value size in octets. It is reserved for WL_JOIN_PREF_WPA type tuple
2298 * and must be set to zero.
2300 * Values are defined below.
2302 * 1. RSSI - 2 octets
2303 * offset 0: reserved
2304 * offset 1: reserved
2306 * 2. WPA - 2 + 12 * n octets (n is # tuples defined below)
2307 * offset 0: reserved
2308 * offset 1: # of tuples
2309 * offset 2: tuple 1
2310 * offset 14: tuple 2
2311 * ...
2312 * offset 2 + 12 * (n - 1) octets: tuple n
2314 * struct wpa_cfg_tuple {
2315 * uint8 akm[DOT11_OUI_LEN+1]; akm suite
2316 * uint8 ucipher[DOT11_OUI_LEN+1]; unicast cipher suite
2317 * uint8 mcipher[DOT11_OUI_LEN+1]; multicast cipher suite
2318 * };
2320 * multicast cipher suite can be specified as a specific cipher suite or WL_WPA_ACP_MCS_ANY.
2322 * 3. BAND - 2 octets
2323 * offset 0: reserved
2324 * offset 1: see "band preference" and "band types"
2326 * 4. BAND RSSI - 2 octets
2327 * offset 0: band types
2328 * offset 1: +ve RSSI boost balue in dB
2331 /* join preference types */
2332 #define WL_JOIN_PREF_RSSI 1 /* by RSSI */
2333 #define WL_JOIN_PREF_WPA 2 /* by akm and ciphers */
2334 #define WL_JOIN_PREF_BAND 3 /* by 802.11 band */
2335 #define WL_JOIN_PREF_RSSI_DELTA 4 /* by 802.11 band only if RSSI delta condition matches */
2336 #define WL_JOIN_PREF_TRANS_PREF 5 /* defined by requesting AP */
2338 /* band preference */
2339 #define WLJP_BAND_ASSOC_PREF 255 /* use what WLC_SET_ASSOC_PREFER ioctl specifies */
2341 /* any multicast cipher suite */
2342 #define WL_WPA_ACP_MCS_ANY "\x00\x00\x00\x00"
2344 struct tsinfo_arg {
2345 uint8 octets[3];
2348 #define NFIFO 6 /* # tx/rx fifopairs */
2350 #define WL_CNT_T_VERSION 6 /* current version of wl_cnt_t struct */
2352 typedef struct {
2353 uint16 version; /* see definition of WL_CNT_T_VERSION */
2354 uint16 length; /* length of entire structure */
2356 /* transmit stat counters */
2357 uint32 txframe; /* tx data frames */
2358 uint32 txbyte; /* tx data bytes */
2359 uint32 txretrans; /* tx mac retransmits */
2360 uint32 txerror; /* tx data errors (derived: sum of others) */
2361 uint32 txctl; /* tx management frames */
2362 uint32 txprshort; /* tx short preamble frames */
2363 uint32 txserr; /* tx status errors */
2364 uint32 txnobuf; /* tx out of buffers errors */
2365 uint32 txnoassoc; /* tx discard because we're not associated */
2366 uint32 txrunt; /* tx runt frames */
2367 uint32 txchit; /* tx header cache hit (fastpath) */
2368 uint32 txcmiss; /* tx header cache miss (slowpath) */
2369 uint32 txcongest; /* tx packets queued when exceeding queue threshold */
2371 /* transmit chip error counters */
2372 uint32 txuflo; /* tx fifo underflows */
2373 uint32 txphyerr; /* tx phy errors (indicated in tx status) */
2374 uint32 txphycrs;
2376 /* receive stat counters */
2377 uint32 rxframe; /* rx data frames */
2378 uint32 rxbyte; /* rx data bytes */
2379 uint32 rxerror; /* rx data errors (derived: sum of others) */
2380 uint32 rxctl; /* rx management frames */
2381 uint32 rxnobuf; /* rx out of buffers errors */
2382 uint32 rxnondata; /* rx non data frames in the data channel errors */
2383 uint32 rxbadds; /* rx bad DS errors */
2384 uint32 rxbadcm; /* rx bad control or management frames */
2385 uint32 rxfragerr; /* rx fragmentation errors */
2386 uint32 rxrunt; /* rx runt frames */
2387 uint32 rxgiant; /* rx giant frames */
2388 uint32 rxnoscb; /* rx no scb error */
2389 uint32 rxbadproto; /* rx invalid frames */
2390 uint32 rxbadsrcmac; /* rx frames with Invalid Src Mac */
2391 uint32 rxbadda; /* rx frames tossed for invalid da */
2392 uint32 rxfilter; /* rx frames filtered out */
2394 /* receive chip error counters */
2395 uint32 rxoflo; /* rx fifo overflow errors */
2396 uint32 rxuflo[NFIFO]; /* rx dma descriptor underflow errors */
2398 uint32 d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */
2399 uint32 d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */
2400 uint32 d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */
2402 /* misc counters */
2403 uint32 dmade; /* tx/rx dma descriptor errors */
2404 uint32 dmada; /* tx/rx dma data errors */
2405 uint32 dmape; /* tx/rx dma descriptor protocol errors */
2406 uint32 reset; /* reset count */
2407 uint32 tbtt; /* cnts the TBTT int's */
2408 uint32 txdmawar;
2409 uint32 pkt_callback_reg_fail; /* callbacks register failure */
2411 /* MAC counters: 32-bit version of d11.h's macstat_t */
2412 uint32 txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS,
2413 * Control Management (includes retransmissions)
2415 uint32 txrtsfrm; /* number of RTS sent out by the MAC */
2416 uint32 txctsfrm; /* number of CTS sent out by the MAC */
2417 uint32 txackfrm; /* number of ACK frames sent out */
2418 uint32 txdnlfrm; /* Not used */
2419 uint32 txbcnfrm; /* beacons transmitted */
2420 uint32 txfunfl[8]; /* per-fifo tx underflows */
2421 uint32 txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS
2422 * or BCN)
2424 uint32 txphyerror; /* Transmit phy error, type of error is reported in tx-status for
2425 * driver enqueued frames
2427 uint32 rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */
2428 uint32 rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */
2429 uint32 rxinvmachdr; /* Either the protocol version != 0 or frame type not
2430 * data/control/management
2432 uint32 rxbadfcs; /* number of frames for which the CRC check failed in the MAC */
2433 uint32 rxbadplcp; /* parity check of the PLCP header failed */
2434 uint32 rxcrsglitch; /* PHY was able to correlate the preamble but not the header */
2435 uint32 rxstrt; /* Number of received frames with a good PLCP
2436 * (i.e. passing parity check)
2438 uint32 rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */
2439 uint32 rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */
2440 uint32 rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */
2441 uint32 rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */
2442 uint32 rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */
2443 uint32 rxackucast; /* number of ucast ACKS received (good FCS) */
2444 uint32 rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */
2445 uint32 rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */
2446 uint32 rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */
2447 uint32 rxrtsocast; /* number of received RTS not addressed to the MAC */
2448 uint32 rxctsocast; /* number of received CTS not addressed to the MAC */
2449 uint32 rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */
2450 uint32 rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */
2451 uint32 rxcfrmmcast; /* number of RX Control multicast frames received by the MAC
2452 * (unlikely to see these)
2454 uint32 rxbeaconmbss; /* beacons received from member of BSS */
2455 uint32 rxdfrmucastobss; /* number of unicast frames addressed to the MAC from
2456 * other BSS (WDS FRAME)
2458 uint32 rxbeaconobss; /* beacons received from other BSS */
2459 uint32 rxrsptmout; /* Number of response timeouts for transmitted frames
2460 * expecting a response
2462 uint32 bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */
2463 uint32 rxf0ovfl; /* Number of receive fifo 0 overflows */
2464 uint32 rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */
2465 uint32 rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */
2466 uint32 txsfovfl; /* Number of transmit status fifo overflows (obsolete) */
2467 uint32 pmqovfl; /* Number of PMQ overflows */
2468 uint32 rxcgprqfrm; /* Number of received Probe requests that made it into
2469 * the PRQ fifo
2471 uint32 rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */
2472 uint32 txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did
2473 * not get ACK
2475 uint32 txcgprssuc; /* Tx Probe Response Success (ACK was received) */
2476 uint32 prs_timeout; /* Number of probe requests that were dropped from the PRQ
2477 * fifo because a probe response could not be sent out within
2478 * the time limit defined in M_PRS_MAXTIME
2480 uint32 rxnack;
2481 uint32 frmscons;
2482 uint32 txnack;
2483 uint32 txglitch_nack; /* obsolete */
2484 uint32 txburst; /* obsolete */
2486 /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
2487 uint32 txfrag; /* dot11TransmittedFragmentCount */
2488 uint32 txmulti; /* dot11MulticastTransmittedFrameCount */
2489 uint32 txfail; /* dot11FailedCount */
2490 uint32 txretry; /* dot11RetryCount */
2491 uint32 txretrie; /* dot11MultipleRetryCount */
2492 uint32 rxdup; /* dot11FrameduplicateCount */
2493 uint32 txrts; /* dot11RTSSuccessCount */
2494 uint32 txnocts; /* dot11RTSFailureCount */
2495 uint32 txnoack; /* dot11ACKFailureCount */
2496 uint32 rxfrag; /* dot11ReceivedFragmentCount */
2497 uint32 rxmulti; /* dot11MulticastReceivedFrameCount */
2498 uint32 rxcrc; /* dot11FCSErrorCount */
2499 uint32 txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */
2500 uint32 rxundec; /* dot11WEPUndecryptableCount */
2502 /* WPA2 counters (see rxundec for DecryptFailureCount) */
2503 uint32 tkipmicfaill; /* TKIPLocalMICFailures */
2504 uint32 tkipcntrmsr; /* TKIPCounterMeasuresInvoked */
2505 uint32 tkipreplay; /* TKIPReplays */
2506 uint32 ccmpfmterr; /* CCMPFormatErrors */
2507 uint32 ccmpreplay; /* CCMPReplays */
2508 uint32 ccmpundec; /* CCMPDecryptErrors */
2509 uint32 fourwayfail; /* FourWayHandshakeFailures */
2510 uint32 wepundec; /* dot11WEPUndecryptableCount */
2511 uint32 wepicverr; /* dot11WEPICVErrorCount */
2512 uint32 decsuccess; /* DecryptSuccessCount */
2513 uint32 tkipicverr; /* TKIPICVErrorCount */
2514 uint32 wepexcluded; /* dot11WEPExcludedCount */
2516 uint32 rxundec_mcst; /* dot11WEPUndecryptableCount */
2518 /* WPA2 counters (see rxundec for DecryptFailureCount) */
2519 uint32 tkipmicfaill_mcst; /* TKIPLocalMICFailures */
2520 uint32 tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */
2521 uint32 tkipreplay_mcst; /* TKIPReplays */
2522 uint32 ccmpfmterr_mcst; /* CCMPFormatErrors */
2523 uint32 ccmpreplay_mcst; /* CCMPReplays */
2524 uint32 ccmpundec_mcst; /* CCMPDecryptErrors */
2525 uint32 fourwayfail_mcst; /* FourWayHandshakeFailures */
2526 uint32 wepundec_mcst; /* dot11WEPUndecryptableCount */
2527 uint32 wepicverr_mcst; /* dot11WEPICVErrorCount */
2528 uint32 decsuccess_mcst; /* DecryptSuccessCount */
2529 uint32 tkipicverr_mcst; /* TKIPICVErrorCount */
2530 uint32 wepexcluded_mcst; /* dot11WEPExcludedCount */
2532 uint32 txchanrej; /* Tx frames suppressed due to channel rejection */
2533 uint32 txexptime; /* Tx frames suppressed due to timer expiration */
2534 uint32 psmwds; /* Count PSM watchdogs */
2535 uint32 phywatchdog; /* Count Phy watchdogs (triggered by ucode) */
2537 /* MBSS counters, AP only */
2538 uint32 prq_entries_handled; /* PRQ entries read in */
2539 uint32 prq_undirected_entries; /* which were bcast bss & ssid */
2540 uint32 prq_bad_entries; /* which could not be translated to info */
2541 uint32 atim_suppress_count; /* TX suppressions on ATIM fifo */
2542 uint32 bcn_template_not_ready; /* Template marked in use on send bcn ... */
2543 uint32 bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */
2544 uint32 late_tbtt_dpc; /* TBTT DPC did not happen in time */
2546 /* per-rate receive stat counters */
2547 uint32 rx1mbps; /* packets rx at 1Mbps */
2548 uint32 rx2mbps; /* packets rx at 2Mbps */
2549 uint32 rx5mbps5; /* packets rx at 5.5Mbps */
2550 uint32 rx6mbps; /* packets rx at 6Mbps */
2551 uint32 rx9mbps; /* packets rx at 9Mbps */
2552 uint32 rx11mbps; /* packets rx at 11Mbps */
2553 uint32 rx12mbps; /* packets rx at 12Mbps */
2554 uint32 rx18mbps; /* packets rx at 18Mbps */
2555 uint32 rx24mbps; /* packets rx at 24Mbps */
2556 uint32 rx36mbps; /* packets rx at 36Mbps */
2557 uint32 rx48mbps; /* packets rx at 48Mbps */
2558 uint32 rx54mbps; /* packets rx at 54Mbps */
2559 uint32 rx108mbps; /* packets rx at 108mbps */
2560 uint32 rx162mbps; /* packets rx at 162mbps */
2561 uint32 rx216mbps; /* packets rx at 216 mbps */
2562 uint32 rx270mbps; /* packets rx at 270 mbps */
2563 uint32 rx324mbps; /* packets rx at 324 mbps */
2564 uint32 rx378mbps; /* packets rx at 378 mbps */
2565 uint32 rx432mbps; /* packets rx at 432 mbps */
2566 uint32 rx486mbps; /* packets rx at 486 mbps */
2567 uint32 rx540mbps; /* packets rx at 540 mbps */
2569 /* pkteng rx frame stats */
2570 uint32 pktengrxducast; /* unicast frames rxed by the pkteng code */
2571 uint32 pktengrxdmcast; /* multicast frames rxed by the pkteng code */
2573 uint32 rfdisable; /* count of radio disables */
2574 uint32 bphy_rxcrsglitch; /* PHY count of bphy glitches */
2576 uint32 txmpdu_sgi; /* count for sgi transmit */
2577 uint32 rxmpdu_sgi; /* count for sgi received */
2578 uint32 txmpdu_stbc; /* count for stbc transmit */
2579 uint32 rxmpdu_stbc; /* count for stbc received */
2581 uint32 dma_hang; /* count for stbc received */
2582 } wl_cnt_t;
2584 #ifndef LINUX_POSTMOGRIFY_REMOVAL
2585 #define WL_DELTA_STATS_T_VERSION 1 /* current version of wl_delta_stats_t struct */
2587 typedef struct {
2588 uint16 version; /* see definition of WL_DELTA_STATS_T_VERSION */
2589 uint16 length; /* length of entire structure */
2591 /* transmit stat counters */
2592 uint32 txframe; /* tx data frames */
2593 uint32 txbyte; /* tx data bytes */
2594 uint32 txretrans; /* tx mac retransmits */
2595 uint32 txfail; /* tx failures */
2597 /* receive stat counters */
2598 uint32 rxframe; /* rx data frames */
2599 uint32 rxbyte; /* rx data bytes */
2601 /* per-rate receive stat counters */
2602 uint32 rx1mbps; /* packets rx at 1Mbps */
2603 uint32 rx2mbps; /* packets rx at 2Mbps */
2604 uint32 rx5mbps5; /* packets rx at 5.5Mbps */
2605 uint32 rx6mbps; /* packets rx at 6Mbps */
2606 uint32 rx9mbps; /* packets rx at 9Mbps */
2607 uint32 rx11mbps; /* packets rx at 11Mbps */
2608 uint32 rx12mbps; /* packets rx at 12Mbps */
2609 uint32 rx18mbps; /* packets rx at 18Mbps */
2610 uint32 rx24mbps; /* packets rx at 24Mbps */
2611 uint32 rx36mbps; /* packets rx at 36Mbps */
2612 uint32 rx48mbps; /* packets rx at 48Mbps */
2613 uint32 rx54mbps; /* packets rx at 54Mbps */
2614 uint32 rx108mbps; /* packets rx at 108mbps */
2615 uint32 rx162mbps; /* packets rx at 162mbps */
2616 uint32 rx216mbps; /* packets rx at 216 mbps */
2617 uint32 rx270mbps; /* packets rx at 270 mbps */
2618 uint32 rx324mbps; /* packets rx at 324 mbps */
2619 uint32 rx378mbps; /* packets rx at 378 mbps */
2620 uint32 rx432mbps; /* packets rx at 432 mbps */
2621 uint32 rx486mbps; /* packets rx at 486 mbps */
2622 uint32 rx540mbps; /* packets rx at 540 mbps */
2623 } wl_delta_stats_t;
2624 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
2626 #define WL_WME_CNT_VERSION 1 /* current version of wl_wme_cnt_t */
2628 typedef struct {
2629 uint32 packets;
2630 uint32 bytes;
2631 } wl_traffic_stats_t;
2633 typedef struct {
2634 uint16 version; /* see definition of WL_WME_CNT_VERSION */
2635 uint16 length; /* length of entire structure */
2637 wl_traffic_stats_t tx[AC_COUNT]; /* Packets transmitted */
2638 wl_traffic_stats_t tx_failed[AC_COUNT]; /* Packets dropped or failed to transmit */
2639 wl_traffic_stats_t rx[AC_COUNT]; /* Packets received */
2640 wl_traffic_stats_t rx_failed[AC_COUNT]; /* Packets failed to receive */
2642 wl_traffic_stats_t forward[AC_COUNT]; /* Packets forwarded by AP */
2644 wl_traffic_stats_t tx_expired[AC_COUNT]; /* packets dropped due to lifetime expiry */
2646 } wl_wme_cnt_t;
2648 struct wl_msglevel2 {
2649 uint32 low;
2650 uint32 high;
2653 #ifndef LINUX_POSTMOGRIFY_REMOVAL
2654 #ifdef WLBA
2656 #define WLC_BA_CNT_VERSION 1 /* current version of wlc_ba_cnt_t */
2658 /* block ack related stats */
2659 typedef struct wlc_ba_cnt {
2660 uint16 version; /* WLC_BA_CNT_VERSION */
2661 uint16 length; /* length of entire structure */
2663 /* transmit stat counters */
2664 uint32 txpdu; /* pdus sent */
2665 uint32 txsdu; /* sdus sent */
2666 uint32 txfc; /* tx side flow controlled packets */
2667 uint32 txfci; /* tx side flow control initiated */
2668 uint32 txretrans; /* retransmitted pdus */
2669 uint32 txbatimer; /* ba resend due to timer */
2670 uint32 txdrop; /* dropped packets */
2671 uint32 txaddbareq; /* addba req sent */
2672 uint32 txaddbaresp; /* addba resp sent */
2673 uint32 txdelba; /* delba sent */
2674 uint32 txba; /* ba sent */
2675 uint32 txbar; /* bar sent */
2676 uint32 txpad[4]; /* future */
2678 /* receive side counters */
2679 uint32 rxpdu; /* pdus recd */
2680 uint32 rxqed; /* pdus buffered before sending up */
2681 uint32 rxdup; /* duplicate pdus */
2682 uint32 rxnobuf; /* pdus discarded due to no buf */
2683 uint32 rxaddbareq; /* addba req recd */
2684 uint32 rxaddbaresp; /* addba resp recd */
2685 uint32 rxdelba; /* delba recd */
2686 uint32 rxba; /* ba recd */
2687 uint32 rxbar; /* bar recd */
2688 uint32 rxinvba; /* invalid ba recd */
2689 uint32 rxbaholes; /* ba recd with holes */
2690 uint32 rxunexp; /* unexpected packets */
2691 uint32 rxpad[4]; /* future */
2692 } wlc_ba_cnt_t;
2693 #endif /* WLBA */
2695 /* structure for per-tid ampdu control */
2696 struct ampdu_tid_control {
2697 uint8 tid; /* tid */
2698 uint8 enable; /* enable/disable */
2701 /* structure for identifying ea/tid for sending addba/delba */
2702 struct ampdu_ea_tid {
2703 struct ether_addr ea; /* Station address */
2704 uint8 tid; /* tid */
2706 /* structure for identifying retry/tid for retry_limit_tid/rr_retry_limit_tid */
2707 struct ampdu_retry_tid {
2708 uint8 tid; /* tid */
2709 uint8 retry; /* retry value */
2712 /* Different discovery modes for dpt */
2713 #define DPT_DISCOVERY_MANUAL 0x01 /* manual discovery mode */
2714 #define DPT_DISCOVERY_AUTO 0x02 /* auto discovery mode */
2715 #define DPT_DISCOVERY_SCAN 0x04 /* scan-based discovery mode */
2717 /* different path selection values */
2718 #define DPT_PATHSEL_AUTO 0 /* auto mode for path selection */
2719 #define DPT_PATHSEL_DIRECT 1 /* always use direct DPT path */
2720 #define DPT_PATHSEL_APPATH 2 /* always use AP path */
2722 /* different ops for deny list */
2723 #define DPT_DENY_LIST_ADD 1 /* add to dpt deny list */
2724 #define DPT_DENY_LIST_REMOVE 2 /* remove from dpt deny list */
2726 /* different ops for manual end point */
2727 #define DPT_MANUAL_EP_CREATE 1 /* create manual dpt endpoint */
2728 #define DPT_MANUAL_EP_MODIFY 2 /* modify manual dpt endpoint */
2729 #define DPT_MANUAL_EP_DELETE 3 /* delete manual dpt endpoint */
2731 /* structure for dpt iovars */
2732 typedef struct dpt_iovar {
2733 struct ether_addr ea; /* Station address */
2734 uint8 mode; /* mode: depends on iovar */
2735 uint32 pad; /* future */
2736 } dpt_iovar_t;
2738 /* flags to indicate DPT status */
2739 #define DPT_STATUS_ACTIVE 0x01 /* link active (though may be suspended) */
2740 #define DPT_STATUS_AES 0x02 /* link secured through AES encryption */
2741 #define DPT_STATUS_FAILED 0x04 /* DPT link failed */
2743 #define DPT_FNAME_LEN 48 /* Max length of friendly name */
2745 typedef struct dpt_status {
2746 uint8 status; /* flags to indicate status */
2747 uint8 fnlen; /* length of friendly name */
2748 uchar name[DPT_FNAME_LEN]; /* friendly name */
2749 uint32 rssi; /* RSSI of the link */
2750 sta_info_t sta; /* sta info */
2751 } dpt_status_t;
2753 /* structure for dpt list */
2754 typedef struct dpt_list {
2755 uint32 num; /* number of entries in struct */
2756 dpt_status_t status[1]; /* per station info */
2757 } dpt_list_t;
2759 /* structure for dpt friendly name */
2760 typedef struct dpt_fname {
2761 uint8 len; /* length of friendly name */
2762 uchar name[DPT_FNAME_LEN]; /* friendly name */
2763 } dpt_fname_t;
2765 /* structure for addts arguments */
2766 /* For ioctls that take a list of TSPEC */
2767 struct tslist {
2768 int count; /* number of tspecs */
2769 struct tsinfo_arg tsinfo[1]; /* variable length array of tsinfo */
2772 /* structure for addts/delts arguments */
2773 typedef struct tspec_arg {
2774 uint16 version; /* see definition of TSPEC_ARG_VERSION */
2775 uint16 length; /* length of entire structure */
2776 uint flag; /* bit field */
2777 /* TSPEC Arguments */
2778 struct tsinfo_arg tsinfo; /* TS Info bit field */
2779 uint16 nom_msdu_size; /* (Nominal or fixed) MSDU Size (bytes) */
2780 uint16 max_msdu_size; /* Maximum MSDU Size (bytes) */
2781 uint min_srv_interval; /* Minimum Service Interval (us) */
2782 uint max_srv_interval; /* Maximum Service Interval (us) */
2783 uint inactivity_interval; /* Inactivity Interval (us) */
2784 uint suspension_interval; /* Suspension Interval (us) */
2785 uint srv_start_time; /* Service Start Time (us) */
2786 uint min_data_rate; /* Minimum Data Rate (bps) */
2787 uint mean_data_rate; /* Mean Data Rate (bps) */
2788 uint peak_data_rate; /* Peak Data Rate (bps) */
2789 uint max_burst_size; /* Maximum Burst Size (bytes) */
2790 uint delay_bound; /* Delay Bound (us) */
2791 uint min_phy_rate; /* Minimum PHY Rate (bps) */
2792 uint16 surplus_bw; /* Surplus Bandwidth Allowance (range 1.0 to 8.0) */
2793 uint16 medium_time; /* Medium Time (32 us/s periods) */
2794 uint8 dialog_token; /* dialog token */
2795 } tspec_arg_t;
2797 /* tspec arg for desired station */
2798 typedef struct tspec_per_sta_arg {
2799 struct ether_addr ea;
2800 struct tspec_arg ts;
2801 } tspec_per_sta_arg_t;
2803 /* structure for max bandwidth for each access category */
2804 typedef struct wme_max_bandwidth {
2805 uint32 ac[AC_COUNT]; /* max bandwidth for each access category */
2806 } wme_max_bandwidth_t;
2808 #define WL_WME_MBW_PARAMS_IO_BYTES (sizeof(wme_max_bandwidth_t))
2810 /* current version of wl_tspec_arg_t struct */
2811 #define TSPEC_ARG_VERSION 2 /* current version of wl_tspec_arg_t struct */
2812 #define TSPEC_ARG_LENGTH 55 /* argument length from tsinfo to medium_time */
2813 #define TSPEC_DEFAULT_DIALOG_TOKEN 42 /* default dialog token */
2814 #define TSPEC_DEFAULT_SBW_FACTOR 0x3000 /* default surplus bw */
2817 /* define for flag */
2818 #define TSPEC_PENDING 0 /* TSPEC pending */
2819 #define TSPEC_ACCEPTED 1 /* TSPEC accepted */
2820 #define TSPEC_REJECTED 2 /* TSPEC rejected */
2821 #define TSPEC_UNKNOWN 3 /* TSPEC unknown */
2822 #define TSPEC_STATUS_MASK 7 /* TSPEC status mask */
2825 /* Software feature flag defines used by wlfeatureflag */
2826 #ifdef WLAFTERBURNER
2827 #define WL_SWFL_ABBFL 0x0001 /* Allow Afterburner on systems w/o hardware BFL */
2828 #define WL_SWFL_ABENCORE 0x0002 /* Allow AB on non-4318E chips */
2829 #endif /* WLAFTERBURNER */
2830 #define WL_SWFL_NOHWRADIO 0x0004
2831 #define WL_SWFL_FLOWCONTROL 0x0008 /* Enable backpressure to OS stack */
2832 #define WL_SWFL_WLBSSSORT 0x0010 /* Per-port supports sorting of BSS */
2834 #define WL_LIFETIME_MAX 0xFFFF /* Max value in ms */
2836 /* Packet lifetime configuration per ac */
2837 typedef struct wl_lifetime {
2838 uint32 ac; /* access class */
2839 uint32 lifetime; /* Packet lifetime value in ms */
2840 } wl_lifetime_t;
2842 /* Channel Switch Announcement param */
2843 typedef struct wl_chan_switch {
2844 uint8 mode; /* value 0 or 1 */
2845 uint8 count; /* count # of beacons before switching */
2846 chanspec_t chspec; /* chanspec */
2847 uint8 reg; /* regulatory class */
2848 } wl_chan_switch_t;
2849 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
2851 /* Roaming trigger definitions for WLC_SET_ROAM_TRIGGER.
2853 * (-100 < value < 0) value is used directly as a roaming trigger in dBm
2854 * (0 <= value) value specifies a logical roaming trigger level from
2855 * the list below
2857 * WLC_GET_ROAM_TRIGGER always returns roaming trigger value in dBm, never
2858 * the logical roam trigger value.
2860 #define WLC_ROAM_TRIGGER_DEFAULT 0 /* default roaming trigger */
2861 #define WLC_ROAM_TRIGGER_BANDWIDTH 1 /* optimize for bandwidth roaming trigger */
2862 #define WLC_ROAM_TRIGGER_DISTANCE 2 /* optimize for distance roaming trigger */
2863 #define WLC_ROAM_TRIGGER_AUTO 3 /* auto-detect environment */
2864 #define WLC_ROAM_TRIGGER_MAX_VALUE 3 /* max. valid value */
2866 /* Preferred Network Offload (PNO, formerly PFN) defines */
2867 enum {
2868 PFN_LIST_ORDER,
2869 PFN_RSSI
2872 enum {
2873 DISABLE,
2874 ENABLE
2877 #define SORT_CRITERIA_BIT 0
2878 #define AUTO_NET_SWITCH_BIT 1
2879 #define ENABLE_BKGRD_SCAN_BIT 2
2880 #define IMMEDIATE_SCAN_BIT 3
2881 #define AUTO_CONNECT_BIT 4
2883 #define SORT_CRITERIA_MASK 0x01
2884 #define AUTO_NET_SWITCH_MASK 0x02
2885 #define ENABLE_BKGRD_SCAN_MASK 0x04
2886 #define IMMEDIATE_SCAN_MASK 0x08
2887 #define AUTO_CONNECT_MASK 0x10
2889 #define PFN_VERSION 1
2891 /* PFN data structure */
2892 typedef struct wl_pfn_param {
2893 int32 version; /* PNO parameters version */
2894 int32 scan_freq; /* Scan frequency */
2895 int32 lost_network_timeout; /* Timeout in sec. to declare
2896 * discovered network as lost
2898 int16 flags; /* Bit field to control features
2899 * of PFN such as sort criteria auto
2900 * enable switch and background scan
2902 int16 rssi_margin; /* Margin to avoid jitter for choosing a
2903 * PFN based on RSSI sort criteria
2905 } wl_pfn_param_t;
2907 typedef struct wl_pfn {
2908 wlc_ssid_t ssid; /* ssid name and its length */
2909 int32 bss_type; /* IBSS or infrastructure */
2910 int32 infra; /* BSS Vs IBSS */
2911 int32 auth; /* Open Vs Closed */
2912 int32 wpa_auth; /* WPA type */
2913 int32 wsec; /* wsec value */
2914 } wl_pfn_t;
2916 /* TCP Checksum Offload defines */
2917 #define TOE_TX_CSUM_OL 0x00000001
2918 #define TOE_RX_CSUM_OL 0x00000002
2920 /* TCP Checksum Offload error injection for testing */
2921 #define TOE_ERRTEST_TX_CSUM 0x00000001
2922 #define TOE_ERRTEST_RX_CSUM 0x00000002
2923 #define TOE_ERRTEST_RX_CSUM2 0x00000004
2925 struct toe_ol_stats_t {
2926 /* Num of tx packets that don't need to be checksummed */
2927 uint32 tx_summed;
2929 /* Num of tx packets where checksum is filled by offload engine */
2930 uint32 tx_iph_fill;
2931 uint32 tx_tcp_fill;
2932 uint32 tx_udp_fill;
2933 uint32 tx_icmp_fill;
2935 /* Num of rx packets where toe finds out if checksum is good or bad */
2936 uint32 rx_iph_good;
2937 uint32 rx_iph_bad;
2938 uint32 rx_tcp_good;
2939 uint32 rx_tcp_bad;
2940 uint32 rx_udp_good;
2941 uint32 rx_udp_bad;
2942 uint32 rx_icmp_good;
2943 uint32 rx_icmp_bad;
2945 /* Num of tx packets in which csum error is injected */
2946 uint32 tx_tcp_errinj;
2947 uint32 tx_udp_errinj;
2948 uint32 tx_icmp_errinj;
2950 /* Num of rx packets in which csum error is injected */
2951 uint32 rx_tcp_errinj;
2952 uint32 rx_udp_errinj;
2953 uint32 rx_icmp_errinj;
2956 /* ARP Offload feature flags for arp_ol iovar */
2957 #define ARP_OL_AGENT 0x00000001
2958 #define ARP_OL_SNOOP 0x00000002
2959 #define ARP_OL_HOST_AUTO_REPLY 0x00000004
2960 #define ARP_OL_PEER_AUTO_REPLY 0x00000008
2962 /* ARP Offload error injection */
2963 #define ARP_ERRTEST_REPLY_PEER 0x1
2964 #define ARP_ERRTEST_REPLY_HOST 0x2
2966 #define ARP_MULTIHOMING_MAX 8 /* Maximum local host IP addresses */
2968 /* Arp offload statistic counts */
2969 struct arp_ol_stats_t {
2970 uint32 host_ip_entries; /* Host IP table addresses (more than one if multihomed) */
2971 uint32 host_ip_overflow; /* Host IP table additions skipped due to overflow */
2973 uint32 arp_table_entries; /* ARP table entries */
2974 uint32 arp_table_overflow; /* ARP table additions skipped due to overflow */
2976 uint32 host_request; /* ARP requests from host */
2977 uint32 host_reply; /* ARP replies from host */
2978 uint32 host_service; /* ARP requests from host serviced by ARP Agent */
2980 uint32 peer_request; /* ARP requests received from network */
2981 uint32 peer_request_drop; /* ARP requests from network that were dropped */
2982 uint32 peer_reply; /* ARP replies received from network */
2983 uint32 peer_reply_drop; /* ARP replies from network that were dropped */
2984 uint32 peer_service; /* ARP request from host serviced by ARP Agent */
2988 * Keep-alive packet offloading.
2991 /* NAT keep-alive packets format: specifies the re-transmission period, the packet
2992 * length, and packet contents.
2994 typedef struct wl_keep_alive_pkt {
2995 uint32 period_msec; /* Retransmission period (0 to disable packet re-transmits) */
2996 uint16 len_bytes; /* Size of packet to transmit (0 to disable packet re-transmits) */
2997 uint8 data[1]; /* Variable length packet to transmit. Contents should include
2998 * entire ethernet packet (enet header, IP header, UDP header,
2999 * and UDP payload) in network byte order.
3001 } wl_keep_alive_pkt_t;
3003 #define WL_KEEP_ALIVE_FIXED_LEN OFFSETOF(wl_keep_alive_pkt_t, data)
3006 * Dongle pattern matching filter.
3009 /* Packet filter types. Currently, only pattern matching is supported. */
3010 typedef enum wl_pkt_filter_type {
3011 WL_PKT_FILTER_TYPE_PATTERN_MATCH /* Pattern matching filter */
3012 } wl_pkt_filter_type_t;
3014 #define WL_PKT_FILTER_TYPE wl_pkt_filter_type_t
3016 /* Pattern matching filter. Specifies an offset within received packets to
3017 * start matching, the pattern to match, the size of the pattern, and a bitmask
3018 * that indicates which bits within the pattern should be matched.
3020 typedef struct wl_pkt_filter_pattern {
3021 uint32 offset; /* Offset within received packet to start pattern matching.
3022 * Offset '0' is the first byte of the ethernet header.
3024 uint32 size_bytes; /* Size of the pattern. Bitmask must be the same size. */
3025 uint8 mask_and_pattern[1]; /* Variable length mask and pattern data. mask starts
3026 * at offset 0. Pattern immediately follows mask.
3028 } wl_pkt_filter_pattern_t;
3030 /* IOVAR "pkt_filter_add" parameter. Used to install packet filters. */
3031 typedef struct wl_pkt_filter {
3032 uint32 id; /* Unique filter id, specified by app. */
3033 uint32 type; /* Filter type (WL_PKT_FILTER_TYPE_xxx). */
3034 uint32 negate_match; /* Negate the result of filter matches */
3035 union { /* Filter definitions */
3036 wl_pkt_filter_pattern_t pattern; /* Pattern matching filter */
3037 } u;
3038 } wl_pkt_filter_t;
3040 #define WL_PKT_FILTER_FIXED_LEN OFFSETOF(wl_pkt_filter_t, u)
3041 #define WL_PKT_FILTER_PATTERN_FIXED_LEN OFFSETOF(wl_pkt_filter_pattern_t, mask_and_pattern)
3043 /* IOVAR "pkt_filter_enable" parameter. */
3044 typedef struct wl_pkt_filter_enable {
3045 uint32 id; /* Unique filter id */
3046 uint32 enable; /* Enable/disable bool */
3047 } wl_pkt_filter_enable_t;
3049 /* IOVAR "pkt_filter_list" parameter. Used to retrieve a list of installed filters. */
3050 typedef struct wl_pkt_filter_list {
3051 uint32 num; /* Number of installed packet filters */
3052 wl_pkt_filter_t filter[1]; /* Variable array of packet filters. */
3053 } wl_pkt_filter_list_t;
3055 #define WL_PKT_FILTER_LIST_FIXED_LEN OFFSETOF(wl_pkt_filter_list_t, filter)
3057 /* IOVAR "pkt_filter_stats" parameter. Used to retrieve debug statistics. */
3058 typedef struct wl_pkt_filter_stats {
3059 uint32 num_pkts_matched; /* # filter matches for specified filter id */
3060 uint32 num_pkts_forwarded; /* # packets fwded from dongle to host for all filters */
3061 uint32 num_pkts_discarded; /* # packets discarded by dongle for all filters */
3062 } wl_pkt_filter_stats_t;
3064 /* Sequential Commands ioctl */
3065 typedef struct wl_seq_cmd_ioctl {
3066 uint32 cmd; /* common ioctl definition */
3067 uint32 len; /* length of user buffer */
3068 } wl_seq_cmd_ioctl_t;
3070 #define WL_SEQ_CMD_ALIGN_BYTES 4
3072 /* These are the set of get IOCTLs that should be allowed when using
3073 * IOCTL sequence commands. These are issued implicitly by wl.exe each time
3074 * it is invoked. We never want to buffer these, or else wl.exe will stop working.
3076 #define WL_SEQ_CMDS_GET_IOCTL_FILTER(cmd) \
3077 (((cmd) == WLC_GET_MAGIC) || \
3078 ((cmd) == WLC_GET_VERSION) || \
3079 ((cmd) == WLC_GET_AP) || \
3080 ((cmd) == WLC_GET_INSTANCE))
3083 * Packet engine interface
3086 #define WL_PKTENG_PER_TX_START 0x01
3087 #define WL_PKTENG_PER_TX_STOP 0x02
3088 #define WL_PKTENG_PER_RX_START 0x04
3089 #define WL_PKTENG_PER_RX_WITH_ACK_START 0x05
3090 #define WL_PKTENG_PER_TX_WITH_ACK_START 0x06
3091 #define WL_PKTENG_PER_RX_STOP 0x08
3092 #define WL_PKTENG_PER_MASK 0xff
3094 #define WL_PKTENG_SYNCHRONOUS 0x100 /* synchronous flag */
3096 typedef struct wl_pkteng {
3097 uint32 flags;
3098 uint32 delay; /* Inter-packet delay */
3099 uint32 nframes; /* Number of frames */
3100 uint32 length; /* Packet length */
3101 uint8 seqno; /* Enable/disable sequence no. */
3102 struct ether_addr dest; /* Destination address */
3103 struct ether_addr src; /* Source address */
3104 } wl_pkteng_t;
3106 #define NUM_80211b_RATES 4
3107 #define NUM_80211ag_RATES 8
3108 #define NUM_80211n_RATES 32
3109 #define NUM_80211_RATES (NUM_80211b_RATES+NUM_80211ag_RATES+NUM_80211n_RATES)
3110 typedef struct wl_pkteng_stats {
3111 uint32 lostfrmcnt; /* RX PER test: no of frames lost (skip seqno) */
3112 int32 rssi; /* RSSI */
3113 int32 snr; /* signal to noise ratio */
3114 uint16 rxpktcnt[NUM_80211_RATES+1];
3115 } wl_pkteng_stats_t;
3118 typedef struct wl_sslpnphy_papd_debug_data {
3119 uint8 psat_pwr;
3120 uint8 psat_indx;
3121 uint8 final_idx;
3122 uint8 start_idx;
3123 int32 min_phase;
3124 } wl_sslpnphy_papd_debug_data_t;
3126 #define WL_WOWL_MAGIC (1 << 0) /* Wakeup on Magic packet */
3127 #define WL_WOWL_NET (1 << 1) /* Wakeup on Netpattern */
3128 #define WL_WOWL_DIS (1 << 2) /* Wakeup on loss-of-link due to Disassoc/Deauth */
3129 #define WL_WOWL_RETR (1 << 3) /* Wakeup on retrograde TSF */
3130 #define WL_WOWL_BCN (1 << 4) /* Wakeup on loss of beacon */
3131 #define WL_WOWL_TST (1 << 5) /* Wakeup after test */
3132 #define WL_WOWL_M1 (1 << 6) /* Wakeup after PTK refresh */
3133 #define WL_WOWL_EAPID (1 << 7) /* Wakeup after receipt of EAP-Identity Req */
3134 #define WL_WOWL_PME_GPIO (1 << 8) /* Wakeind via PME(0) or GPIO(1) */
3135 #define WL_WOWL_KEYROT (1 << 14) /* If the bit is set, use key rotaton */
3136 #define WL_WOWL_BCAST (1 << 15) /* If the bit is set, frm received was bcast frame */
3138 #define MAGIC_PKT_MINLEN 102 /* Magic pkt min length is 6 * 0xFF + 16 * ETHER_ADDR_LEN */
3140 typedef struct {
3141 uint masksize; /* Size of the mask in #of bytes */
3142 uint offset; /* Offset to start looking for the packet in # of bytes */
3143 uint patternoffset; /* Offset of start of pattern in the structure */
3144 uint patternsize; /* Size of the pattern itself in #of bytes */
3145 ulong id; /* id */
3146 /* Mask follows the structure above */
3147 /* Pattern follows the mask is at 'patternoffset' from the start */
3148 } wl_wowl_pattern_t;
3150 typedef struct {
3151 uint count;
3152 wl_wowl_pattern_t pattern[1];
3153 } wl_wowl_pattern_list_t;
3155 typedef struct {
3156 uint8 pci_wakeind; /* Whether PCI PMECSR PMEStatus bit was set */
3157 uint16 ucode_wakeind; /* What wakeup-event indication was set by ucode */
3158 } wl_wowl_wakeind_t;
3160 /* per AC rate control related data structure */
3161 typedef struct wl_txrate_class {
3162 uint8 init_rate;
3163 uint8 min_rate;
3164 uint8 max_rate;
3165 } wl_txrate_class_t;
3168 #if defined(DSLCPE_DELAY)
3169 #define WL_DELAYMODE_DEFER 0 /* defer by scheduler's choice, make this driver default */
3170 #define WL_DELAYMODE_FORCE 1 /* force, this is driver default */
3171 #define WL_DELAYMODE_AUTO 2 /* defer if no sta associated, force if sta associated */
3172 #endif
3174 /* Overlap BSS Scan parameters default, minimum, maximum */
3175 #define WLC_OBSS_SCAN_PASSIVE_DWELL_DEFAULT 20 /* unit TU */
3176 #define WLC_OBSS_SCAN_PASSIVE_DWELL_MIN 5 /* unit TU */
3177 #define WLC_OBSS_SCAN_PASSIVE_DWELL_MAX 1000 /* unit TU */
3178 #define WLC_OBSS_SCAN_ACTIVE_DWELL_DEFAULT 10 /* unit TU */
3179 #define WLC_OBSS_SCAN_ACTIVE_DWELL_MIN 10 /* unit TU */
3180 #define WLC_OBSS_SCAN_ACTIVE_DWELL_MAX 1000 /* unit TU */
3181 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_DEFAULT 300 /* unit Sec */
3182 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MIN 10 /* unit Sec */
3183 #define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MAX 900 /* unit Sec */
3184 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_DEFAULT 5
3185 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MIN 5
3186 #define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MAX 100
3187 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_DEFAULT 200 /* unit TU */
3188 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MIN 200 /* unit TU */
3189 #define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MAX 10000 /* unit TU */
3190 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_DEFAULT 20 /* unit TU */
3191 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MIN 20 /* unit TU */
3192 #define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MAX 10000 /* unit TU */
3193 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_DEFAULT 25 /* unit percent */
3194 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MIN 0 /* unit percent */
3195 #define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MAX 100 /* unit percent */
3197 /* structure for Overlap BSS scan arguments */
3198 typedef struct wl_obss_scan_arg {
3199 int16 passive_dwell;
3200 int16 active_dwell;
3201 int16 bss_widthscan_interval;
3202 int16 passive_total;
3203 int16 active_total;
3204 int16 chanwidth_transition_delay;
3205 int16 activity_threshold;
3206 } wl_obss_scan_arg_t;
3208 #define WL_OBSS_SCAN_PARAM_LEN sizeof(wl_obss_scan_arg_t)
3209 #define WL_MIN_NUM_OBSS_SCAN_ARG 7 /* minimum number of arguments required for OBSS Scan */
3211 #define WL_COEX_INFO_MASK 0x07
3212 #define WL_COEX_INFO_REQ 0x01
3213 #define WL_COEX_40MHZ_INTOLERANT 0x02
3214 #define WL_COEX_WIDTH20 0x04
3216 #define WLC_RSSI_INVALID 0 /* invalid RSSI value */
3218 #define MAX_RSSI_LEVELS 8
3220 /* RSSI event notification configuration. */
3221 typedef struct wl_rssi_event {
3222 uint32 rate_limit_msec; /* # of events posted to application will be limited to
3223 * one per specified period (0 to disable rate limit).
3225 uint8 num_rssi_levels; /* Number of entries in rssi_levels[] below */
3226 int8 rssi_levels[MAX_RSSI_LEVELS]; /* Variable number of RSSI levels. An event
3227 * will be posted each time the RSSI of received
3228 * beacons/packets crosses a level.
3230 } wl_rssi_event_t;
3232 typedef struct wl_action_obss_coex_req {
3233 uint8 info;
3234 uint8 num;
3235 uint8 ch_list[1];
3236 } wl_action_obss_coex_req_t;
3238 /* **** EXTLOG **** */
3239 #define EXTLOG_CUR_VER 0x0100
3241 #define MAX_ARGSTR_LEN 18 /* At least big enough for storing ETHER_ADDR_STR_LEN */
3243 /* log modules (bitmap) */
3244 #define LOG_MODULE_COMMON 0x0001
3245 #define LOG_MODULE_ASSOC 0x0002
3246 #define LOG_MODULE_EVENT 0x0004
3247 #define LOG_MODULE_MAX 3 /* Update when adding module */
3249 /* log levels */
3250 #define WL_LOG_LEVEL_DISABLE 0
3251 #define WL_LOG_LEVEL_ERR 1
3252 #define WL_LOG_LEVEL_WARN 2
3253 #define WL_LOG_LEVEL_INFO 3
3254 #define WL_LOG_LEVEL_MAX WL_LOG_LEVEL_INFO /* Update when adding level */
3256 /* flag */
3257 #define LOG_FLAG_EVENT 1
3259 /* log arg_type */
3260 #define LOG_ARGTYPE_NULL 0
3261 #define LOG_ARGTYPE_STR 1 /* %s */
3262 #define LOG_ARGTYPE_INT 2 /* %d */
3263 #define LOG_ARGTYPE_INT_STR 3 /* %d...%s */
3264 #define LOG_ARGTYPE_STR_INT 4 /* %s...%d */
3266 typedef struct wlc_extlog_cfg {
3267 int max_number;
3268 uint16 module; /* bitmap */
3269 uint8 level;
3270 uint8 flag;
3271 uint16 version;
3272 } wlc_extlog_cfg_t;
3274 typedef struct log_record {
3275 uint32 time;
3276 uint16 module;
3277 uint16 id;
3278 uint8 level;
3279 uint8 sub_unit;
3280 uint8 seq_num;
3281 int32 arg;
3282 char str[MAX_ARGSTR_LEN];
3283 } log_record_t;
3285 typedef struct wlc_extlog_req {
3286 uint32 from_last;
3287 uint32 num;
3288 } wlc_extlog_req_t;
3290 typedef struct wlc_extlog_results {
3291 uint16 version;
3292 uint16 record_len;
3293 uint32 num;
3294 log_record_t logs[1];
3295 } wlc_extlog_results_t;
3297 typedef struct log_idstr {
3298 uint16 id;
3299 uint16 flag;
3300 uint8 arg_type;
3301 const char *fmt_str;
3302 } log_idstr_t;
3304 #define FMTSTRF_USER 1
3306 /* flat ID definitions
3307 * New definitions HAVE TO BE ADDED at the end of the table. Otherwise, it will
3308 * affect backward compatibility with pre-existing apps
3310 typedef enum {
3311 FMTSTR_DRIVER_UP_ID = 0,
3312 FMTSTR_DRIVER_DOWN_ID = 1,
3313 FMTSTR_SUSPEND_MAC_FAIL_ID = 2,
3314 FMTSTR_NO_PROGRESS_ID = 3,
3315 FMTSTR_RFDISABLE_ID = 4,
3316 FMTSTR_REG_PRINT_ID = 5,
3317 FMTSTR_EXPTIME_ID = 6,
3318 FMTSTR_JOIN_START_ID = 7,
3319 FMTSTR_JOIN_COMPLETE_ID = 8,
3320 FMTSTR_NO_NETWORKS_ID = 9,
3321 FMTSTR_SECURITY_MISMATCH_ID = 10,
3322 FMTSTR_RATE_MISMATCH_ID = 11,
3323 FMTSTR_AP_PRUNED_ID = 12,
3324 FMTSTR_KEY_INSERTED_ID = 13,
3325 FMTSTR_DEAUTH_ID = 14,
3326 FMTSTR_DISASSOC_ID = 15,
3327 FMTSTR_LINK_UP_ID = 16,
3328 FMTSTR_LINK_DOWN_ID = 17,
3329 FMTSTR_RADIO_HW_OFF_ID = 18,
3330 FMTSTR_RADIO_HW_ON_ID = 19,
3331 FMTSTR_EVENT_DESC_ID = 20,
3332 FMTSTR_PNP_SET_POWER_ID = 21,
3333 FMTSTR_RADIO_SW_OFF_ID = 22,
3334 FMTSTR_RADIO_SW_ON_ID = 23,
3335 FMTSTR_PWD_MISMATCH_ID = 24,
3336 FMTSTR_FATAL_ERROR_ID = 25,
3337 FMTSTR_AUTH_FAIL_ID = 26,
3338 FMTSTR_ASSOC_FAIL_ID = 27,
3339 FMTSTR_IBSS_FAIL_ID = 28,
3340 FMTSTR_EXTAP_FAIL_ID = 29,
3341 FMTSTR_MAX_ID
3342 } log_fmtstr_id_t;
3343 /* no default structure packing */
3344 #include <packed_section_end.h>
3346 /* require strict packing */
3347 #include <packed_section_start.h>
3348 /* Structures and constants used for "vndr_ie" IOVar interface */
3349 #define VNDR_IE_CMD_LEN 4 /* length of the set command string:
3350 * "add", "del" (+ NUL)
3353 /* 802.11 Mgmt Packet flags */
3354 #define VNDR_IE_BEACON_FLAG 0x1
3355 #define VNDR_IE_PRBRSP_FLAG 0x2
3356 #define VNDR_IE_ASSOCRSP_FLAG 0x4
3357 #define VNDR_IE_AUTHRSP_FLAG 0x8
3358 #define VNDR_IE_PRBREQ_FLAG 0x10
3359 #define VNDR_IE_ASSOCREQ_FLAG 0x20
3360 #define VNDR_IE_IWAPID_FLAG 0x40 /* vendor IE in IW advertisement protocol ID field */
3361 #define VNDR_IE_CUSTOM_FLAG 0x100 /* allow custom IE id */
3363 #define VNDR_IE_INFO_HDR_LEN (sizeof(uint32))
3365 typedef BWL_PRE_PACKED_STRUCT struct {
3366 uint32 pktflag; /* bitmask indicating which packet(s) contain this IE */
3367 vndr_ie_t vndr_ie_data; /* vendor IE data */
3368 } BWL_POST_PACKED_STRUCT vndr_ie_info_t;
3370 typedef BWL_PRE_PACKED_STRUCT struct {
3371 int iecount; /* number of entries in the vndr_ie_list[] array */
3372 vndr_ie_info_t vndr_ie_list[1]; /* variable size list of vndr_ie_info_t structs */
3373 } BWL_POST_PACKED_STRUCT vndr_ie_buf_t;
3375 typedef BWL_PRE_PACKED_STRUCT struct {
3376 char cmd[VNDR_IE_CMD_LEN]; /* vndr_ie IOVar set command : "add", "del" + NUL */
3377 vndr_ie_buf_t vndr_ie_buffer; /* buffer containing Vendor IE list information */
3378 } BWL_POST_PACKED_STRUCT vndr_ie_setbuf_t;
3380 typedef BWL_PRE_PACKED_STRUCT struct {
3381 uint8 id; /* IE type */
3382 uint8 len; /* IE length */
3383 uint8 data[1]; /* IE data */
3384 } BWL_POST_PACKED_STRUCT ie_info_t;
3386 typedef BWL_PRE_PACKED_STRUCT struct {
3387 int iecount; /* number of entries in the ie_list[] array */
3388 uint32 pktflag; /* bitmask indicating which packet(s) contain this IE */
3389 ie_info_t ie_list[1]; /* variable size list of ie_info_t structs */
3390 } BWL_POST_PACKED_STRUCT ie_buf_t;
3392 typedef BWL_PRE_PACKED_STRUCT struct {
3393 char cmd[VNDR_IE_CMD_LEN]; /* ie IOVar set command : "add" + NUL */
3394 ie_buf_t ie_buffer; /* buffer containing IE list information */
3395 } BWL_POST_PACKED_STRUCT ie_setbuf_t;
3397 typedef BWL_PRE_PACKED_STRUCT struct {
3398 uint32 pktflag; /* bitmask indicating which packet(s) contain this IE */
3399 uint8 id; /* IE type */
3400 } BWL_POST_PACKED_STRUCT ie_getbuf_t;
3402 /* structures used to define format of wps ie data from probe requests */
3403 /* passed up to applications via iovar "prbreq_wpsie" */
3404 typedef BWL_PRE_PACKED_STRUCT struct sta_prbreq_wps_ie_hdr {
3405 struct ether_addr staAddr;
3406 uint16 ieLen;
3407 } BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_hdr_t;
3409 typedef BWL_PRE_PACKED_STRUCT struct sta_prbreq_wps_ie_data {
3410 sta_prbreq_wps_ie_hdr_t hdr;
3411 uint8 ieData[1];
3412 } BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_data_t;
3414 typedef BWL_PRE_PACKED_STRUCT struct sta_prbreq_wps_ie_list {
3415 uint32 totLen;
3416 uint8 ieDataList[1];
3417 } BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_list_t;
3418 /* no strict structure packing */
3419 #include <packed_section_end.h>
3421 /* Global ASSERT Logging */
3422 #define ASSERTLOG_CUR_VER 0x0100
3423 #define MAX_ASSRTSTR_LEN 64
3425 typedef struct assert_record {
3426 uint32 time;
3427 uint8 seq_num;
3428 char str[MAX_ASSRTSTR_LEN];
3429 } assert_record_t;
3431 typedef struct assertlog_results {
3432 uint16 version;
3433 uint16 record_len;
3434 uint32 num;
3435 assert_record_t logs[1];
3436 } assertlog_results_t;
3438 #define LOGRRC_FIX_LEN 8
3439 #define IOBUF_ALLOWED_NUM_OF_LOGREC(type, len) ((len - LOGRRC_FIX_LEN)/sizeof(type))
3442 /* channel interference measurement (chanim) related defines */
3444 /* chanim mode */
3445 #define CHANIM_DISABLE 0 /* disabled */
3446 #define CHANIM_DETECT 1 /* detection only */
3447 #define CHANIM_ACT 2 /* detection and act */
3448 #define CHANIM_MODE_MAX 2
3450 /* define for apcs reason code */
3451 #define APCS_INIT 0
3452 #define APCS_IOCTL 1
3453 #define APCS_CHANIM 2
3454 #define APCS_CSTIMER 3
3455 #define APCS_BTA 4
3457 /* number of ACS record entries */
3458 #define CHANIM_ACS_RECORD 10
3460 /* CHANIM */
3461 #define CCASTATS_TXDUR 0
3462 #define CCASTATS_INBSS 1
3463 #define CCASTATS_OBSS 2
3464 #define CCASTATS_NOCTG 3
3465 #define CCASTATS_NOPKT 4
3466 #define CCASTATS_DOZE 5
3467 #define CCASTATS_TXOP 6
3468 #define CCASTATS_GDTXDUR 7
3469 #define CCASTATS_BDTXDUR 8
3470 #define CCASTATS_MAX 9
3472 /* chanim acs record */
3473 typedef struct {
3474 bool valid;
3475 uint8 trigger;
3476 chanspec_t selected_chspc;
3477 int8 bgnoise;
3478 uint32 glitch_cnt;
3479 uint8 ccastats;
3480 uint timestamp;
3481 } chanim_acs_record_t;
3483 typedef struct {
3484 chanim_acs_record_t acs_record[CHANIM_ACS_RECORD];
3485 uint8 count;
3486 uint timestamp;
3487 } wl_acs_record_t;
3489 typedef struct chanim_stats {
3490 uint32 glitchcnt; /* normalized as per second count */
3491 uint32 badplcp; /* normalized as per second count */
3492 uint8 ccastats[CCASTATS_MAX]; /* normalized as 0-255 */
3493 int8 bgnoise; /* background noise level (in dBm) */
3494 chanspec_t chanspec;
3495 uint32 timestamp;
3496 } chanim_stats_t;
3498 #define WL_CHANIM_STATS_VERSION 1
3499 #define WL_CHANIM_COUNT_ALL 0xff
3500 #define WL_CHANIM_COUNT_ONE 0x1
3502 typedef struct {
3503 uint32 buflen;
3504 uint32 version;
3505 uint32 count;
3506 chanim_stats_t stats[1];
3507 } wl_chanim_stats_t;
3509 #define WL_CHANIM_STATS_FIXED_LEN OFFSETOF(wl_chanim_stats_t, stats)
3511 /* Noise measurement metrics. */
3512 #define NOISE_MEASURE_KNOISE 0x1
3514 /* scb probe parameter */
3515 typedef struct {
3516 uint32 scb_timeout;
3517 uint32 scb_activity_time;
3518 uint32 scb_max_probe;
3519 } wl_scb_probe_t;
3521 /* ap tpc modes */
3522 #define AP_TPC_OFF 0
3523 #define AP_TPC_BSS_PWR 1 /* BSS power control */
3524 #define AP_TPC_AP_PWR 2 /* AP power control */
3525 #define AP_TPC_AP_BSS_PWR 3 /* Both AP and BSS power control */
3526 #define AP_TPC_MAX_LINK_MARGIN 127
3528 /* structure/defines for selective mgmt frame (smf) stats support */
3530 #define SMFS_VERSION 1
3531 /* selected mgmt frame (smf) stats element */
3532 typedef struct wl_smfs_elem {
3533 uint32 count;
3534 uint16 code; /* SC or RC code */
3535 } wl_smfs_elem_t;
3537 typedef struct wl_smf_stats {
3538 uint32 version;
3539 uint16 length; /* reserved for future usage */
3540 uint8 type;
3541 uint8 codetype;
3542 uint32 ignored_cnt;
3543 uint32 malformed_cnt;
3544 uint32 count_total; /* count included the interested group */
3545 wl_smfs_elem_t elem[1];
3546 } wl_smf_stats_t;
3548 #define WL_SMFSTATS_FIXED_LEN OFFSETOF(wl_smf_stats_t, elem);
3550 enum {
3551 SMFS_CODETYPE_SC,
3552 SMFS_CODETYPE_RC
3555 /* reuse two number in the sc/rc space */
3556 #define SMFS_CODE_MALFORMED 0xFFFE
3557 #define SMFS_CODE_IGNORED 0xFFFD
3559 typedef enum smfs_type {
3560 SMFS_TYPE_AUTH,
3561 SMFS_TYPE_ASSOC,
3562 SMFS_TYPE_REASSOC,
3563 SMFS_TYPE_DISASSOC_TX,
3564 SMFS_TYPE_DISASSOC_RX,
3565 SMFS_TYPE_DEAUTH_TX,
3566 SMFS_TYPE_DEAUTH_RX,
3567 SMFS_TYPE_MAX
3568 } smfs_type_t;
3570 #ifdef PHYMON
3572 #define PHYMON_VERSION 1
3574 typedef struct wl_phycal_core_state {
3575 /* Tx IQ/LO calibration coeffs */
3576 int16 tx_iqlocal_a;
3577 int16 tx_iqlocal_b;
3578 int8 tx_iqlocal_ci;
3579 int8 tx_iqlocal_cq;
3580 int8 tx_iqlocal_di;
3581 int8 tx_iqlocal_dq;
3582 int8 tx_iqlocal_ei;
3583 int8 tx_iqlocal_eq;
3584 int8 tx_iqlocal_fi;
3585 int8 tx_iqlocal_fq;
3587 /* Rx IQ calibration coeffs */
3588 int16 rx_iqcal_a;
3589 int16 rx_iqcal_b;
3591 uint8 tx_iqlocal_pwridx; /* Tx Power Index for Tx IQ/LO calibration */
3592 uint32 papd_epsilon_table[64]; /* PAPD epsilon table */
3593 int16 papd_epsilon_offset; /* PAPD epsilon offset */
3594 uint8 curr_tx_pwrindex; /* Tx power index */
3595 int8 idle_tssi; /* Idle TSSI */
3596 int8 est_tx_pwr; /* Estimated Tx Power (dB) */
3597 int8 est_rx_pwr; /* Estimated Rx Power (dB) from RSSI */
3598 uint16 rx_gaininfo; /* Rx gain applied on last Rx pkt */
3599 uint16 init_gaincode; /* initgain required for ACI */
3600 int8 estirr_tx;
3601 int8 estirr_rx;
3603 } wl_phycal_core_state_t;
3605 typedef struct wl_phycal_state {
3606 int version;
3607 int8 num_phy_cores; /* number of cores */
3608 int8 curr_temperature; /* on-chip temperature sensor reading */
3609 chanspec_t chspec; /* channspec for this state */
3610 bool aci_state; /* ACI state: ON/OFF */
3611 uint16 crsminpower; /* crsminpower required for ACI */
3612 uint16 crsminpowerl; /* crsminpowerl required for ACI */
3613 uint16 crsminpoweru; /* crsminpoweru required for ACI */
3614 wl_phycal_core_state_t phycal_core[1];
3615 } wl_phycal_state_t;
3617 #define WL_PHYCAL_STAT_FIXED_LEN OFFSETOF(wl_phycal_state_t, phycal_core)
3618 #endif /* PHYMON */
3620 #ifdef WLP2P
3621 /* discovery state */
3622 typedef struct wl_p2p_disc_st {
3623 uint8 state; /* see state */
3624 chanspec_t chspec; /* valid in listen state */
3625 uint16 dwell; /* valid in listen state, in ms */
3626 } wl_p2p_disc_st_t;
3628 /* state */
3629 #define WL_P2P_DISC_ST_SCAN 0
3630 #define WL_P2P_DISC_ST_LISTEN 1
3631 #define WL_P2P_DISC_ST_SEARCH 2
3633 /* scan request */
3634 typedef struct wl_p2p_scan {
3635 uint8 type; /* 'S' for WLC_SCAN, 'E' for "escan" */
3636 uint8 reserved[3];
3637 /* scan or escan parms... */
3638 } wl_p2p_scan_t;
3640 /* i/f request */
3641 typedef struct wl_p2p_if {
3642 struct ether_addr addr;
3643 uint8 type; /* see i/f type */
3644 chanspec_t chspec; /* for p2p_ifadd GO */
3645 } wl_p2p_if_t;
3647 /* i/f type */
3648 #define WL_P2P_IF_CLIENT 0
3649 #define WL_P2P_IF_GO 1
3650 #define WL_P2P_IF_DYNBCN_GO 2
3651 #define WL_P2P_IF_DEV 3
3653 /* i/f query */
3654 typedef struct wl_p2p_ifq {
3655 uint bsscfgidx;
3656 char ifname[BCM_MSG_IFNAME_MAX];
3657 } wl_p2p_ifq_t;
3659 /* OppPS & CTWindow */
3660 typedef struct wl_p2p_ops {
3661 uint8 ops; /* 0: disable 1: enable */
3662 uint8 ctw; /* >= 10 */
3663 } wl_p2p_ops_t;
3665 /* absence and presence request */
3666 typedef struct wl_p2p_sched_desc {
3667 uint32 start;
3668 uint32 interval;
3669 uint32 duration;
3670 uint32 count; /* see count */
3671 } wl_p2p_sched_desc_t;
3673 /* count */
3674 #define WL_P2P_SCHED_RSVD 0
3675 #define WL_P2P_SCHED_REPEAT 255 /* anything > 255 will be treated as 255 */
3677 typedef struct wl_p2p_sched {
3678 uint8 type; /* see schedule type */
3679 uint8 action; /* see schedule action */
3680 uint8 option; /* see schedule option */
3681 wl_p2p_sched_desc_t desc[1];
3682 } wl_p2p_sched_t;
3683 #define WL_P2P_SCHED_FIXED_LEN 3
3685 /* schedule type */
3686 #define WL_P2P_SCHED_TYPE_ABS 0 /* Scheduled Absence */
3687 #define WL_P2P_SCHED_TYPE_REQ_ABS 1 /* Requested Absence */
3689 /* schedule action during absence periods (for WL_P2P_SCHED_ABS type) */
3690 #define WL_P2P_SCHED_ACTION_NONE 0 /* no action */
3691 #define WL_P2P_SCHED_ACTION_DOZE 1 /* doze */
3692 /* schedule option - WL_P2P_SCHED_TYPE_REQ_ABS */
3693 #define WL_P2P_SCHED_ACTION_GOOFF 2 /* turn off GO beacon/prbrsp functions */
3694 /* schedule option - WL_P2P_SCHED_TYPE_XXX */
3695 #define WL_P2P_SCHED_ACTION_RESET 255 /* reset */
3697 /* schedule option - WL_P2P_SCHED_TYPE_ABS */
3698 #define WL_P2P_SCHED_OPTION_NORMAL 0 /* normal start/interval/duration/count */
3699 #define WL_P2P_SCHED_OPTION_BCNPCT 1 /* percentage of beacon interval */
3700 /* schedule option - WL_P2P_SCHED_TYPE_REQ_ABS */
3701 #define WL_P2P_SCHED_OPTION_TSFOFS 2 /* normal start/internal/duration/count with
3702 * start being an offset of the 'current' TSF
3705 /* feature flags */
3706 #define WL_P2P_FEAT_GO_CSA (1 << 0) /* GO moves with the STA using CSA method */
3707 #define WL_P2P_FEAT_GO_NOLEGACY (1 << 1) /* GO does not probe respond to non-p2p probe
3708 * requests
3710 #define WL_P2P_FEAT_RESTRICT_DEV_RESP (1 << 2) /* Restrict p2p dev interface from responding */
3711 #endif /* WLP2P */
3713 /* RFAWARE def */
3714 #define BCM_ACTION_RFAWARE 0x77
3715 #define BCM_ACTION_RFAWARE_DCS 0x01
3717 /* DCS reason code define */
3718 #define BCM_DCS_IOVAR 0x1
3719 #define BCM_DCS_UNKNOWN 0xFF
3721 typedef struct wl_bcmdcs_data {
3722 uint reason;
3723 chanspec_t chspec;
3724 } wl_bcmdcs_data_t;
3726 /* n-mode support capability */
3727 /* 2x2 includes both 1x1 & 2x2 devices
3728 * reserved #define 2 for future when we want to separate 1x1 & 2x2 and
3729 * control it independently
3731 #define WL_11N_2x2 1
3732 #define WL_11N_3x3 3
3733 #define WL_11N_4x4 4
3735 /* define 11n feature disable flags */
3736 #define WLFEATURE_DISABLE_11N 0x00000001
3737 #define WLFEATURE_DISABLE_11N_STBC_TX 0x00000002
3738 #define WLFEATURE_DISABLE_11N_STBC_RX 0x00000004
3739 #define WLFEATURE_DISABLE_11N_SGI_TX 0x00000008
3740 #define WLFEATURE_DISABLE_11N_SGI_RX 0x00000010
3741 #define WLFEATURE_DISABLE_11N_AMPDU_TX 0x00000020
3742 #define WLFEATURE_DISABLE_11N_AMPDU_RX 0x00000040
3743 #define WLFEATURE_DISABLE_11N_GF 0x00000080
3746 /* NAT configuration */
3747 typedef struct {
3748 uint32 ipaddr; /* interface ip address */
3749 uint32 ipaddr_mask; /* interface ip address mask */
3750 uint32 ipaddr_gateway; /* gateway ip address */
3751 uint8 mac_gateway[6]; /* gateway mac address */
3752 uint32 ipaddr_dns; /* DNS server ip address, valid only for public if */
3753 uint8 mac_dns[6]; /* DNS server mac address, valid only for public if */
3754 uint8 GUID[38]; /* interface GUID */
3755 } nat_if_info_t;
3757 typedef struct {
3758 uint op; /* operation code */
3759 bool pub_if; /* set for public if, clear for private if */
3760 nat_if_info_t if_info; /* interface info */
3761 } nat_cfg_t;
3763 /* op code in nat_cfg */
3764 #define NAT_OP_ENABLE 1 /* enable NAT on given interface */
3765 #define NAT_OP_DISABLE 2 /* disable NAT on given interface */
3766 #define NAT_OP_DISABLE_ALL 3 /* disable NAT on all interfaces */
3768 /* NAT state */
3769 #define NAT_STATE_ENABLED 1 /* NAT is enabled */
3770 #define NAT_STATE_DISABLED 2 /* NAT is disabled */
3772 typedef struct {
3773 int state; /* NAT state returned */
3774 } nat_state_t;
3776 #define BTA_STATE_LOG_SZ 64
3778 /* BTAMP Statemachine states */
3779 enum {
3780 HCIReset = 1,
3781 HCIReadLocalAMPInfo,
3782 HCIReadLocalAMPASSOC,
3783 HCIWriteRemoteAMPASSOC,
3784 HCICreatePhysicalLink,
3785 HCIAcceptPhysicalLinkRequest,
3786 HCIDisconnectPhysicalLink,
3787 HCICreateLogicalLink,
3788 HCIAcceptLogicalLink,
3789 HCIDisconnectLogicalLink,
3790 HCILogicalLinkCancel,
3791 HCIAmpStateChange,
3792 HCIWriteLogicalLinkAcceptTimeout
3795 #define CHANNEL_5G_LOW_START 36 /* 5G low (36..48) CDD enable/disable bit mask */
3796 #define CHANNEL_5G_MID_START 52 /* 5G mid (52..64) CDD enable/disable bit mask */
3797 #define CHANNEL_5G_HIGH_START 100 /* 5G high (100..140) CDD enable/disable bit mask */
3798 #define CHANNEL_5G_UPPER_START 149 /* 5G upper (149..161) CDD enable/disable bit mask */
3800 enum {
3801 SPATIAL_MODE_2G_IDX = 0,
3802 SPATIAL_MODE_5G_LOW_IDX,
3803 SPATIAL_MODE_5G_MID_IDX,
3804 SPATIAL_MODE_5G_HIGH_IDX,
3805 SPATIAL_MODE_5G_UPPER_IDX,
3806 SPATIAL_MODE_MAX_IDX
3809 typedef struct {
3810 uint32 iperf_destport; /* Also indicates enable, disable */
3811 uint32 iperf_cnt_in;
3812 uint32 iperf_cnt_out;
3813 } wl_iperf_stats_t;
3815 #endif /* _wlioctl_h_ */