2 * Copyright (c) 2010 Broadcom Corporation
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 #include <linux/ieee80211.h>
22 #include <proto/bcmeth.h>
24 #include <proto/bcmevent.h>
25 #include <proto/802.11.h>
29 #define INTF_NAME_SIZ 16
34 #define WL_BSS_INFO_VERSION 108 /* current ver of wl_bss_info struct */
37 * Applications MUST CHECK ie_offset field and length field to access IEs and
38 * next bss_info structure in a vector (in wl_scan_results_t)
40 typedef struct wl_bss_info
{
41 u32 version
; /* version field */
42 u32 length
; /* byte length of data in this record,
43 * starting at version and including IEs
46 u16 beacon_period
; /* units are Kusec */
47 u16 capability
; /* Capability information */
51 uint count
; /* # rates in this set */
52 u8 rates
[16]; /* rates in 500kbps units w/hi bit set if basic */
53 } rateset
; /* supported rates */
54 chanspec_t chanspec
; /* chanspec for bss */
55 u16 atim_window
; /* units are Kusec */
56 u8 dtim_period
; /* DTIM period */
57 s16 RSSI
; /* receive signal strength (in dBm) */
58 s8 phy_noise
; /* noise (in dBm) */
60 u8 n_cap
; /* BSS is 802.11N Capable */
61 u32 nbss_cap
; /* 802.11N BSS Capabilities (based on HT_CAP_*) */
62 u8 ctl_ch
; /* 802.11N BSS control channel number */
63 u32 reserved32
[1]; /* Reserved for expansion of BSS properties */
65 u8 reserved
[3]; /* Reserved for expansion of BSS properties */
66 u8 basic_mcs
[MCSSET_LEN
]; /* 802.11N BSS required MCS set */
68 u16 ie_offset
; /* offset at which IEs start, from beginning */
69 u32 ie_length
; /* byte length of Information Elements */
70 s16 SNR
; /* average SNR of during frame reception */
71 /* Add new fields here */
72 /* variable length Information Elements */
74 #endif /* BRCM_FULLMAC */
76 typedef struct wlc_ssid
{
78 unsigned char SSID
[32];
82 typedef struct chan_scandata
{
85 chanspec_t channel
; /* Channel num, bw, ctrl_sb and band */
90 typedef enum wl_scan_type
{
91 EXTDSCAN_FOREGROUND_SCAN
,
92 EXTDSCAN_BACKGROUND_SCAN
,
93 EXTDSCAN_FORCEDBACKGROUND_SCAN
96 #define WLC_EXTDSCAN_MAX_SSID 5
98 #define WL_BSS_FLAGS_FROM_BEACON 0x01 /* bss_info derived from beacon */
99 #define WL_BSS_FLAGS_FROM_CACHE 0x02 /* bss_info collected from cache */
100 #define WL_BSS_FLAGS_RSSI_ONCHANNEL 0x04 /* rssi info was received on channel (vs offchannel) */
102 typedef struct wl_extdscan_params
{
103 s8 nprobes
; /* 0, passive, otherwise active */
104 s8 split_scan
; /* split scan */
107 wlc_ssid_t ssid
[WLC_EXTDSCAN_MAX_SSID
]; /* ssid list */
108 u32 tx_rate
; /* in 500ksec units */
109 wl_scan_type_t scan_type
; /* enum */
111 chan_scandata_t channel_list
[1]; /* list of chandata structs */
112 } wl_extdscan_params_t
;
114 #define WL_EXTDSCAN_PARAMS_FIXED_SIZE (sizeof(wl_extdscan_params_t) - sizeof(chan_scandata_t))
116 #define WL_BSSTYPE_INFRA 1
117 #define WL_BSSTYPE_INDEP 0
118 #define WL_BSSTYPE_ANY 2
120 /* Bitmask for scan_type */
121 #define WL_SCANFLAGS_PASSIVE 0x01 /* force passive scan */
122 #define WL_SCANFLAGS_RESERVED 0x02 /* Reserved */
123 #define WL_SCANFLAGS_PROHIBITED 0x04 /* allow scanning prohibited channels */
125 typedef struct wl_scan_params
{
126 wlc_ssid_t ssid
; /* default: {0, ""} */
127 u8 bssid
[ETH_ALEN
]; /* default: bcast */
128 s8 bss_type
; /* default: any,
129 * DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT
131 u8 scan_type
; /* flags, 0 use default */
132 s32 nprobes
; /* -1 use default, number of probes per channel */
133 s32 active_time
; /* -1 use default, dwell time per channel for
136 s32 passive_time
; /* -1 use default, dwell time per channel
137 * for passive scanning
139 s32 home_time
; /* -1 use default, dwell time for the home channel
140 * between channel scans
142 s32 channel_num
; /* count of channels and ssids that follow
144 * low half is count of channels in channel_list, 0
145 * means default (use all available channels)
147 * high half is entries in wlc_ssid_t array that
148 * follows channel_list, aligned for s32 (4 bytes)
149 * meaning an odd channel count implies a 2-byte pad
150 * between end of channel_list and first ssid
152 * if ssid count is zero, single ssid in the fixed
153 * parameter portion is assumed, otherwise ssid in
154 * the fixed portion is ignored
156 u16 channel_list
[1]; /* list of chanspecs */
159 /* size of wl_scan_params not including variable length array */
160 #define WL_SCAN_PARAMS_FIXED_SIZE 64
162 /* masks for channel and ssid count */
163 #define WL_SCAN_PARAMS_COUNT_MASK 0x0000ffff
164 #define WL_SCAN_PARAMS_NSSID_SHIFT 16
166 #define WL_SCAN_ACTION_START 1
167 #define WL_SCAN_ACTION_CONTINUE 2
168 #define WL_SCAN_ACTION_ABORT 3
170 #define ISCAN_REQ_VERSION 1
172 /* incremental scan struct */
173 typedef struct wl_iscan_params
{
177 wl_scan_params_t params
;
180 /* 3 fields + size of wl_scan_params, not including variable length array */
181 #define WL_ISCAN_PARAMS_FIXED_SIZE (offsetof(wl_iscan_params_t, params) + sizeof(wlc_ssid_t))
183 typedef struct wl_scan_results
{
187 wl_bss_info_t bss_info
[1];
190 /* size of wl_scan_results not including variable length array */
191 #define WL_SCAN_RESULTS_FIXED_SIZE (sizeof(wl_scan_results_t) - sizeof(wl_bss_info_t))
193 /* wl_iscan_results status values */
194 #define WL_SCAN_RESULTS_SUCCESS 0
195 #define WL_SCAN_RESULTS_PARTIAL 1
196 #define WL_SCAN_RESULTS_PENDING 2
197 #define WL_SCAN_RESULTS_ABORTED 3
198 #define WL_SCAN_RESULTS_NO_MEM 4
200 #define ESCAN_REQ_VERSION 1
202 typedef struct wl_escan_params
{
206 wl_scan_params_t params
;
209 #define WL_ESCAN_PARAMS_FIXED_SIZE (offsetof(wl_escan_params_t, params) + sizeof(wlc_ssid_t))
211 typedef struct wl_escan_result
{
216 wl_bss_info_t bss_info
[1];
219 #define WL_ESCAN_RESULTS_FIXED_SIZE (sizeof(wl_escan_result_t) - sizeof(wl_bss_info_t))
221 /* incremental scan results struct */
222 typedef struct wl_iscan_results
{
224 wl_scan_results_t results
;
225 } wl_iscan_results_t
;
227 /* size of wl_iscan_results not including variable length array */
228 #define WL_ISCAN_RESULTS_FIXED_SIZE \
229 (WL_SCAN_RESULTS_FIXED_SIZE + offsetof(wl_iscan_results_t, results))
231 typedef struct wl_probe_params
{
236 #endif /* BRCM_FULLMAC */
238 #define WL_NUMRATES 16 /* max # of rates in a rateset */
239 typedef struct wl_rateset
{
240 u32 count
; /* # rates in this set */
241 u8 rates
[WL_NUMRATES
]; /* rates in 500kbps units w/hi bit set if basic */
245 typedef struct wl_rateset_args
{
246 u32 count
; /* # rates in this set */
247 u8 rates
[WL_NUMRATES
]; /* rates in 500kbps units w/hi bit set if basic */
248 u8 mcs
[MCSSET_LEN
]; /* supported mcs index bit map */
252 typedef struct wl_u32_list
{
253 /* in - # of elements, out - # of entries */
255 /* variable length u32 list */
259 /* used for association with a specific BSSID and chanspec list */
260 typedef struct wl_assoc_params
{
261 u8 bssid
[ETH_ALEN
]; /* 00:00:00:00:00:00: broadcast scan */
263 s32 chanspec_num
; /* 0: all available channels,
264 * otherwise count of chanspecs in chanspec_list
266 chanspec_t chanspec_list
[1]; /* list of chanspecs */
268 #define WL_ASSOC_PARAMS_FIXED_SIZE (sizeof(wl_assoc_params_t) - sizeof(chanspec_t))
270 /* used for reassociation/roam to a specific BSSID and channel */
271 typedef wl_assoc_params_t wl_reassoc_params_t
;
272 #define WL_REASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE
274 /* used for join with or without a specific bssid and channel list */
275 typedef struct wl_join_params
{
277 wl_assoc_params_t params
; /* optional field, but it must include the fixed portion
278 * of the wl_assoc_params_t struct when it does present.
281 #define WL_JOIN_PARAMS_FIXED_SIZE (sizeof(wl_join_params_t) - sizeof(chanspec_t))
283 #endif /* BRCM_FULLMAC */
285 /* defines used by the nrate iovar */
286 #define NRATE_MCS_INUSE 0x00000080 /* MSC in use,indicates b0-6 holds an mcs */
287 #define NRATE_RATE_MASK 0x0000007f /* rate/mcs value */
288 #define NRATE_STF_MASK 0x0000ff00 /* stf mode mask: siso, cdd, stbc, sdm */
289 #define NRATE_STF_SHIFT 8 /* stf mode shift */
290 #define NRATE_OVERRIDE 0x80000000 /* bit indicates override both rate & mode */
291 #define NRATE_OVERRIDE_MCS_ONLY 0x40000000 /* bit indicate to override mcs only */
292 #define NRATE_SGI_MASK 0x00800000 /* sgi mode */
293 #define NRATE_SGI_SHIFT 23 /* sgi mode */
294 #define NRATE_LDPC_CODING 0x00400000 /* bit indicates adv coding in use */
295 #define NRATE_LDPC_SHIFT 22 /* ldpc shift */
297 #define NRATE_STF_SISO 0 /* stf mode SISO */
298 #define NRATE_STF_CDD 1 /* stf mode CDD */
299 #define NRATE_STF_STBC 2 /* stf mode STBC */
300 #define NRATE_STF_SDM 3 /* stf mode SDM */
302 #define ANTENNA_NUM_1 1 /* total number of antennas to be used */
303 #define ANTENNA_NUM_2 2
304 #define ANTENNA_NUM_3 3
305 #define ANTENNA_NUM_4 4
307 #define ANT_SELCFG_AUTO 0x80 /* bit indicates antenna sel AUTO */
308 #define ANT_SELCFG_MASK 0x33 /* antenna configuration mask */
309 #define ANT_SELCFG_MAX 4 /* max number of antenna configurations */
310 #define ANT_SELCFG_TX_UNICAST 0 /* unicast tx antenna configuration */
311 #define ANT_SELCFG_RX_UNICAST 1 /* unicast rx antenna configuration */
312 #define ANT_SELCFG_TX_DEF 2 /* default tx antenna configuration */
313 #define ANT_SELCFG_RX_DEF 3 /* default rx antenna configuration */
315 #define MAX_STREAMS_SUPPORTED 4 /* max number of streams supported */
318 u8 ant_config
[ANT_SELCFG_MAX
]; /* antenna configuration */
319 u8 num_antcfg
; /* number of available antenna configurations */
322 #define HIGHEST_SINGLE_STREAM_MCS 7 /* MCS values greater than this enable multiple streams */
325 #define MAX_CCA_CHANNELS 38 /* Max number of 20 Mhz wide channels */
326 #define MAX_CCA_SECS 60 /* CCA keeps this many seconds history */
328 #define IBSS_MED 15 /* Mediom in-bss congestion percentage */
329 #define IBSS_HI 25 /* Hi in-bss congestion percentage */
332 #define INTERFER_MED 5
333 #define INTERFER_HI 10
335 #define CCA_FLAG_2G_ONLY 0x01 /* Return a channel from 2.4 Ghz band */
336 #define CCA_FLAG_5G_ONLY 0x02 /* Return a channel from 2.4 Ghz band */
337 #define CCA_FLAG_IGNORE_DURATION 0x04 /* Ignore dwell time for each channel */
338 #define CCA_FLAGS_PREFER_1_6_11 0x10
339 #define CCA_FLAG_IGNORE_INTERFER 0x20 /* do not exlude channel based on interfer level */
341 #define CCA_ERRNO_BAND 1 /* After filtering for band pref, no choices left */
342 #define CCA_ERRNO_DURATION 2 /* After filtering for duration, no choices left */
343 #define CCA_ERRNO_PREF_CHAN 3 /* After filtering for chan pref, no choices left */
344 #define CCA_ERRNO_INTERFER 4 /* After filtering for interference, no choices left */
345 #define CCA_ERRNO_TOO_FEW 5 /* Only 1 channel was input */
348 u32 duration
; /* millisecs spent sampling this channel */
349 u32 congest_ibss
; /* millisecs in our bss (presumably this traffic will */
350 /* move if cur bss moves channels) */
351 u32 congest_obss
; /* traffic not in our bss */
352 u32 interference
; /* millisecs detecting a non 802.11 interferer. */
353 u32 timestamp
; /* second timestamp */
357 chanspec_t chanspec
; /* Which channel? */
358 u8 num_secs
; /* How many secs worth of data */
359 cca_congest_t secs
[1]; /* Data */
360 } cca_congest_channel_req_t
;
362 #endif /* BRCM_FULLMAC */
364 #define WLC_CNTRY_BUF_SZ 4 /* Country string is 3 bytes + NUL */
367 typedef struct wl_country
{
368 char country_abbrev
[WLC_CNTRY_BUF_SZ
]; /* nul-terminated country code used in
371 s32 rev
; /* revision specifier for ccode
372 * on set, -1 indicates unspecified.
375 char ccode
[WLC_CNTRY_BUF_SZ
]; /* nul-terminated built-in country code.
376 * variable length, but fixed size in
377 * struct allows simple allocation for
378 * expected country strings <= 3 chars.
382 typedef struct wl_channels_in_country
{
385 char country_abbrev
[WLC_CNTRY_BUF_SZ
];
388 } wl_channels_in_country_t
;
390 typedef struct wl_country_list
{
395 char country_abbrev
[1];
398 #define WL_NUM_RPI_BINS 8
399 #define WL_RM_TYPE_BASIC 1
400 #define WL_RM_TYPE_CCA 2
401 #define WL_RM_TYPE_RPI 3
403 #define WL_RM_FLAG_PARALLEL (1<<0)
405 #define WL_RM_FLAG_LATE (1<<1)
406 #define WL_RM_FLAG_INCAPABLE (1<<2)
407 #define WL_RM_FLAG_REFUSED (1<<3)
409 typedef struct wl_rm_req_elt
{
413 u32 token
; /* token for this measurement */
414 u32 tsf_h
; /* TSF high 32-bits of Measurement start time */
415 u32 tsf_l
; /* TSF low 32-bits */
419 typedef struct wl_rm_req
{
420 u32 token
; /* overall measurement set token */
421 u32 count
; /* number of measurement requests */
422 void *cb
; /* completion callback function: may be NULL */
423 void *cb_arg
; /* arg to completion callback function */
424 wl_rm_req_elt_t req
[1]; /* variable length block of requests */
426 #define WL_RM_REQ_FIXED_LEN offsetof(wl_rm_req_t, req)
428 typedef struct wl_rm_rep_elt
{
432 u32 token
; /* token for this measurement */
433 u32 tsf_h
; /* TSF high 32-bits of Measurement start time */
434 u32 tsf_l
; /* TSF low 32-bits */
436 u32 len
; /* byte length of data block */
437 u8 data
[1]; /* variable length data block */
439 #define WL_RM_REP_ELT_FIXED_LEN 24 /* length excluding data block */
441 #define WL_RPI_REP_BIN_NUM 8
442 typedef struct wl_rm_rpi_rep
{
443 u8 rpi
[WL_RPI_REP_BIN_NUM
];
444 s8 rpi_max
[WL_RPI_REP_BIN_NUM
];
447 typedef struct wl_rm_rep
{
448 u32 token
; /* overall measurement set token */
449 u32 len
; /* length of measurement report block */
450 wl_rm_rep_elt_t rep
[1]; /* variable length block of reports */
452 #define WL_RM_REP_FIXED_LEN 8
453 #endif /* BRCM_FULLMAC */
455 /* Enumerate crypto algorithms */
456 #define CRYPTO_ALGO_OFF 0
457 #define CRYPTO_ALGO_WEP1 1
458 #define CRYPTO_ALGO_TKIP 2
459 #define CRYPTO_ALGO_WEP128 3
460 #define CRYPTO_ALGO_AES_CCM 4
461 #define CRYPTO_ALGO_AES_RESERVED1 5
462 #define CRYPTO_ALGO_AES_RESERVED2 6
463 #define CRYPTO_ALGO_NALG 7
465 #define WSEC_GEN_MIC_ERROR 0x0001
466 #define WSEC_GEN_REPLAY 0x0002
467 #define WSEC_GEN_ICV_ERROR 0x0004
469 #define WL_SOFT_KEY (1 << 0) /* Indicates this key is using soft encrypt */
470 #define WL_PRIMARY_KEY (1 << 1) /* Indicates this key is the primary (ie tx) key */
471 #define WL_KF_RES_4 (1 << 4) /* Reserved for backward compat */
472 #define WL_KF_RES_5 (1 << 5) /* Reserved for backward compat */
473 #define WL_IBSS_PEER_GROUP_KEY (1 << 6) /* Indicates a group key for a IBSS PEER */
475 typedef struct wl_wsec_key
{
476 u32 index
; /* key index */
477 u32 len
; /* key length */
478 u8 data
[WLAN_MAX_KEY_LEN
]; /* key data */
480 u32 algo
; /* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
481 u32 flags
; /* misc flags */
484 int iv_initialized
; /* has IV been initialized already? */
488 u32 hi
; /* upper 32 bits of IV */
489 u16 lo
; /* lower 16 bits of IV */
492 u8 ea
[ETH_ALEN
]; /* per station */
495 #define WSEC_MIN_PSK_LEN 8
496 #define WSEC_MAX_PSK_LEN 64
498 /* Flag for key material needing passhash'ing */
499 #define WSEC_PASSPHRASE (1<<0)
501 /* receptacle for WLC_SET_WSEC_PMK parameter */
503 unsigned short key_len
; /* octets in key material */
504 unsigned short flags
; /* key handling qualification */
505 u8 key
[WSEC_MAX_PSK_LEN
]; /* PMK material */
508 /* wireless security bitvec */
509 #define WEP_ENABLED 0x0001
510 #define TKIP_ENABLED 0x0002
511 #define AES_ENABLED 0x0004
512 #define WSEC_SWFLAG 0x0008
513 #define SES_OW_ENABLED 0x0040 /* to go into transition mode without setting wep */
515 /* WPA authentication mode bitvec */
516 #define WPA_AUTH_DISABLED 0x0000 /* Legacy (i.e., non-WPA) */
517 #define WPA_AUTH_NONE 0x0001 /* none (IBSS) */
518 #define WPA_AUTH_UNSPECIFIED 0x0002 /* over 802.1x */
519 #define WPA_AUTH_PSK 0x0004 /* Pre-shared key */
520 #define WPA_AUTH_RESERVED1 0x0008
521 #define WPA_AUTH_RESERVED2 0x0010
522 /* #define WPA_AUTH_8021X 0x0020 *//* 802.1x, reserved */
523 #define WPA2_AUTH_RESERVED1 0x0020
524 #define WPA2_AUTH_UNSPECIFIED 0x0040 /* over 802.1x */
525 #define WPA2_AUTH_PSK 0x0080 /* Pre-shared key */
526 #define WPA2_AUTH_RESERVED3 0x0200
527 #define WPA2_AUTH_RESERVED4 0x0400
528 #define WPA2_AUTH_RESERVED5 0x0800
533 typedef struct _pmkid
{
535 u8 PMKID
[WLAN_PMKID_LEN
];
538 typedef struct _pmkid_list
{
543 typedef struct _pmkid_cand
{
548 typedef struct _pmkid_cand_list
{
550 pmkid_cand_t pmkid_cand
[1];
553 typedef struct wl_led_info
{
554 u32 index
; /* led index */
559 /* R_REG and W_REG struct passed through ioctl */
561 u32 byteoff
; /* byte offset of the field in d11regs_t */
562 u32 val
; /* read/write value of the field */
563 u32 size
; /* sizeof the field */
564 uint band
; /* band (optional) */
569 /* Used to get specific STA parameters */
574 #endif /* BRCM_FULLMAC */
576 /* channel encoding */
577 typedef struct channel_info
{
583 /* For ioctls that take a list of MAC addresses */
585 uint count
; /* number of MAC addresses */
586 u8 ea
[1][ETH_ALEN
]; /* variable length array of MAC addresses */
590 /* Linux network driver ioctl encoding */
591 typedef struct wl_ioctl
{
592 uint cmd
; /* common ioctl definition */
593 void *buf
; /* pointer to user buffer */
594 uint len
; /* length of user buffer */
595 u8 set
; /* get or set request (optional) */
596 uint used
; /* bytes read or written (optional) */
597 uint needed
; /* bytes needed (optional) */
599 #endif /* BRCM_FULLMAC */
603 * Structure for passing hardware and software
604 * revision info up from the driver.
606 typedef struct wlc_rev_info
{
607 uint vendorid
; /* PCI vendor id */
608 uint deviceid
; /* device id of chip */
609 uint radiorev
; /* radio revision */
610 uint chiprev
; /* chip revision */
611 uint corerev
; /* core revision */
612 uint boardid
; /* board identifier (usu. PCI sub-device id) */
613 uint boardvendor
; /* board vendor (usu. PCI sub-vendor id) */
614 uint boardrev
; /* board revision */
615 uint driverrev
; /* driver version */
616 uint ucoderev
; /* microcode version */
617 uint bus
; /* bus type */
618 uint chipnum
; /* chip number */
619 uint phytype
; /* phy type */
620 uint phyrev
; /* phy revision */
621 uint anarev
; /* anacore rev */
622 uint chippkg
; /* chip package info */
625 #define WL_REV_INFO_LEGACY_LENGTH 48
628 #define WLC_IOCTL_SMLEN 256 /* "small" length ioctl buffer required */
629 #define WLC_IOCTL_MEDLEN 1536 /* "med" length ioctl buffer required */
630 #define WLC_IOCTL_MAXLEN 8192
633 /* common ioctl definitions */
634 #define WLC_GET_MAGIC 0
635 #define WLC_GET_VERSION 1
638 #define WLC_GET_LOOP 4
639 #define WLC_SET_LOOP 5
641 #define WLC_GET_MSGLEVEL 7
642 #define WLC_SET_MSGLEVEL 8
643 #define WLC_GET_PROMISC 9
644 #define WLC_SET_PROMISC 10
645 #define WLC_OVERLAY_IOCTL 11
646 #define WLC_GET_RATE 12
647 /* #define WLC_SET_RATE 13 *//* no longer supported */
648 #define WLC_GET_INSTANCE 14
649 /* #define WLC_GET_FRAG 15 *//* no longer supported */
650 /* #define WLC_SET_FRAG 16 *//* no longer supported */
651 /* #define WLC_GET_RTS 17 *//* no longer supported */
652 /* #define WLC_SET_RTS 18 *//* no longer supported */
653 #define WLC_GET_INFRA 19
654 #define WLC_SET_INFRA 20
655 #define WLC_GET_AUTH 21
656 #define WLC_SET_AUTH 22
657 #define WLC_GET_BSSID 23
658 #define WLC_SET_BSSID 24
659 #define WLC_GET_SSID 25
660 #define WLC_SET_SSID 26
661 #define WLC_RESTART 27
662 /* #define WLC_DUMP_SCB 28 *//* no longer supported */
663 #define WLC_GET_CHANNEL 29
664 #define WLC_SET_CHANNEL 30
665 #define WLC_GET_SRL 31
666 #define WLC_SET_SRL 32
667 #define WLC_GET_LRL 33
668 #define WLC_SET_LRL 34
669 #define WLC_GET_PLCPHDR 35
670 #define WLC_SET_PLCPHDR 36
671 #define WLC_GET_RADIO 37
672 #define WLC_SET_RADIO 38
673 #define WLC_GET_PHYTYPE 39
674 #define WLC_DUMP_RATE 40
675 #define WLC_SET_RATE_PARAMS 41
676 #define WLC_GET_FIXRATE 42
677 #define WLC_SET_FIXRATE 43
678 /* #define WLC_GET_WEP 42 *//* no longer supported */
679 /* #define WLC_SET_WEP 43 *//* no longer supported */
680 #define WLC_GET_KEY 44
681 #define WLC_SET_KEY 45
682 #define WLC_GET_REGULATORY 46
683 #define WLC_SET_REGULATORY 47
684 #define WLC_GET_PASSIVE_SCAN 48
685 #define WLC_SET_PASSIVE_SCAN 49
687 #define WLC_SCAN_RESULTS 51
688 #define WLC_DISASSOC 52
689 #define WLC_REASSOC 53
690 #define WLC_GET_ROAM_TRIGGER 54
691 #define WLC_SET_ROAM_TRIGGER 55
692 #define WLC_GET_ROAM_DELTA 56
693 #define WLC_SET_ROAM_DELTA 57
694 #define WLC_GET_ROAM_SCAN_PERIOD 58
695 #define WLC_SET_ROAM_SCAN_PERIOD 59
696 #define WLC_EVM 60 /* diag */
697 #define WLC_GET_TXANT 61
698 #define WLC_SET_TXANT 62
699 #define WLC_GET_ANTDIV 63
700 #define WLC_SET_ANTDIV 64
701 /* #define WLC_GET_TXPWR 65 *//* no longer supported */
702 /* #define WLC_SET_TXPWR 66 *//* no longer supported */
703 #define WLC_GET_CLOSED 67
704 #define WLC_SET_CLOSED 68
705 #define WLC_GET_MACLIST 69
706 #define WLC_SET_MACLIST 70
707 #define WLC_GET_RATESET 71
708 #define WLC_SET_RATESET 72
709 /* #define WLC_GET_LOCALE 73 *//* no longer supported */
710 #define WLC_LONGTRAIN 74
711 #define WLC_GET_BCNPRD 75
712 #define WLC_SET_BCNPRD 76
713 #define WLC_GET_DTIMPRD 77
714 #define WLC_SET_DTIMPRD 78
715 #define WLC_GET_SROM 79
716 #define WLC_SET_SROM 80
717 #define WLC_GET_WEP_RESTRICT 81
718 #define WLC_SET_WEP_RESTRICT 82
719 #define WLC_GET_COUNTRY 83
720 #define WLC_SET_COUNTRY 84
721 #define WLC_GET_PM 85
722 #define WLC_SET_PM 86
723 #define WLC_GET_WAKE 87
724 #define WLC_SET_WAKE 88
725 /* #define WLC_GET_D11CNTS 89 *//* -> "counters" iovar */
726 #define WLC_GET_FORCELINK 90 /* ndis only */
727 #define WLC_SET_FORCELINK 91 /* ndis only */
728 #define WLC_FREQ_ACCURACY 92 /* diag */
729 #define WLC_CARRIER_SUPPRESS 93 /* diag */
730 #define WLC_GET_PHYREG 94
731 #define WLC_SET_PHYREG 95
732 #define WLC_GET_RADIOREG 96
733 #define WLC_SET_RADIOREG 97
734 #define WLC_GET_REVINFO 98
735 #define WLC_GET_UCANTDIV 99
736 #define WLC_SET_UCANTDIV 100
737 #define WLC_R_REG 101
738 #define WLC_W_REG 102
739 /* #define WLC_DIAG_LOOPBACK 103 old tray diag */
740 /* #define WLC_RESET_D11CNTS 104 *//* -> "reset_d11cnts" iovar */
741 #define WLC_GET_MACMODE 105
742 #define WLC_SET_MACMODE 106
743 #define WLC_GET_MONITOR 107
744 #define WLC_SET_MONITOR 108
745 #define WLC_GET_GMODE 109
746 #define WLC_SET_GMODE 110
747 #define WLC_GET_LEGACY_ERP 111
748 #define WLC_SET_LEGACY_ERP 112
749 #define WLC_GET_RX_ANT 113
750 #define WLC_GET_CURR_RATESET 114 /* current rateset */
751 #define WLC_GET_SCANSUPPRESS 115
752 #define WLC_SET_SCANSUPPRESS 116
753 #define WLC_GET_AP 117
754 #define WLC_SET_AP 118
755 #define WLC_GET_EAP_RESTRICT 119
756 #define WLC_SET_EAP_RESTRICT 120
757 #define WLC_SCB_AUTHORIZE 121
758 #define WLC_SCB_DEAUTHORIZE 122
759 #define WLC_GET_WDSLIST 123
760 #define WLC_SET_WDSLIST 124
761 #define WLC_GET_ATIM 125
762 #define WLC_SET_ATIM 126
763 #define WLC_GET_RSSI 127
764 #define WLC_GET_PHYANTDIV 128
765 #define WLC_SET_PHYANTDIV 129
766 #define WLC_AP_RX_ONLY 130
767 #define WLC_GET_TX_PATH_PWR 131
768 #define WLC_SET_TX_PATH_PWR 132
769 #define WLC_GET_WSEC 133
770 #define WLC_SET_WSEC 134
771 #define WLC_GET_PHY_NOISE 135
772 #define WLC_GET_BSS_INFO 136
773 #define WLC_GET_PKTCNTS 137
774 #define WLC_GET_LAZYWDS 138
775 #define WLC_SET_LAZYWDS 139
776 #define WLC_GET_BANDLIST 140
777 #define WLC_GET_BAND 141
778 #define WLC_SET_BAND 142
779 #define WLC_SCB_DEAUTHENTICATE 143
780 #define WLC_GET_SHORTSLOT 144
781 #define WLC_GET_SHORTSLOT_OVERRIDE 145
782 #define WLC_SET_SHORTSLOT_OVERRIDE 146
783 #define WLC_GET_SHORTSLOT_RESTRICT 147
784 #define WLC_SET_SHORTSLOT_RESTRICT 148
785 #define WLC_GET_GMODE_PROTECTION 149
786 #define WLC_GET_GMODE_PROTECTION_OVERRIDE 150
787 #define WLC_SET_GMODE_PROTECTION_OVERRIDE 151
788 #define WLC_UPGRADE 152
789 /* #define WLC_GET_MRATE 153 *//* no longer supported */
790 /* #define WLC_SET_MRATE 154 *//* no longer supported */
791 #define WLC_GET_IGNORE_BCNS 155
792 #define WLC_SET_IGNORE_BCNS 156
793 #define WLC_GET_SCB_TIMEOUT 157
794 #define WLC_SET_SCB_TIMEOUT 158
795 #define WLC_GET_ASSOCLIST 159
796 #define WLC_GET_CLK 160
797 #define WLC_SET_CLK 161
798 #define WLC_GET_UP 162
800 #define WLC_GET_WPA_AUTH 164
801 #define WLC_SET_WPA_AUTH 165
802 #define WLC_GET_UCFLAGS 166
803 #define WLC_SET_UCFLAGS 167
804 #define WLC_GET_PWRIDX 168
805 #define WLC_SET_PWRIDX 169
806 #define WLC_GET_TSSI 170
807 #define WLC_GET_SUP_RATESET_OVERRIDE 171
808 #define WLC_SET_SUP_RATESET_OVERRIDE 172
809 /* #define WLC_SET_FAST_TIMER 173 *//* no longer supported */
810 /* #define WLC_GET_FAST_TIMER 174 *//* no longer supported */
811 /* #define WLC_SET_SLOW_TIMER 175 *//* no longer supported */
812 /* #define WLC_GET_SLOW_TIMER 176 *//* no longer supported */
813 /* #define WLC_DUMP_PHYREGS 177 *//* no longer supported */
814 #define WLC_GET_PROTECTION_CONTROL 178
815 #define WLC_SET_PROTECTION_CONTROL 179
816 #define WLC_GET_PHYLIST 180
817 #define WLC_ENCRYPT_STRENGTH 181 /* ndis only */
818 #define WLC_DECRYPT_STATUS 182 /* ndis only */
819 #define WLC_GET_KEY_SEQ 183
820 #define WLC_GET_SCAN_CHANNEL_TIME 184
821 #define WLC_SET_SCAN_CHANNEL_TIME 185
822 #define WLC_GET_SCAN_UNASSOC_TIME 186
823 #define WLC_SET_SCAN_UNASSOC_TIME 187
824 #define WLC_GET_SCAN_HOME_TIME 188
825 #define WLC_SET_SCAN_HOME_TIME 189
826 #define WLC_GET_SCAN_NPROBES 190
827 #define WLC_SET_SCAN_NPROBES 191
828 #define WLC_GET_PRB_RESP_TIMEOUT 192
829 #define WLC_SET_PRB_RESP_TIMEOUT 193
830 #define WLC_GET_ATTEN 194
831 #define WLC_SET_ATTEN 195
832 #define WLC_GET_SHMEM 196 /* diag */
833 #define WLC_SET_SHMEM 197 /* diag */
834 /* #define WLC_GET_GMODE_PROTECTION_CTS 198 *//* no longer supported */
835 /* #define WLC_SET_GMODE_PROTECTION_CTS 199 *//* no longer supported */
836 #define WLC_SET_WSEC_TEST 200
837 #define WLC_SCB_DEAUTHENTICATE_FOR_REASON 201
838 #define WLC_TKIP_COUNTERMEASURES 202
839 #define WLC_GET_PIOMODE 203
840 #define WLC_SET_PIOMODE 204
841 #define WLC_SET_ASSOC_PREFER 205
842 #define WLC_GET_ASSOC_PREFER 206
843 #define WLC_SET_ROAM_PREFER 207
844 #define WLC_GET_ROAM_PREFER 208
845 #define WLC_SET_LED 209
846 #define WLC_GET_LED 210
847 #define WLC_RESERVED6 211
848 #define WLC_RESERVED7 212
849 #define WLC_GET_CHANNEL_QA 213
850 #define WLC_START_CHANNEL_QA 214
851 #define WLC_GET_CHANNEL_SEL 215
852 #define WLC_START_CHANNEL_SEL 216
853 #define WLC_GET_VALID_CHANNELS 217
854 #define WLC_GET_FAKEFRAG 218
855 #define WLC_SET_FAKEFRAG 219
856 #define WLC_GET_PWROUT_PERCENTAGE 220
857 #define WLC_SET_PWROUT_PERCENTAGE 221
858 #define WLC_SET_BAD_FRAME_PREEMPT 222
859 #define WLC_GET_BAD_FRAME_PREEMPT 223
860 #define WLC_SET_LEAP_LIST 224
861 #define WLC_GET_LEAP_LIST 225
862 #define WLC_GET_CWMIN 226
863 #define WLC_SET_CWMIN 227
864 #define WLC_GET_CWMAX 228
865 #define WLC_SET_CWMAX 229
866 #define WLC_GET_WET 230
867 #define WLC_SET_WET 231
868 #define WLC_GET_PUB 232
869 /* #define WLC_SET_GLACIAL_TIMER 233 *//* no longer supported */
870 /* #define WLC_GET_GLACIAL_TIMER 234 *//* no longer supported */
871 #define WLC_GET_KEY_PRIMARY 235
872 #define WLC_SET_KEY_PRIMARY 236
873 /* #define WLC_DUMP_RADIOREGS 237 *//* no longer supported */
874 #define WLC_RESERVED4 238
875 #define WLC_RESERVED5 239
876 #define WLC_UNSET_CALLBACK 240
877 #define WLC_SET_CALLBACK 241
878 #define WLC_GET_RADAR 242
879 #define WLC_SET_RADAR 243
880 #define WLC_SET_SPECT_MANAGMENT 244
881 #define WLC_GET_SPECT_MANAGMENT 245
882 #define WLC_WDS_GET_REMOTE_HWADDR 246 /* handled in wl_linux.c/wl_vx.c */
883 #define WLC_WDS_GET_WPA_SUP 247
884 #define WLC_SET_CS_SCAN_TIMER 248
885 #define WLC_GET_CS_SCAN_TIMER 249
886 #define WLC_MEASURE_REQUEST 250
888 #define WLC_SEND_QUIET 252
889 #define WLC_KEEPALIVE 253
890 #define WLC_SEND_PWR_CONSTRAINT 254
891 #define WLC_UPGRADE_STATUS 255
892 #define WLC_CURRENT_PWR 256
893 #define WLC_GET_SCAN_PASSIVE_TIME 257
894 #define WLC_SET_SCAN_PASSIVE_TIME 258
895 #define WLC_LEGACY_LINK_BEHAVIOR 259
896 #define WLC_GET_CHANNELS_IN_COUNTRY 260
897 #define WLC_GET_COUNTRY_LIST 261
898 #define WLC_GET_VAR 262 /* get value of named variable */
899 #define WLC_SET_VAR 263 /* set named variable to value */
900 #define WLC_NVRAM_GET 264 /* deprecated */
901 #define WLC_NVRAM_SET 265
902 #define WLC_NVRAM_DUMP 266
903 #define WLC_REBOOT 267
904 #define WLC_SET_WSEC_PMK 268
905 #define WLC_GET_AUTH_MODE 269
906 #define WLC_SET_AUTH_MODE 270
907 #define WLC_GET_WAKEENTRY 271
908 #define WLC_SET_WAKEENTRY 272
909 #define WLC_NDCONFIG_ITEM 273 /* currently handled in wl_oid.c */
910 #define WLC_NVOTPW 274
912 #define WLC_IOV_BLOCK_GET 276
913 #define WLC_IOV_MODULES_GET 277
914 #define WLC_SOFT_RESET 278
915 #define WLC_GET_ALLOW_MODE 279
916 #define WLC_SET_ALLOW_MODE 280
917 #define WLC_GET_DESIRED_BSSID 281
918 #define WLC_SET_DESIRED_BSSID 282
919 #define WLC_DISASSOC_MYAP 283
920 #define WLC_GET_RESERVED10 284
921 #define WLC_GET_RESERVED11 285
922 #define WLC_GET_RESERVED12 286
923 #define WLC_GET_RESERVED13 287
924 #define WLC_GET_RESERVED14 288
925 #define WLC_SET_RESERVED15 289
926 #define WLC_SET_RESERVED16 290
927 #define WLC_GET_RESERVED17 291
928 #define WLC_GET_RESERVED18 292
929 #define WLC_GET_RESERVED19 293
930 #define WLC_SET_RESERVED1A 294
931 #define WLC_GET_RESERVED1B 295
932 #define WLC_GET_RESERVED1C 296
933 #define WLC_GET_RESERVED1D 297
934 #define WLC_SET_RESERVED1E 298
935 #define WLC_GET_RESERVED1F 299
936 #define WLC_GET_RESERVED20 300
937 #define WLC_GET_RESERVED21 301
938 #define WLC_GET_RESERVED22 302
939 #define WLC_GET_RESERVED23 303
940 #define WLC_GET_RESERVED24 304
941 #define WLC_SET_RESERVED25 305
942 #define WLC_GET_RESERVED26 306
943 #define WLC_NPHY_SAMPLE_COLLECT 307 /* Nphy sample collect mode */
944 #define WLC_UM_PRIV 308 /* for usermode driver private ioctl */
945 #define WLC_GET_CMD 309
946 /* #define WLC_LAST 310 *//* Never used - can be reused */
947 #define WLC_RESERVED8 311
948 #define WLC_RESERVED9 312
949 #define WLC_RESERVED1 313
950 #define WLC_RESERVED2 314
951 #define WLC_RESERVED3 315
954 #ifndef EPICTRL_COOKIE
955 #define EPICTRL_COOKIE 0xABADCEDE
958 #define WL_DECRYPT_STATUS_SUCCESS 1
959 #define WL_DECRYPT_STATUS_FAILURE 2
960 #define WL_DECRYPT_STATUS_UNKNOWN 3
962 /* allows user-mode app to poll the status of USB image upgrade */
963 #define WLC_UPGRADE_SUCCESS 0
964 #define WLC_UPGRADE_PENDING 1
966 /* WLC_GET_AUTH, WLC_SET_AUTH values */
967 #define WL_AUTH_OPEN_SYSTEM 0 /* d11 open authentication */
968 #define WL_AUTH_SHARED_KEY 1 /* d11 shared authentication */
969 #define WL_AUTH_OPEN_SHARED 2 /* try open, then shared if open failed w/rc 13 */
971 /* Bit masks for radio disabled status - returned by WL_GET_RADIO */
972 #define WL_RADIO_SW_DISABLE (1<<0)
973 #define WL_RADIO_HW_DISABLE (1<<1)
974 #define WL_RADIO_MPC_DISABLE (1<<2)
975 #define WL_RADIO_COUNTRY_DISABLE (1<<3) /* some countries don't support any channel */
977 #define WL_SPURAVOID_OFF 0
978 #define WL_SPURAVOID_ON1 1
979 #define WL_SPURAVOID_ON2 2
981 /* Override bit for WLC_SET_TXPWR. if set, ignore other level limits */
982 #define WL_TXPWR_OVERRIDE (1U<<31)
984 #define WL_PHY_PAVARS_LEN 6 /* Phy type, Band range, chain, a1, b0, b1 */
986 typedef struct wl_po
{
987 u16 phy_type
; /* Phy type */
994 /* a large TX Power as an init value to factor out of min() calculations,
995 * keep low enough to fit in an s8, units are .25 dBm
997 #define WLC_TXPWR_MAX (127) /* ~32 dBm = 1,500 mW */
999 /* "diag" iovar argument and error code */
1000 #define WL_DIAG_INTERRUPT 1 /* d11 loopback interrupt test */
1001 #define WL_DIAG_LOOPBACK 2 /* d11 loopback data test */
1002 #define WL_DIAG_MEMORY 3 /* d11 memory test */
1003 #define WL_DIAG_LED 4 /* LED test */
1004 #define WL_DIAG_REG 5 /* d11/phy register test */
1005 #define WL_DIAG_SROM 6 /* srom read/crc test */
1006 #define WL_DIAG_DMA 7 /* DMA test */
1008 #define WL_DIAGERR_SUCCESS 0
1009 #define WL_DIAGERR_FAIL_TO_RUN 1 /* unable to run requested diag */
1010 #define WL_DIAGERR_NOT_SUPPORTED 2 /* diag requested is not supported */
1011 #define WL_DIAGERR_INTERRUPT_FAIL 3 /* loopback interrupt test failed */
1012 #define WL_DIAGERR_LOOPBACK_FAIL 4 /* loopback data test failed */
1013 #define WL_DIAGERR_SROM_FAIL 5 /* srom read failed */
1014 #define WL_DIAGERR_SROM_BADCRC 6 /* srom crc failed */
1015 #define WL_DIAGERR_REG_FAIL 7 /* d11/phy register test failed */
1016 #define WL_DIAGERR_MEMORY_FAIL 8 /* d11 memory test failed */
1017 #define WL_DIAGERR_NOMEM 9 /* diag test failed due to no memory */
1018 #define WL_DIAGERR_DMA_FAIL 10 /* DMA test failed */
1020 #define WL_DIAGERR_MEMORY_TIMEOUT 11 /* d11 memory test didn't finish in time */
1021 #define WL_DIAGERR_MEMORY_BADPATTERN 12 /* d11 memory test result in bad pattern */
1024 #define WLC_BAND_AUTO 0 /* auto-select */
1025 #define WLC_BAND_5G 1 /* 5 Ghz */
1026 #define WLC_BAND_2G 2 /* 2.4 Ghz */
1027 #define WLC_BAND_ALL 3 /* all bands */
1029 /* band range returned by band_range iovar */
1030 #define WL_CHAN_FREQ_RANGE_2G 0
1031 #define WL_CHAN_FREQ_RANGE_5GL 1
1032 #define WL_CHAN_FREQ_RANGE_5GM 2
1033 #define WL_CHAN_FREQ_RANGE_5GH 3
1035 /* phy types (returned by WLC_GET_PHYTPE) */
1036 #define WLC_PHY_TYPE_A 0
1037 #define WLC_PHY_TYPE_B 1
1038 #define WLC_PHY_TYPE_G 2
1039 #define WLC_PHY_TYPE_N 4
1040 #define WLC_PHY_TYPE_LP 5
1041 #define WLC_PHY_TYPE_SSN 6
1042 #define WLC_PHY_TYPE_HT 7
1043 #define WLC_PHY_TYPE_LCN 8
1044 #define WLC_PHY_TYPE_NULL 0xf
1046 /* MAC list modes */
1047 #define WLC_MACMODE_DISABLED 0 /* MAC list disabled */
1048 #define WLC_MACMODE_DENY 1 /* Deny specified (i.e. allow unspecified) */
1049 #define WLC_MACMODE_ALLOW 2 /* Allow specified (i.e. deny unspecified) */
1052 * 54g modes (basic bits may still be overridden)
1054 * GMODE_LEGACY_B Rateset: 1b, 2b, 5.5, 11
1057 * GMODE_AUTO Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
1058 * Extended Rateset: 6, 9, 12, 48
1061 * GMODE_ONLY Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54
1062 * Extended Rateset: 6b, 9, 12b, 48
1063 * Preamble: Short required
1065 * GMODE_B_DEFERRED Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
1066 * Extended Rateset: 6, 9, 12, 48
1069 * GMODE_PERFORMANCE Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54
1070 * Preamble: Short required
1071 * Shortslot: On and required
1072 * GMODE_LRS Rateset: 1b, 2b, 5.5b, 11b
1073 * Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54
1077 #define GMODE_LEGACY_B 0
1078 #define GMODE_AUTO 1
1079 #define GMODE_ONLY 2
1080 #define GMODE_B_DEFERRED 3
1081 #define GMODE_PERFORMANCE 4
1085 /* values for PLCPHdr_override */
1086 #define WLC_PLCP_AUTO -1
1087 #define WLC_PLCP_SHORT 0
1088 #define WLC_PLCP_LONG 1
1090 /* values for g_protection_override and n_protection_override */
1091 #define WLC_PROTECTION_AUTO -1
1092 #define WLC_PROTECTION_OFF 0
1093 #define WLC_PROTECTION_ON 1
1094 #define WLC_PROTECTION_MMHDR_ONLY 2
1095 #define WLC_PROTECTION_CTS_ONLY 3
1097 /* values for g_protection_control and n_protection_control */
1098 #define WLC_PROTECTION_CTL_OFF 0
1099 #define WLC_PROTECTION_CTL_LOCAL 1
1100 #define WLC_PROTECTION_CTL_OVERLAP 2
1102 /* values for n_protection */
1103 #define WLC_N_PROTECTION_OFF 0
1104 #define WLC_N_PROTECTION_OPTIONAL 1
1105 #define WLC_N_PROTECTION_20IN40 2
1106 #define WLC_N_PROTECTION_MIXEDMODE 3
1108 /* values for n_preamble_type */
1109 #define WLC_N_PREAMBLE_MIXEDMODE 0
1110 #define WLC_N_PREAMBLE_GF 1
1111 #define WLC_N_PREAMBLE_GF_BRCM 2
1113 /* values for band specific 40MHz capabilities */
1114 #define WLC_N_BW_20ALL 0
1115 #define WLC_N_BW_40ALL 1
1116 #define WLC_N_BW_20IN2G_40IN5G 2
1118 /* values to force tx/rx chain */
1119 #define WLC_N_TXRX_CHAIN0 0
1120 #define WLC_N_TXRX_CHAIN1 1
1122 /* bitflags for SGI support (sgi_rx iovar) */
1123 #define WLC_N_SGI_20 0x01
1124 #define WLC_N_SGI_40 0x02
1130 /* interference mitigation options */
1131 #define INTERFERE_OVRRIDE_OFF -1 /* interference override off */
1132 #define INTERFERE_NONE 0 /* off */
1133 #define NON_WLAN 1 /* foreign/non 802.11 interference, no auto detect */
1134 #define WLAN_MANUAL 2 /* ACI: no auto detection */
1135 #define WLAN_AUTO 3 /* ACI: auto detect */
1136 #define WLAN_AUTO_W_NOISE 4 /* ACI: auto - detect and non 802.11 interference */
1137 #define AUTO_ACTIVE (1 << 7) /* Auto is currently active */
1139 #define WL_RSSI_ANT_VERSION 1 /* current version of wl_rssi_ant_t */
1140 #define WL_ANT_RX_MAX 2 /* max 2 receive antennas */
1141 #define WL_ANT_HT_RX_MAX 3 /* max 3 receive antennas/cores */
1142 #define WL_ANT_IDX_1 0 /* antenna index 1 */
1143 #define WL_ANT_IDX_2 1 /* antenna index 2 */
1145 #ifndef WL_RSSI_ANT_MAX
1146 #define WL_RSSI_ANT_MAX 4 /* max possible rx antennas */
1147 #elif WL_RSSI_ANT_MAX != 4
1148 #error "WL_RSSI_ANT_MAX does not match"
1151 /* RSSI per antenna */
1153 u32 version
; /* version field */
1154 u32 count
; /* number of valid antenna rssi */
1155 s8 rssi_ant
[WL_RSSI_ANT_MAX
]; /* rssi per antenna */
1158 #define NUM_PWRCTRL_RATES 12
1161 u8 txpwr_band_max
[NUM_PWRCTRL_RATES
]; /* User set target */
1162 u8 txpwr_limit
[NUM_PWRCTRL_RATES
]; /* reg and local power limit */
1163 u8 txpwr_local_max
; /* local max according to the AP */
1164 u8 txpwr_local_constraint
; /* local constraint according to the AP */
1165 u8 txpwr_chan_reg_max
; /* Regulatory max for this channel */
1166 u8 txpwr_target
[2][NUM_PWRCTRL_RATES
]; /* Latest target for 2.4 and 5 Ghz */
1167 u8 txpwr_est_Pout
[2]; /* Latest estimate for 2.4 and 5 Ghz */
1168 u8 txpwr_opo
[NUM_PWRCTRL_RATES
]; /* On G phy, OFDM power offset */
1169 u8 txpwr_bphy_cck_max
[NUM_PWRCTRL_RATES
]; /* Max CCK power for this band (SROM) */
1170 u8 txpwr_bphy_ofdm_max
; /* Max OFDM power for this band (SROM) */
1171 u8 txpwr_aphy_max
[NUM_PWRCTRL_RATES
]; /* Max power for A band (SROM) */
1172 s8 txpwr_antgain
[2]; /* Ant gain for each band - from SROM */
1173 u8 txpwr_est_Pout_gofdm
; /* Pwr estimate for 2.4 OFDM */
1174 } tx_power_legacy_t
;
1176 #define WL_TX_POWER_RATES_LEGACY 45
1177 #define WL_TX_POWER_MCS20_FIRST 12
1178 #define WL_TX_POWER_MCS20_NUM 16
1179 #define WL_TX_POWER_MCS40_FIRST 28
1180 #define WL_TX_POWER_MCS40_NUM 17
1183 #define WL_TX_POWER_RATES 101
1184 #define WL_TX_POWER_CCK_FIRST 0
1185 #define WL_TX_POWER_CCK_NUM 4
1186 #define WL_TX_POWER_OFDM_FIRST 4 /* Index for first 20MHz OFDM SISO rate */
1187 #define WL_TX_POWER_OFDM20_CDD_FIRST 12 /* Index for first 20MHz OFDM CDD rate */
1188 #define WL_TX_POWER_OFDM40_SISO_FIRST 52 /* Index for first 40MHz OFDM SISO rate */
1189 #define WL_TX_POWER_OFDM40_CDD_FIRST 60 /* Index for first 40MHz OFDM CDD rate */
1190 #define WL_TX_POWER_OFDM_NUM 8
1191 #define WL_TX_POWER_MCS20_SISO_FIRST 20 /* Index for first 20MHz MCS SISO rate */
1192 #define WL_TX_POWER_MCS20_CDD_FIRST 28 /* Index for first 20MHz MCS CDD rate */
1193 #define WL_TX_POWER_MCS20_STBC_FIRST 36 /* Index for first 20MHz MCS STBC rate */
1194 #define WL_TX_POWER_MCS20_SDM_FIRST 44 /* Index for first 20MHz MCS SDM rate */
1195 #define WL_TX_POWER_MCS40_SISO_FIRST 68 /* Index for first 40MHz MCS SISO rate */
1196 #define WL_TX_POWER_MCS40_CDD_FIRST 76 /* Index for first 40MHz MCS CDD rate */
1197 #define WL_TX_POWER_MCS40_STBC_FIRST 84 /* Index for first 40MHz MCS STBC rate */
1198 #define WL_TX_POWER_MCS40_SDM_FIRST 92 /* Index for first 40MHz MCS SDM rate */
1199 #define WL_TX_POWER_MCS_1_STREAM_NUM 8
1200 #define WL_TX_POWER_MCS_2_STREAM_NUM 8
1201 #define WL_TX_POWER_MCS_32 100 /* Index for 40MHz rate MCS 32 */
1202 #define WL_TX_POWER_MCS_32_NUM 1
1204 /* sslpnphy specifics */
1205 #define WL_TX_POWER_MCS20_SISO_FIRST_SSN 12 /* Index for first 20MHz MCS SISO rate */
1207 /* tx_power_t.flags bits */
1208 #define WL_TX_POWER_F_ENABLED 1
1209 #define WL_TX_POWER_F_HW 2
1210 #define WL_TX_POWER_F_MIMO 4
1211 #define WL_TX_POWER_F_SISO 8
1215 chanspec_t chanspec
; /* txpwr report for this channel */
1216 chanspec_t local_chanspec
; /* channel on which we are associated */
1217 u8 local_max
; /* local max according to the AP */
1218 u8 local_constraint
; /* local constraint according to the AP */
1219 s8 antgain
[2]; /* Ant gain for each band - from SROM */
1220 u8 rf_cores
; /* count of RF Cores being reported */
1221 u8 est_Pout
[4]; /* Latest tx power out estimate per RF chain */
1222 u8 est_Pout_act
[4]; /* Latest tx power out estimate per RF chain
1223 * without adjustment
1225 u8 est_Pout_cck
; /* Latest CCK tx power out estimate */
1226 u8 tx_power_max
[4]; /* Maximum target power among all rates */
1227 u8 tx_power_max_rate_ind
[4]; /* Index of the rate with the max target power */
1228 u8 user_limit
[WL_TX_POWER_RATES
]; /* User limit */
1229 u8 reg_limit
[WL_TX_POWER_RATES
]; /* Regulatory power limit */
1230 u8 board_limit
[WL_TX_POWER_RATES
]; /* Max power board can support (SROM) */
1231 u8 target
[WL_TX_POWER_RATES
]; /* Latest target power */
1234 typedef struct tx_inst_power
{
1235 u8 txpwr_est_Pout
[2]; /* Latest estimate for 2.4 and 5 Ghz */
1236 u8 txpwr_est_Pout_gofdm
; /* Pwr estimate for 2.4 OFDM */
1239 /* Message levels */
1240 #define WL_ERROR_VAL 0x00000001
1241 #define WL_TRACE_VAL 0x00000002
1243 /* maximum channels returned by the get valid channels iovar */
1244 #define WL_NUMCHANNELS 64
1245 #define WL_NUMCHANSPECS 100
1251 #define NFIFO 6 /* # tx/rx fifopairs */
1253 struct wl_msglevel2
{
1258 /* structure for per-tid ampdu control */
1259 struct ampdu_tid_control
{
1261 u8 enable
; /* enable/disable */
1264 /* structure for identifying ea/tid for sending addba/delba */
1265 struct ampdu_ea_tid
{
1266 u8 ea
[ETH_ALEN
]; /* Station address */
1269 /* structure for identifying retry/tid for retry_limit_tid/rr_retry_limit_tid */
1270 struct ampdu_retry_tid
{
1272 u8 retry
; /* retry value */
1276 /* Software feature flag defines used by wlfeatureflag */
1277 #define WL_SWFL_NOHWRADIO 0x0004
1278 #define WL_SWFL_FLOWCONTROL 0x0008 /* Enable backpressure to OS stack */
1279 #define WL_SWFL_WLBSSSORT 0x0010 /* Per-port supports sorting of BSS */
1281 #define WL_LIFETIME_MAX 0xFFFF /* Max value in ms */
1284 /* Pattern matching filter. Specifies an offset within received packets to
1285 * start matching, the pattern to match, the size of the pattern, and a bitmask
1286 * that indicates which bits within the pattern should be matched.
1288 typedef struct wl_pkt_filter_pattern
{
1289 u32 offset
; /* Offset within received packet to start pattern matching.
1290 * Offset '0' is the first byte of the ethernet header.
1292 u32 size_bytes
; /* Size of the pattern. Bitmask must be the same size. */
1293 u8 mask_and_pattern
[1]; /* Variable length mask and pattern data. mask starts
1294 * at offset 0. Pattern immediately follows mask.
1296 } wl_pkt_filter_pattern_t
;
1298 /* IOVAR "pkt_filter_add" parameter. Used to install packet filters. */
1299 typedef struct wl_pkt_filter
{
1300 u32 id
; /* Unique filter id, specified by app. */
1301 u32 type
; /* Filter type (WL_PKT_FILTER_TYPE_xxx). */
1302 u32 negate_match
; /* Negate the result of filter matches */
1303 union { /* Filter definitions */
1304 wl_pkt_filter_pattern_t pattern
; /* Pattern matching filter */
1308 #define WL_PKT_FILTER_FIXED_LEN offsetof(wl_pkt_filter_t, u)
1309 #define WL_PKT_FILTER_PATTERN_FIXED_LEN offsetof(wl_pkt_filter_pattern_t, mask_and_pattern)
1311 /* IOVAR "pkt_filter_enable" parameter. */
1312 typedef struct wl_pkt_filter_enable
{
1313 u32 id
; /* Unique filter id */
1314 u32 enable
; /* Enable/disable bool */
1315 } wl_pkt_filter_enable_t
;
1318 #define WLC_RSSI_INVALID 0 /* invalid RSSI value */
1320 /* n-mode support capability */
1321 /* 2x2 includes both 1x1 & 2x2 devices
1322 * reserved #define 2 for future when we want to separate 1x1 & 2x2 and
1323 * control it independently
1325 #define WL_11N_2x2 1
1326 #define WL_11N_3x3 3
1327 #define WL_11N_4x4 4
1329 /* define 11n feature disable flags */
1330 #define WLFEATURE_DISABLE_11N 0x00000001
1331 #define WLFEATURE_DISABLE_11N_STBC_TX 0x00000002
1332 #define WLFEATURE_DISABLE_11N_STBC_RX 0x00000004
1333 #define WLFEATURE_DISABLE_11N_SGI_TX 0x00000008
1334 #define WLFEATURE_DISABLE_11N_SGI_RX 0x00000010
1335 #define WLFEATURE_DISABLE_11N_AMPDU_TX 0x00000020
1336 #define WLFEATURE_DISABLE_11N_AMPDU_RX 0x00000040
1337 #define WLFEATURE_DISABLE_11N_GF 0x00000080
1339 #define WL_EVENTING_MASK_LEN 16
1341 #define TOE_TX_CSUM_OL 0x00000001
1342 #define TOE_RX_CSUM_OL 0x00000002
1348 typedef enum sup_auth_status
{
1349 WLC_SUP_DISCONNECTED
= 0,
1352 WLC_SUP_AUTHENTICATING
,
1353 WLC_SUP_AUTHENTICATED
,
1357 WLC_SUP_LAST_BASIC_STATE
,
1358 WLC_SUP_KEYXCHANGE_WAIT_M1
= WLC_SUP_AUTHENTICATED
,
1359 WLC_SUP_KEYXCHANGE_PREP_M2
= WLC_SUP_KEYXCHANGE
,
1360 WLC_SUP_KEYXCHANGE_WAIT_M3
= WLC_SUP_LAST_BASIC_STATE
,
1361 WLC_SUP_KEYXCHANGE_PREP_M4
,
1362 WLC_SUP_KEYXCHANGE_WAIT_G1
,
1363 WLC_SUP_KEYXCHANGE_PREP_G2
1364 } sup_auth_status_t
;
1365 #endif /* _wlioctl_h_ */