18ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt/*
28ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt * Custom OID/ioctl definitions for
38ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt * Broadcom 802.11abg Networking Device Driver
48ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt *
58ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt * Definitions subject to change without notice.
68ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt *
7832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * Copyright (C) 1999-2012, Broadcom Corporation
88ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt *
9832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *      Unless you and Broadcom execute a separate written software license
108ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt * agreement governing use of this software, this software is licensed to you
118ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt * under the terms of the GNU General Public License version 2 (the "GPL"),
128ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt * available at http://www.broadcom.com/licenses/GPLv2.php, with the
138ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt * following added to such license:
148ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt *
158ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt *      As a special exception, the copyright holders of this software give you
168ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt * permission to link this software with independent modules, and to copy and
178ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt * distribute the resulting executable under terms of your choice, provided that
188ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt * you also meet, for each linked independent module, the terms and conditions of
198ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt * the license of that module.  An independent module is a module which is not
208ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt * derived from this software.  The special exception does not apply to any
218ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt * modifications of the software.
228ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt *
238ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt *      Notwithstanding the above, under no circumstances may you combine this
248ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt * software in any way with any other Broadcom software provided under a license
258ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt * other than the GPL, without Broadcom's express prior written consent.
268ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt *
2735326a4297a7f6715bc05725b2f2c807af32f827Dmitry Shmidt * $Id: wlioctl.h 357627 2012-09-19 12:42:22Z $
288ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt */
298ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
308ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#ifndef _wlioctl_h_
31832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	_wlioctl_h_
328ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
338ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#include <typedefs.h>
348ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#include <proto/ethernet.h>
358ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#include <proto/bcmeth.h>
368ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#include <proto/bcmevent.h>
378ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#include <proto/802.11.h>
384a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#include <bcmwifi_channels.h>
394a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#include <bcmwifi_rates.h>
408ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4166981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
42832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#include <bcm_mpool_pub.h>
438ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#include <bcmcdc.h>
4466981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
4566981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
4666981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt/*  LINUX_POSTMOGRIFY_REMOVAL: undefined during compile phase, so its
4766981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt *  a no-op for most cases. For hybrid and other open source releases,
4866981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt *  its defined during a second pass and mogrified out for distribution.
4966981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt */
5066981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
5166981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
5266981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
538ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
548ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#ifndef INTF_NAME_SIZ
55832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define INTF_NAME_SIZ	16
568ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#endif
578ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
58832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Used to send ioctls over the transport pipe */
598ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct remote_ioctl {
60832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	cdc_ioctl_t 	msg;
61832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint		data_len;
628ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	char            intf_name[INTF_NAME_SIZ];
638ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} rem_ioctl_t;
64832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define REMOTE_SIZE	sizeof(rem_ioctl_t)
658ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
66832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ACTION_FRAME_SIZE 1800
678ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
688ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_action_frame {
69832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr 	da;
70832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 			len;
71832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 			packetId;
72832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8			data[ACTION_FRAME_SIZE];
738ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_action_frame_t;
748ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
758ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_WIFI_ACTION_FRAME_SIZE sizeof(struct wl_action_frame)
768ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
778ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct ssid_info
788ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt{
79832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		ssid_len;	/* the length of SSID */
80832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		ssid[32];	/* SSID string */
818ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} ssid_info_t;
828ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
838ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_af_params {
84832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 			channel;
85832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 			dwell_time;
86832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr 	BSSID;
87832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wl_action_frame_t	action_frame;
888ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_af_params_t;
898ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
908ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_WIFI_AF_PARAMS_SIZE sizeof(struct wl_af_params)
918ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
92832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define MFP_TEST_FLAG_NORMAL	0
93832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define MFP_TEST_FLAG_ANY_KEY	1
94832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wl_sa_query {
95832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32			flag;
96832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 			action;
97832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 			id;
98832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr 	da;
99832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_sa_query_t;
100832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
10166981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /*  LINUX_POSTMOGRIFY_REMOVAL */
1028ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
103832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* require default structure packing */
1048ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define BWL_DEFAULT_PACKING
1058ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#include <packed_section_start.h>
1068ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1078ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
108832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
109832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Legacy structure to help keep backward compatible wl tool and tray app */
1108ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
111832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	LEGACY_WL_BSS_INFO_VERSION	107	/* older version of wl_bss_info struct */
1128ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
113832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wl_bss_info_107 {
114832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		version;		/* version field */
115832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		length;			/* byte length of data in this record,
116832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 * starting at version and including IEs
117832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 */
118832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr BSSID;
119832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16		beacon_period;		/* units are Kusec */
120832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16		capability;		/* Capability information */
121832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		SSID_len;
122832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		SSID[32];
123832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct {
124832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt		uint	count;			/* # rates in this set */
125832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt		uint8	rates[16];		/* rates in 500kbps units w/hi bit set if basic */
126832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	} rateset;				/* supported rates */
127832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		channel;		/* Channel no. */
128832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16		atim_window;		/* units are Kusec */
129832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		dtim_period;		/* DTIM period */
130832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int16		RSSI;			/* receive signal strength (in dBm) */
131832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8		phy_noise;		/* noise (in dBm) */
132832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		ie_length;		/* byte length of Information Elements */
133832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* variable length Information Elements */
134832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_bss_info_107_t;
1358ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
136832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/*
137832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * Per-BSS information structure.
138832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
1398ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
140832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	LEGACY2_WL_BSS_INFO_VERSION	108		/* old version of wl_bss_info struct */
1418ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
142832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* BSS info structure
143832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * Applications MUST CHECK ie_offset field and length field to access IEs and
144832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * next bss_info structure in a vector (in wl_scan_results_t)
145832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
1468ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_bss_info_108 {
147832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		version;		/* version field */
148832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		length;			/* byte length of data in this record,
149832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 * starting at version and including IEs
150832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 */
1518ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	struct ether_addr BSSID;
152832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16		beacon_period;		/* units are Kusec */
153832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16		capability;		/* Capability information */
154832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		SSID_len;
155832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		SSID[32];
1568ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	struct {
157832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt		uint	count;			/* # rates in this set */
158832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt		uint8	rates[16];		/* rates in 500kbps units w/hi bit set if basic */
159832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	} rateset;				/* supported rates */
160832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t	chanspec;		/* chanspec for bss */
161832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16		atim_window;		/* units are Kusec */
162832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		dtim_period;		/* DTIM period */
163832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int16		RSSI;			/* receive signal strength (in dBm) */
164832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8		phy_noise;		/* noise (in dBm) */
165832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
166832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		n_cap;			/* BSS is 802.11N Capable */
167832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		nbss_cap;		/* 802.11N BSS Capabilities (based on HT_CAP_*) */
168832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		ctl_ch;			/* 802.11N BSS control channel number */
169832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		reserved32[1];		/* Reserved for expansion of BSS properties */
170832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		flags;			/* flags */
171832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		reserved[3];		/* Reserved for expansion of BSS properties */
172832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		basic_mcs[MCSSET_LEN];	/* 802.11N BSS required MCS set */
173832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
174832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16		ie_offset;		/* offset at which IEs start, from beginning */
175832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		ie_length;		/* byte length of Information Elements */
176832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* Add new fields here */
177832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* variable length Information Elements */
1788ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_bss_info_108_t;
1798ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
18066981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
18166981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
182832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_BSS_INFO_VERSION	109		/* current version of wl_bss_info struct */
1838ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
184832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* BSS info structure
185832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * Applications MUST CHECK ie_offset field and length field to access IEs and
186832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * next bss_info structure in a vector (in wl_scan_results_t)
187832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
1888ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_bss_info {
189832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		version;		/* version field */
190832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		length;			/* byte length of data in this record,
191832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 * starting at version and including IEs
192832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 */
1938ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	struct ether_addr BSSID;
194832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16		beacon_period;		/* units are Kusec */
195832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16		capability;		/* Capability information */
196832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		SSID_len;
197832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		SSID[32];
1988ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	struct {
199832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt		uint	count;			/* # rates in this set */
200832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt		uint8	rates[16];		/* rates in 500kbps units w/hi bit set if basic */
201832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	} rateset;				/* supported rates */
202832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t	chanspec;		/* chanspec for bss */
203832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16		atim_window;		/* units are Kusec */
204832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		dtim_period;		/* DTIM period */
205832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int16		RSSI;			/* receive signal strength (in dBm) */
206832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8		phy_noise;		/* noise (in dBm) */
207832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
208832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		n_cap;			/* BSS is 802.11N Capable */
2097e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32		nbss_cap;		/* 802.11N+AC BSS Capabilities */
210832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		ctl_ch;			/* 802.11N BSS control channel number */
211832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		padding1[3];		/* explicit struct alignment padding */
212832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16		vht_rxmcsmap;		/* VHT rx mcs map */
213832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16		vht_txmcsmap;		/* VHT tx mcs map */
214832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		flags;			/* flags */
215832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		vht_cap;		/* BSS is vht capable */
216832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		reserved[2];		/* Reserved for expansion of BSS properties */
217832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		basic_mcs[MCSSET_LEN];	/* 802.11N BSS required MCS set */
218832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
219832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16		ie_offset;		/* offset at which IEs start, from beginning */
220832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		ie_length;		/* byte length of Information Elements */
221832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int16		SNR;			/* average SNR of during frame reception */
222832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* Add new fields here */
223832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* variable length Information Elements */
2248ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_bss_info_t;
2258ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2267e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt/* bss_info_cap_t flags */
2277e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt#define WL_BSS_FLAGS_FROM_BEACON	0x01	/* bss_info derived from beacon */
2287e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt#define WL_BSS_FLAGS_FROM_CACHE		0x02	/* bss_info collected from cache */
2297e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt#define WL_BSS_FLAGS_RSSI_ONCHANNEL 0x04 /* rssi info was received on channel (vs offchannel) */
2307e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt
2317e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt/* bssinfo flag for nbss_cap */
2327e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt#define VHT_BI_SGI_80MHZ			0x00000100
2337e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt
23466981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
23566981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
2368ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_bsscfg {
237832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	wsec;
238832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	WPA_auth;
239832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	wsec_index;
240832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	associated;
241832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	BSS;
242832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	phytest_on;
243832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr	prev_BSSID;
244832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr	BSSID;
245832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  targetbss_wpa2_flags;
246832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 assoc_type;
247832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 assoc_state;
2488ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_bsscfg_t;
2498ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2508ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_bss_config {
251832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	atim_window;
252832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	beacon_period;
253832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	chanspec;
2548ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_bss_config_t;
2558ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
256832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define DLOAD_HANDLER_VER			1	/* Downloader version */
257832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define DLOAD_FLAG_VER_MASK		0xf000	/* Downloader version mask */
258832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define DLOAD_FLAG_VER_SHIFT	12	/* Downloader version shift */
259832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
260832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define DL_CRC_NOT_INUSE 			0x0001
261832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
262832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* generic download types & flags */
263832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidtenum {
264832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	DL_TYPE_UCODE = 1,
265832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	DL_TYPE_CLM = 2
266832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt};
267832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
268832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* ucode type values */
269832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidtenum {
270832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	UCODE_FW,
271832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	INIT_VALS,
272832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	BS_INIT_VALS
273832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt};
274832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
275832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidtstruct wl_dload_data {
276832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 flag;
277832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 dload_type;
278832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 len;
279832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 crc;
280832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8  data[1];
281832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt};
282832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wl_dload_data wl_dload_data_t;
283832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
284832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidtstruct wl_ucode_info {
285832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 ucode_type;
286832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 num_chunks;
287832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 chunk_len;
288832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 chunk_num;
289832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8  data_chunk[1];
290832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt};
291832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wl_ucode_info wl_ucode_info_t;
292832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
293832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidtstruct wl_clm_dload_info {
294832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 ds_id;
295832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 clm_total_len;
296832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 num_chunks;
297832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 chunk_len;
298832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 chunk_offset;
299832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8  data_chunk[1];
300832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt};
301832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wl_clm_dload_info wl_clm_dload_info_t;
3028ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
30366981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
30466981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
3058ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wlc_ssid {
306832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		SSID_len;
307832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uchar		SSID[32];
3088ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wlc_ssid_t;
3098ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
31066981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
31166981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
312832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define MAX_PREFERRED_AP_NUM     5
313832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wlc_fastssidinfo {
314832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32				SSID_channel[MAX_PREFERRED_AP_NUM];
315832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wlc_ssid_t		SSID_info[MAX_PREFERRED_AP_NUM];
316832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wlc_fastssidinfo_t;
317832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
318832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct wnm_url {
319832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8   len;
320832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8   data[1];
321832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} BWL_POST_PACKED_STRUCT wnm_url_t;
322832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
323832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct chan_scandata {
324832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		txpower;
325832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		pad;
326832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t	channel;	/* Channel num, bw, ctrl_sb and band */
327832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		channel_mintime;
328832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		channel_maxtime;
329832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} chan_scandata_t;
330832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
331832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef enum wl_scan_type {
332832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	EXTDSCAN_FOREGROUND_SCAN,
333832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	EXTDSCAN_BACKGROUND_SCAN,
334832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	EXTDSCAN_FORCEDBACKGROUND_SCAN
335832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_scan_type_t;
336832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
337832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_EXTDSCAN_MAX_SSID		5
338832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
339832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wl_extdscan_params {
340832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8 		nprobes;		/* 0, passive, otherwise active */
341832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8    	split_scan;		/* split scan */
342832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8		band;			/* band */
343832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8		pad;
344832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wlc_ssid_t 	ssid[WLC_EXTDSCAN_MAX_SSID]; /* ssid list */
345832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		tx_rate;		/* in 500ksec units */
346832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wl_scan_type_t	scan_type;		/* enum */
347832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 		channel_num;
348832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chan_scandata_t channel_list[1];	/* list of chandata structs */
349832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_extdscan_params_t;
350832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
351832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_EXTDSCAN_PARAMS_FIXED_SIZE 	(sizeof(wl_extdscan_params_t) - sizeof(chan_scandata_t))
3528ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3538ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_BSSTYPE_INFRA 1
3548ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_BSSTYPE_INDEP 0
3558ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_BSSTYPE_ANY   2
3568ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
357832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Bitmask for scan_type */
358832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_SCANFLAGS_PASSIVE	0x01	/* force passive scan */
359832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_SCANFLAGS_RESERVED	0x02	/* Reserved */
360832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_SCANFLAGS_PROHIBITED	0x04	/* allow scanning prohibited channels */
3618ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3628ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_SCAN_PARAMS_SSID_MAX 	10
3638ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3648ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_scan_params {
365832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wlc_ssid_t ssid;		/* default: {0, ""} */
366832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr bssid;	/* default: bcast */
367832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8 bss_type;			/* default: any,
368832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT
369832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 */
370832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 scan_type;		/* flags, 0 use default */
371832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 nprobes;			/* -1 use default, number of probes per channel */
372832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 active_time;		/* -1 use default, dwell time per channel for
373832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * active scanning
374832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 */
375832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 passive_time;		/* -1 use default, dwell time per channel
376832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * for passive scanning
377832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 */
378832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 home_time;		/* -1 use default, dwell time for the home channel
379832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * between channel scans
380832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 */
381832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 channel_num;		/* count of channels and ssids that follow
382832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 *
383832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * low half is count of channels in channel_list, 0
384832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * means default (use all available channels)
385832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 *
386832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * high half is entries in wlc_ssid_t array that
387832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * follows channel_list, aligned for int32 (4 bytes)
388832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * meaning an odd channel count implies a 2-byte pad
389832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * between end of channel_list and first ssid
390832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 *
391832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * if ssid count is zero, single ssid in the fixed
392832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * parameter portion is assumed, otherwise ssid in
393832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * the fixed portion is ignored
394832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 */
395832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 channel_list[1];		/* list of chanspecs */
3968ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_scan_params_t;
3978ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
398832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* size of wl_scan_params not including variable length array */
3998ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_SCAN_PARAMS_FIXED_SIZE 64
4008ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
401832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* masks for channel and ssid count */
4028ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_SCAN_PARAMS_COUNT_MASK 0x0000ffff
4038ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_SCAN_PARAMS_NSSID_SHIFT 16
4048ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4058ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_SCAN_ACTION_START      1
4068ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_SCAN_ACTION_CONTINUE   2
4078ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_SCAN_ACTION_ABORT      3
4088ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4098ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define ISCAN_REQ_VERSION 1
4108ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
411832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* incremental scan struct */
4128ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_iscan_params {
4138ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 version;
4148ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 action;
4158ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 scan_duration;
4168ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	wl_scan_params_t params;
4178ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_iscan_params_t;
4188ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
419832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* 3 fields + size of wl_scan_params, not including variable length array */
4208ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_ISCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_iscan_params_t, params) + sizeof(wlc_ssid_t))
42166981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
4228ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4238ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_scan_results {
4248ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 buflen;
4258ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 version;
4268ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 count;
4278ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	wl_bss_info_t bss_info[1];
4288ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_scan_results_t;
4298ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
43066981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
431832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* size of wl_scan_results not including variable length array */
4328ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_SCAN_RESULTS_FIXED_SIZE (sizeof(wl_scan_results_t) - sizeof(wl_bss_info_t))
4338ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
434832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* wl_iscan_results status values */
435832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_SCAN_RESULTS_SUCCESS	0
436832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_SCAN_RESULTS_PARTIAL	1
437832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_SCAN_RESULTS_PENDING	2
438832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_SCAN_RESULTS_ABORTED	3
4398ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_SCAN_RESULTS_NO_MEM  4
4408ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
441832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Used in EXT_STA */
4428ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define DNGL_RXCTXT_SIZE	45
4438ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4448ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4458ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define ESCAN_REQ_VERSION 1
4468ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4478ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_escan_params {
4488ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 version;
4498ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 action;
4508ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 sync_id;
4518ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	wl_scan_params_t params;
4528ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_escan_params_t;
4538ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4548ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_ESCAN_PARAMS_FIXED_SIZE (OFFSETOF(wl_escan_params_t, params) + sizeof(wlc_ssid_t))
4558ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4568ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_escan_result {
4578ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 buflen;
4588ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 version;
4598ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 sync_id;
4608ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 bss_count;
4618ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	wl_bss_info_t bss_info[1];
4628ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_escan_result_t;
4638ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4648ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_ESCAN_RESULTS_FIXED_SIZE (sizeof(wl_escan_result_t) - sizeof(wl_bss_info_t))
4658ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
466832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* incremental scan results struct */
4678ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_iscan_results {
4688ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 status;
4698ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	wl_scan_results_t results;
4708ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_iscan_results_t;
4718ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
472832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* size of wl_iscan_results not including variable length array */
4738ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_ISCAN_RESULTS_FIXED_SIZE \
4748ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	(WL_SCAN_RESULTS_FIXED_SIZE + OFFSETOF(wl_iscan_results_t, results))
4758ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4768ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_probe_params {
4778ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	wlc_ssid_t ssid;
4788ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	struct ether_addr bssid;
4798ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	struct ether_addr mac;
4808ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_probe_params_t;
48166981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
4828ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4834a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_MAXRATES_IN_SET		16	/* max # of rates in a rateset */
4848ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_rateset {
485832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	count;			/* # rates in this set */
4864a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint8	rates[WL_MAXRATES_IN_SET];	/* rates in 500kbps units w/hi bit set if basic */
4878ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_rateset_t;
4888ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4898ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_rateset_args {
490832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	count;			/* # rates in this set */
4914a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint8	rates[WL_MAXRATES_IN_SET];	/* rates in 500kbps units w/hi bit set if basic */
492832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8   mcs[MCSSET_LEN];        /* supported mcs index bit map */
4938ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_rateset_args_t;
4948ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
495832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* uint32 list */
4968ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_uint32_list {
497832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* in - # of elements, out - # of entries */
4988ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 count;
499832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* variable length uint32 list */
5008ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 element[1];
5018ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_uint32_list_t;
5028ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
503832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* used for association with a specific BSSID and chanspec list */
5048ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_assoc_params {
505832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr bssid;	/* 00:00:00:00:00:00: broadcast scan */
506832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 chanspec_num;		/* 0: all available channels,
507832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * otherwise count of chanspecs in chanspec_list
508832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 */
509832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t chanspec_list[1];	/* list of chanspecs */
5108ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_assoc_params_t;
511832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_ASSOC_PARAMS_FIXED_SIZE 	OFFSETOF(wl_assoc_params_t, chanspec_list)
5128ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
513832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* used for reassociation/roam to a specific BSSID and channel */
5148ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef wl_assoc_params_t wl_reassoc_params_t;
515832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_REASSOC_PARAMS_FIXED_SIZE	WL_ASSOC_PARAMS_FIXED_SIZE
5168ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
517832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* used for association to a specific BSSID and channel */
5188ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef wl_assoc_params_t wl_join_assoc_params_t;
519832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_JOIN_ASSOC_PARAMS_FIXED_SIZE	WL_ASSOC_PARAMS_FIXED_SIZE
5208ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
521832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* used for join with or without a specific bssid and channel list */
5228ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_join_params {
5238ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	wlc_ssid_t ssid;
524832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wl_assoc_params_t params;	/* optional field, but it must include the fixed portion
525832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * of the wl_assoc_params_t struct when it does present.
526832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 */
5278ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_join_params_t;
52866981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
52966981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef  LINUX_POSTMOGRIFY_REMOVAL
530832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_JOIN_PARAMS_FIXED_SIZE 	(OFFSETOF(wl_join_params_t, params) + \
531832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 WL_ASSOC_PARAMS_FIXED_SIZE)
532832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* scan params for extended join */
5338ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_join_scan_params {
534832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 scan_type;		/* 0 use default, active or passive scan */
535832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 nprobes;			/* -1 use default, number of probes per channel */
536832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 active_time;		/* -1 use default, dwell time per channel for
537832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * active scanning
538832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 */
539832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 passive_time;		/* -1 use default, dwell time per channel
540832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * for passive scanning
541832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 */
542832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 home_time;		/* -1 use default, dwell time for the home channel
543832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * between channel scans
544832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 */
5458ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_join_scan_params_t;
5468ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
547832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* extended join params */
5488ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_extjoin_params {
549832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wlc_ssid_t ssid;		/* {0, ""}: wildcard scan */
5508ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	wl_join_scan_params_t scan;
551832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wl_join_assoc_params_t assoc;	/* optional field, but it must include the fixed portion
552832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * of the wl_join_assoc_params_t struct when it does
553832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * present.
554832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 */
5558ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_extjoin_params_t;
556832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_EXTJOIN_PARAMS_FIXED_SIZE 	(OFFSETOF(wl_extjoin_params_t, assoc) + \
557832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 WL_JOIN_ASSOC_PARAMS_FIXED_SIZE)
558832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
559832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* All builds use the new 11ac ratespec/chanspec */
560832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#undef  D11AC_IOTYPES
561832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define D11AC_IOTYPES
562832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
563832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#ifndef D11AC_IOTYPES
564832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
565832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* defines used by the nrate iovar */
566832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NRATE_MCS_INUSE	0x00000080	/* MSC in use,indicates b0-6 holds an mcs */
567832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NRATE_RATE_MASK 0x0000007f	/* rate/mcs value */
568832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NRATE_STF_MASK	0x0000ff00	/* stf mode mask: siso, cdd, stbc, sdm */
569832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NRATE_STF_SHIFT	8			/* stf mode shift */
570832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NRATE_OVERRIDE	0x80000000	/* bit indicates override both rate & mode */
571832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NRATE_OVERRIDE_MCS_ONLY 0x40000000 /* bit indicate to override mcs only */
572832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NRATE_SGI_MASK  0x00800000      /* sgi mode */
573832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NRATE_SGI_SHIFT 23              /* sgi mode */
574832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NRATE_LDPC_CODING 0x00400000    /* bit indicates adv coding in use */
575832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NRATE_LDPC_SHIFT 22             /* ldpc shift */
576832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
577832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NRATE_STF_SISO	0		/* stf mode SISO */
578832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NRATE_STF_CDD	1		/* stf mode CDD */
579832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NRATE_STF_STBC	2		/* stf mode STBC */
580832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NRATE_STF_SDM	3		/* stf mode SDM */
581832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
582832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#else /* D11AC_IOTYPES */
583832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
584832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* WL_RSPEC defines for rate information */
585832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_RATE_MASK      0x000000FF      /* rate or HT MCS value */
586832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_VHT_MCS_MASK   0x0000000F      /* VHT MCS value */
587832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_VHT_NSS_MASK   0x000000F0      /* VHT Nss value */
588832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_VHT_NSS_SHIFT  4               /* VHT Nss value shift */
589832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_TXEXP_MASK     0x00000300
590832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_TXEXP_SHIFT    8
591832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_BW_MASK        0x00070000      /* bandwidth mask */
592832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_BW_SHIFT       16              /* bandwidth shift */
593832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_STBC           0x00100000      /* STBC encoding, Nsts = 2 x Nss */
594832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_LDPC           0x00400000      /* bit indicates adv coding in use */
595832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_SGI            0x00800000      /* Short GI mode */
596832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_ENCODING_MASK  0x03000000      /* Encoding of Rate/MCS field */
597832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_OVERRIDE_RATE  0x40000000      /* bit indicate to override mcs only */
598832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_OVERRIDE_MODE  0x80000000      /* bit indicates override both rate & mode */
599832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
600832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* WL_RSPEC_ENCODING field defs */
601832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_ENCODE_RATE    0x00000000      /* Legacy rate is stored in RSPEC_RATE_MASK */
602832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_ENCODE_HT      0x01000000      /* HT MCS is stored in RSPEC_RATE_MASK */
603832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_ENCODE_VHT     0x02000000      /* VHT MCS and Nss is stored in RSPEC_RATE_MASK */
604832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
605832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* WL_RSPEC_BW field defs */
606832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_BW_UNSPECIFIED 0
607832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_BW_20MHZ       0x00010000
608832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_BW_40MHZ       0x00020000
609832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_BW_80MHZ       0x00030000
610832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSPEC_BW_160MHZ      0x00040000
611832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
612832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Legacy defines for the nrate iovar */
613832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OLD_NRATE_MCS_INUSE         0x00000080 /* MSC in use,indicates b0-6 holds an mcs */
614832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OLD_NRATE_RATE_MASK         0x0000007f /* rate/mcs value */
615832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OLD_NRATE_STF_MASK          0x0000ff00 /* stf mode mask: siso, cdd, stbc, sdm */
616832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OLD_NRATE_STF_SHIFT         8          /* stf mode shift */
617832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OLD_NRATE_OVERRIDE          0x80000000 /* bit indicates override both rate & mode */
618832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OLD_NRATE_OVERRIDE_MCS_ONLY 0x40000000 /* bit indicate to override mcs only */
619832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OLD_NRATE_SGI               0x00800000 /* sgi mode */
620832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OLD_NRATE_LDPC_CODING       0x00400000 /* bit indicates adv coding in use */
621832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
622832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OLD_NRATE_STF_SISO	0		/* stf mode SISO */
623832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OLD_NRATE_STF_CDD	1		/* stf mode CDD */
624832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OLD_NRATE_STF_STBC	2		/* stf mode STBC */
625832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OLD_NRATE_STF_SDM	3		/* stf mode SDM */
626832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
627832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#endif /* D11AC_IOTYPES */
628832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
629832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ANTENNA_NUM_1	1		/* total number of antennas to be used */
630832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ANTENNA_NUM_2	2
631832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ANTENNA_NUM_3	3
632832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ANTENNA_NUM_4	4
633832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
634832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ANT_SELCFG_AUTO		0x80	/* bit indicates antenna sel AUTO */
635832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ANT_SELCFG_MASK		0x33	/* antenna configuration mask */
636832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ANT_SELCFG_MAX		4	/* max number of antenna configurations */
637832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ANT_SELCFG_TX_UNICAST	0	/* unicast tx antenna configuration */
638832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ANT_SELCFG_RX_UNICAST	1	/* unicast rx antenna configuration */
639832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ANT_SELCFG_TX_DEF	2	/* default tx antenna configuration */
640832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ANT_SELCFG_RX_DEF	3	/* default rx antenna configuration */
641832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
642832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define MAX_STREAMS_SUPPORTED	4	/* max number of streams supported */
6438ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
6448ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
645832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 ant_config[ANT_SELCFG_MAX];	/* antenna configuration */
646832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 num_antcfg;	/* number of available antenna configurations */
6478ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wlc_antselcfg_t;
6488ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
649832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define HIGHEST_SINGLE_STREAM_MCS	7 /* MCS values greater than this enable multiple streams */
6508ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
651832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define MAX_CCA_CHANNELS 38	/* Max number of 20 Mhz wide channels */
652832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define MAX_CCA_SECS     60	/* CCA keeps this many seconds history */
6538ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
654832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define IBSS_MED        15	/* Mediom in-bss congestion percentage */
655832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define IBSS_HI         25	/* Hi in-bss congestion percentage */
6568ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define OBSS_MED        12
6578ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define OBSS_HI         25
6588ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define INTERFER_MED    5
6598ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define INTERFER_HI     10
6608ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
661832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define  CCA_FLAG_2G_ONLY		0x01	/* Return a channel from 2.4 Ghz band */
662832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define  CCA_FLAG_5G_ONLY		0x02	/* Return a channel from 2.4 Ghz band */
663832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define  CCA_FLAG_IGNORE_DURATION	0x04	/* Ignore dwell time for each channel */
664832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define  CCA_FLAGS_PREFER_1_6_11	0x10
665832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define  CCA_FLAG_IGNORE_INTERFER 	0x20 /* do not exlude channel based on interfer level */
6668ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
667832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CCA_ERRNO_BAND 		1	/* After filtering for band pref, no choices left */
668832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CCA_ERRNO_DURATION	2	/* After filtering for duration, no choices left */
669832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CCA_ERRNO_PREF_CHAN	3	/* After filtering for chan pref, no choices left */
670832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CCA_ERRNO_INTERFER	4	/* After filtering for interference, no choices left */
671832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CCA_ERRNO_TOO_FEW	5	/* Only 1 channel was input */
6728ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
6738ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
674832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 duration;	/* millisecs spent sampling this channel */
675832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 congest_ibss;	/* millisecs in our bss (presumably this traffic will */
676832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				/*  move if cur bss moves channels) */
677832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 congest_obss;	/* traffic not in our bss */
678832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 interference;	/* millisecs detecting a non 802.11 interferer. */
679832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 timestamp;	/* second timestamp */
6808ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} cca_congest_t;
6818ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
6828ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
683832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t chanspec;	/* Which channel? */
684832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 num_secs;		/* How many secs worth of data */
685832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	cca_congest_t  secs[1];	/* Data */
6868ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} cca_congest_channel_req_t;
6878ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
688832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* interference source detection and identification mode */
689832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ITFR_MODE_DISABLE	0	/* disable feature */
690832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ITFR_MODE_MANUAL_ENABLE	1	/* enable manual detection */
691832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ITFR_MODE_AUTO_ENABLE	2	/* enable auto detection */
692832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
693832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* interference sources */
694832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidtenum interference_source {
695832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	ITFR_NONE = 0,		/* interference */
696832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	ITFR_PHONE,		/* wireless phone */
697832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	ITFR_VIDEO_CAMERA,	/* wireless video camera */
698832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	ITFR_MICROWAVE_OVEN,	/* microwave oven */
699832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	ITFR_BABY_MONITOR,	/* wireless baby monitor */
700832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	ITFR_BLUETOOTH,		/* bluetooth */
701832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	ITFR_VIDEO_CAMERA_OR_BABY_MONITOR,	/* wireless camera or baby monitor */
702832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	ITFR_BLUETOOTH_OR_BABY_MONITOR,	/* bluetooth or baby monitor */
703832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	ITFR_VIDEO_CAMERA_OR_PHONE,	/* video camera or phone */
704832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	ITFR_UNIDENTIFIED	/* interference from unidentified source */
705832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt};
706832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
707832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* structure for interference source report */
708832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
709832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 flags;	/* flags.  bit definitions below */
710832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 source;	/* last detected interference source */
711832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 timestamp;	/* second timestamp on interferenced flag change */
712832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} interference_source_rep_t;
713832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
714832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* bit definitions for flags in interference source report */
715832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ITFR_INTERFERENCED	1	/* interference detected */
716832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ITFR_HOME_CHANNEL	2	/* home channel has interference */
717832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ITFR_NOISY_ENVIRONMENT	4	/* noisy environemnt so feature stopped */
718832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
71966981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
72066981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
721832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_CNTRY_BUF_SZ	4		/* Country string is 3 bytes + NUL */
7228ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
72366981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
72466981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
7258ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_country {
726832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	char country_abbrev[WLC_CNTRY_BUF_SZ];	/* nul-terminated country code used in
727832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 * the Country IE
728832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 */
729832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 rev;				/* revision specifier for ccode
730832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 * on set, -1 indicates unspecified.
731832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 * on get, rev >= 0
732832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 */
733832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	char ccode[WLC_CNTRY_BUF_SZ];		/* nul-terminated built-in country code.
734832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 * variable length, but fixed size in
735832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 * struct allows simple allocation for
736832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 * expected country strings <= 3 chars.
737832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 */
7388ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_country_t;
7398ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
7408ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_channels_in_country {
7418ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 buflen;
7428ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 band;
7438ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	char country_abbrev[WLC_CNTRY_BUF_SZ];
7448ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 count;
7458ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 channel[1];
7468ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_channels_in_country_t;
7478ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
7488ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_country_list {
7498ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 buflen;
7508ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 band_set;
7518ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 band;
7528ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 count;
7538ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	char country_abbrev[1];
7548ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_country_list_t;
7558ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
756832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NUM_RPI_BINS		8
757832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RM_TYPE_BASIC	1
758832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RM_TYPE_CCA		2
759832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RM_TYPE_RPI		3
7608ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
761832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RM_FLAG_PARALLEL	(1<<0)
7628ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
763832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RM_FLAG_LATE		(1<<1)
764832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RM_FLAG_INCAPABLE	(1<<2)
765832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RM_FLAG_REFUSED	(1<<3)
7668ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
7678ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_rm_req_elt {
768832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8	type;
769832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8	flags;
770832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t	chanspec;
771832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	token;		/* token for this measurement */
772832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	tsf_h;		/* TSF high 32-bits of Measurement start time */
773832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	tsf_l;		/* TSF low 32-bits */
774832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	dur;		/* TUs */
7758ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_rm_req_elt_t;
7768ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
7778ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_rm_req {
778832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	token;		/* overall measurement set token */
779832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	count;		/* number of measurement requests */
780832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	void	*cb;		/* completion callback function: may be NULL */
781832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	void	*cb_arg;	/* arg to completion callback function */
782832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wl_rm_req_elt_t	req[1];	/* variable length block of requests */
7838ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_rm_req_t;
784832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RM_REQ_FIXED_LEN	OFFSETOF(wl_rm_req_t, req)
7858ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
7868ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_rm_rep_elt {
787832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8	type;
788832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8	flags;
789832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t	chanspec;
790832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	token;		/* token for this measurement */
791832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	tsf_h;		/* TSF high 32-bits of Measurement start time */
792832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	tsf_l;		/* TSF low 32-bits */
793832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	dur;		/* TUs */
794832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	len;		/* byte length of data block */
795832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8	data[1];	/* variable length data block */
7968ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_rm_rep_elt_t;
797832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RM_REP_ELT_FIXED_LEN	24	/* length excluding data block */
7988ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
7998ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_RPI_REP_BIN_NUM 8
8008ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_rm_rpi_rep {
801832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8	rpi[WL_RPI_REP_BIN_NUM];
802832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8	rpi_max[WL_RPI_REP_BIN_NUM];
8038ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_rm_rpi_rep_t;
8048ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
8058ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_rm_rep {
806832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	token;		/* overall measurement set token */
807832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	len;		/* length of measurement report block */
808832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wl_rm_rep_elt_t	rep[1];	/* variable length block of reports */
8098ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_rm_rep_t;
810832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RM_REP_FIXED_LEN	8
8118ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
8128ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
8138ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef enum sup_auth_status {
814832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* Basic supplicant authentication states */
8158ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	WLC_SUP_DISCONNECTED = 0,
8168ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	WLC_SUP_CONNECTING,
8178ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	WLC_SUP_IDREQUIRED,
8188ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	WLC_SUP_AUTHENTICATING,
8198ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	WLC_SUP_AUTHENTICATED,
8208ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	WLC_SUP_KEYXCHANGE,
8218ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	WLC_SUP_KEYED,
8228ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	WLC_SUP_TIMEOUT,
8238ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	WLC_SUP_LAST_BASIC_STATE,
8248ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
825832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* Extended supplicant authentication states */
826832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* Waiting to receive handshake msg M1 */
8278ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	WLC_SUP_KEYXCHANGE_WAIT_M1 = WLC_SUP_AUTHENTICATED,
828832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* Preparing to send handshake msg M2 */
8298ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	WLC_SUP_KEYXCHANGE_PREP_M2 = WLC_SUP_KEYXCHANGE,
830832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* Waiting to receive handshake msg M3 */
8318ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	WLC_SUP_KEYXCHANGE_WAIT_M3 = WLC_SUP_LAST_BASIC_STATE,
832832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	WLC_SUP_KEYXCHANGE_PREP_M4,	/* Preparing to send handshake msg M4 */
833832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	WLC_SUP_KEYXCHANGE_WAIT_G1,	/* Waiting to receive handshake msg G1 */
834832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	WLC_SUP_KEYXCHANGE_PREP_G2	/* Preparing to send handshake msg G2 */
8358ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} sup_auth_status_t;
83666981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
8378ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
838832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Enumerate crypto algorithms */
839832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	CRYPTO_ALGO_OFF			0
840832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	CRYPTO_ALGO_WEP1		1
841832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	CRYPTO_ALGO_TKIP		2
842832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	CRYPTO_ALGO_WEP128		3
843832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CRYPTO_ALGO_AES_CCM		4
844832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CRYPTO_ALGO_AES_OCB_MSDU	5
845832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CRYPTO_ALGO_AES_OCB_MPDU	6
846832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CRYPTO_ALGO_NALG		7
847832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CRYPTO_ALGO_PMK			12	/* for 802.1x supp to set PMK before 4-way */
848832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
849832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WSEC_GEN_MIC_ERROR	0x0001
850832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WSEC_GEN_REPLAY		0x0002
851832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WSEC_GEN_ICV_ERROR	0x0004
852832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WSEC_GEN_MFP_ACT_ERROR	0x0008
853832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WSEC_GEN_MFP_DISASSOC_ERROR	0x0010
854832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WSEC_GEN_MFP_DEAUTH_ERROR	0x0020
855832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
856832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_SOFT_KEY	(1 << 0)	/* Indicates this key is using soft encrypt */
857832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PRIMARY_KEY	(1 << 1)	/* Indicates this key is the primary (ie tx) key */
858832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_KF_RES_4	(1 << 4)	/* Reserved for backward compat */
859832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_KF_RES_5	(1 << 5)	/* Reserved for backward compat */
860832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_IBSS_PEER_GROUP_KEY	(1 << 6)	/* Indicates a group key for a IBSS PEER */
8618ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
8628ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_wsec_key {
863832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		index;		/* key index */
864832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		len;		/* key length */
865832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		data[DOT11_MAX_KEY_SIZE];	/* key data */
866832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		pad_1[18];
867832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		algo;		/* CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */
868832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		flags;		/* misc flags */
869832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		pad_2[2];
870832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int		pad_3;
871832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int		iv_initialized;	/* has IV been initialized already? */
872832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int		pad_4;
873832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* Rx IV */
8748ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	struct {
875832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt		uint32	hi;		/* upper 32 bits of IV */
876832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt		uint16	lo;		/* lower 16 bits of IV */
8778ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	} rxiv;
878832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		pad_5[2];
879832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr ea;		/* per station */
8808ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_wsec_key_t;
8818ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
882832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WSEC_MIN_PSK_LEN	8
883832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WSEC_MAX_PSK_LEN	64
8848ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
885832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Flag for key material needing passhash'ing */
886832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WSEC_PASSPHRASE		(1<<0)
8878ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
888832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* receptacle for WLC_SET_WSEC_PMK parameter */
8898ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
890832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	ushort	key_len;		/* octets in key material */
891832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	ushort	flags;			/* key handling qualification */
892832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8	key[WSEC_MAX_PSK_LEN];	/* PMK material */
8938ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wsec_pmk_t;
8948ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
895832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* wireless security bitvec */
896832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WEP_ENABLED		0x0001
897832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TKIP_ENABLED		0x0002
898832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define AES_ENABLED		0x0004
899832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WSEC_SWFLAG		0x0008
900832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define SES_OW_ENABLED		0x0040	/* to go into transition mode without setting wep */
901832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
902832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* wsec macros for operating on the above definitions */
903832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WSEC_WEP_ENABLED(wsec)	((wsec) & WEP_ENABLED)
904832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WSEC_TKIP_ENABLED(wsec)	((wsec) & TKIP_ENABLED)
905832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WSEC_AES_ENABLED(wsec)	((wsec) & AES_ENABLED)
906832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
907832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WSEC_ENABLED(wsec)	((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED))
908832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WSEC_SES_OW_ENABLED(wsec)	((wsec) & SES_OW_ENABLED)
909832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
910832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#ifdef MFP
911832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define MFP_CAPABLE		0x0200
912832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define MFP_REQUIRED	0x0400
913832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define MFP_SHA256		0x0800 /* a special configuration for STA for WIFI test tool */
914832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#endif /* MFP */
915832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
916832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* WPA authentication mode bitvec */
917832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WPA_AUTH_DISABLED	0x0000	/* Legacy (i.e., non-WPA) */
918832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WPA_AUTH_NONE		0x0001	/* none (IBSS) */
919832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WPA_AUTH_UNSPECIFIED	0x0002	/* over 802.1x */
920832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WPA_AUTH_PSK		0x0004	/* Pre-shared key */
921832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WPA_AUTH_8021X 0x0020 */	/* 802.1x, reserved */
922832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WPA2_AUTH_UNSPECIFIED	0x0040	/* over 802.1x */
923832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WPA2_AUTH_PSK		0x0080	/* Pre-shared key */
924832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define BRCM_AUTH_PSK           0x0100  /* BRCM specific PSK */
925832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define BRCM_AUTH_DPT		0x0200	/* DPT PSK without group keys */
926832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WPA2_AUTH_MFP           0x1000  /* MFP (11w) in contrast to CCX */
927832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WPA2_AUTH_TPK		0x2000 	/* TDLS Peer Key */
928832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WPA2_AUTH_FT		0x4000 	/* Fast Transition. */
929832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WPA_AUTH_PFN_ANY	0xffffffff	/* for PFN, match only ssid */
930832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
931832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* pmkid */
932832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	MAXPMKID		16
9338ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
9348ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct _pmkid {
935832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr	BSSID;
936832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8			PMKID[WPA2_PMKID_LEN];
9378ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} pmkid_t;
9388ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
9398ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct _pmkid_list {
940832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	npmkid;
941832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	pmkid_t	pmkid[1];
9428ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} pmkid_list_t;
9438ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
9448ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct _pmkid_cand {
945832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr	BSSID;
946832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8			preauth;
9478ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} pmkid_cand_t;
9488ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
9498ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct _pmkid_cand_list {
950832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	npmkid_cand;
951832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	pmkid_cand_t	pmkid_cand[1];
9528ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} pmkid_cand_list_t;
9538ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
95466981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
9558ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_assoc_info {
956832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		req_len;
957832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		resp_len;
958832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32		flags;
9598ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	struct dot11_assoc_req req;
960832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr reassoc_bssid; /* used in reassoc's */
9618ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	struct dot11_assoc_resp resp;
9628ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_assoc_info_t;
9638ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
964832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* flags */
965832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_ASSOC_REQ_IS_REASSOC 0x01 /* assoc req was actually a reassoc */
9668ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
967832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wl_led_info {
968832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32      index;      /* led index */
969832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32      behavior;
970832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8       activehi;
971832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_led_info_t;
9728ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
9738ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
974832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* srom read/write struct passed through ioctl */
9758ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
976832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint	byteoff;	/* byte offset */
977832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint	nbytes;		/* number of bytes */
978832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	buf[1];
979832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} srom_rw_t;
980832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
981832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* similar cis (srom or otp) struct [iovar: may not be aligned] */
982832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
983832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	source;		/* cis source */
984832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	byteoff;	/* byte offset */
985832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	nbytes;		/* number of bytes */
986832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* data follows here */
987832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} cis_rw_t;
9888ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
989832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_CIS_DEFAULT	0	/* built-in default */
990832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_CIS_SROM	1	/* source is sprom */
991832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_CIS_OTP	2	/* source is otp */
9928ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
993832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* R_REG and W_REG struct passed through ioctl */
994832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
995832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	byteoff;	/* byte offset of the field in d11regs_t */
996832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	val;		/* read/write value of the field */
997832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	size;		/* sizeof the field */
998832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint	band;		/* band (optional) */
999832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} rw_reg_t;
1000832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1001832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Structure used by GET/SET_ATTEN ioctls - it controls power in b/g-band */
1002832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* PCL - Power Control Loop */
1003832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* current gain setting is replaced by user input */
1004832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_ATTEN_APP_INPUT_PCL_OFF	0	/* turn off PCL, apply supplied input */
1005832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_ATTEN_PCL_ON			1	/* turn on PCL */
1006832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* current gain setting is maintained */
1007832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_ATTEN_PCL_OFF		2	/* turn off PCL. */
10088ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1009832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
1010832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	auto_ctrl;	/* WL_ATTEN_XX */
1011832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	bb;		/* Baseband attenuation */
1012832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	radio;		/* Radio attenuation */
1013832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	txctl1;		/* Radio TX_CTL1 value */
1014832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} atten_t;
1015832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1016832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Per-AC retry parameters */
1017832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidtstruct wme_tx_params_s {
1018832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8  short_retry;
1019832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8  short_fallback;
1020832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8  long_retry;
1021832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8  long_fallback;
1022832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 max_rate;  /* In units of 512 Kbps */
1023832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt};
10248ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1025832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wme_tx_params_s wme_tx_params_t;
1026832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1027832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_WME_TX_PARAMS_IO_BYTES (sizeof(wme_tx_params_t) * AC_COUNT)
1028832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1029832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* defines used by poweridx iovar - it controls power in a-band */
1030832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* current gain setting is maintained */
1031832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PWRIDX_PCL_OFF	-2	/* turn off PCL.  */
1032832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PWRIDX_PCL_ON	-1	/* turn on PCL */
1033832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PWRIDX_LOWER_LIMIT	-2	/* lower limit */
1034832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PWRIDX_UPPER_LIMIT	63	/* upper limit */
1035832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* value >= 0 causes
1036832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *	- input to be set to that value
1037832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *	- PCL to be off
1038832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
1039832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1040832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Used to get specific link/ac parameters */
1041832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
1042832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int ac;
1043832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 val;
1044832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr ea;
1045832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} link_val_t;
10468ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1047832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define BCM_MAC_STATUS_INDICATION	(0x40010200L)
10488ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1049832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
1050832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16			ver;		/* version of this struct */
1051832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16			len;		/* length in bytes of this structure */
1052832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16			cap;		/* sta's advertised capabilities */
1053832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32			flags;		/* flags defined below */
1054832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32			idle;		/* time since data pkt rx'd from sta */
1055832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr	ea;		/* Station address */
1056832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wl_rateset_t		rateset;	/* rateset in use */
1057832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32			in;		/* seconds elapsed since associated */
1058832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32			listen_interval_inms; /* Min Listen interval in ms for this STA */
1059832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32			tx_pkts;	/* # of packets transmitted */
1060832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32			tx_failures;	/* # of packets failed */
1061832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32			rx_ucast_pkts;	/* # of unicast packets received */
1062832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32			rx_mcast_pkts;	/* # of multicast packets received */
1063832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32			tx_rate;	/* Rate of last successful tx frame */
1064832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32			rx_rate;	/* Rate of last successful rx frame */
1065832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32			rx_decrypt_succeeds;	/* # of packet decrypted successfully */
1066832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32			rx_decrypt_failures;	/* # of packet decrypted unsuccessfully */
1067832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} sta_info_t;
10688ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1069832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_OLD_STAINFO_SIZE	OFFSETOF(sta_info_t, tx_pkts)
1070832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1071832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_STA_VER		3
1072832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1073832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Flags for sta_info_t indicating properties of STA */
1074832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_STA_BRCM		0x1		/* Running a Broadcom driver */
1075832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_STA_WME		0x2		/* WMM association */
1076832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_STA_UNUSED		0x4
1077832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_STA_AUTHE		0x8		/* Authenticated */
1078832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_STA_ASSOC		0x10		/* Associated */
1079832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_STA_AUTHO		0x20		/* Authorized */
1080832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_STA_WDS		0x40		/* Wireless Distribution System */
1081832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_STA_WDS_LINKUP	0x80		/* WDS traffic/probes flowing properly */
1082832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_STA_PS		0x100		/* STA is in power save mode from AP's viewpoint */
1083832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_STA_APSD_BE		0x200		/* APSD delv/trigger for AC_BE is default enabled */
1084832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_STA_APSD_BK		0x400		/* APSD delv/trigger for AC_BK is default enabled */
1085832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_STA_APSD_VI		0x800		/* APSD delv/trigger for AC_VI is default enabled */
1086832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_STA_APSD_VO		0x1000		/* APSD delv/trigger for AC_VO is default enabled */
1087832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_STA_N_CAP		0x2000		/* STA 802.11n capable */
1088832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_STA_SCBSTATS		0x4000		/* Per STA debug stats */
1089832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1090832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_WDS_LINKUP		WL_STA_WDS_LINKUP	/* deprecated */
1091832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1092832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Values for TX Filter override mode */
10938ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WLC_TXFILTER_OVERRIDE_DISABLED  0
10948ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WLC_TXFILTER_OVERRIDE_ENABLED   1
10958ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
109666981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
109766981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
1098832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Used to get specific STA parameters */
10998ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
1100832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	val;
11018ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	struct ether_addr ea;
11028ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} scb_val_t;
11038ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1104832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Used by iovar versions of some ioctls, i.e. WLC_SCB_AUTHORIZE et al */
11058ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
11068ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 code;
11078ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	scb_val_t ioctl_args;
11088ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} authops_t;
11098ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1110832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* channel encoding */
11118ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct channel_info {
11128ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int hw_channel;
11138ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int target_channel;
11148ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int scan_channel;
11158ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} channel_info_t;
11168ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1117832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* For ioctls that take a list of MAC addresses */
11188ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidtstruct maclist {
1119832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint count;			/* number of MAC addresses */
1120832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr ea[1];	/* variable length array of MAC addresses */
11218ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt};
11228ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
112366981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
1124832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* get pkt count struct passed through ioctl */
11258ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct get_pktcnt {
11268ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint rx_good_pkt;
11278ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint rx_bad_pkt;
11288ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint tx_good_pkt;
11298ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint tx_bad_pkt;
1130832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint rx_ocast_good_pkt; /* unicast packets destined for others */
11318ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} get_pktcnt_t;
11328ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1133832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* NINTENDO2 */
1134832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LQ_IDX_MIN              0
1135832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LQ_IDX_MAX              1
1136832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LQ_IDX_AVG              2
1137832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LQ_IDX_SUM              2
1138832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LQ_IDX_LAST             3
1139832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LQ_STOP_MONITOR         0
1140832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LQ_START_MONITOR        1
1141832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1142832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Get averages RSSI, Rx PHY rate and SNR values */
1143832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
1144832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int rssi[LQ_IDX_LAST];  /* Array to keep min, max, avg rssi */
1145832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int snr[LQ_IDX_LAST];   /* Array to keep min, max, avg snr */
1146832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int isvalid;            /* Flag indicating whether above data is valid */
1147832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_lq_t; /* Link Quality */
1148832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1149832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef enum wl_wakeup_reason_type {
1150832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	LCD_ON = 1,
1151832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	LCD_OFF,
1152832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	DRC1_WAKE,
1153832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	DRC2_WAKE,
1154832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	REASON_LAST
1155832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_wr_type_t;
1156832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1157832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
1158832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Unique filter id */
1159832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	id;
1160832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1161832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* stores the reason for the last wake up */
1162832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8	reason;
1163832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_wr_t;
1164832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1165832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Get MAC specific rate histogram command */
1166832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
1167832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct	ether_addr ea;	/* MAC Address */
1168832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8	ac_cat;	/* Access Category */
1169832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8	num_pkts;	/* Number of packet entries to be averaged */
1170832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_mac_ratehisto_cmd_t;	/* MAC Specific Rate Histogram command */
1171832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1172832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Get MAC rate histogram response */
1173832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
1174832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rate[WLC_MAXRATE + 1];	/* Rates */
11754a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint32	mcs[WL_RATESET_SZ_HT_MCS * WL_TX_CHAINS_MAX];	/* MCS counts */
11764a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint32	vht[WL_RATESET_SZ_VHT_MCS][WL_TX_CHAINS_MAX];	/* VHT counts */
1177832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	tsf_timer[2][2];	/* Start and End time for 8bytes value */
1178832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_mac_ratehisto_res_t;	/* MAC Specific Rate Histogram Response */
1179832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1180832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Values for TX Filter override mode */
1181832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_TXFILTER_OVERRIDE_DISABLED  0
1182832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_TXFILTER_OVERRIDE_ENABLED   1
1183832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
11848ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_IOCTL_ACTION_GET				0x0
11858ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_IOCTL_ACTION_SET				0x1
11868ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_IOCTL_ACTION_OVL_IDX_MASK	0x1e
11878ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_IOCTL_ACTION_OVL_RSV			0x20
11888ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_IOCTL_ACTION_OVL				0x40
11898ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_IOCTL_ACTION_MASK			0x7e
11908ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_IOCTL_ACTION_OVL_SHIFT		1
11918ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
119266981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
119366981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
1194832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Linux network driver ioctl encoding */
11958ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_ioctl {
1196832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint cmd;	/* common ioctl definition */
1197832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	void *buf;	/* pointer to user buffer */
1198832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint len;	/* length of user buffer */
1199832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 set;		/* 1=set IOCTL; 0=query IOCTL */
1200832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint used;	/* bytes read or written (optional) */
1201832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint needed;	/* bytes needed (optional) */
12028ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_ioctl_t;
12038ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
120466981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
120566981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
1206832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* reference to wl_ioctl_t struct used by usermode driver */
1207832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ioctl_subtype	set		/* subtype param */
1208832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ioctl_pid	used		/* pid param */
1209832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ioctl_status	needed		/* status param */
12108ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1211832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/*
1212832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * Structure for passing hardware and software
1213832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * revision info up from the driver.
1214832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
12158ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wlc_rev_info {
1216832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint		vendorid;	/* PCI vendor id */
1217832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint		deviceid;	/* device id of chip */
1218832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint		radiorev;	/* radio revision */
1219832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint		chiprev;	/* chip revision */
1220832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint		corerev;	/* core revision */
1221832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint		boardid;	/* board identifier (usu. PCI sub-device id) */
1222832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint		boardvendor;	/* board vendor (usu. PCI sub-vendor id) */
1223832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint		boardrev;	/* board revision */
1224832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint		driverrev;	/* driver version */
1225832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint		ucoderev;	/* microcode version */
1226832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint		bus;		/* bus type */
1227832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint		chipnum;	/* chip number */
1228832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint		phytype;	/* phy type */
1229832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint		phyrev;		/* phy revision */
1230832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint		anarev;		/* anacore rev */
1231832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint		chippkg;	/* chip package info */
12328ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wlc_rev_info_t;
12338ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1234832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_REV_INFO_LEGACY_LENGTH	48
12358ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
12368ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_BRAND_MAX 10
12378ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_instance_info {
12388ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint instance;
12398ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	char brand[WL_BRAND_MAX];
12408ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_instance_info_t;
12418ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1242832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* structure to change size of tx fifo */
12438ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_txfifo_sz {
1244832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	magic;
1245832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	fifo;
1246832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	size;
12478ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_txfifo_sz_t;
1248832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* magic pattern used for mismatch driver and wl */
1249832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TXFIFO_SZ_MAGIC	0xa5a5
12508ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1251832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Transfer info about an IOVar from the driver */
1252832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Max supported IOV name size in bytes, + 1 for nul termination */
12538ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WLC_IOV_NAME_LEN 30
12548ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wlc_iov_trx_s {
12558ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 module;
12568ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 type;
12578ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	char name[WLC_IOV_NAME_LEN];
12588ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wlc_iov_trx_t;
12598ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1260832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* check this magic number */
1261832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_IOCTL_MAGIC		0x14e46c77
12628ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1263832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* bump this number if you change the ioctl interface */
1264832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#ifdef D11AC_IOTYPES
1265832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_IOCTL_VERSION	2
1266832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_IOCTL_VERSION_LEGACY_IOTYPES	1
12678ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#else
1268832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_IOCTL_VERSION	1
1269832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#endif /* D11AC_IOTYPES */
127066981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
1271832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1272832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_IOCTL_MAXLEN		8192	/* max length ioctl buffer required */
1273832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_IOCTL_SMLEN			256	/* "small" length ioctl buffer required */
1274832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_IOCTL_MEDLEN		1536    /* "med" length ioctl buffer required */
12758ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#if defined(LCNCONF) || defined(LCN40CONF)
1276832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SAMPLECOLLECT_MAXLEN	8192	/* Max Sample Collect buffer */
12778ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#else
1278832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SAMPLECOLLECT_MAXLEN	10240	/* Max Sample Collect buffer for two cores */
12798ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#endif
1280832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1281832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* common ioctl definitions */
1282832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_MAGIC				0
1283832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_VERSION				1
1284832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_UP					2
1285832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_DOWN				3
1286832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_LOOP				4
1287832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_LOOP				5
1288832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_DUMP				6
1289832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_MSGLEVEL			7
1290832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_MSGLEVEL			8
1291832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PROMISC				9
1292832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_PROMISC				10
1293832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_OVERLAY_IOCTL			11 */ /* not supported */
1294832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_RATE				12
1295832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_MAX_RATE			13
1296832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_INSTANCE			14
1297832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_GET_FRAG				15 */ /* no longer supported */
1298832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_SET_FRAG				16 */ /* no longer supported */
1299832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_GET_RTS				17 */ /* no longer supported */
1300832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_SET_RTS				18 */ /* no longer supported */
1301832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_INFRA				19
1302832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_INFRA				20
1303832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_AUTH				21
1304832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_AUTH				22
1305832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_BSSID				23
1306832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_BSSID				24
1307832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SSID				25
1308832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_SSID				26
1309832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_RESTART				27
1310832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_TERMINATED             		28
1311832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_DUMP_SCB				28 */ /* no longer supported */
1312832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_CHANNEL				29
1313832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_CHANNEL				30
1314832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SRL				31
1315832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_SRL				32
1316832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_LRL				33
1317832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_LRL				34
1318832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PLCPHDR				35
1319832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_PLCPHDR				36
1320832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_RADIO				37
1321832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_RADIO				38
1322832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PHYTYPE				39
1323832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_DUMP_RATE				40
1324832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_RATE_PARAMS			41
1325832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_FIXRATE				42
1326832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_FIXRATE				43
1327832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_GET_WEP				42 */ /* no longer supported */
1328832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_SET_WEP				43 */ /* no longer supported */
1329832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_KEY				44
1330832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_KEY				45
1331832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_REGULATORY			46
1332832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_REGULATORY			47
1333832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PASSIVE_SCAN			48
1334832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_PASSIVE_SCAN			49
1335832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SCAN				50
1336832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SCAN_RESULTS			51
1337832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_DISASSOC				52
1338832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_REASSOC				53
1339832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_ROAM_TRIGGER			54
1340832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_ROAM_TRIGGER			55
1341832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_ROAM_DELTA			56
1342832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_ROAM_DELTA			57
1343832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_ROAM_SCAN_PERIOD		58
1344832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_ROAM_SCAN_PERIOD		59
1345832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_EVM					60	/* diag */
1346832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_TXANT				61
1347832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_TXANT				62
1348832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_ANTDIV				63
1349832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_ANTDIV				64
1350832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_GET_TXPWR			65 */ /* no longer supported */
1351832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_SET_TXPWR			66 */ /* no longer supported */
1352832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_CLOSED				67
1353832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_CLOSED				68
1354832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_MACLIST				69
1355832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_MACLIST				70
1356832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_RATESET				71
1357832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_RATESET				72
1358832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_GET_LOCALE			73 */ /* no longer supported */
1359832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_LONGTRAIN				74
1360832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_BCNPRD				75
1361832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_BCNPRD				76
1362832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_DTIMPRD				77
1363832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_DTIMPRD				78
1364832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SROM				79
1365832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_SROM				80
1366832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_WEP_RESTRICT			81
1367832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_WEP_RESTRICT			82
1368832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_COUNTRY				83
1369832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_COUNTRY				84
1370832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PM				85
1371832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_PM				86
1372832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_WAKE				87
1373832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_WAKE				88
1374832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_GET_D11CNTS			89 */ /* -> "counters" iovar */
1375832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_FORCELINK			90	/* ndis only */
1376832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_FORCELINK			91	/* ndis only */
1377832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_FREQ_ACCURACY			92	/* diag */
1378832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_CARRIER_SUPPRESS			93	/* diag */
1379832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PHYREG				94
1380832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_PHYREG				95
1381832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_RADIOREG			96
1382832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_RADIOREG			97
1383832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_REVINFO				98
1384832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_UCANTDIV			99
1385832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_UCANTDIV			100
1386832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_R_REG				101
1387832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_W_REG				102
1388832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_DIAG_LOOPBACK			103	old tray diag */
1389832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_RESET_D11CNTS			104 */ /* -> "reset_d11cnts" iovar */
1390832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_MACMODE				105
1391832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_MACMODE				106
1392832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_MONITOR				107
1393832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_MONITOR				108
1394832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_GMODE				109
1395832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_GMODE				110
1396832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_LEGACY_ERP			111
1397832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_LEGACY_ERP			112
1398832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_RX_ANT				113
1399832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_CURR_RATESET			114	/* current rateset */
1400832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SCANSUPPRESS			115
1401832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_SCANSUPPRESS			116
1402832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_AP				117
1403832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_AP				118
1404832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_EAP_RESTRICT			119
1405832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_EAP_RESTRICT			120
1406832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SCB_AUTHORIZE			121
1407832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SCB_DEAUTHORIZE			122
1408832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_WDSLIST				123
1409832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_WDSLIST				124
1410832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_ATIM				125
1411832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_ATIM				126
1412832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_RSSI				127
1413832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PHYANTDIV			128
1414832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_PHYANTDIV			129
1415832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_AP_RX_ONLY				130
1416832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_TX_PATH_PWR			131
1417832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_TX_PATH_PWR			132
1418832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_WSEC				133
1419832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_WSEC				134
1420832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PHY_NOISE			135
1421832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_BSS_INFO			136
1422832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PKTCNTS				137
1423832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_LAZYWDS				138
1424832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_LAZYWDS				139
1425832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_BANDLIST			140
142666981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
142766981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
1428832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_BAND				141
1429832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_BAND				142
1430832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SCB_DEAUTHENTICATE			143
1431832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SHORTSLOT			144
1432832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SHORTSLOT_OVERRIDE		145
1433832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_SHORTSLOT_OVERRIDE		146
1434832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SHORTSLOT_RESTRICT		147
1435832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_SHORTSLOT_RESTRICT		148
1436832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_GMODE_PROTECTION		149
1437832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_GMODE_PROTECTION_OVERRIDE	150
1438832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_GMODE_PROTECTION_OVERRIDE	151
1439832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_UPGRADE				152
1440832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_GET_MRATE			153 */ /* no longer supported */
1441832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_SET_MRATE			154 */ /* no longer supported */
1442832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_IGNORE_BCNS			155
1443832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_IGNORE_BCNS			156
1444832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SCB_TIMEOUT			157
1445832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_SCB_TIMEOUT			158
1446832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_ASSOCLIST			159
1447832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_CLK				160
1448832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_CLK				161
1449832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_UP				162
1450832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OUT					163
1451832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_WPA_AUTH			164
1452832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_WPA_AUTH			165
1453832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_UCFLAGS				166
1454832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_UCFLAGS				167
1455832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PWRIDX				168
1456832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_PWRIDX				169
1457832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_TSSI				170
1458832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SUP_RATESET_OVERRIDE		171
1459832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_SUP_RATESET_OVERRIDE		172
1460832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_SET_FAST_TIMER			173 */ /* no longer supported */
1461832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_GET_FAST_TIMER			174 */ /* no longer supported */
1462832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_SET_SLOW_TIMER			175 */ /* no longer supported */
1463832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_GET_SLOW_TIMER			176 */ /* no longer supported */
1464832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_DUMP_PHYREGS			177 */ /* no longer supported */
1465832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PROTECTION_CONTROL		178
1466832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_PROTECTION_CONTROL		179
146766981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL  */
1468832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PHYLIST				180
146966981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
1470832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_ENCRYPT_STRENGTH			181	/* ndis only */
1471832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_DECRYPT_STATUS			182	/* ndis only */
1472832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_KEY_SEQ				183
1473832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SCAN_CHANNEL_TIME		184
1474832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_SCAN_CHANNEL_TIME		185
1475832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SCAN_UNASSOC_TIME		186
1476832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_SCAN_UNASSOC_TIME		187
1477832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SCAN_HOME_TIME			188
1478832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_SCAN_HOME_TIME			189
1479832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SCAN_NPROBES			190
1480832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_SCAN_NPROBES			191
1481832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PRB_RESP_TIMEOUT		192
1482832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_PRB_RESP_TIMEOUT		193
1483832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_ATTEN				194
1484832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_ATTEN				195
1485832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SHMEM				196	/* diag */
1486832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_SHMEM				197	/* diag */
1487832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_GET_GMODE_PROTECTION_CTS		198 */ /* no longer supported */
1488832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_SET_GMODE_PROTECTION_CTS		199 */ /* no longer supported */
1489832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_WSEC_TEST			200
149066981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
1491832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SCB_DEAUTHENTICATE_FOR_REASON	201
149266981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
1493832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_TKIP_COUNTERMEASURES		202
1494832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PIOMODE				203
1495832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_PIOMODE				204
1496832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_ASSOC_PREFER			205
1497832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_ASSOC_PREFER			206
1498832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_ROAM_PREFER			207
1499832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_ROAM_PREFER			208
1500832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_LED				209
1501832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_LED				210
1502832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_INTERFERENCE_MODE		211
1503832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_INTERFERENCE_MODE		212
1504832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_CHANNEL_QA			213
1505832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_START_CHANNEL_QA			214
1506832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_CHANNEL_SEL			215
1507832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_START_CHANNEL_SEL			216
150866981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
1509832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_VALID_CHANNELS			217
1510832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_FAKEFRAG			218
1511832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_FAKEFRAG			219
1512832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PWROUT_PERCENTAGE		220
1513832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_PWROUT_PERCENTAGE		221
1514832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_BAD_FRAME_PREEMPT		222
1515832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_BAD_FRAME_PREEMPT		223
1516832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_LEAP_LIST			224
1517832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_LEAP_LIST			225
1518832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_CWMIN				226
1519832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_CWMIN				227
1520832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_CWMAX				228
1521832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_CWMAX				229
1522832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_WET				230
1523832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_WET				231
1524832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PUB				232
1525832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_SET_GLACIAL_TIMER		233 */ /* no longer supported */
1526832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_GET_GLACIAL_TIMER		234 */ /* no longer supported */
1527832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_KEY_PRIMARY			235
1528832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_KEY_PRIMARY			236
152966981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
153066981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
153166981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
1532832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_DUMP_RADIOREGS			237 */ /* no longer supported */
1533832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_ACI_ARGS			238
1534832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_ACI_ARGS			239
1535832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_UNSET_CALLBACK			240
1536832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_CALLBACK			241
1537832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_RADAR				242
1538832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_RADAR				243
1539832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_SPECT_MANAGMENT			244
1540832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SPECT_MANAGMENT			245
1541832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_WDS_GET_REMOTE_HWADDR		246	/* handled in wl_linux.c/wl_vx.c */
1542832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_WDS_GET_WPA_SUP			247
1543832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_CS_SCAN_TIMER			248
1544832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_CS_SCAN_TIMER			249
1545832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_MEASURE_REQUEST			250
1546832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_INIT				251
1547832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SEND_QUIET				252
1548832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_KEEPALIVE			253
1549832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SEND_PWR_CONSTRAINT			254
1550832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_UPGRADE_STATUS			255
1551832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_CURRENT_PWR				256
1552832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SCAN_PASSIVE_TIME		257
1553832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_SCAN_PASSIVE_TIME		258
1554832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_LEGACY_LINK_BEHAVIOR		259
1555832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_CHANNELS_IN_COUNTRY		260
1556832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_COUNTRY_LIST			261
155766981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
1558832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_VAR				262	/* get value of named variable */
1559832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_VAR				263	/* set named variable to value */
156066981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
1561832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_NVRAM_GET				264	/* deprecated */
1562832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_NVRAM_SET				265
1563832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_NVRAM_DUMP				266
1564832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_REBOOT				267
1565832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_WSEC_PMK			268
1566832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_AUTH_MODE			269
1567832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_AUTH_MODE			270
1568832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_WAKEENTRY			271
1569832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_WAKEENTRY			272
1570832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_NDCONFIG_ITEM			273	/* currently handled in wl_oid.c */
1571832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_NVOTPW				274
1572832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OTPW				275
1573832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_IOV_BLOCK_GET			276
1574832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_IOV_MODULES_GET			277
1575832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SOFT_RESET				278
1576832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_ALLOW_MODE			279
1577832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_ALLOW_MODE			280
1578832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_DESIRED_BSSID			281
1579832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_DESIRED_BSSID			282
1580832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_DISASSOC_MYAP			283
1581832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_NBANDS				284	/* for Dongle EXT_STA support */
1582832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_BANDSTATES			285	/* for Dongle EXT_STA support */
1583832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_WLC_BSS_INFO			286	/* for Dongle EXT_STA support */
1584832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_ASSOC_INFO			287	/* for Dongle EXT_STA support */
1585832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_OID_PHY				288	/* for Dongle EXT_STA support */
1586832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_OID_PHY				289	/* for Dongle EXT_STA support */
1587832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_ASSOC_TIME			290	/* for Dongle EXT_STA support */
1588832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_DESIRED_SSID			291	/* for Dongle EXT_STA support */
1589832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_CHANSPEC			292	/* for Dongle EXT_STA support */
1590832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_ASSOC_STATE			293	/* for Dongle EXT_STA support */
1591832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_PHY_STATE			294	/* for Dongle EXT_STA support */
1592832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SCAN_PENDING			295	/* for Dongle EXT_STA support */
1593832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_SCANREQ_PENDING			296	/* for Dongle EXT_STA support */
1594832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PREV_ROAM_REASON		297	/* for Dongle EXT_STA support */
1595832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_PREV_ROAM_REASON		298	/* for Dongle EXT_STA support */
1596832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_BANDSTATES_PI			299	/* for Dongle EXT_STA support */
1597832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_PHY_STATE			300	/* for Dongle EXT_STA support */
1598832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_BSS_WPA_RSN			301	/* for Dongle EXT_STA support */
1599832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_BSS_WPA2_RSN			302	/* for Dongle EXT_STA support */
1600832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_BSS_BCN_TS			303	/* for Dongle EXT_STA support */
1601832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_INT_DISASSOC			304	/* for Dongle EXT_STA support */
1602832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_NUM_PEERS			305     /* for Dongle EXT_STA support */
1603832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_NUM_BSS				306	/* for Dongle EXT_STA support */
1604832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_PHY_SAMPLE_COLLECT			307	/* phy sample collect mode */
1605832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_UM_PRIV				308 */	/* Deprecated: usermode driver */
1606832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_CMD				309
1607832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_LAST				310 */	/* Never used - can be reused */
1608832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_INTERFERENCE_OVERRIDE_MODE	311	/* set inter mode override */
1609832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_INTERFERENCE_OVERRIDE_MODE	312	/* get inter mode override */
1610832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_GET_WAI_RESTRICT			313 */	/* for WAPI, deprecated use iovar instead */
1611832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_SET_WAI_RESTRICT			314 */	/* for WAPI, deprecated use iovar instead */
1612832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* #define WLC_SET_WAI_REKEY			315 */	/* for WAPI, deprecated use iovar instead */
1613832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SET_NAT_CONFIG			316	/* for configuring NAT filter driver */
1614832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_GET_NAT_STATE			317
1615832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_LAST				318
16168ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
16178ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#ifndef EPICTRL_COOKIE
1618832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define EPICTRL_COOKIE		0xABADCEDE
16198ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#endif
16208ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1621832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* vx wlc ioctl's offset */
16228ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define CMN_IOCTL_OFF 0x180
16238ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1624832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/*
1625832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * custom OID support
1626832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *
1627832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * 0xFF - implementation specific OID
1628832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * 0xE4 - first byte of Broadcom PCI vendor ID
1629832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * 0x14 - second byte of Broadcom PCI vendor ID
1630832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * 0xXX - the custom OID number
1631832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
16328ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1633832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* begin 0x1f values beyond the start of the ET driver range. */
1634832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_OID_BASE		0xFFE41420
16358ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1636832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* NDIS overrides */
1637832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_WL_GETINSTANCE	(WL_OID_BASE + WLC_GET_INSTANCE)
1638832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_WL_GET_FORCELINK	(WL_OID_BASE + WLC_GET_FORCELINK)
1639832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_WL_SET_FORCELINK	(WL_OID_BASE + WLC_SET_FORCELINK)
1640832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	OID_WL_ENCRYPT_STRENGTH	(WL_OID_BASE + WLC_ENCRYPT_STRENGTH)
1641832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_WL_DECRYPT_STATUS	(WL_OID_BASE + WLC_DECRYPT_STATUS)
16428ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define OID_LEGACY_LINK_BEHAVIOR (WL_OID_BASE + WLC_LEGACY_LINK_BEHAVIOR)
1643832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_WL_NDCONFIG_ITEM	(WL_OID_BASE + WLC_NDCONFIG_ITEM)
1644832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1645832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* EXT_STA Dongle suuport */
1646832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_STA_CHANSPEC	(WL_OID_BASE + WLC_GET_CHANSPEC)
1647832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_STA_NBANDS		(WL_OID_BASE + WLC_GET_NBANDS)
1648832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_STA_GET_PHY		(WL_OID_BASE + WLC_GET_OID_PHY)
1649832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_STA_SET_PHY		(WL_OID_BASE + WLC_SET_OID_PHY)
1650832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_STA_ASSOC_TIME	(WL_OID_BASE + WLC_SET_ASSOC_TIME)
1651832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_STA_DESIRED_SSID	(WL_OID_BASE + WLC_GET_DESIRED_SSID)
1652832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_STA_SET_PHY_STATE	(WL_OID_BASE + WLC_SET_PHY_STATE)
1653832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_STA_SCAN_PENDING	(WL_OID_BASE + WLC_GET_SCAN_PENDING)
16548ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define OID_STA_SCANREQ_PENDING (WL_OID_BASE + WLC_GET_SCANREQ_PENDING)
16558ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define OID_STA_GET_ROAM_REASON (WL_OID_BASE + WLC_GET_PREV_ROAM_REASON)
16568ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define OID_STA_SET_ROAM_REASON (WL_OID_BASE + WLC_SET_PREV_ROAM_REASON)
1657832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_STA_GET_PHY_STATE	(WL_OID_BASE + WLC_GET_PHY_STATE)
1658832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_STA_INT_DISASSOC	(WL_OID_BASE + WLC_GET_INT_DISASSOC)
1659832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_STA_SET_NUM_PEERS	(WL_OID_BASE + WLC_SET_NUM_PEERS)
1660832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_STA_GET_NUM_BSS	(WL_OID_BASE + WLC_GET_NUM_BSS)
16618ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1662832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* NAT filter driver support */
1663832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_NAT_SET_CONFIG	(WL_OID_BASE + WLC_SET_NAT_CONFIG)
1664832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define OID_NAT_GET_STATE	(WL_OID_BASE + WLC_GET_NAT_STATE)
16658ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1666832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DECRYPT_STATUS_SUCCESS	1
1667832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DECRYPT_STATUS_FAILURE	2
1668832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DECRYPT_STATUS_UNKNOWN	3
16698ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1670832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* allows user-mode app to poll the status of USB image upgrade */
1671832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_UPGRADE_SUCCESS			0
1672832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_UPGRADE_PENDING			1
16738ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
16748ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#ifdef CONFIG_USBRNDIS_RETAIL
1675832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* struct passed in for WLC_NDCONFIG_ITEM */
16768ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
16778ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	char *name;
16788ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	void *param;
16798ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} ndconfig_item_t;
16808ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#endif
16818ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
16828ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1683832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* WLC_GET_AUTH, WLC_SET_AUTH values */
1684832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_AUTH_OPEN_SYSTEM		0	/* d11 open authentication */
1685832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_AUTH_SHARED_KEY		1	/* d11 shared authentication */
1686bf0a60dff01ce71898435787f292f9c12bb40a85Dmitry Shmidt#ifdef BCM4330_CHIP
1687bf0a60dff01ce71898435787f292f9c12bb40a85Dmitry Shmidt#define WL_AUTH_OPEN_SHARED		2	/* try open, then shared if open failed w/rc 13 */
1688bf0a60dff01ce71898435787f292f9c12bb40a85Dmitry Shmidt#else
1689bf0a60dff01ce71898435787f292f9c12bb40a85Dmitry Shmidt/* BCM4334(Phoenex branch) value changed to 3 */
1690bf0a60dff01ce71898435787f292f9c12bb40a85Dmitry Shmidt#define WL_AUTH_OPEN_SHARED		3	/* try open, then shared if open failed w/rc 13 */
1691bf0a60dff01ce71898435787f292f9c12bb40a85Dmitry Shmidt#endif
169266981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
16938ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1694832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Bit masks for radio disabled status - returned by WL_GET_RADIO */
1695832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RADIO_SW_DISABLE		(1<<0)
1696832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RADIO_HW_DISABLE		(1<<1)
1697832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RADIO_MPC_DISABLE		(1<<2)
1698832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RADIO_COUNTRY_DISABLE	(1<<3)	/* some countries don't support any channel */
16998ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1700832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_SPURAVOID_OFF	0
1701832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_SPURAVOID_ON1	1
1702832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_SPURAVOID_ON2	2
17038ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1704832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Override bit for WLC_SET_TXPWR.  if set, ignore other level limits */
1705832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TXPWR_OVERRIDE	(1U<<31)
17068ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_TXPWR_NEG   (1U<<30)
17078ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
170866981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
1709832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PHY_PAVARS_LEN	32	/* Phy type, Band range, chain, a1[0], b0[0], b1[0] ... */
17108ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1711832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PHY_PAVAR_VER	1	/* pavars version */
17128ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
17138ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_po {
1714832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	phy_type;	/* Phy type */
1715832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	band;
1716832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	cckpo;
1717832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	ofdmpo;
1718832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	mcspo[8];
17198ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_po_t;
17208ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1721832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* a large TX Power as an init value to factor out of MIN() calculations,
1722832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * keep low enough to fit in an int8, units are .25 dBm
1723832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
1724832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_TXPWR_MAX		(127)	/* ~32 dBm = 1,500 mW */
1725832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1726832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* "diag" iovar argument and error code */
1727832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAG_INTERRUPT			1	/* d11 loopback interrupt test */
1728832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAG_LOOPBACK			2	/* d11 loopback data test */
1729832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAG_MEMORY				3	/* d11 memory test */
1730832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAG_LED				4	/* LED test */
1731832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAG_REG				5	/* d11/phy register test */
1732832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAG_SROM				6	/* srom read/crc test */
1733832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAG_DMA				7	/* DMA test */
1734832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAG_LOOPBACK_EXT			8	/* enhenced d11 loopback data test */
1735832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1736832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAGERR_SUCCESS			0
1737832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAGERR_FAIL_TO_RUN			1	/* unable to run requested diag */
1738832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAGERR_NOT_SUPPORTED		2	/* diag requested is not supported */
1739832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAGERR_INTERRUPT_FAIL		3	/* loopback interrupt test failed */
1740832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAGERR_LOOPBACK_FAIL		4	/* loopback data test failed */
1741832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAGERR_SROM_FAIL			5	/* srom read failed */
1742832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAGERR_SROM_BADCRC			6	/* srom crc failed */
1743832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAGERR_REG_FAIL			7	/* d11/phy register test failed */
1744832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAGERR_MEMORY_FAIL			8	/* d11 memory test failed */
1745832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAGERR_NOMEM			9	/* diag test failed due to no memory */
1746832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAGERR_DMA_FAIL			10	/* DMA test failed */
1747832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1748832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAGERR_MEMORY_TIMEOUT		11	/* d11 memory test didn't finish in time */
1749832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DIAGERR_MEMORY_BADPATTERN		12	/* d11 memory test result in bad pattern */
1750832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1751832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* band types */
1752832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_BAND_AUTO		0	/* auto-select */
1753832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_BAND_5G		1	/* 5 Ghz */
1754832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_BAND_2G		2	/* 2.4 Ghz */
1755832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_BAND_ALL		3	/* all bands */
1756832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1757832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* band range returned by band_range iovar */
17588ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_CHAN_FREQ_RANGE_2G      0
17598ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_CHAN_FREQ_RANGE_5GL     1
17608ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_CHAN_FREQ_RANGE_5GM     2
17618ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_CHAN_FREQ_RANGE_5GH     3
17628ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
17638ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_CHAN_FREQ_RANGE_5G_BAND0     1
17648ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_CHAN_FREQ_RANGE_5G_BAND1     2
17658ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_CHAN_FREQ_RANGE_5G_BAND2     3
17668ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_CHAN_FREQ_RANGE_5G_BAND3     4
17678ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1768832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_CHAN_FREQ_RANGE_5G_4BAND    	5
176966981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
1770832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1771832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* phy types (returned by WLC_GET_PHYTPE) */
1772832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_PHY_TYPE_A		0
1773832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_PHY_TYPE_B		1
1774832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_PHY_TYPE_G		2
1775832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_PHY_TYPE_N		4
1776832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_PHY_TYPE_LP		5
1777832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_PHY_TYPE_SSN	6
1778832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_PHY_TYPE_HT		7
1779832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_PHY_TYPE_LCN	8
1780832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_PHY_TYPE_LCN40	10
17814a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WLC_PHY_TYPE_AC		11
1782832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_PHY_TYPE_NULL	0xf
1783832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
178466981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt/* Values for PM */
178566981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#define PM_OFF	0
178666981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#define PM_MAX	1
178766981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#define PM_FAST 2
178866981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#define PM_FORCE_OFF 3 		/* use this bit to force PM off even bt is active */
178966981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
179066981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
1791832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* MAC list modes */
1792832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_MACMODE_DISABLED	0	/* MAC list disabled */
1793832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_MACMODE_DENY	1	/* Deny specified (i.e. allow unspecified) */
1794832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_MACMODE_ALLOW	2	/* Allow specified (i.e. deny unspecified) */
17958ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1796832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/*
1797832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * 54g modes (basic bits may still be overridden)
1798832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *
1799832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * GMODE_LEGACY_B			Rateset: 1b, 2b, 5.5, 11
1800832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *					Preamble: Long
1801832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *					Shortslot: Off
1802832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * GMODE_AUTO				Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
1803832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *					Extended Rateset: 6, 9, 12, 48
1804832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *					Preamble: Long
1805832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *					Shortslot: Auto
1806832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * GMODE_ONLY				Rateset: 1b, 2b, 5.5b, 11b, 18, 24b, 36, 54
1807832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *					Extended Rateset: 6b, 9, 12b, 48
1808832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *					Preamble: Short required
1809832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *					Shortslot: Auto
1810832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * GMODE_B_DEFERRED			Rateset: 1b, 2b, 5.5b, 11b, 18, 24, 36, 54
1811832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *					Extended Rateset: 6, 9, 12, 48
1812832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *					Preamble: Long
1813832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *					Shortslot: On
1814832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * GMODE_PERFORMANCE			Rateset: 1b, 2b, 5.5b, 6b, 9, 11b, 12b, 18, 24b, 36, 48, 54
1815832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *					Preamble: Short required
1816832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *					Shortslot: On and required
1817832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * GMODE_LRS				Rateset: 1b, 2b, 5.5b, 11b
1818832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *					Extended Rateset: 6, 9, 12, 18, 24, 36, 48, 54
1819832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *					Preamble: Long
1820832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *					Shortslot: Auto
1821832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
1822832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define GMODE_LEGACY_B		0
1823832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define GMODE_AUTO		1
1824832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define GMODE_ONLY		2
1825832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define GMODE_B_DEFERRED	3
1826832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define GMODE_PERFORMANCE	4
1827832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define GMODE_LRS		5
1828832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define GMODE_MAX		6
1829832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1830832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* values for PLCPHdr_override */
1831832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_PLCP_AUTO	-1
1832832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_PLCP_SHORT	0
1833832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_PLCP_LONG	1
1834832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1835832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* values for g_protection_override and n_protection_override */
1836832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_PROTECTION_AUTO		-1
1837832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_PROTECTION_OFF		0
1838832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_PROTECTION_ON		1
1839832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_PROTECTION_MMHDR_ONLY	2
1840832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_PROTECTION_CTS_ONLY		3
1841832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1842832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* values for g_protection_control and n_protection_control */
1843832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_PROTECTION_CTL_OFF		0
1844832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_PROTECTION_CTL_LOCAL	1
1845832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_PROTECTION_CTL_OVERLAP	2
1846832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1847832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* values for n_protection */
1848832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_N_PROTECTION_OFF		0
1849832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_N_PROTECTION_OPTIONAL	1
1850832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_N_PROTECTION_20IN40		2
1851832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_N_PROTECTION_MIXEDMODE	3
1852832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
1853832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* values for n_preamble_type */
1854832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_N_PREAMBLE_MIXEDMODE	0
1855832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_N_PREAMBLE_GF		1
18568ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WLC_N_PREAMBLE_GF_BRCM          2
18578ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
18584a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt/* values for band specific 40MHz capabilities (deprecated) */
1859832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_N_BW_20ALL			0
1860832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_N_BW_40ALL			1
1861832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_N_BW_20IN2G_40IN5G		2
18628ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
18634a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WLC_BW_20MHZ_BIT		(1<<0)
18644a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WLC_BW_40MHZ_BIT		(1<<1)
18654a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WLC_BW_80MHZ_BIT		(1<<2)
18664a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
18674a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt/* Bandwidth capabilities */
18684a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WLC_BW_CAP_20MHZ		(WLC_BW_20MHZ_BIT)
18694a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WLC_BW_CAP_40MHZ		(WLC_BW_40MHZ_BIT|WLC_BW_20MHZ_BIT)
18704a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WLC_BW_CAP_80MHZ		(WLC_BW_80MHZ_BIT|WLC_BW_40MHZ_BIT|WLC_BW_20MHZ_BIT)
18714a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WLC_BW_CAP_UNRESTRICTED		0xFF
18724a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
18734a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_BW_CAP_20MHZ(bw_cap)	(((bw_cap) & WLC_BW_20MHZ_BIT) ? TRUE : FALSE)
18744a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_BW_CAP_40MHZ(bw_cap)	(((bw_cap) & WLC_BW_40MHZ_BIT) ? TRUE : FALSE)
18754a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_BW_CAP_80MHZ(bw_cap)	(((bw_cap) & WLC_BW_80MHZ_BIT) ? TRUE : FALSE)
18764a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
1877832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* values to force tx/rx chain */
1878832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_N_TXRX_CHAIN0		0
1879832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_N_TXRX_CHAIN1		1
18808ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1881832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* bitflags for SGI support (sgi_rx iovar) */
1882832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_N_SGI_20			0x01
1883832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_N_SGI_40			0x02
18847e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt#define WLC_VHT_SGI_80			0x04
18858ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1886832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* when sgi_tx==WLC_SGI_ALL, bypass rate selection, enable sgi for all mcs */
1887832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_SGI_ALL				0x02
18888ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
18898ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define LISTEN_INTERVAL			10
1890832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* interference mitigation options */
1891832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	INTERFERE_OVRRIDE_OFF	-1	/* interference override off */
1892832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	INTERFERE_NONE	0	/* off */
1893832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	NON_WLAN	1	/* foreign/non 802.11 interference, no auto detect */
1894832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLAN_MANUAL	2	/* ACI: no auto detection */
1895832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLAN_AUTO	3	/* ACI: auto detect */
1896832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLAN_AUTO_W_NOISE	4	/* ACI: auto - detect and non 802.11 interference */
1897832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define AUTO_ACTIVE	(1 << 7) /* Auto is currently active */
18988ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
18998ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_aci_args {
1900832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int enter_aci_thresh; /* Trigger level to start detecting ACI */
1901832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int exit_aci_thresh; /* Trigger level to exit ACI mode */
1902832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int usec_spin; /* microsecs to delay between rssi samples */
1903832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int glitch_delay; /* interval between ACI scans when glitch count is consistently high */
1904832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 nphy_adcpwr_enter_thresh;	/* ADC power to enter ACI mitigation mode */
1905832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 nphy_adcpwr_exit_thresh;	/* ADC power to exit ACI mitigation mode */
1906832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 nphy_repeat_ctr;		/* Number of tries per channel to compute power */
1907832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 nphy_num_samples;	/* Number of samples to compute power on one channel */
1908832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 nphy_undetect_window_sz;	/* num of undetects to exit ACI Mitigation mode */
1909832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 nphy_b_energy_lo_aci;	/* low ACI power energy threshold for bphy */
1910832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 nphy_b_energy_md_aci;	/* mid ACI power energy threshold for bphy */
1911832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 nphy_b_energy_hi_aci;	/* high ACI power energy threshold for bphy */
1912832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 nphy_noise_noassoc_glitch_th_up; /* wl interference 4 */
19138ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 nphy_noise_noassoc_glitch_th_dn;
19148ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 nphy_noise_assoc_glitch_th_up;
19158ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 nphy_noise_assoc_glitch_th_dn;
19168ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 nphy_noise_assoc_aci_glitch_th_up;
19178ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 nphy_noise_assoc_aci_glitch_th_dn;
19188ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 nphy_noise_assoc_enter_th;
19198ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 nphy_noise_noassoc_enter_th;
19208ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 nphy_noise_assoc_rx_glitch_badplcp_enter_th;
19218ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 nphy_noise_noassoc_crsidx_incr;
19228ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 nphy_noise_assoc_crsidx_incr;
19238ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 nphy_noise_crsidx_decr;
19248ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_aci_args_t;
19258ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1926832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TRIGGER_NOW				0
1927832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TRIGGER_CRS				0x01
1928832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TRIGGER_CRSDEASSERT			0x02
1929832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TRIGGER_GOODFCS				0x04
1930832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TRIGGER_BADFCS				0x08
1931832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TRIGGER_BADPLCP				0x10
1932832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TRIGGER_CRSGLITCH			0x20
1933832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_ACI_ARGS_LEGACY_LENGTH	16	/* bytes of pre NPHY aci args */
1934832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_SAMPLECOLLECT_T_VERSION	2	/* version of wl_samplecollect_args_t struct */
19358ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_samplecollect_args {
1936832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* version 0 fields */
19378ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 coll_us;
19388ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int cores;
1939832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* add'l version 1 fields */
1940832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 version;     /* see definition of WL_SAMPLECOLLECT_T_VERSION */
1941832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 length;      /* length of entire structure */
19428ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int8 trigger;
19438ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 timeout;
19448ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 mode;
19458ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 pre_dur;
19468ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 post_dur;
19478ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 gpio_sel;
19488ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	bool downsamp;
19498ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	bool be_deaf;
1950832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	bool agc;		/* loop from init gain and going down */
1951832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	bool filter;		/* override high pass corners to lowest */
1952832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* add'l version 2 fields */
19538ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 trigger_state;
19548ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 module_sel1;
19558ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 module_sel2;
19568ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 nsamps;
19578ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_samplecollect_args_t;
19588ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1959832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_SAMPLEDATA_HEADER_TYPE	1
1960832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_SAMPLEDATA_HEADER_SIZE	80	/* sample collect header size (bytes) */
1961832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_SAMPLEDATA_TYPE		2
1962832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_SAMPLEDATA_SEQ		0xff	/* sequence # */
1963832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_SAMPLEDATA_MORE_DATA		0x100	/* more data mask */
1964832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_SAMPLEDATA_T_VERSION		1	/* version of wl_samplecollect_args_t struct */
1965832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* version for unpacked sample data, int16 {(I,Q),Core(0..N)} */
1966832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_SAMPLEDATA_T_VERSION_SPEC_AN 2
19678ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
19688ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_sampledata {
1969832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 version;	/* structure version */
1970832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 size;	/* size of structure */
1971832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 tag;	/* Header/Data */
1972832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 length;	/* data length */
1973832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 flag;	/* bit def */
19748ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_sampledata_t;
19758ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
1976832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* wl_radar_args_t */
1977832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
1978832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int npulses; 	/* required number of pulses at n * t_int */
1979832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int ncontig; 	/* required number of pulses at t_int */
1980832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int min_pw; 	/* minimum pulse width (20 MHz clocks) */
1981832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int max_pw; 	/* maximum pulse width (20 MHz clocks) */
1982832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 thresh0;	/* Radar detection, thresh 0 */
1983832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 thresh1;	/* Radar detection, thresh 1 */
1984832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 blank;	/* Radar detection, blank control */
1985832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 fmdemodcfg;	/* Radar detection, fmdemod config */
1986832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int npulses_lp;  /* Radar detection, minimum long pulses */
1987832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int min_pw_lp; /* Minimum pulsewidth for long pulses */
1988832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int max_pw_lp; /* Maximum pulsewidth for long pulses */
1989832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int min_fm_lp; /* Minimum fm for long pulses */
1990832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int max_span_lp;  /* Maximum deltat for long pulses */
1991832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int min_deltat; /* Minimum spacing between pulses */
1992832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int max_deltat; /* Maximum spacing between pulses */
1993832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 autocorr;	/* Radar detection, autocorr on or off */
1994832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 st_level_time;	/* Radar detection, start_timing level */
1995832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 t2_min; /* minimum clocks needed to remain in state 2 */
1996832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 version; /* version */
1997832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 fra_pulse_err;	/* sample error margin for detecting French radar pulsed */
1998832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int npulses_fra;  /* Radar detection, minimum French pulses set */
1999832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int npulses_stg2;  /* Radar detection, minimum staggered-2 pulses set */
2000832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int npulses_stg3;  /* Radar detection, minimum staggered-3 pulses set */
2001832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 percal_mask;	/* defines which period cal is masked from radar detection */
2002832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int quant;	/* quantization resolution to pulse positions */
2003832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 min_burst_intv_lp;	/* minimum burst to burst interval for bin3 radar */
2004832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 max_burst_intv_lp;	/* maximum burst to burst interval for bin3 radar */
2005832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int nskip_rst_lp;	/* number of skipped pulses before resetting lp buffer */
2006832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int max_pw_tol;	/* maximum tollerance allowed in detected pulse width for radar detection */
2007832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 feature_mask; /* 16-bit mask to specify enabled features */
2008832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_radar_args_t;
2009832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2010832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RADAR_ARGS_VERSION 2
20118ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2012832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
2013832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 version; /* version */
2014832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 thresh0_20_lo;	/* Radar detection, thresh 0 (range 5250-5350MHz) for BW 20MHz */
2015832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 thresh1_20_lo;	/* Radar detection, thresh 1 (range 5250-5350MHz) for BW 20MHz */
2016832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 thresh0_40_lo;	/* Radar detection, thresh 0 (range 5250-5350MHz) for BW 40MHz */
2017832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 thresh1_40_lo;	/* Radar detection, thresh 1 (range 5250-5350MHz) for BW 40MHz */
20184a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint16 thresh0_80_lo;	/* Radar detection, thresh 0 (range 5250-5350MHz) for BW 80MHz */
20194a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint16 thresh1_80_lo;	/* Radar detection, thresh 1 (range 5250-5350MHz) for BW 80MHz */
20204a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint16 thresh0_160_lo;	/* Radar detection, thresh 0 (range 5250-5350MHz) for BW 160MHz */
20214a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint16 thresh1_160_lo;	/* Radar detection, thresh 1 (range 5250-5350MHz) for BW 160MHz */
2022832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 thresh0_20_hi;	/* Radar detection, thresh 0 (range 5470-5725MHz) for BW 20MHz */
2023832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 thresh1_20_hi;	/* Radar detection, thresh 1 (range 5470-5725MHz) for BW 20MHz */
2024832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 thresh0_40_hi;	/* Radar detection, thresh 0 (range 5470-5725MHz) for BW 40MHz */
2025832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 thresh1_40_hi;	/* Radar detection, thresh 1 (range 5470-5725MHz) for BW 40MHz */
20264a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint16 thresh0_80_hi;	/* Radar detection, thresh 0 (range 5470-5725MHz) for BW 80MHz */
20274a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint16 thresh1_80_hi;	/* Radar detection, thresh 1 (range 5470-5725MHz) for BW 80MHz */
20284a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint16 thresh0_160_hi;	/* Radar detection, thresh 0 (range 5470-5725MHz) for BW 160MHz */
20294a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint16 thresh1_160_hi;	/* Radar detection, thresh 1 (range 5470-5725MHz) for BW 160MHz */
2030832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_radar_thr_t;
2031832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
20324a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_RADAR_THR_VERSION	2
2033832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_THRESHOLD_LO_BAND	70	/* range from 5250MHz - 5350MHz */
2034832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2035832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* radar iovar SET defines */
2036832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RADAR_DETECTOR_OFF		0	/* radar detector off */
2037832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RADAR_DETECTOR_ON		1	/* radar detector on */
2038832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RADAR_SIMULATED		2	/* force radar detector to declare
2039832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 * detection once
2040832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 */
2041832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSSI_ANT_VERSION	1	/* current version of wl_rssi_ant_t */
2042832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_ANT_RX_MAX		2	/* max 2 receive antennas */
2043832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_ANT_HT_RX_MAX	3	/* max 3 receive antennas/cores */
2044832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_ANT_IDX_1		0	/* antenna index 1 */
2045832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_ANT_IDX_2		1	/* antenna index 2 */
2046832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2047832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#ifndef WL_RSSI_ANT_MAX
2048832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RSSI_ANT_MAX		4	/* max possible rx antennas */
2049832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#elif WL_RSSI_ANT_MAX != 4
2050832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#error "WL_RSSI_ANT_MAX does not match"
2051832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#endif
20528ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2053832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* RSSI per antenna */
2054832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
2055832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	version;		/* version field */
2056832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	count;			/* number of valid antenna rssi */
2057832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8 rssi_ant[WL_RSSI_ANT_MAX];	/* rssi per antenna */
2058832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_rssi_ant_t;
20598ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2060832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* dfs_status iovar-related defines */
20618ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2062832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* cac - channel availability check,
2063832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * ism - in-service monitoring
2064832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * csa - channel switching announcement
2065832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
20668ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2067832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* cac state values */
2068832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DFS_CACSTATE_IDLE		0	/* state for operating in non-radar channel */
2069832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_DFS_CACSTATE_PREISM_CAC	1	/* CAC in progress */
2070832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DFS_CACSTATE_ISM		2	/* ISM in progress */
2071832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DFS_CACSTATE_CSA		3	/* csa */
2072832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DFS_CACSTATE_POSTISM_CAC	4	/* ISM CAC */
2073832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DFS_CACSTATE_PREISM_OOC	5	/* PREISM OOC */
2074832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DFS_CACSTATE_POSTISM_OOC	6	/* POSTISM OOC */
2075832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DFS_CACSTATES		7	/* this many states exist */
2076832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2077832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* data structure used in 'dfs_status' wl interface, which is used to query dfs status */
2078832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
2079832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint state;		/* noted by WL_DFS_CACSTATE_XX. */
2080832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint duration;		/* time spent in ms in state. */
2081832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* as dfs enters ISM state, it removes the operational channel from quiet channel
2082832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	 * list and notes the channel in channel_cleared. set to 0 if no channel is cleared
2083832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	 */
2084832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t chanspec_cleared;
2085832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* chanspec cleared used to be a uint, add another to uint16 to maintain size */
2086832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 pad;
2087832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_dfs_status_t;
2088832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2089832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NUM_PWRCTRL_RATES 12
20908ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2091832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
2092832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 txpwr_band_max[NUM_PWRCTRL_RATES];	/* User set target */
2093832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 txpwr_limit[NUM_PWRCTRL_RATES];		/* reg and local power limit */
2094832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 txpwr_local_max;				/* local max according to the AP */
2095832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 txpwr_local_constraint;			/* local constraint according to the AP */
2096832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 txpwr_chan_reg_max;			/* Regulatory max for this channel */
2097832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 txpwr_target[2][NUM_PWRCTRL_RATES];	/* Latest target for 2.4 and 5 Ghz */
2098832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 txpwr_est_Pout[2];			/* Latest estimate for 2.4 and 5 Ghz */
2099832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 txpwr_opo[NUM_PWRCTRL_RATES];		/* On G phy, OFDM power offset */
2100832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 txpwr_bphy_cck_max[NUM_PWRCTRL_RATES];	/* Max CCK power for this band (SROM) */
2101832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 txpwr_bphy_ofdm_max;			/* Max OFDM power for this band (SROM) */
2102832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 txpwr_aphy_max[NUM_PWRCTRL_RATES];	/* Max power for A band (SROM) */
2103832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8  txpwr_antgain[2];				/* Ant gain for each band - from SROM */
2104832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 txpwr_est_Pout_gofdm;			/* Pwr estimate for 2.4 OFDM */
2105832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} tx_power_legacy_t;
2106832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2107832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_RATES_LEGACY    45
2108832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS20_FIRST         12
2109832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS20_NUM           16
2110832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS40_FIRST         28
2111832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS40_NUM           17
21128ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2113832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
2114832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 flags;
2115832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t chanspec;                 /* txpwr report for this channel */
2116832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t local_chanspec;           /* channel on which we are associated */
2117832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 local_max;                 /* local max according to the AP */
2118832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 local_constraint;              /* local constraint according to the AP */
2119832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8  antgain[2];                /* Ant gain for each band - from SROM */
2120832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 rf_cores;                  /* count of RF Cores being reported */
2121832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 est_Pout[4];                           /* Latest tx power out estimate per RF
2122832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt							  * chain without adjustment
2123832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt							  */
2124832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 est_Pout_cck;                          /* Latest CCK tx power out estimate */
2125832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 user_limit[WL_TX_POWER_RATES_LEGACY];  /* User limit */
2126832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 reg_limit[WL_TX_POWER_RATES_LEGACY];   /* Regulatory power limit */
2127832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 board_limit[WL_TX_POWER_RATES_LEGACY]; /* Max power board can support (SROM) */
2128832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 target[WL_TX_POWER_RATES_LEGACY];      /* Latest target power */
2129832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} tx_power_legacy2_t;
2130832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2131832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* TX Power index defines */
2132832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NUM_RATES_CCK			4 /* 1, 2, 5.5, 11 Mbps */
2133832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NUM_RATES_OFDM			8 /* 6, 9, 12, 18, 24, 36, 48, 54 Mbps SISO/CDD */
2134832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NUM_RATES_MCS_1STREAM	8 /* MCS 0-7 1-stream rates - SISO/CDD/STBC/MCS */
2135832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NUM_RATES_EXTRA_VHT		2 /* Additional VHT 11AC rates */
21364a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_NUM_RATES_VHT			10
2137832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NUM_RATES_MCS32			1
2138832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2139832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_NUM_RATES_CCK       WL_NUM_RATES_CCK
2140832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_NUM_RATES_OFDM      WL_NUM_RATES_OFDM
2141832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_NUM_RATES_MCS_1_STREAM  WL_NUM_RATES_MCS_1STREAM
2142832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_NUM_RATES_MCS_2_STREAM  WL_NUM_RATES_MCS_1STREAM
2143832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_NUM_RATES_MCS32     WL_NUM_RATES_MCS32
2144832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_CCK_NUM     WL_NUM_RATES_CCK
2145832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_OFDM_NUM        WL_NUM_RATES_OFDM
2146832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS_1_STREAM_NUM    WL_NUM_RATES_MCS_1STREAM
2147832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS_2_STREAM_NUM    WL_NUM_RATES_MCS_1STREAM
2148832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS_32_NUM      WL_NUM_RATES_MCS32
2149832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2150832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NUM_2x2_ELEMENTS		4
2151832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NUM_3x3_ELEMENTS		6
2152832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2153832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct txppr {
2154832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* start of 20MHz tx power limits */
2155832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_1x1dsss[WL_NUM_RATES_CCK];		/* Legacy CCK/DSSS */
2156832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_1x1ofdm[WL_NUM_RATES_OFDM];		/* Legacy OFDM transmission */
2157832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_1x1mcs0[WL_NUM_RATES_MCS_1STREAM];		/* SISO MCS 0-7 */
2158832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2159832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_1x2dsss[WL_NUM_RATES_CCK];		/* Legacy CCK/DSSS */
2160832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_1x2cdd_ofdm[WL_NUM_RATES_OFDM];	/* Legacy OFDM CDD transmission */
2161832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_1x2cdd_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* CDD MCS 0-7 */
2162832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_2x2stbc_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* STBC MCS 0-7 */
2163832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_2x2sdm_mcs8[WL_NUM_RATES_MCS_1STREAM];	/* MCS 8-15 */
2164832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2165832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_1x3dsss[WL_NUM_RATES_CCK];		/* Legacy CCK/DSSS */
2166832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_1x3cdd_ofdm[WL_NUM_RATES_OFDM];	/* Legacy OFDM CDD transmission */
2167832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_1x3cdd_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* 1 Nsts to 3 Tx Chain */
2168832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_2x3stbc_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* STBC MCS 0-7 */
2169832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_2x3sdm_mcs8[WL_NUM_RATES_MCS_1STREAM];	/* 2 Nsts to 3 Tx Chain */
2170832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_3x3sdm_mcs16[WL_NUM_RATES_MCS_1STREAM];	/* 3 Nsts to 3 Tx Chain */
2171832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2172832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_1x1vht[WL_NUM_RATES_EXTRA_VHT];		/* VHT8_9SS1 */
2173832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_1x2cdd_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_CDD1 */
2174832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_2x2stbc_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_STBC */
2175832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_2x2sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS2 */
2176832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_1x3cdd_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_CDD2 */
2177832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_2x3stbc_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_STBC_SPEXP1 */
2178832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_2x3sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS2_SPEXP1 */
2179832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20_3x3sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS3 */
2180832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2181832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* start of 40MHz tx power limits */
2182832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_dummy1x1dsss[WL_NUM_RATES_CCK];	/* Legacy CCK/DSSS */
2183832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_1x1ofdm[WL_NUM_RATES_OFDM];		/* Legacy OFDM transmission */
2184832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_1x1mcs0[WL_NUM_RATES_MCS_1STREAM];		/* SISO MCS 0-7 */
2185832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2186832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_dummy1x2dsss[WL_NUM_RATES_CCK];	/* Legacy CCK/DSSS */
2187832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_1x2cdd_ofdm[WL_NUM_RATES_OFDM];	/* Legacy OFDM CDD transmission */
2188832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_1x2cdd_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* CDD MCS 0-7 */
2189832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_2x2stbc_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* STBC MCS 0-7 */
2190832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_2x2sdm_mcs8[WL_NUM_RATES_MCS_1STREAM];	/* MCS 8-15 */
2191832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2192832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_dummy1x3dsss[WL_NUM_RATES_CCK];	/* Legacy CCK/DSSS */
2193832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_1x3cdd_ofdm[WL_NUM_RATES_OFDM];	/* Legacy OFDM CDD transmission */
2194832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_1x3cdd_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* 1 Nsts to 3 Tx Chain */
2195832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_2x3stbc_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* STBC MCS 0-7 */
2196832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_2x3sdm_mcs8[WL_NUM_RATES_MCS_1STREAM];	/* 2 Nsts to 3 Tx Chain */
2197832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_3x3sdm_mcs16[WL_NUM_RATES_MCS_1STREAM];	/* 3 Nsts to 3 Tx Chain */
2198832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2199832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_1x1vht[WL_NUM_RATES_EXTRA_VHT];		/* VHT8_9SS1 */
2200832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_1x2cdd_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_CDD1 */
2201832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_2x2stbc_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_STBC */
2202832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_2x2sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS2 */
2203832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_1x3cdd_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_CDD2 */
2204832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_2x3stbc_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_STBC_SPEXP1 */
2205832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_2x3sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS2_SPEXP1 */
2206832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40_3x3sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS3 */
2207832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2208832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* start of 20in40MHz tx power limits */
2209832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_1x1dsss[WL_NUM_RATES_CCK];	/* Legacy CCK/DSSS */
2210832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_1x1ofdm[WL_NUM_RATES_OFDM];	/* Legacy OFDM transmission */
2211832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_1x1mcs0[WL_NUM_RATES_MCS_1STREAM];	/* SISO MCS 0-7 */
2212832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2213832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_1x2dsss[WL_NUM_RATES_CCK];		/* Legacy CCK/DSSS */
2214832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_1x2cdd_ofdm[WL_NUM_RATES_OFDM];	/* Legacy OFDM CDD transmission */
2215832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_1x2cdd_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* CDD MCS 0-7 */
2216832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_2x2stbc_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* STBC MCS 0-7 */
2217832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_2x2sdm_mcs8[WL_NUM_RATES_MCS_1STREAM];	/* MCS 8-15 */
2218832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2219832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_1x3dsss[WL_NUM_RATES_CCK];		/* Legacy CCK/DSSS */
2220832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_1x3cdd_ofdm[WL_NUM_RATES_OFDM];	/* 20 in 40 MHz Legacy OFDM CDD */
2221832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_1x3cdd_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* 1 Nsts to 3 Tx Chain */
2222832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_2x3stbc_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* STBC MCS 0-7 */
2223832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_2x3sdm_mcs8[WL_NUM_RATES_MCS_1STREAM];	/* 2 Nsts to 3 Tx Chain */
2224832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_3x3sdm_mcs16[WL_NUM_RATES_MCS_1STREAM];	/* 3 Nsts to 3 Tx Chain */
2225832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2226832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_1x1vht[WL_NUM_RATES_EXTRA_VHT];		/* VHT8_9SS1 */
2227832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_1x2cdd_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_CDD1 */
2228832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_2x2stbc_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_STBC */
2229832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_2x2sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS2 */
2230832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_1x3cdd_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_CDD2 */
2231832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_2x3stbc_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_STBC_SPEXP1 */
2232832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_2x3sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS2_SPEXP1 */
2233832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in40_3x3sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS3 */
2234832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2235832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* start of 80MHz tx power limits */
2236832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_dummy1x1dsss[WL_NUM_RATES_CCK];		/* Legacy CCK/DSSS */
2237832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_1x1ofdm[WL_NUM_RATES_OFDM];			/* Legacy OFDM transmission */
2238832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_1x1mcs0[WL_NUM_RATES_MCS_1STREAM];	/* SISO MCS 0-7 */
2239832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2240832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_dummy1x2dsss[WL_NUM_RATES_CCK];	/* Legacy CCK/DSSS */
2241832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_1x2cdd_ofdm[WL_NUM_RATES_OFDM];	/* Legacy OFDM CDD transmission */
2242832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_1x2cdd_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* CDD MCS 0-7 */
2243832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_2x2stbc_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* STBC MCS 0-7 */
2244832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_2x2sdm_mcs8[WL_NUM_RATES_MCS_1STREAM];	/* MCS 8-15 */
2245832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2246832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_dummy1x3dsss[WL_NUM_RATES_CCK];	/* Legacy CCK/DSSS */
2247832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_1x3cdd_ofdm[WL_NUM_RATES_OFDM];	/* Legacy OFDM CDD transmission */
2248832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_1x3cdd_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* 1 Nsts to 3 Tx Chain */
2249832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_2x3stbc_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* STBC MCS 0-7 */
2250832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_2x3sdm_mcs8[WL_NUM_RATES_MCS_1STREAM];	/* 2 Nsts to 3 Tx Chain */
2251832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_3x3sdm_mcs16[WL_NUM_RATES_MCS_1STREAM];	/* 3 Nsts to 3 Tx Chain */
2252832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2253832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_1x1vht[WL_NUM_RATES_EXTRA_VHT];		/* VHT8_9SS1 */
2254832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_1x2cdd_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_CDD1 */
2255832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_2x2stbc_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_STBC */
2256832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_2x2sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS2 */
2257832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_1x3cdd_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_CDD2 */
2258832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_2x3stbc_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_STBC_SPEXP1 */
2259832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_2x3sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS2_SPEXP1 */
2260832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b80_3x3sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS3 */
2261832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2262832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* start of 20in80MHz tx power limits */
2263832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_1x1dsss[WL_NUM_RATES_CCK];	/* Legacy CCK/DSSS */
2264832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_1x1ofdm[WL_NUM_RATES_OFDM];	/* Legacy OFDM transmission */
2265832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_1x1mcs0[WL_NUM_RATES_MCS_1STREAM];	/* SISO MCS 0-7 */
2266832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2267832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_1x2dsss[WL_NUM_RATES_CCK];		/* Legacy CCK/DSSS */
2268832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_1x2cdd_ofdm[WL_NUM_RATES_OFDM];	/* Legacy OFDM CDD transmission */
2269832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_1x2cdd_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* CDD MCS 0-7 */
2270832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_2x2stbc_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* STBC MCS 0-7 */
2271832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_2x2sdm_mcs8[WL_NUM_RATES_MCS_1STREAM];	/* MCS 8-15 */
2272832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2273832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_1x3dsss[WL_NUM_RATES_CCK];		/* Legacy CCK/DSSS */
2274832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_1x3cdd_ofdm[WL_NUM_RATES_OFDM];	/* Legacy OFDM CDD transmission */
2275832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_1x3cdd_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* 1 Nsts to 3 Tx Chain */
2276832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_2x3stbc_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* STBC MCS 0-7 */
2277832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_2x3sdm_mcs8[WL_NUM_RATES_MCS_1STREAM];	/* 2 Nsts to 3 Tx Chain */
2278832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_3x3sdm_mcs16[WL_NUM_RATES_MCS_1STREAM];	/* 3 Nsts to 3 Tx Chain */
2279832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2280832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_1x1vht[WL_NUM_RATES_EXTRA_VHT];		/* VHT8_9SS1 */
2281832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_1x2cdd_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_CDD1 */
2282832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_2x2stbc_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_STBC */
2283832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_2x2sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS2 */
2284832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_1x3cdd_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_CDD2 */
2285832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_2x3stbc_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_STBC_SPEXP1 */
2286832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_2x3sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS2_SPEXP1 */
2287832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b20in80_3x3sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS3 */
2288832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2289832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* start of 40in80MHz tx power limits */
2290832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_dummy1x1dsss[WL_NUM_RATES_CCK];	/* Legacy CCK/DSSS */
2291832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_1x1ofdm[WL_NUM_RATES_OFDM];		/* Legacy OFDM transmission */
2292832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_1x1mcs0[WL_NUM_RATES_MCS_1STREAM];	/* SISO MCS 0-7 */
2293832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2294832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_dummy1x2dsss[WL_NUM_RATES_CCK];	/* Legacy CCK/DSSS */
2295832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_1x2cdd_ofdm[WL_NUM_RATES_OFDM];	/* Legacy OFDM CDD transmission */
2296832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_1x2cdd_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* CDD MCS 0-7 */
2297832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_2x2stbc_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* STBC MCS 0-7 */
2298832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_2x2sdm_mcs8[WL_NUM_RATES_MCS_1STREAM];	/* MCS 8-15 */
2299832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2300832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_dummy1x3dsss[WL_NUM_RATES_CCK];	/* Legacy CCK/DSSS */
2301832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_1x3cdd_ofdm[WL_NUM_RATES_OFDM];	/* MHz Legacy OFDM CDD */
2302832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_1x3cdd_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* 1 Nsts to 3 Tx Chain */
2303832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_2x3stbc_mcs0[WL_NUM_RATES_MCS_1STREAM];	/* STBC MCS 0-7 */
2304832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_2x3sdm_mcs8[WL_NUM_RATES_MCS_1STREAM];	/* 2 Nsts to 3 Tx Chain */
2305832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_3x3sdm_mcs16[WL_NUM_RATES_MCS_1STREAM];	/* 3 Nsts to 3 Tx Chain */
2306832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2307832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_1x1vht[WL_NUM_RATES_EXTRA_VHT];		/* VHT8_9SS1 */
2308832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_1x2cdd_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_CDD1 */
2309832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_2x2stbc_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_STBC */
2310832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_2x2sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS2 */
2311832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_1x3cdd_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_CDD2 */
2312832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_2x3stbc_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS1_STBC_SPEXP1 */
2313832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_2x3sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS2_SPEXP1 */
2314832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 b40in80_3x3sdm_vht[WL_NUM_RATES_EXTRA_VHT];	/* VHT8_9SS3 */
2315832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2316832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 mcs32; /* C_CHECK - THIS NEEDS TO BE REMOVED THROUGHOUT THE CODE */
2317832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} txppr_t;
2318832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2319832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* 20MHz */
2320832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_CCK_FIRST					OFFSETOF(txppr_t, b20_1x1dsss)
2321832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_OFDM20_FIRST				OFFSETOF(txppr_t, b20_1x1ofdm)
2322832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS20_SISO_FIRST			OFFSETOF(txppr_t, b20_1x1mcs0)
2323832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20_S1x1_FIRST				OFFSETOF(txppr_t, b20_1x1mcs0)
2324832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2325832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_CCK_CDD_S1x2_FIRST			OFFSETOF(txppr_t, b20_1x2dsss)
2326832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_OFDM20_CDD_FIRST			OFFSETOF(txppr_t, b20_1x2cdd_ofdm)
2327832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS20_CDD_FIRST				OFFSETOF(txppr_t, b20_1x2cdd_mcs0)
2328832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20_S1x2_FIRST				OFFSETOF(txppr_t, b20_1x2cdd_mcs0)
2329832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS20_STBC_FIRST			OFFSETOF(txppr_t, b20_2x2stbc_mcs0)
2330832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS20_SDM_FIRST				OFFSETOF(txppr_t, b20_2x2sdm_mcs8)
2331832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20_S2x2_FIRST				OFFSETOF(txppr_t, b20_2x2sdm_mcs8)
2332832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2333832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_CCK_CDD_S1x3_FIRST			OFFSETOF(txppr_t, b20_1x3dsss)
2334832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_OFDM20_CDD_S1x3_FIRST		OFFSETOF(txppr_t, b20_1x3cdd_ofdm)
2335832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20_S1x3_FIRST				OFFSETOF(txppr_t, b20_1x3cdd_mcs0)
2336832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20_STBC_S2x3_FIRST			OFFSETOF(txppr_t, b20_2x3stbc_mcs0)
2337832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20_S2x3_FIRST				OFFSETOF(txppr_t, b20_2x3sdm_mcs8)
2338832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20_S3x3_FIRST				OFFSETOF(txppr_t, b20_3x3sdm_mcs16)
2339832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2340832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20_S1X1_VHT					OFFSETOF(txppr_t, b20_1x1vht)
2341832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20_S1X2_CDD_VHT				OFFSETOF(txppr_t, b20_1x2cdd_vht)
2342832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20_S2X2_STBC_VHT			OFFSETOF(txppr_t, b20_2x2stbc_vht)
2343832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20_S2X2_VHT					OFFSETOF(txppr_t, b20_2x2sdm_vht)
2344832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20_S1X3_CDD_VHT				OFFSETOF(txppr_t, b20_1x3cdd_vht)
2345832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20_S2X3_STBC_VHT			OFFSETOF(txppr_t, b20_2x3stbc_vht)
2346832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20_S2X3_VHT					OFFSETOF(txppr_t, b20_2x3sdm_vht)
2347832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20_S3X3_VHT					OFFSETOF(txppr_t, b20_3x3sdm_vht)
2348832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2349832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* 40MHz */
2350832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_DUMMY_CCK_FIRST			OFFSETOF(txppr_t, b40_dummy1x1dsss)
2351832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_OFDM40_FIRST				OFFSETOF(txppr_t, b40_1x1ofdm)
2352832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS40_SISO_FIRST			OFFSETOF(txppr_t, b40_1x1mcs0)
2353832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_S1x1_FIRST				OFFSETOF(txppr_t, b40_1x1mcs0)
2354832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2355832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_DUMMY_CCK_CDD_S1x2_FIRST	OFFSETOF(txppr_t, b40_dummy1x2dsss)
2356832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_OFDM40_CDD_FIRST			OFFSETOF(txppr_t, b40_1x2cdd_ofdm)
2357832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS40_CDD_FIRST				OFFSETOF(txppr_t, b40_1x2cdd_mcs0)
2358832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_S1x2_FIRST				OFFSETOF(txppr_t, b40_1x2cdd_mcs0)
2359832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS40_STBC_FIRST			OFFSETOF(txppr_t, b40_2x2stbc_mcs0)
2360832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS40_SDM_FIRST				OFFSETOF(txppr_t, b40_2x2sdm_mcs8)
2361832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_S2x2_FIRST				OFFSETOF(txppr_t, b40_2x2sdm_mcs8)
2362832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2363832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_DUMMY_CCK_CDD_S1x3_FIRST	OFFSETOF(txppr_t, b40_dummy1x3dsss)
2364832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_OFDM40_CDD_S1x3_FIRST		OFFSETOF(txppr_t, b40_1x3cdd_ofdm)
2365832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_S1x3_FIRST				OFFSETOF(txppr_t, b40_1x3cdd_mcs0)
2366832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_STBC_S2x3_FIRST			OFFSETOF(txppr_t, b40_2x3stbc_mcs0)
2367832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_S2x3_FIRST				OFFSETOF(txppr_t, b40_2x3sdm_mcs8)
2368832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_S3x3_FIRST				OFFSETOF(txppr_t, b40_3x3sdm_mcs16)
2369832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2370832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_S1X1_VHT					OFFSETOF(txppr_t, b40_1x1vht)
2371832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_S1X2_CDD_VHT				OFFSETOF(txppr_t, b40_1x2cdd_vht)
2372832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_S2X2_STBC_VHT			OFFSETOF(txppr_t, b40_2x2stbc_vht)
2373832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_S2X2_VHT					OFFSETOF(txppr_t, b40_2x2sdm_vht)
2374832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_S1X3_CDD_VHT				OFFSETOF(txppr_t, b40_1x3cdd_vht)
2375832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_S2X3_STBC_VHT			OFFSETOF(txppr_t, b40_2x3stbc_vht)
2376832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_S2X3_VHT					OFFSETOF(txppr_t, b40_2x3sdm_vht)
2377832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40_S3X3_VHT					OFFSETOF(txppr_t, b40_3x3sdm_vht)
2378832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2379832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* 20 in 40MHz */
2380832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_CCK_FIRST				OFFSETOF(txppr_t, b20in40_1x1dsss)
2381832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_OFDM_FIRST				OFFSETOF(txppr_t, b20in40_1x1ofdm)
2382832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_S1x1_FIRST				OFFSETOF(txppr_t, b20in40_1x1mcs0)
2383832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2384832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_CCK_20U_CDD_S1x2_FIRST	OFFSETOF(txppr_t, b20in40_1x2dsss)
2385832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_OFDM_CDD_FIRST		OFFSETOF(txppr_t, b20in40_1x2cdd_ofdm)
2386832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_S1x2_FIRST			OFFSETOF(txppr_t, b20in40_1x2cdd_mcs0)
2387832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_STBC_S2x2_FIRST	OFFSETOF(txppr_t, b20in40_2x2stbc_mcs0)
2388832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_S2x2_FIRST			OFFSETOF(txppr_t, b20in40_2x2sdm_mcs8)
2389832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2390832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_CCK_20U_CDD_S1x3_FIRST	OFFSETOF(txppr_t, b20in40_1x3dsss)
2391832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_OFDM_CDD_S1x3_FIRST OFFSETOF(txppr_t, b20in40_1x3cdd_ofdm)
2392832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_S1x3_FIRST			OFFSETOF(txppr_t, b20in40_1x3cdd_mcs0)
2393832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_STBC_S2x3_FIRST	OFFSETOF(txppr_t, b20in40_2x3stbc_mcs0)
2394832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_S2x3_FIRST			OFFSETOF(txppr_t, b20in40_2x3sdm_mcs8)
2395832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_S3x3_FIRST			OFFSETOF(txppr_t, b20in40_3x3sdm_mcs16)
2396832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2397832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_S1X1_VHT			OFFSETOF(txppr_t, b20in40_1x1vht)
2398832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_S1X2_CDD_VHT		OFFSETOF(txppr_t, b20in40_1x2cdd_vht)
2399832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_S2X2_STBC_VHT		OFFSETOF(txppr_t, b20in40_2x2stbc_vht)
2400832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_S2X2_VHT			OFFSETOF(txppr_t, b20in40_2x2sdm_vht)
2401832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_S1X3_CDD_VHT		OFFSETOF(txppr_t, b20in40_1x3cdd_vht)
2402832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_S2X3_STBC_VHT		OFFSETOF(txppr_t, b20in40_2x3stbc_vht)
2403832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_S2X3_VHT			OFFSETOF(txppr_t, b20in40_2x3sdm_vht)
2404832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UL_S3X3_VHT			OFFSETOF(txppr_t, b20in40_3x3sdm_vht)
2405832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2406832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* 80MHz */
2407832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_DUMMY_CCK_FIRST		OFFSETOF(txppr_t, b80_dummy1x1dsss)
2408832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_OFDM80_FIRST			OFFSETOF(txppr_t, b80_1x1ofdm)
2409832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS80_SISO_FIRST		OFFSETOF(txppr_t, b80_1x1mcs0)
2410832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_S1x1_FIRST			OFFSETOF(txppr_t, b80_1x1mcs0)
2411832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2412832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_DUMMY_CCK_CDD_S1x2_FIRST	OFFSETOF(txppr_t, b80_dummy1x2dsss)
2413832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_OFDM80_CDD_FIRST			OFFSETOF(txppr_t, b80_1x2cdd_ofdm)
2414832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS80_CDD_FIRST				OFFSETOF(txppr_t, b80_1x2cdd_mcs0)
2415832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_S1x2_FIRST				OFFSETOF(txppr_t, b80_1x2cdd_mcs0)
2416832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS80_STBC_FIRST			OFFSETOF(txppr_t, b80_2x2stbc_mcs0)
2417832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS80_SDM_FIRST				OFFSETOF(txppr_t, b80_2x2sdm_mcs8)
2418832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_S2x2_FIRST				OFFSETOF(txppr_t, b80_2x2sdm_mcs8)
2419832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2420832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_DUMMY_CCK_CDD_S1x3_FIRST	OFFSETOF(txppr_t, b80_dummy1x3dsss)
2421832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_OFDM80_CDD_S1x3_FIRST		OFFSETOF(txppr_t, b80_1x3cdd_ofdm)
2422832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_S1x3_FIRST				OFFSETOF(txppr_t, b80_1x3cdd_mcs0)
2423832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_STBC_S2x3_FIRST			OFFSETOF(txppr_t, b80_2x3stbc_mcs0)
2424832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_S2x3_FIRST				OFFSETOF(txppr_t, b80_2x3sdm_mcs8)
2425832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_S3x3_FIRST				OFFSETOF(txppr_t, b80_3x3sdm_mcs16)
2426832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2427832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_S1X1_VHT					OFFSETOF(txppr_t, b80_1x1vht)
2428832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_S1X2_CDD_VHT				OFFSETOF(txppr_t, b80_1x2cdd_vht)
2429832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_S2X2_STBC_VHT			OFFSETOF(txppr_t, b80_2x2stbc_vht)
2430832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_S2X2_VHT					OFFSETOF(txppr_t, b80_2x2sdm_vht)
2431832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_S1X3_CDD_VHT				OFFSETOF(txppr_t, b80_1x3cdd_vht)
2432832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_S2X3_STBC_VHT			OFFSETOF(txppr_t, b80_2x3stbc_vht)
2433832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_S2X3_VHT					OFFSETOF(txppr_t, b80_2x3sdm_vht)
2434832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_80_S3X3_VHT					OFFSETOF(txppr_t, b80_3x3sdm_vht)
2435832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2436832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* 20 in 80MHz */
2437832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_CCK_FIRST				OFFSETOF(txppr_t, b20in80_1x1dsss)
2438832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_OFDM_FIRST			OFFSETOF(txppr_t, b20in80_1x1ofdm)
2439832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_S1x1_FIRST			OFFSETOF(txppr_t, b20in80_1x1mcs0)
2440832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2441832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_CCK_20UU_CDD_S1x2_FIRST		OFFSETOF(txppr_t, b20in80_1x2dsss)
2442832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_OFDM_CDD_FIRST		OFFSETOF(txppr_t, b20in80_1x2cdd_ofdm)
2443832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_S1x2_FIRST			OFFSETOF(txppr_t, b20in80_1x2cdd_mcs0)
2444832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_STBC_S2x2_FIRST		OFFSETOF(txppr_t, b20in80_2x2stbc_mcs0)
2445832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_S2x2_FIRST			OFFSETOF(txppr_t, b20in80_2x2sdm_mcs8)
2446832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2447832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_CCK_20UU_CDD_S1x3_FIRST		OFFSETOF(txppr_t, b20in80_1x3dsss)
2448832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_OFDM_CDD_S1x3_FIRST	OFFSETOF(txppr_t, b20in80_1x3cdd_ofdm)
2449832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_S1x3_FIRST			OFFSETOF(txppr_t, b20in80_1x3cdd_mcs0)
2450832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_STBC_S2x3_FIRST		OFFSETOF(txppr_t, b20in80_2x3stbc_mcs0)
2451832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_S2x3_FIRST			OFFSETOF(txppr_t, b20in80_2x3sdm_mcs8)
2452832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_S3x3_FIRST			OFFSETOF(txppr_t, b20in80_3x3sdm_mcs16)
2453832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2454832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_S1X1_VHT			OFFSETOF(txppr_t, b20in80_1x1vht)
2455832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_S1X2_CDD_VHT		OFFSETOF(txppr_t, b20in80_1x2cdd_vht)
2456832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_S2X2_STBC_VHT		OFFSETOF(txppr_t, b20in80_2x2stbc_vht)
2457832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_S2X2_VHT			OFFSETOF(txppr_t, b20in80_2x2sdm_vht)
2458832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_S1X3_CDD_VHT		OFFSETOF(txppr_t, b20in80_1x3cdd_vht)
2459832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_S2X3_STBC_VHT		OFFSETOF(txppr_t, b20in80_2x3stbc_vht)
2460832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_S2X3_VHT			OFFSETOF(txppr_t, b20in80_2x3sdm_vht)
2461832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_20UUL_S3X3_VHT			OFFSETOF(txppr_t, b20in80_3x3sdm_vht)
2462832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2463832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* 40 in 80MHz */
2464832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_DUMMY_CCK_FIRST		OFFSETOF(txppr_t, b40in80_dummy1x1dsss)
2465832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_OFDM_FIRST			OFFSETOF(txppr_t, b40in80_1x1ofdm)
2466832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_S1x1_FIRST			OFFSETOF(txppr_t, b40in80_1x1mcs0)
2467832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2468832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_CCK_40UU_DUMMY_CDD_S1x2_FIRST OFFSETOF(txppr_t, b40in80_dummy1x2dsss)
2469832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_OFDM_CDD_FIRST		OFFSETOF(txppr_t, b40in80_1x2cdd_ofdm)
2470832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_S1x2_FIRST			OFFSETOF(txppr_t, b40in80_1x2cdd_mcs0)
2471832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_STBC_S2x2_FIRST		OFFSETOF(txppr_t, b40in80_2x2stbc_mcs0)
2472832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_S2x2_FIRST			OFFSETOF(txppr_t, b40in80_2x2sdm_mcs8)
2473832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2474832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_CCK_40UU_DUMMY_CDD_S1x3_FIRST OFFSETOF(txppr_t, b40in80_dummy1x3dsss)
2475832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_OFDM_CDD_S1x3_FIRST	OFFSETOF(txppr_t, b40in80_1x3cdd_ofdm)
2476832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_S1x3_FIRST			OFFSETOF(txppr_t, b40in80_1x3cdd_mcs0)
2477832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_STBC_S2x3_FIRST		OFFSETOF(txppr_t, b40in80_2x3stbc_mcs0)
2478832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_S2x3_FIRST			OFFSETOF(txppr_t, b40in80_2x3sdm_mcs8)
2479832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_S3x3_FIRST			OFFSETOF(txppr_t, b40in80_3x3sdm_mcs16)
2480832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2481832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_S1X1_VHT			OFFSETOF(txppr_t, b40in80_1x1vht)
2482832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_S1X2_CDD_VHT		OFFSETOF(txppr_t, b40in80_1x2cdd_vht)
2483832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_S2X2_STBC_VHT		OFFSETOF(txppr_t, b40in80_2x2stbc_vht)
2484832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_S2X2_VHT			OFFSETOF(txppr_t, b40in80_2x2sdm_vht)
2485832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_S1X3_CDD_VHT		OFFSETOF(txppr_t, b40in80_1x3cdd_vht)
2486832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_S2X3_STBC_VHT		OFFSETOF(txppr_t, b40in80_2x3stbc_vht)
2487832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_S2X3_VHT			OFFSETOF(txppr_t, b40in80_2x3sdm_vht)
2488832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_40UUL_S3X3_VHT			OFFSETOF(txppr_t, b40in80_3x3sdm_vht)
2489832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2490832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS_32			OFFSETOF(txppr_t, mcs32) /* C_CHECK remove later */
2491832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2492832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_RATES			sizeof(struct txppr)
2493832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2494832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* sslpnphy specifics */
2495832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS20_SISO_FIRST_SSN	WL_TX_POWER_MCS20_SISO_FIRST
2496832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_MCS40_SISO_FIRST_SSN	WL_TX_POWER_MCS40_SISO_FIRST
2497832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2498832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* tx_power_t.flags bits */
2499832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_F_ENABLED	1
2500832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_F_HW	2
2501832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_F_MIMO	4
2502832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_F_SISO	8
2503832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TX_POWER_F_HT	0x10
25048ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2505832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
2506832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 ver;				/* version of this struct */
2507832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 len;				/* length in bytes of this structure */
2508832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 flags;
2509832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t chanspec;			/* txpwr report for this channel */
2510832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t local_chanspec;		/* channel on which we are associated */
2511832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 ppr[WL_TX_POWER_RATES];		/* Latest target power */
2512832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_txppr_t;
25138ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2514832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TXPPR_VERSION	0
2515832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TXPPR_LENGTH	(sizeof(wl_txppr_t))
2516832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TX_POWER_T_VERSION	43
25178ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2518832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Defines used with channel_bandwidth for curpower */
2519832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BW_20MHZ 		0
2520832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BW_40MHZ 		1
2521832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BW_80MHZ 		2
25228ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
25234a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt/* tx_power_t.flags bits */
25244a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#ifdef PPR_API
25254a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_TX_POWER2_F_ENABLED	1
25264a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_TX_POWER2_F_HW		2
25274a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_TX_POWER2_F_MIMO		4
25284a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_TX_POWER2_F_SISO		8
25294a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_TX_POWER2_F_HT		0x10
25304a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#else
25314a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_TX_POWER_F_ENABLED	1
25324a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_TX_POWER_F_HW		2
25334a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_TX_POWER_F_MIMO		4
25344a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_TX_POWER_F_SISO		8
25354a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_TX_POWER_F_HT		0x10
25364a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#endif
2537832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
2538832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 flags;
2539832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t chanspec;			/* txpwr report for this channel */
2540832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t local_chanspec;		/* channel on which we are associated */
2541832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 local_max;			/* local max according to the AP */
2542832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 local_constraint;			/* local constraint according to the AP */
2543832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8  antgain[2];			/* Ant gain for each band - from SROM */
2544832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 rf_cores;				/* count of RF Cores being reported */
2545832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 est_Pout[4];			/* Latest tx power out estimate per RF chain */
2546832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 est_Pout_act[4];		/* Latest tx power out estimate per RF chain
2547832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	* without adjustment
2548832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	*/
2549832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 est_Pout_cck;			/* Latest CCK tx power out estimate */
2550832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 tx_power_max[4];		/* Maximum target power among all rates */
2551832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint tx_power_max_rate_ind[4];		/* Index of the rate with the max target power */
2552832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 user_limit[WL_TX_POWER_RATES];	/* User limit */
2553832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8 board_limit[WL_TX_POWER_RATES];	/* Max power board can support (SROM) */
2554832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8 target[WL_TX_POWER_RATES];			/* Latest target power */
25554a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	int8 clm_limits[WL_NUMRATES];		/* regulatory limits - 20, 40 or 80MHz */
25564a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	int8 clm_limits_subchan1[WL_NUMRATES];	/* regulatory limits - 20in40 or 40in80 */
25574a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	int8 clm_limits_subchan2[WL_NUMRATES];	/* regulatory limits - 20in80MHz */
2558832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8 sar;					/* SAR limit for display by wl executable */
2559832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8 channel_bandwidth;		/* 20, 40 or 80 MHz bandwidth? */
2560832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 version;				/* Version of the data format wlu <--> driver */
25614a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint8 display_core;			/* Displayed curpower core */
25624a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#ifdef PPR_API
25634a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt} tx_power_new_t;
25644a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#else
2565832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} tx_power_t;
25664a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#endif
2567832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2568832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct tx_inst_power {
2569832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 txpwr_est_Pout[2];			/* Latest estimate for 2.4 and 5 Ghz */
2570832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 txpwr_est_Pout_gofdm;			/* Pwr estimate for 2.4 OFDM */
2571832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} tx_inst_power_t;
25728ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
25738ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2574832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
2575832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 flags;
2576832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t chanspec;			/* txpwr report for this channel */
2577832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t local_chanspec;		/* channel on which we are associated */
2578832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 local_max;			/* local max according to the AP */
2579832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 local_constraint;			/* local constraint according to the AP */
2580832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8  antgain[2];			/* Ant gain for each band - from SROM */
2581832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 rf_cores;				/* count of RF Cores being reported */
2582832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 est_Pout[4];			/* Latest tx power out estimate per RF chain */
2583832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 est_Pout_act[4];                  /* Latest tx power out estimate per RF chain
2584832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 * without adjustment
2585832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 */
2586832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 est_Pout_cck;			/* Latest CCK tx power out estimate */
2587832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 tx_power_max[4];                  /* Maximum target power among all rates */
2588832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint tx_power_max_rate_ind[4];         /* Index of the rate with the max target power */
2589832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	txppr_t user_limit;			/* User limit */
2590832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	txppr_t reg_limit;			/* Regulatory power limit */
2591832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	txppr_t board_limit;			/* Max power board can support (SROM) */
2592832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	txppr_t target;				/* Latest target power */
2593832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_txpwr_t;
2594832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2595832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NUM_TXCHAIN_MAX	4
2596832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wl_txchain_pwr_offsets {
2597832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8 offset[WL_NUM_TXCHAIN_MAX];	/* quarter dBm signed offset for each chain */
2598832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_txchain_pwr_offsets_t;
2599832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2600832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* 802.11h measurement types */
2601832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_MEASURE_TPC			1
2602832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_MEASURE_CHANNEL_BASIC	2
2603832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_MEASURE_CHANNEL_CCA		3
2604832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_MEASURE_CHANNEL_RPI		4
2605832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2606832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* regulatory enforcement levels */
2607832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define SPECT_MNGMT_OFF			0		/* both 11h and 11d disabled */
2608832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define SPECT_MNGMT_LOOSE_11H		1		/* allow non-11h APs in scan lists */
2609832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define SPECT_MNGMT_STRICT_11H		2		/* prune out non-11h APs from scan list */
2610832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define SPECT_MNGMT_STRICT_11D		3		/* switch to 802.11D mode */
2611832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* SPECT_MNGMT_LOOSE_11H_D - same as SPECT_MNGMT_LOOSE with the exception that Country IE
2612832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * adoption is done regardless of capability spectrum_management
2613832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
2614832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define SPECT_MNGMT_LOOSE_11H_D		4		/* operation defined above */
2615832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2616832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_CHAN_VALID_HW	(1 << 0)	/* valid with current HW */
2617832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_CHAN_VALID_SW	(1 << 1)	/* valid with current country setting */
2618832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_CHAN_BAND_5G		(1 << 2)	/* 5GHz-band channel */
2619832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_CHAN_RADAR		(1 << 3)	/* radar sensitive  channel */
2620832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_CHAN_INACTIVE	(1 << 4)	/* temporarily inactive due to radar */
2621832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_CHAN_PASSIVE		(1 << 5)	/* channel is in passive mode */
2622832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_CHAN_RESTRICTED	(1 << 6)	/* restricted use channel */
2623832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2624832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* BTC mode used by "btc_mode" iovar */
2625832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_BTC_DISABLE		0	/* disable BT coexistence */
2626832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_FULLTDM      1	/* full TDM COEX */
2627832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_ENABLE       1	/* full TDM COEX to maintain backward compatiblity */
2628832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_PREMPT      2    /* full TDM COEX with preemption */
2629832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_LITE        3	/* light weight coex for large isolation platform */
2630832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_PARALLEL		4   /* BT and WLAN run in parallel with separate antenna  */
2631832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_HYBRID		5   /* hybrid coex, only ack is allowed to transmit in BT slot */
2632832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_DEFAULT		8	/* set the default mode for the device */
2633832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_INF_BTC_DISABLE      0
2634832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_INF_BTC_ENABLE       1
2635832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_INF_BTC_AUTO         3
2636832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2637832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* BTC wire used by "btc_wire" iovar */
2638832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_BTC_DEFWIRE		0	/* use default wire setting */
2639832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_2WIRE		2	/* use 2-wire BTC */
2640832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_3WIRE		3	/* use 3-wire BTC */
2641832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_4WIRE		4	/* use 4-wire BTC */
2642832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2643832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* BTC flags: BTC configuration that can be set by host */
2644832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_FLAG_PREMPT               (1 << 0)
2645832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_FLAG_BT_DEF               (1 << 1)
2646832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_FLAG_ACTIVE_PROT          (1 << 2)
2647832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_FLAG_SIM_RSP              (1 << 3)
2648832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_FLAG_PS_PROTECT           (1 << 4)
2649832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_FLAG_SIM_TX_LP	         (1 << 5)
2650832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_FLAG_ECI                  (1 << 6)
2651832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_FLAG_LIGHT                (1 << 7)
2652832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTC_FLAG_PARALLEL             (1 << 8)
2653832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2654832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Message levels */
2655832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_ERROR_VAL		0x00000001
2656832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TRACE_VAL		0x00000002
2657832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PRHDRS_VAL		0x00000004
2658832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PRPKT_VAL		0x00000008
2659832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_INFORM_VAL		0x00000010
2660832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TMP_VAL		0x00000020
2661832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_OID_VAL		0x00000040
2662832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RATE_VAL		0x00000080
2663832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_ASSOC_VAL		0x00000100
2664832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PRUSR_VAL		0x00000200
2665832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PS_VAL		0x00000400
2666832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TXPWR_VAL		0x00000800	/* retired in TOT on 6/10/2009 */
2667832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PORT_VAL		0x00001000
2668832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DUAL_VAL		0x00002000
2669832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_WSEC_VAL		0x00004000
2670832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_WSEC_DUMP_VAL	0x00008000
2671832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_LOG_VAL		0x00010000
2672832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NRSSI_VAL		0x00020000	/* retired in TOT on 6/10/2009 */
2673832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_LOFT_VAL		0x00040000	/* retired in TOT on 6/10/2009 */
2674832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_REGULATORY_VAL	0x00080000
2675832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PHYCAL_VAL		0x00100000	/* retired in TOT on 6/10/2009 */
2676832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RADAR_VAL		0x00200000	/* retired in TOT on 6/10/2009 */
2677832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_MPC_VAL		0x00400000
2678832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_APSTA_VAL		0x00800000
2679832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DFS_VAL		0x01000000
2680832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BA_VAL		0x02000000	/* retired in TOT on 6/14/2010 */
2681832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_ACI_VAL		0x04000000
2682832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_MBSS_VAL		0x04000000
2683832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_CAC_VAL		0x08000000
2684832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_AMSDU_VAL		0x10000000
2685832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_AMPDU_VAL		0x20000000
2686832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_FFPLD_VAL		0x40000000
2687832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2688832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* wl_msg_level is full. For new bits take the next one and AND with
2689832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * wl_msg_level2 in wl_dbg.h
2690832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
2691832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_DPT_VAL 		0x00000001
2692832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_SCAN_VAL		0x00000002
2693832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_WOWL_VAL		0x00000004
2694832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_COEX_VAL		0x00000008
2695832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_RTDC_VAL		0x00000010
2696832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PROTO_VAL		0x00000020
2697832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_BTA_VAL		0x00000040
2698832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_CHANINT_VAL		0x00000080
2699832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_THERMAL_VAL		0x00000100	/* retired in TOT on 6/10/2009 */
2700832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_VAL		0x00000200
2701832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_ITFR_VAL		0x00000400
2702832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_MCHAN_VAL		0x00000800
2703832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TDLS_VAL		0x00001000
2704832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_MCNX_VAL		0x00002000
2705832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PROT_VAL		0x00004000
2706832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PSTA_VAL		0x00008000
27074a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_TBTT_VAL		0x00010000
27084a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_NIC_VAL		0x00020000
27097e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt#define WL_PWRSEL_VAL	0x00040000
2710832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* use top-bit for WL_TIME_STAMP_VAL because this is a modifier
2711832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * rather than a message-type of its own
2712832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
2713832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_TIMESTAMP_VAL        0x80000000
2714832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2715832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* max # of leds supported by GPIO (gpio pin# == led index#) */
2716832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_NUMGPIO		32	/* gpio 0-31 */
2717832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2718832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* led per-pin behaviors */
2719832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_OFF		0		/* always off */
2720832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_ON		1		/* always on */
2721832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_ACTIVITY		2		/* activity */
2722832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_RADIO		3		/* radio enabled */
2723832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_ARADIO		4		/* 5  Ghz radio enabled */
2724832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_BRADIO		5		/* 2.4Ghz radio enabled */
2725832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_BGMODE		6		/* on if gmode, off if bmode */
2726832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_WI1		7
2727832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_WI2		8
2728832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_WI3		9
2729832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_ASSOC		10		/* associated state indicator */
2730832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_INACTIVE		11		/* null behavior (clears default behavior) */
2731832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_ASSOCACT		12		/* on when associated; blink fast for activity */
2732832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_LED_WI4		13
2733832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_LED_WI5		14
2734832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_BLINKSLOW	15		/* blink slow */
2735832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_BLINKMED		16		/* blink med */
2736832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_BLINKFAST	17		/* blink fast */
2737832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_BLINKCUSTOM	18		/* blink custom */
2738832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_BLINKPERIODIC	19		/* blink periodic (custom 1000ms / off 400ms) */
2739832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_LED_ASSOC_WITH_SEC 	20		/* when connected with security */
2740832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						/* keep on for 300 sec */
2741832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_LED_START_OFF 	21		/* off upon boot, could be turned on later */
2742832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_NUMBEHAVIOR	22
2743832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2744832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* led behavior numeric value format */
2745832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_BEH_MASK		0x7f		/* behavior mask */
2746832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_LED_AL_MASK		0x80		/* activelow (polarity) bit */
2747832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2748832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* maximum channels returned by the get valid channels iovar */
2749832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NUMCHANNELS		64
27504a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
27514a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt/* max number of chanspecs (used by the iovar to calc. buf space) */
27524a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_NUMCHANSPECS 110
2753832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2754832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* WDS link local endpoint WPA role */
2755832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_WDS_WPA_ROLE_AUTH	0	/* authenticator */
2756832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_WDS_WPA_ROLE_SUP	1	/* supplicant */
2757832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_WDS_WPA_ROLE_AUTO	255	/* auto, based on mac addr value */
2758832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2759832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* number of bytes needed to define a 128-bit mask for MAC event reporting */
2760832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_EVENTING_MASK_LEN	16
27618ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2762832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/*
2763832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * Join preference iovar value is an array of tuples. Each tuple has a one-byte type,
2764832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * a one-byte length, and a variable length value.  RSSI type tuple must be present
2765832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * in the array.
2766832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *
2767832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * Types are defined in "join preference types" section.
2768832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *
2769832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * Length is the value size in octets. It is reserved for WL_JOIN_PREF_WPA type tuple
2770832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * and must be set to zero.
2771832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *
2772832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * Values are defined below.
2773832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *
2774832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * 1. RSSI - 2 octets
2775832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * offset 0: reserved
2776832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * offset 1: reserved
2777832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *
2778832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * 2. WPA - 2 + 12 * n octets (n is # tuples defined below)
2779832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * offset 0: reserved
2780832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * offset 1: # of tuples
2781832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * offset 2: tuple 1
2782832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * offset 14: tuple 2
2783832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * ...
2784832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * offset 2 + 12 * (n - 1) octets: tuple n
2785832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *
2786832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * struct wpa_cfg_tuple {
2787832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *   uint8 akm[DOT11_OUI_LEN+1];     akm suite
2788832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *   uint8 ucipher[DOT11_OUI_LEN+1]; unicast cipher suite
2789832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *   uint8 mcipher[DOT11_OUI_LEN+1]; multicast cipher suite
2790832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * };
2791832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *
2792832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * multicast cipher suite can be specified as a specific cipher suite or WL_WPA_ACP_MCS_ANY.
2793832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *
2794832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * 3. BAND - 2 octets
2795832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * offset 0: reserved
2796832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * offset 1: see "band preference" and "band types"
2797832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *
2798832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * 4. BAND RSSI - 2 octets
2799832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * offset 0: band types
2800832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * offset 1: +ve RSSI boost balue in dB
2801832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
28028ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2803832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* join preference types */
2804832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_JOIN_PREF_RSSI	1	/* by RSSI */
2805832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_JOIN_PREF_WPA	2	/* by akm and ciphers */
2806832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_JOIN_PREF_BAND	3	/* by 802.11 band */
2807832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_JOIN_PREF_RSSI_DELTA	4	/* by 802.11 band only if RSSI delta condition matches */
2808832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_JOIN_PREF_TRANS_PREF	5	/* defined by requesting AP */
28098ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2810832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* band preference */
2811832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLJP_BAND_ASSOC_PREF	255	/* use what WLC_SET_ASSOC_PREFER ioctl specifies */
28128ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2813832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* any multicast cipher suite */
2814832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_WPA_ACP_MCS_ANY	"\x00\x00\x00\x00"
28158ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
28168ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidtstruct tsinfo_arg {
28178ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 octets[3];
28188ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt};
281966981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
28208ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2821832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	NFIFO			6	/* # tx/rx fifopairs */
28228ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
2823832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_CNT_T_VERSION	8	/* current version of wl_cnt_t struct */
28248ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
28258ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
2826832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	version;	/* see definition of WL_CNT_T_VERSION */
2827832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	length;		/* length of entire structure */
2828832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2829832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* transmit stat counters */
2830832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txframe;	/* tx data frames */
2831832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txbyte;		/* tx data bytes */
2832832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txretrans;	/* tx mac retransmits */
2833832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txerror;	/* tx data errors (derived: sum of others) */
2834832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txctl;		/* tx management frames */
2835832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txprshort;	/* tx short preamble frames */
2836832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txserr;		/* tx status errors */
2837832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txnobuf;	/* tx out of buffers errors */
2838832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txnoassoc;	/* tx discard because we're not associated */
2839832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txrunt;		/* tx runt frames */
2840832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txchit;		/* tx header cache hit (fastpath) */
2841832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txcmiss;	/* tx header cache miss (slowpath) */
2842832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2843832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* transmit chip error counters */
2844832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txuflo;		/* tx fifo underflows */
2845832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txphyerr;	/* tx phy errors (indicated in tx status) */
2846832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txphycrs;
2847832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2848832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* receive stat counters */
2849832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxframe;	/* rx data frames */
2850832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxbyte;		/* rx data bytes */
2851832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxerror;	/* rx data errors (derived: sum of others) */
2852832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxctl;		/* rx management frames */
2853832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxnobuf;	/* rx out of buffers errors */
2854832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxnondata;	/* rx non data frames in the data channel errors */
2855832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxbadds;	/* rx bad DS errors */
2856832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxbadcm;	/* rx bad control or management frames */
2857832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxfragerr;	/* rx fragmentation errors */
2858832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxrunt;		/* rx runt frames */
2859832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxgiant;	/* rx giant frames */
2860832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxnoscb;	/* rx no scb error */
2861832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxbadproto;	/* rx invalid frames */
2862832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxbadsrcmac;	/* rx frames with Invalid Src Mac */
2863832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxbadda;	/* rx frames tossed for invalid da */
2864832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxfilter;	/* rx frames filtered out */
2865832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2866832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* receive chip error counters */
2867832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxoflo;		/* rx fifo overflow errors */
2868832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxuflo[NFIFO];	/* rx dma descriptor underflow errors */
2869832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2870832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	d11cnt_txrts_off;	/* d11cnt txrts value when reset d11cnt */
2871832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	d11cnt_rxcrc_off;	/* d11cnt rxcrc value when reset d11cnt */
2872832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	d11cnt_txnocts_off;	/* d11cnt txnocts value when reset d11cnt */
2873832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2874832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* misc counters */
2875832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	dmade;		/* tx/rx dma descriptor errors */
2876832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	dmada;		/* tx/rx dma data errors */
2877832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	dmape;		/* tx/rx dma descriptor protocol errors */
2878832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	reset;		/* reset count */
2879832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	tbtt;		/* cnts the TBTT int's */
2880832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txdmawar;
2881832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	pkt_callback_reg_fail;	/* callbacks register failure */
2882832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2883832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* MAC counters: 32-bit version of d11.h's macstat_t */
2884832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txallfrm;	/* total number of frames sent, incl. Data, ACK, RTS, CTS,
2885832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * Control Management (includes retransmissions)
2886832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 */
2887832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txrtsfrm;	/* number of RTS sent out by the MAC */
2888832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txctsfrm;	/* number of CTS sent out by the MAC */
2889832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txackfrm;	/* number of ACK frames sent out */
2890832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txdnlfrm;	/* Not used */
2891832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txbcnfrm;	/* beacons transmitted */
2892832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txfunfl[8];	/* per-fifo tx underflows */
2893832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txtplunfl;	/* Template underflows (mac was too slow to transmit ACK/CTS
2894832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * or BCN)
2895832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 */
2896832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txphyerror;	/* Transmit phy error, type of error is reported in tx-status for
2897832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * driver enqueued frames
2898832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 */
2899832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxfrmtoolong;	/* Received frame longer than legal limit (2346 bytes) */
2900832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxfrmtooshrt;	/* Received frame did not contain enough bytes for its frame type */
2901832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxinvmachdr;	/* Either the protocol version != 0 or frame type not
2902832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * data/control/management
2903832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 */
2904832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxbadfcs;	/* number of frames for which the CRC check failed in the MAC */
2905832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxbadplcp;	/* parity check of the PLCP header failed */
2906832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxcrsglitch;	/* PHY was able to correlate the preamble but not the header */
2907832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxstrt;		/* Number of received frames with a good PLCP
2908832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * (i.e. passing parity check)
2909832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 */
2910832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */
2911832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */
2912832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxcfrmucast;	/* number of received CNTRL frames with good FCS and matching RA */
2913832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxrtsucast;	/* number of unicast RTS addressed to the MAC (good FCS) */
2914832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxctsucast;	/* number of unicast CTS addressed to the MAC (good FCS) */
2915832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxackucast;	/* number of ucast ACKS received (good FCS) */
2916832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxdfrmocast;	/* number of received DATA frames (good FCS and not matching RA) */
2917832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxmfrmocast;	/* number of received MGMT frames (good FCS and not matching RA) */
2918832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxcfrmocast;	/* number of received CNTRL frame (good FCS and not matching RA) */
2919832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxrtsocast;	/* number of received RTS not addressed to the MAC */
2920832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxctsocast;	/* number of received CTS not addressed to the MAC */
2921832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxdfrmmcast;	/* number of RX Data multicast frames received by the MAC */
2922832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxmfrmmcast;	/* number of RX Management multicast frames received by the MAC */
2923832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxcfrmmcast;	/* number of RX Control multicast frames received by the MAC
2924832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * (unlikely to see these)
2925832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 */
2926832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxbeaconmbss;	/* beacons received from member of BSS */
2927832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxdfrmucastobss; /* number of unicast frames addressed to the MAC from
2928832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				  * other BSS (WDS FRAME)
2929832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				  */
2930832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxbeaconobss;	/* beacons received from other BSS */
2931832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxrsptmout;	/* Number of response timeouts for transmitted frames
2932832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * expecting a response
2933832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 */
2934832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	bcntxcancl;	/* transmit beacons canceled due to receipt of beacon (IBSS) */
2935832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxf0ovfl;	/* Number of receive fifo 0 overflows */
2936832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxf1ovfl;	/* Number of receive fifo 1 overflows (obsolete) */
2937832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxf2ovfl;	/* Number of receive fifo 2 overflows (obsolete) */
2938832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txsfovfl;	/* Number of transmit status fifo overflows (obsolete) */
2939832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	pmqovfl;	/* Number of PMQ overflows */
2940832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxcgprqfrm;	/* Number of received Probe requests that made it into
2941832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * the PRQ fifo
2942832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 */
2943832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxcgprsqovfl;	/* Rx Probe Request Que overflow in the AP */
2944832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txcgprsfail;	/* Tx Probe Response Fail. AP sent probe response but did
2945832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * not get ACK
2946832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 */
2947832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txcgprssuc;	/* Tx Probe Response Success (ACK was received) */
2948832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	prs_timeout;	/* Number of probe requests that were dropped from the PRQ
2949832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * fifo because a probe response could not be sent out within
2950832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * the time limit defined in M_PRS_MAXTIME
2951832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 */
2952832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxnack;		/* obsolete */
2953832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	frmscons;	/* obsolete */
2954832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txnack;		/* obsolete */
2955832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txglitch_nack;	/* obsolete */
2956832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txburst;	/* obsolete */
2957832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2958832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
2959832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txfrag;		/* dot11TransmittedFragmentCount */
2960832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txmulti;	/* dot11MulticastTransmittedFrameCount */
2961832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txfail;		/* dot11FailedCount */
2962832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txretry;	/* dot11RetryCount */
2963832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txretrie;	/* dot11MultipleRetryCount */
2964832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxdup;		/* dot11FrameduplicateCount */
2965832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txrts;		/* dot11RTSSuccessCount */
2966832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txnocts;	/* dot11RTSFailureCount */
2967832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txnoack;	/* dot11ACKFailureCount */
2968832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxfrag;		/* dot11ReceivedFragmentCount */
2969832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxmulti;	/* dot11MulticastReceivedFrameCount */
2970832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxcrc;		/* dot11FCSErrorCount */
2971832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txfrmsnt;	/* dot11TransmittedFrameCount (bogus MIB?) */
2972832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxundec;	/* dot11WEPUndecryptableCount */
2973832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2974832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* WPA2 counters (see rxundec for DecryptFailureCount) */
2975832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	tkipmicfaill;	/* TKIPLocalMICFailures */
2976832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	tkipcntrmsr;	/* TKIPCounterMeasuresInvoked */
2977832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	tkipreplay;	/* TKIPReplays */
2978832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	ccmpfmterr;	/* CCMPFormatErrors */
2979832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	ccmpreplay;	/* CCMPReplays */
2980832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	ccmpundec;	/* CCMPDecryptErrors */
2981832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	fourwayfail;	/* FourWayHandshakeFailures */
2982832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	wepundec;	/* dot11WEPUndecryptableCount */
2983832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	wepicverr;	/* dot11WEPICVErrorCount */
2984832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	decsuccess;	/* DecryptSuccessCount */
2985832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	tkipicverr;	/* TKIPICVErrorCount */
2986832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	wepexcluded;	/* dot11WEPExcludedCount */
2987832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2988832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txchanrej;	/* Tx frames suppressed due to channel rejection */
2989832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	psmwds;		/* Count PSM watchdogs */
2990832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	phywatchdog;	/* Count Phy watchdogs (triggered by ucode) */
2991832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
2992832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* MBSS counters, AP only */
2993832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	prq_entries_handled;	/* PRQ entries read in */
2994832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	prq_undirected_entries;	/*    which were bcast bss & ssid */
2995832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	prq_bad_entries;	/*    which could not be translated to info */
2996832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	atim_suppress_count;	/* TX suppressions on ATIM fifo */
2997832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	bcn_template_not_ready;	/* Template marked in use on send bcn ... */
2998832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */
2999832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	late_tbtt_dpc;	/* TBTT DPC did not happen in time */
3000832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3001832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* per-rate receive stat counters */
3002832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx1mbps;	/* packets rx at 1Mbps */
3003832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx2mbps;	/* packets rx at 2Mbps */
3004832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx5mbps5;	/* packets rx at 5.5Mbps */
3005832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx6mbps;	/* packets rx at 6Mbps */
3006832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx9mbps;	/* packets rx at 9Mbps */
3007832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx11mbps;	/* packets rx at 11Mbps */
3008832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx12mbps;	/* packets rx at 12Mbps */
3009832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx18mbps;	/* packets rx at 18Mbps */
3010832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx24mbps;	/* packets rx at 24Mbps */
3011832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx36mbps;	/* packets rx at 36Mbps */
3012832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx48mbps;	/* packets rx at 48Mbps */
3013832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx54mbps;	/* packets rx at 54Mbps */
3014832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx108mbps; 	/* packets rx at 108mbps */
3015832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx162mbps;	/* packets rx at 162mbps */
3016832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx216mbps;	/* packets rx at 216 mbps */
3017832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx270mbps;	/* packets rx at 270 mbps */
3018832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx324mbps;	/* packets rx at 324 mbps */
3019832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx378mbps;	/* packets rx at 378 mbps */
3020832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx432mbps;	/* packets rx at 432 mbps */
3021832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx486mbps;	/* packets rx at 486 mbps */
3022832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx540mbps;	/* packets rx at 540 mbps */
3023832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3024832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* pkteng rx frame stats */
3025832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	pktengrxducast; /* unicast frames rxed by the pkteng code */
3026832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	pktengrxdmcast; /* multicast frames rxed by the pkteng code */
3027832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3028832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rfdisable;	/* count of radio disables */
3029832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	bphy_rxcrsglitch;	/* PHY count of bphy glitches */
3030832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3031832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txexptime;	/* Tx frames suppressed due to timer expiration */
3032832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3033832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txmpdu_sgi;	/* count for sgi transmit */
3034832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxmpdu_sgi;	/* count for sgi received */
3035832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	txmpdu_stbc;	/* count for stbc transmit */
3036832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxmpdu_stbc;	/* count for stbc received */
3037832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3038832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	rxundec_mcst;	/* dot11WEPUndecryptableCount */
3039832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3040832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* WPA2 counters (see rxundec for DecryptFailureCount) */
3041832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	tkipmicfaill_mcst;	/* TKIPLocalMICFailures */
3042832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	tkipcntrmsr_mcst;	/* TKIPCounterMeasuresInvoked */
3043832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	tkipreplay_mcst;	/* TKIPReplays */
3044832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	ccmpfmterr_mcst;	/* CCMPFormatErrors */
3045832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	ccmpreplay_mcst;	/* CCMPReplays */
3046832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	ccmpundec_mcst;	/* CCMPDecryptErrors */
3047832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	fourwayfail_mcst;	/* FourWayHandshakeFailures */
3048832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	wepundec_mcst;	/* dot11WEPUndecryptableCount */
3049832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	wepicverr_mcst;	/* dot11WEPICVErrorCount */
3050832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	decsuccess_mcst;	/* DecryptSuccessCount */
3051832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	tkipicverr_mcst;	/* TKIPICVErrorCount */
3052832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	wepexcluded_mcst;	/* dot11WEPExcludedCount */
3053832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3054832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	dma_hang;	/* count for dma hang */
3055832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	reinit;		/* count for reinit */
3056832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3057832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  pstatxucast;	/* count of ucast frames xmitted on all psta assoc */
3058832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  pstatxnoassoc;	/* count of txnoassoc frames xmitted on all psta assoc */
3059832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  pstarxucast;	/* count of ucast frames received on all psta assoc */
3060832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  pstarxbcmc;	/* count of bcmc frames received on all psta */
3061832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  pstatxbcmc;	/* count of bcmc frames transmitted on all psta */
3062832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3063832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  cso_passthrough; /* hw cso required but passthrough */
3064832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_cnt_t;
3065832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
306666981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
3067832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
3068832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16  version;    /* see definition of WL_CNT_T_VERSION */
3069832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16  length;     /* length of entire structure */
3070832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3071832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* transmit stat counters */
3072832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txframe;    /* tx data frames */
3073832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txbyte;     /* tx data bytes */
3074832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txretrans;  /* tx mac retransmits */
3075832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txerror;    /* tx data errors (derived: sum of others) */
3076832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txctl;      /* tx management frames */
3077832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txprshort;  /* tx short preamble frames */
3078832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txserr;     /* tx status errors */
3079832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txnobuf;    /* tx out of buffers errors */
3080832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txnoassoc;  /* tx discard because we're not associated */
3081832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txrunt;     /* tx runt frames */
3082832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txchit;     /* tx header cache hit (fastpath) */
3083832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txcmiss;    /* tx header cache miss (slowpath) */
3084832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3085832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* transmit chip error counters */
3086832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txuflo;     /* tx fifo underflows */
3087832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txphyerr;   /* tx phy errors (indicated in tx status) */
30888ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32  txphycrs;
30898ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3090832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* receive stat counters */
3091832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxframe;    /* rx data frames */
3092832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxbyte;     /* rx data bytes */
3093832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxerror;    /* rx data errors (derived: sum of others) */
3094832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxctl;      /* rx management frames */
3095832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxnobuf;    /* rx out of buffers errors */
3096832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxnondata;  /* rx non data frames in the data channel errors */
3097832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxbadds;    /* rx bad DS errors */
3098832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxbadcm;    /* rx bad control or management frames */
3099832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxfragerr;  /* rx fragmentation errors */
3100832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxrunt;     /* rx runt frames */
3101832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxgiant;    /* rx giant frames */
3102832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxnoscb;    /* rx no scb error */
3103832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxbadproto; /* rx invalid frames */
3104832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxbadsrcmac;    /* rx frames with Invalid Src Mac */
3105832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxbadda;    /* rx frames tossed for invalid da */
3106832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxfilter;   /* rx frames filtered out */
3107832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3108832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* receive chip error counters */
3109832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxoflo;     /* rx fifo overflow errors */
3110832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxuflo[NFIFO];  /* rx dma descriptor underflow errors */
3111832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3112832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  d11cnt_txrts_off;   /* d11cnt txrts value when reset d11cnt */
3113832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  d11cnt_rxcrc_off;   /* d11cnt rxcrc value when reset d11cnt */
3114832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */
3115832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3116832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* misc counters */
3117832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  dmade;      /* tx/rx dma descriptor errors */
3118832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  dmada;      /* tx/rx dma data errors */
3119832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  dmape;      /* tx/rx dma descriptor protocol errors */
3120832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  reset;      /* reset count */
3121832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  tbtt;       /* cnts the TBTT int's */
31228ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32  txdmawar;
3123832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  pkt_callback_reg_fail;  /* callbacks register failure */
3124832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3125832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* MAC counters: 32-bit version of d11.h's macstat_t */
3126832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txallfrm;   /* total number of frames sent, incl. Data, ACK, RTS, CTS,
3127832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt			     * Control Management (includes retransmissions)
3128832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt			     */
3129832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txrtsfrm;   /* number of RTS sent out by the MAC */
3130832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txctsfrm;   /* number of CTS sent out by the MAC */
3131832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txackfrm;   /* number of ACK frames sent out */
3132832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txdnlfrm;   /* Not used */
3133832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txbcnfrm;   /* beacons transmitted */
3134832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txfunfl[8]; /* per-fifo tx underflows */
3135832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txtplunfl;  /* Template underflows (mac was too slow to transmit ACK/CTS
3136832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt			     * or BCN)
3137832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt			     */
3138832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txphyerror; /* Transmit phy error, type of error is reported in tx-status for
3139832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt			     * driver enqueued frames
3140832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt			     */
3141832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxfrmtoolong;   /* Received frame longer than legal limit (2346 bytes) */
3142832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxfrmtooshrt;   /* Received frame did not contain enough bytes for its frame type */
3143832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxinvmachdr;    /* Either the protocol version != 0 or frame type not
3144832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * data/control/management
3145832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt			   */
3146832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxbadfcs;   /* number of frames for which the CRC check failed in the MAC */
3147832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxbadplcp;  /* parity check of the PLCP header failed */
3148832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxcrsglitch;    /* PHY was able to correlate the preamble but not the header */
3149832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxstrt;     /* Number of received frames with a good PLCP
3150832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt			     * (i.e. passing parity check)
3151832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt			     */
3152832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */
3153832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */
3154832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxcfrmucast;    /* number of received CNTRL frames with good FCS and matching RA */
3155832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */
3156832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */
3157832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxackucast; /* number of ucast ACKS received (good FCS) */
3158832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxdfrmocast;    /* number of received DATA frames (good FCS and not matching RA) */
3159832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxmfrmocast;    /* number of received MGMT frames (good FCS and not matching RA) */
3160832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxcfrmocast;    /* number of received CNTRL frame (good FCS and not matching RA) */
3161832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxrtsocast; /* number of received RTS not addressed to the MAC */
3162832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxctsocast; /* number of received CTS not addressed to the MAC */
3163832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxdfrmmcast;    /* number of RX Data multicast frames received by the MAC */
3164832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxmfrmmcast;    /* number of RX Management multicast frames received by the MAC */
3165832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxcfrmmcast;    /* number of RX Control multicast frames received by the MAC
3166832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * (unlikely to see these)
3167832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 */
3168832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxbeaconmbss;   /* beacons received from member of BSS */
3169832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxdfrmucastobss; /* number of unicast frames addressed to the MAC from
3170832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				  * other BSS (WDS FRAME)
3171832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				  */
3172832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxbeaconobss;   /* beacons received from other BSS */
3173832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxrsptmout; /* Number of response timeouts for transmitted frames
3174832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt			     * expecting a response
3175832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt			     */
3176832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */
3177832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxf0ovfl;   /* Number of receive fifo 0 overflows */
3178832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxf1ovfl;   /* Number of receive fifo 1 overflows (obsolete) */
3179832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxf2ovfl;   /* Number of receive fifo 2 overflows (obsolete) */
3180832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txsfovfl;   /* Number of transmit status fifo overflows (obsolete) */
3181832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  pmqovfl;    /* Number of PMQ overflows */
3182832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxcgprqfrm; /* Number of received Probe requests that made it into
3183832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt			     * the PRQ fifo
3184832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt			     */
3185832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxcgprsqovfl;   /* Rx Probe Request Que overflow in the AP */
3186832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txcgprsfail;    /* Tx Probe Response Fail. AP sent probe response but did
3187832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * not get ACK
3188832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 */
3189832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txcgprssuc; /* Tx Probe Response Success (ACK was received) */
3190832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  prs_timeout;    /* Number of probe requests that were dropped from the PRQ
3191832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * fifo because a probe response could not be sent out within
3192832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * the time limit defined in M_PRS_MAXTIME
3193832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 */
31948ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32  rxnack;
31958ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32  frmscons;
31968ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32  txnack;
3197832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txglitch_nack;  /* obsolete */
3198832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txburst;    /* obsolete */
3199832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3200832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */
3201832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txfrag;     /* dot11TransmittedFragmentCount */
3202832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txmulti;    /* dot11MulticastTransmittedFrameCount */
3203832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txfail;     /* dot11FailedCount */
3204832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txretry;    /* dot11RetryCount */
3205832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txretrie;   /* dot11MultipleRetryCount */
3206832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxdup;      /* dot11FrameduplicateCount */
3207832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txrts;      /* dot11RTSSuccessCount */
3208832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txnocts;    /* dot11RTSFailureCount */
3209832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txnoack;    /* dot11ACKFailureCount */
3210832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxfrag;     /* dot11ReceivedFragmentCount */
3211832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxmulti;    /* dot11MulticastReceivedFrameCount */
3212832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxcrc;      /* dot11FCSErrorCount */
3213832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txfrmsnt;   /* dot11TransmittedFrameCount (bogus MIB?) */
3214832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxundec;    /* dot11WEPUndecryptableCount */
3215832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3216832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* WPA2 counters (see rxundec for DecryptFailureCount) */
3217832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  tkipmicfaill;   /* TKIPLocalMICFailures */
3218832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  tkipcntrmsr;    /* TKIPCounterMeasuresInvoked */
3219832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  tkipreplay; /* TKIPReplays */
3220832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  ccmpfmterr; /* CCMPFormatErrors */
3221832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  ccmpreplay; /* CCMPReplays */
3222832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  ccmpundec;  /* CCMPDecryptErrors */
3223832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  fourwayfail;    /* FourWayHandshakeFailures */
3224832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  wepundec;   /* dot11WEPUndecryptableCount */
3225832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  wepicverr;  /* dot11WEPICVErrorCount */
3226832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  decsuccess; /* DecryptSuccessCount */
3227832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  tkipicverr; /* TKIPICVErrorCount */
3228832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  wepexcluded;    /* dot11WEPExcludedCount */
3229832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3230832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxundec_mcst;   /* dot11WEPUndecryptableCount */
3231832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3232832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* WPA2 counters (see rxundec for DecryptFailureCount) */
3233832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  tkipmicfaill_mcst;  /* TKIPLocalMICFailures */
3234832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  tkipcntrmsr_mcst;   /* TKIPCounterMeasuresInvoked */
3235832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  tkipreplay_mcst;    /* TKIPReplays */
3236832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  ccmpfmterr_mcst;    /* CCMPFormatErrors */
3237832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  ccmpreplay_mcst;    /* CCMPReplays */
3238832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  ccmpundec_mcst; /* CCMPDecryptErrors */
3239832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  fourwayfail_mcst;   /* FourWayHandshakeFailures */
3240832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  wepundec_mcst;  /* dot11WEPUndecryptableCount */
3241832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  wepicverr_mcst; /* dot11WEPICVErrorCount */
3242832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  decsuccess_mcst;    /* DecryptSuccessCount */
3243832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  tkipicverr_mcst;    /* TKIPICVErrorCount */
3244832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  wepexcluded_mcst;   /* dot11WEPExcludedCount */
3245832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3246832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txchanrej;  /* Tx frames suppressed due to channel rejection */
3247832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txexptime;  /* Tx frames suppressed due to timer expiration */
3248832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  psmwds;     /* Count PSM watchdogs */
3249832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  phywatchdog;    /* Count Phy watchdogs (triggered by ucode) */
3250832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3251832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* MBSS counters, AP only */
3252832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  prq_entries_handled;    /* PRQ entries read in */
3253832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  prq_undirected_entries; /*    which were bcast bss & ssid */
3254832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  prq_bad_entries;    /*    which could not be translated to info */
3255832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  atim_suppress_count;    /* TX suppressions on ATIM fifo */
3256832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  bcn_template_not_ready; /* Template marked in use on send bcn ... */
3257832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */
3258832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  late_tbtt_dpc;  /* TBTT DPC did not happen in time */
3259832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3260832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* per-rate receive stat counters */
3261832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx1mbps;    /* packets rx at 1Mbps */
3262832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx2mbps;    /* packets rx at 2Mbps */
3263832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx5mbps5;   /* packets rx at 5.5Mbps */
3264832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx6mbps;    /* packets rx at 6Mbps */
3265832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx9mbps;    /* packets rx at 9Mbps */
3266832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx11mbps;   /* packets rx at 11Mbps */
3267832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx12mbps;   /* packets rx at 12Mbps */
3268832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx18mbps;   /* packets rx at 18Mbps */
3269832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx24mbps;   /* packets rx at 24Mbps */
3270832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx36mbps;   /* packets rx at 36Mbps */
3271832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx48mbps;   /* packets rx at 48Mbps */
3272832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx54mbps;   /* packets rx at 54Mbps */
3273832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx108mbps;  /* packets rx at 108mbps */
3274832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx162mbps;  /* packets rx at 162mbps */
3275832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx216mbps;  /* packets rx at 216 mbps */
3276832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx270mbps;  /* packets rx at 270 mbps */
3277832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx324mbps;  /* packets rx at 324 mbps */
3278832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx378mbps;  /* packets rx at 378 mbps */
3279832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx432mbps;  /* packets rx at 432 mbps */
3280832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx486mbps;  /* packets rx at 486 mbps */
3281832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx540mbps;  /* packets rx at 540 mbps */
3282832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3283832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* pkteng rx frame stats */
3284832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  pktengrxducast; /* unicast frames rxed by the pkteng code */
3285832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  pktengrxdmcast; /* multicast frames rxed by the pkteng code */
3286832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3287832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rfdisable;  /* count of radio disables */
3288832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  bphy_rxcrsglitch;   /* PHY count of bphy glitches */
3289832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3290832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txmpdu_sgi; /* count for sgi transmit */
3291832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxmpdu_sgi; /* count for sgi received */
3292832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  txmpdu_stbc;    /* count for stbc transmit */
3293832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rxmpdu_stbc;    /* count for stbc received */
3294832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_cnt_ver_six_t;
3295832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3296832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_DELTA_STATS_T_VERSION	1	/* current version of wl_delta_stats_t struct */
32978ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3298832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
3299832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 version;     /* see definition of WL_DELTA_STATS_T_VERSION */
3300832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 length;      /* length of entire structure */
3301832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3302832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* transmit stat counters */
3303832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 txframe;     /* tx data frames */
3304832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 txbyte;      /* tx data bytes */
3305832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 txretrans;   /* tx mac retransmits */
3306832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 txfail;      /* tx failures */
3307832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3308832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* receive stat counters */
3309832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 rxframe;     /* rx data frames */
3310832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 rxbyte;      /* rx data bytes */
3311832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3312832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* per-rate receive stat counters */
3313832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx1mbps;	/* packets rx at 1Mbps */
3314832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx2mbps;	/* packets rx at 2Mbps */
3315832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx5mbps5;	/* packets rx at 5.5Mbps */
3316832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx6mbps;	/* packets rx at 6Mbps */
3317832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx9mbps;	/* packets rx at 9Mbps */
3318832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx11mbps;	/* packets rx at 11Mbps */
3319832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx12mbps;	/* packets rx at 12Mbps */
3320832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx18mbps;	/* packets rx at 18Mbps */
3321832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx24mbps;	/* packets rx at 24Mbps */
3322832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx36mbps;	/* packets rx at 36Mbps */
3323832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx48mbps;	/* packets rx at 48Mbps */
3324832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx54mbps;	/* packets rx at 54Mbps */
3325832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx108mbps; 	/* packets rx at 108mbps */
3326832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx162mbps;	/* packets rx at 162mbps */
3327832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx216mbps;	/* packets rx at 216 mbps */
3328832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx270mbps;	/* packets rx at 270 mbps */
3329832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx324mbps;	/* packets rx at 324 mbps */
3330832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx378mbps;	/* packets rx at 378 mbps */
3331832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx432mbps;	/* packets rx at 432 mbps */
3332832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx486mbps;	/* packets rx at 486 mbps */
3333832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  rx540mbps;	/* packets rx at 540 mbps */
3334832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_delta_stats_t;
3335832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
3336832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3337832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_WME_CNT_VERSION	1	/* current version of wl_wme_cnt_t */
33388ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
33398ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
33408ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 packets;
33418ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 bytes;
33428ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_traffic_stats_t;
33438ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
33448ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
3345832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	version;	/* see definition of WL_WME_CNT_VERSION */
3346832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	length;		/* length of entire structure */
33478ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3348832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wl_traffic_stats_t tx[AC_COUNT];	/* Packets transmitted */
3349832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wl_traffic_stats_t tx_failed[AC_COUNT];	/* Packets dropped or failed to transmit */
3350832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wl_traffic_stats_t rx[AC_COUNT];	/* Packets received */
3351832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wl_traffic_stats_t rx_failed[AC_COUNT];	/* Packets failed to receive */
33528ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3353832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wl_traffic_stats_t forward[AC_COUNT];	/* Packets forwarded by AP */
33548ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3355832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wl_traffic_stats_t tx_expired[AC_COUNT];	/* packets dropped due to lifetime expiry */
33568ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
33578ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_wme_cnt_t;
33588ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
335966981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
33608ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidtstruct wl_msglevel2 {
33618ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 low;
33628ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 high;
33638ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt};
33648ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
33658ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_mkeep_alive_pkt {
3366832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	version; /* Version for mkeep_alive */
3367832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	length; /* length of fixed parameters in the structure */
33688ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32	period_msec;
33698ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16	len_bytes;
3370832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8	keep_alive_id; /* 0 - 3 for N = 4 */
33718ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8	data[1];
33728ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_mkeep_alive_pkt_t;
33738ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
33748ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_MKEEP_ALIVE_VERSION		1
33758ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_MKEEP_ALIVE_FIXED_LEN	OFFSETOF(wl_mkeep_alive_pkt_t, data)
33768ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_MKEEP_ALIVE_PRECISION	500
33778ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3378832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#ifdef WLBA
3379832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3380832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_BA_CNT_VERSION  1   /* current version of wlc_ba_cnt_t */
3381832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3382832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* block ack related stats */
3383832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wlc_ba_cnt {
3384832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16  version;    /* WLC_BA_CNT_VERSION */
3385832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16  length;     /* length of entire structure */
3386832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3387832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* transmit stat counters */
3388832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 txpdu;       /* pdus sent */
3389832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 txsdu;       /* sdus sent */
3390832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 txfc;        /* tx side flow controlled packets */
3391832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 txfci;       /* tx side flow control initiated */
3392832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 txretrans;   /* retransmitted pdus */
3393832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 txbatimer;   /* ba resend due to timer */
3394832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 txdrop;      /* dropped packets */
3395832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 txaddbareq;  /* addba req sent */
3396832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 txaddbaresp; /* addba resp sent */
3397832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 txdelba;     /* delba sent */
3398832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 txba;        /* ba sent */
3399832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 txbar;       /* bar sent */
3400832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 txpad[4];    /* future */
3401832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3402832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* receive side counters */
3403832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 rxpdu;       /* pdus recd */
3404832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 rxqed;       /* pdus buffered before sending up */
3405832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 rxdup;       /* duplicate pdus */
3406832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 rxnobuf;     /* pdus discarded due to no buf */
3407832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 rxaddbareq;  /* addba req recd */
3408832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 rxaddbaresp; /* addba resp recd */
3409832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 rxdelba;     /* delba recd */
3410832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 rxba;        /* ba recd */
3411832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 rxbar;       /* bar recd */
3412832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 rxinvba;     /* invalid ba recd */
3413832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 rxbaholes;   /* ba recd with holes */
3414832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 rxunexp;     /* unexpected packets */
3415832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 rxpad[4];    /* future */
3416832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wlc_ba_cnt_t;
3417832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#endif /* WLBA */
3418832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3419832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* structure for per-tid ampdu control */
3420832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidtstruct ampdu_tid_control {
3421832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 tid;			/* tid */
3422832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 enable;			/* enable/disable */
3423832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt};
34248ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3425832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* structure for identifying ea/tid for sending addba/delba */
3426832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidtstruct ampdu_ea_tid {
3427832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr ea;		/* Station address */
3428832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 tid;			/* tid */
3429832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt};
3430832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* structure for identifying retry/tid for retry_limit_tid/rr_retry_limit_tid */
3431832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidtstruct ampdu_retry_tid {
3432832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 tid;	/* tid */
3433832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 retry;	/* retry value */
3434832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt};
34358ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3436832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Different discovery modes for dpt */
3437832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	DPT_DISCOVERY_MANUAL	0x01	/* manual discovery mode */
3438832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	DPT_DISCOVERY_AUTO	0x02	/* auto discovery mode */
3439832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	DPT_DISCOVERY_SCAN	0x04	/* scan-based discovery mode */
3440832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3441832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* different path selection values */
3442832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define DPT_PATHSEL_AUTO	0	/* auto mode for path selection */
3443832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define DPT_PATHSEL_DIRECT	1	/* always use direct DPT path */
3444832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define DPT_PATHSEL_APPATH	2	/* always use AP path */
3445832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3446832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* different ops for deny list */
3447832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define DPT_DENY_LIST_ADD 	1	/* add to dpt deny list */
3448832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define DPT_DENY_LIST_REMOVE 	2	/* remove from dpt deny list */
3449832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3450832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* different ops for manual end point */
3451832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define DPT_MANUAL_EP_CREATE	1	/* create manual dpt endpoint */
3452832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define DPT_MANUAL_EP_MODIFY	2	/* modify manual dpt endpoint */
3453832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define DPT_MANUAL_EP_DELETE	3	/* delete manual dpt endpoint */
3454832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3455832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* structure for dpt iovars */
3456832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct dpt_iovar {
3457832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr ea;		/* Station address */
3458832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 mode;			/* mode: depends on iovar */
3459832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 pad;			/* future */
3460832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} dpt_iovar_t;
3461832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3462832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* flags to indicate DPT status */
3463832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	DPT_STATUS_ACTIVE	0x01	/* link active (though may be suspended) */
3464832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	DPT_STATUS_AES		0x02	/* link secured through AES encryption */
3465832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	DPT_STATUS_FAILED	0x04	/* DPT link failed */
3466832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3467832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	DPT_FNAME_LEN		48	/* Max length of friendly name */
3468832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3469832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct dpt_status {
3470832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 status;			/* flags to indicate status */
3471832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 fnlen;			/* length of friendly name */
3472832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uchar name[DPT_FNAME_LEN];	/* friendly name */
3473832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 rssi;			/* RSSI of the link */
3474832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	sta_info_t sta;			/* sta info */
3475832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} dpt_status_t;
3476832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3477832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* structure for dpt list */
3478832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct dpt_list {
3479832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 num;			/* number of entries in struct */
3480832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	dpt_status_t status[1];		/* per station info */
3481832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} dpt_list_t;
3482832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3483832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* structure for dpt friendly name */
3484832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct dpt_fname {
3485832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 len;			/* length of friendly name */
3486832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uchar name[DPT_FNAME_LEN];	/* friendly name */
3487832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} dpt_fname_t;
3488832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3489832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define BDD_FNAME_LEN       32  /* Max length of friendly name */
3490832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct bdd_fname {
3491832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 len;          /* length of friendly name */
3492832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uchar name[BDD_FNAME_LEN];  /* friendly name */
3493832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} bdd_fname_t;
3494832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3495832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* structure for addts arguments */
3496832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* For ioctls that take a list of TSPEC */
3497832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidtstruct tslist {
3498832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int count;			/* number of tspecs */
3499832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct tsinfo_arg tsinfo[1];	/* variable length array of tsinfo */
3500832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt};
35018ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3502832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#ifdef WLTDLS
3503832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* different ops for manual end point */
3504832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TDLS_MANUAL_EP_CREATE	1	/* create manual dpt endpoint */
3505832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TDLS_MANUAL_EP_MODIFY	2	/* modify manual dpt endpoint */
3506832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TDLS_MANUAL_EP_DELETE	3	/* delete manual dpt endpoint */
3507832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TDLS_MANUAL_EP_PM		4	/*  put dpt endpoint in PM mode */
3508832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TDLS_MANUAL_EP_WAKE		5	/* wake up dpt endpoint from PM */
3509832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TDLS_MANUAL_EP_DISCOVERY	6	/* discover if endpoint is TDLS capable */
3510832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TDLS_MANUAL_EP_CHSW		7	/* channel switch */
3511832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3512832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* structure for tdls iovars */
3513832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct tdls_iovar {
3514832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr ea;		/* Station address */
3515832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 mode;			/* mode: depends on iovar */
3516832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t chanspec;
3517832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 pad;			/* future */
3518832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} tdls_iovar_t;
35194a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
35204a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt/* modes */
35214a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define TDLS_WFD_IE_TX 0
35224a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define TDLS_WFD_IE_RX 1
35234a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define TDLS_WFD_IE_SIZE 255
35244a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt/* structure for tdls wfd ie */
35254a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidttypedef struct tdls_wfd_ie_iovar {
35264a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	struct ether_addr ea;		/* Station address */
35274a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint8 mode;
35284a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint8 length;
35294a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint8 data[TDLS_WFD_IE_SIZE];
35304a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt} tdls_wfd_ie_iovar_t;
3531832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#endif /* WLTDLS */
3532832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3533832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* structure for addts/delts arguments */
3534832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct tspec_arg {
3535832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 version;			/* see definition of TSPEC_ARG_VERSION */
3536832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 length;			/* length of entire structure */
3537832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint flag;			/* bit field */
3538832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* TSPEC Arguments */
3539832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct tsinfo_arg tsinfo;	/* TS Info bit field */
3540832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 nom_msdu_size;		/* (Nominal or fixed) MSDU Size (bytes) */
3541832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 max_msdu_size;		/* Maximum MSDU Size (bytes) */
3542832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint min_srv_interval;		/* Minimum Service Interval (us) */
3543832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint max_srv_interval;		/* Maximum Service Interval (us) */
3544832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint inactivity_interval;	/* Inactivity Interval (us) */
3545832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint suspension_interval;	/* Suspension Interval (us) */
3546832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint srv_start_time;		/* Service Start Time (us) */
3547832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint min_data_rate;		/* Minimum Data Rate (bps) */
3548832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint mean_data_rate;		/* Mean Data Rate (bps) */
3549832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint peak_data_rate;		/* Peak Data Rate (bps) */
3550832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint max_burst_size;		/* Maximum Burst Size (bytes) */
3551832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint delay_bound;		/* Delay Bound (us) */
3552832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint min_phy_rate;		/* Minimum PHY Rate (bps) */
3553832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 surplus_bw;		/* Surplus Bandwidth Allowance (range 1.0 to 8.0) */
3554832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 medium_time;		/* Medium Time (32 us/s periods) */
3555832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 dialog_token;		/* dialog token */
3556832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} tspec_arg_t;
3557832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3558832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* tspec arg for desired station */
3559832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef	struct tspec_per_sta_arg {
3560832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr ea;
3561832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct tspec_arg ts;
3562832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} tspec_per_sta_arg_t;
3563832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3564832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* structure for max bandwidth for each access category */
3565832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef	struct wme_max_bandwidth {
3566832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	ac[AC_COUNT];	/* max bandwidth for each access category */
3567832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wme_max_bandwidth_t;
3568832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3569832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_WME_MBW_PARAMS_IO_BYTES (sizeof(wme_max_bandwidth_t))
3570832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3571832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* current version of wl_tspec_arg_t struct */
3572832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	TSPEC_ARG_VERSION		2	/* current version of wl_tspec_arg_t struct */
3573832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TSPEC_ARG_LENGTH		55	/* argument length from tsinfo to medium_time */
3574832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TSPEC_DEFAULT_DIALOG_TOKEN	42	/* default dialog token */
3575832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TSPEC_DEFAULT_SBW_FACTOR	0x3000	/* default surplus bw */
3576832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3577832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
35784a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_WOWL_KEEPALIVE_MAX_PACKET_SIZE  80
35794a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WLC_WOWL_MAX_KEEPALIVE	2
35804a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
3581832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* define for flag */
3582832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TSPEC_PENDING		0	/* TSPEC pending */
3583832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TSPEC_ACCEPTED		1	/* TSPEC accepted */
3584832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TSPEC_REJECTED		2	/* TSPEC rejected */
3585832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TSPEC_UNKNOWN		3	/* TSPEC unknown */
3586832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TSPEC_STATUS_MASK	7	/* TSPEC status mask */
3587832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3588832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3589832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Software feature flag defines used by wlfeatureflag */
3590832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#ifdef WLAFTERBURNER
3591832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_SWFL_ABBFL       0x0001 /* Allow Afterburner on systems w/o hardware BFL */
3592832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_SWFL_ABENCORE    0x0002 /* Allow AB on non-4318E chips */
3593832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#endif /* WLAFTERBURNER */
3594832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_SWFL_NOHWRADIO	0x0004
3595832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_SWFL_FLOWCONTROL     0x0008 /* Enable backpressure to OS stack */
3596832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_SWFL_WLBSSSORT	0x0010 /* Per-port supports sorting of BSS */
3597832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3598832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_LIFETIME_MAX 0xFFFF /* Max value in ms */
3599832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3600832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Packet lifetime configuration per ac */
3601832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wl_lifetime {
3602832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 ac;	        /* access class */
3603832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 lifetime;    /* Packet lifetime value in ms */
3604832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_lifetime_t;
3605832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3606832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Channel Switch Announcement param */
3607832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wl_chan_switch {
3608832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 mode;		/* value 0 or 1 */
3609832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 count;		/* count # of beacons before switching */
3610832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t chspec;	/* chanspec */
3611832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 reg;		/* regulatory class */
3612832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_chan_switch_t;
3613832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
3614832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Roaming trigger definitions for WLC_SET_ROAM_TRIGGER.
3615832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *
3616832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * (-100 < value < 0)   value is used directly as a roaming trigger in dBm
3617832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * (0 <= value) value specifies a logical roaming trigger level from
3618832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *                      the list below
3619832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *
3620832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * WLC_GET_ROAM_TRIGGER always returns roaming trigger value in dBm, never
3621832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * the logical roam trigger value.
3622832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
3623832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_ROAM_TRIGGER_DEFAULT	0 /* default roaming trigger */
3624832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_ROAM_TRIGGER_BANDWIDTH	1 /* optimize for bandwidth roaming trigger */
3625832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_ROAM_TRIGGER_DISTANCE	2 /* optimize for distance roaming trigger */
3626832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_ROAM_TRIGGER_AUTO		3 /* auto-detect environment */
3627832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_ROAM_TRIGGER_MAX_VALUE	3 /* max. valid value */
36288ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
36294a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WLC_ROAM_NEVER_ROAM_TRIGGER	(-100) /* Avoid Roaming by setting a large value */
36304a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
3631832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Preferred Network Offload (PNO, formerly PFN) defines */
3632832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WPA_AUTH_PFN_ANY	0xffffffff	/* for PFN, match only ssid */
36338ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
36348ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidtenum {
36358ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	PFN_LIST_ORDER,
36368ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	PFN_RSSI
36378ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt};
36388ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
36398ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidtenum {
36408ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	DISABLE,
36418ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	ENABLE
36428ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt};
36438ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
36448ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidtenum {
36458ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	OFF_ADAPT,
36468ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SMART_ADAPT,
36478ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	STRICT_ADAPT,
36488ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SLOW_ADAPT
36498ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt};
36508ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
36518ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define SORT_CRITERIA_BIT		0
36528ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define AUTO_NET_SWITCH_BIT		1
3653832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ENABLE_BKGRD_SCAN_BIT		2
36548ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define IMMEDIATE_SCAN_BIT		3
36558ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define	AUTO_CONNECT_BIT		4
36568ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define	ENABLE_BD_SCAN_BIT		5
3657832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ENABLE_ADAPTSCAN_BIT		6
36588ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define IMMEDIATE_EVENT_BIT		8
36597e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt#define SUPPRESS_SSID_BIT		9
36607e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt#define ENABLE_NET_OFFLOAD_BIT		10
36618ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
36628ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define SORT_CRITERIA_MASK		0x0001
36638ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define AUTO_NET_SWITCH_MASK	0x0002
36648ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define ENABLE_BKGRD_SCAN_MASK	0x0004
36658ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define IMMEDIATE_SCAN_MASK		0x0008
36668ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define	AUTO_CONNECT_MASK		0x0010
3667832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
36688ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define ENABLE_BD_SCAN_MASK		0x0020
36698ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define ENABLE_ADAPTSCAN_MASK	0x00c0
36708ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define IMMEDIATE_EVENT_MASK	0x0100
36717e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt#define SUPPRESS_SSID_MASK	0x0200
36727e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt#define ENABLE_NET_OFFLOAD_MASK	0x0400
36738ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
36748ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define PFN_VERSION				2
36758ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define PFN_SCANRESULT_VERSION	1
36768ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define MAX_PFN_LIST_COUNT	16
36778ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
36788ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define PFN_COMPLETE			1
36798ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define PFN_INCOMPLETE			0
36808ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
36818ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define DEFAULT_BESTN			2
36828ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define DEFAULT_MSCAN			0
36838ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define DEFAULT_REPEAT			10
36848ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define DEFAULT_EXP				2
36858ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3686832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* PFN network info structure */
36878ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_pfn_subnet_info {
36888ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	struct ether_addr BSSID;
3689832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8	channel; /* channel number only */
36908ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8	SSID_len;
36918ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8	SSID[32];
36928ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_pfn_subnet_info_t;
36938ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
36948ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_pfn_net_info {
36958ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	wl_pfn_subnet_info_t pfnsubnet;
3696832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int16	RSSI; /* receive signal strength (in dBm) */
3697832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	timestamp; /* age in seconds */
36988ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_pfn_net_info_t;
36998ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
37008ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_pfn_scanresults {
37018ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 version;
37028ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 status;
37038ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 count;
37048ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	wl_pfn_net_info_t netinfo[1];
37058ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_pfn_scanresults_t;
37068ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3707832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* PFN data structure */
37088ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_pfn_param {
3709832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 version;			/* PNO parameters version */
3710832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 scan_freq;		/* Scan frequency */
3711832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 lost_network_timeout;	/* Timeout in sec. to declare
3712832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * discovered network as lost
3713832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 */
3714832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int16 flags;			/* Bit field to control features
3715832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * of PFN such as sort criteria auto
3716832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * enable switch and background scan
3717832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 */
3718832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int16 rssi_margin;		/* Margin to avoid jitter for choosing a
3719832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * PFN based on RSSI sort criteria
3720832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 */
3721832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 bestn; /* number of best networks in each scan */
3722832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 mscan; /* number of scans recorded */
3723832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 repeat; /* Minimum number of scan intervals
3724832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				     *before scan frequency changes in adaptive scan
3725832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				     */
3726832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 exp; /* Exponent of 2 for maximum scan interval */
3727832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 slow_freq; /* slow scan period */
37288ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_pfn_param_t;
37298ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
37308ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_pfn_bssid {
37318ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	struct ether_addr 	macaddr;
3732832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* Bit4: suppress_lost, Bit3: suppress_found */
37338ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16				flags;
37348ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_pfn_bssid_t;
37358ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_PFN_SUPPRESSFOUND_MASK	0x08
37368ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_PFN_SUPPRESSLOST_MASK	0x10
37378ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
37388ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_pfn_cfg {
37398ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32				reporttype;
37408ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int32				channel_num;
37418ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16				channel_list[WL_NUMCHANNELS];
37428ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_pfn_cfg_t;
37438ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_PFN_REPORT_ALLNET 	0
37448ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_PFN_REPORT_SSIDNET 	1
37458ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_PFN_REPORT_BSSIDNET 	2
37468ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
37478ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_pfn {
3748832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wlc_ssid_t		ssid;			/* ssid name and its length */
3749832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32			flags;			/* bit2: hidden */
3750832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32			infra;			/* BSS Vs IBSS */
3751832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32			auth;			/* Open Vs Closed */
3752832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32			wpa_auth;		/* WPA type */
3753832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32			wsec;			/* wsec value */
37548ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_pfn_t;
37558ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_PFN_HIDDEN_BIT		2
3756832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define PNO_SCAN_MAX_FW		508*1000	/* max time scan time in msec */
3757832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define PNO_SCAN_MAX_FW_SEC	PNO_SCAN_MAX_FW/1000 /* max time scan time in SEC */
3758832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define PNO_SCAN_MIN_FW_SEC	10			/* min time scan time in SEC */
37598ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_PFN_HIDDEN_MASK		0x4
37608ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
376166981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
376266981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
3763832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* TCP Checksum Offload defines */
3764832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TOE_TX_CSUM_OL		0x00000001
3765832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TOE_RX_CSUM_OL		0x00000002
37668ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
376766981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
3768832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* TCP Checksum Offload error injection for testing */
3769832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TOE_ERRTEST_TX_CSUM	0x00000001
3770832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TOE_ERRTEST_RX_CSUM	0x00000002
3771832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define TOE_ERRTEST_RX_CSUM2	0x00000004
37728ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
37738ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidtstruct toe_ol_stats_t {
3774832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* Num of tx packets that don't need to be checksummed */
37758ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 tx_summed;
37768ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3777832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* Num of tx packets where checksum is filled by offload engine */
37788ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 tx_iph_fill;
37798ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 tx_tcp_fill;
37808ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 tx_udp_fill;
37818ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 tx_icmp_fill;
37828ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3783832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/*  Num of rx packets where toe finds out if checksum is good or bad */
37848ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 rx_iph_good;
37858ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 rx_iph_bad;
37868ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 rx_tcp_good;
37878ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 rx_tcp_bad;
37888ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 rx_udp_good;
37898ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 rx_udp_bad;
37908ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 rx_icmp_good;
37918ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 rx_icmp_bad;
37928ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3793832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* Num of tx packets in which csum error is injected */
37948ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 tx_tcp_errinj;
37958ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 tx_udp_errinj;
37968ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 tx_icmp_errinj;
37978ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3798832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* Num of rx packets in which csum error is injected */
37998ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 rx_tcp_errinj;
38008ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 rx_udp_errinj;
38018ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 rx_icmp_errinj;
38028ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt};
38038ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3804832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* ARP Offload feature flags for arp_ol iovar */
3805832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ARP_OL_AGENT		0x00000001
3806832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ARP_OL_SNOOP		0x00000002
3807832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ARP_OL_HOST_AUTO_REPLY	0x00000004
3808832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ARP_OL_PEER_AUTO_REPLY	0x00000008
38098ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3810832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* ARP Offload error injection */
3811832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ARP_ERRTEST_REPLY_PEER	0x1
3812832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ARP_ERRTEST_REPLY_HOST	0x2
38138ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3814832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ARP_MULTIHOMING_MAX	8	/* Maximum local host IP addresses */
3815832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ND_MULTIHOMING_MAX 8	/* Maximum local host IP addresses */
38168ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3817832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Arp offload statistic counts */
38188ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidtstruct arp_ol_stats_t {
3819832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  host_ip_entries;	/* Host IP table addresses (more than one if multihomed) */
3820832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  host_ip_overflow;	/* Host IP table additions skipped due to overflow */
38218ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3822832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  arp_table_entries;	/* ARP table entries */
3823832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  arp_table_overflow;	/* ARP table additions skipped due to overflow */
38248ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3825832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  host_request;		/* ARP requests from host */
3826832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  host_reply;		/* ARP replies from host */
3827832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  host_service;		/* ARP requests from host serviced by ARP Agent */
38288ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3829832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  peer_request;		/* ARP requests received from network */
3830832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  peer_request_drop;	/* ARP requests from network that were dropped */
3831832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  peer_reply;		/* ARP replies received from network */
3832832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  peer_reply_drop;	/* ARP replies from network that were dropped */
3833832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  peer_service;		/* ARP request from host serviced by ARP Agent */
38348ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt};
38358ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3836832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* NS offload statistic counts */
3837832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidtstruct nd_ol_stats_t {
3838832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  host_ip_entries;    /* Host IP table addresses (more than one if multihomed) */
3839832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  host_ip_overflow;   /* Host IP table additions skipped due to overflow */
3840832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  peer_request;       /* NS requests received from network */
3841832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  peer_request_drop;  /* NS requests from network that were dropped */
3842832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  peer_reply_drop;    /* NA replies from network that were dropped */
3843832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32  peer_service;       /* NS request from host serviced by firmware */
3844832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt};
38458ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3846832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/*
3847832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * Keep-alive packet offloading.
3848832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
38498ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3850832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* NAT keep-alive packets format: specifies the re-transmission period, the packet
3851832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * length, and packet contents.
3852832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
38538ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_keep_alive_pkt {
3854832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	period_msec;	/* Retransmission period (0 to disable packet re-transmits) */
3855832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	len_bytes;	/* Size of packet to transmit (0 to disable packet re-transmits) */
3856832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8	data[1];	/* Variable length packet to transmit.  Contents should include
3857832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * entire ethernet packet (enet header, IP header, UDP header,
3858832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * and UDP payload) in network byte order.
3859832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 */
38608ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_keep_alive_pkt_t;
38618ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3862832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_KEEP_ALIVE_FIXED_LEN		OFFSETOF(wl_keep_alive_pkt_t, data)
38638ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3864832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/*
3865832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * Dongle pattern matching filter.
3866832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
38678ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3868832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Packet filter types. Currently, only pattern matching is supported. */
38698ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef enum wl_pkt_filter_type {
3870832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	WL_PKT_FILTER_TYPE_PATTERN_MATCH	/* Pattern matching filter */
38718ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_pkt_filter_type_t;
38728ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
38738ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_PKT_FILTER_TYPE wl_pkt_filter_type_t
38748ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3875832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Pattern matching filter. Specifies an offset within received packets to
3876832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * start matching, the pattern to match, the size of the pattern, and a bitmask
3877832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * that indicates which bits within the pattern should be matched.
3878832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
38798ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_pkt_filter_pattern {
3880832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	offset;		/* Offset within received packet to start pattern matching.
3881832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 * Offset '0' is the first byte of the ethernet header.
3882832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				 */
3883832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	size_bytes;	/* Size of the pattern.  Bitmask must be the same size. */
3884832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8   mask_and_pattern[1]; /* Variable length mask and pattern data.  mask starts
3885832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				      * at offset 0.  Pattern immediately follows mask.
3886832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt				      */
38878ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_pkt_filter_pattern_t;
38888ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3889832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* IOVAR "pkt_filter_add" parameter. Used to install packet filters. */
38908ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_pkt_filter {
3891832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	id;		/* Unique filter id, specified by app. */
3892832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	type;		/* Filter type (WL_PKT_FILTER_TYPE_xxx). */
3893832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	negate_match;	/* Negate the result of filter matches */
3894832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	union {			/* Filter definitions */
3895832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt		wl_pkt_filter_pattern_t pattern;	/* Pattern matching filter */
38968ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	} u;
38978ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_pkt_filter_t;
38988ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3899832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PKT_FILTER_FIXED_LEN		  OFFSETOF(wl_pkt_filter_t, u)
3900832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PKT_FILTER_PATTERN_FIXED_LEN	  OFFSETOF(wl_pkt_filter_pattern_t, mask_and_pattern)
39018ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3902832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* IOVAR "pkt_filter_enable" parameter. */
39038ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_pkt_filter_enable {
3904832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	id;		/* Unique filter id */
3905832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	enable;		/* Enable/disable bool */
39068ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_pkt_filter_enable_t;
39078ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3908832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* IOVAR "pkt_filter_list" parameter. Used to retrieve a list of installed filters. */
39098ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_pkt_filter_list {
3910832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	num;		/* Number of installed packet filters */
3911832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wl_pkt_filter_t	filter[1];	/* Variable array of packet filters. */
39128ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_pkt_filter_list_t;
39138ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3914832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PKT_FILTER_LIST_FIXED_LEN	  OFFSETOF(wl_pkt_filter_list_t, filter)
39158ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3916832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* IOVAR "pkt_filter_stats" parameter. Used to retrieve debug statistics. */
39178ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_pkt_filter_stats {
3918832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	num_pkts_matched;	/* # filter matches for specified filter id */
3919832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	num_pkts_forwarded;	/* # packets fwded from dongle to host for all filters */
3920832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32	num_pkts_discarded;	/* # packets discarded by dongle for all filters */
39218ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_pkt_filter_stats_t;
39228ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3923832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Sequential Commands ioctl */
39248ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_seq_cmd_ioctl {
3925832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 cmd;		/* common ioctl definition */
3926832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 len;		/* length of user buffer */
39278ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_seq_cmd_ioctl_t;
39288ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3929832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_SEQ_CMD_ALIGN_BYTES	4
39308ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3931832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* These are the set of get IOCTLs that should be allowed when using
3932832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * IOCTL sequence commands. These are issued implicitly by wl.exe each time
3933832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * it is invoked. We never want to buffer these, or else wl.exe will stop working.
3934832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
39358ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_SEQ_CMDS_GET_IOCTL_FILTER(cmd) \
3936832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	(((cmd) == WLC_GET_MAGIC)		|| \
3937832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	 ((cmd) == WLC_GET_VERSION)		|| \
3938832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	 ((cmd) == WLC_GET_AP)			|| \
39398ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	 ((cmd) == WLC_GET_INSTANCE))
39408ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3941832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/*
3942832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * Packet engine interface
3943832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
39448ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3945832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PKTENG_PER_TX_START			0x01
3946832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PKTENG_PER_TX_STOP			0x02
3947832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PKTENG_PER_RX_START			0x04
3948832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PKTENG_PER_RX_WITH_ACK_START 	0x05
3949832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PKTENG_PER_TX_WITH_ACK_START 	0x06
3950832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PKTENG_PER_RX_STOP			0x08
3951832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PKTENG_PER_MASK			0xff
39528ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3953832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_PKTENG_SYNCHRONOUS			0x100	/* synchronous flag */
39548ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
39558ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_pkteng {
39568ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 flags;
3957832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 delay;			/* Inter-packet delay */
3958832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 nframes;			/* Number of frames */
3959832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 length;			/* Packet length */
3960832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8  seqno;			/* Enable/disable sequence no. */
3961832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr dest;		/* Destination address */
3962832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr src;		/* Source address */
39638ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_pkteng_t;
39648ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
3965832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NUM_80211b_RATES	4
3966832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NUM_80211ag_RATES	8
3967832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NUM_80211n_RATES	32
3968832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NUM_80211_RATES		(NUM_80211b_RATES+NUM_80211ag_RATES+NUM_80211n_RATES)
39698ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_pkteng_stats {
3970832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 lostfrmcnt;		/* RX PER test: no of frames lost (skip seqno) */
3971832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 rssi;			/* RSSI */
3972832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int32 snr;			/* signal to noise ratio */
39738ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 rxpktcnt[NUM_80211_RATES+1];
39748ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_pkteng_stats_t;
39758ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
39768ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
39774a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_WOWL_MAGIC       (1 << 0)    /* Wakeup on Magic packet */
39784a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_WOWL_NET         (1 << 1)    /* Wakeup on Netpattern */
39794a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_WOWL_DIS         (1 << 2)    /* Wakeup on loss-of-link due to Disassoc/Deauth */
39804a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_WOWL_RETR        (1 << 3)    /* Wakeup on retrograde TSF */
39814a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_WOWL_BCN         (1 << 4)    /* Wakeup on loss of beacon */
39824a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_WOWL_TST         (1 << 5)    /* Wakeup after test */
39834a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_WOWL_M1          (1 << 6)    /* Wakeup after PTK refresh */
39844a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_WOWL_EAPID       (1 << 7)    /* Wakeup after receipt of EAP-Identity Req */
39854a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_WOWL_PME_GPIO    (1 << 8)    /* Wakeind via PME(0) or GPIO(1) */
39864a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_WOWL_NEEDTKIP1   (1 << 9)    /* need tkip phase 1 key to be updated by the driver */
39874a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_WOWL_GTK_FAILURE (1 << 10)   /* enable wakeup if GTK fails */
39884a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_WOWL_EXTMAGPAT   (1 << 11)   /* support extended magic packets */
39894a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_WOWL_ARPOFFLOAD  (1 << 12)   /* support ARP/NS/keepalive offloading */
39904a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_WOWL_WPA2        (1 << 13)   /* read protocol version for EAPOL frames */
39914a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_WOWL_KEYROT      (1 << 14)   /* If the bit is set, use key rotaton */
39924a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WL_WOWL_BCAST       (1 << 15)   /* If the bit is set, frm received was bcast frame */
39934a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
39944a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define MAGIC_PKT_MINLEN 102    /* Magic pkt min length is 6 * 0xFF + 16 * ETHER_ADDR_LEN */
39954a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
39964a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WOWL_PATTEN_TYPE_ARP	(1 << 0)	/* ARP offload Pattern */
39974a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define WOWL_PATTEN_TYPE_NA		(1 << 1)	/* NA offload Pattern */
39988ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
39998ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
40004a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint32 masksize;		/* Size of the mask in #of bytes */
40014a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint32 offset;			/* Offset to start looking for the packet in # of bytes */
40024a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint32 patternoffset;	/* Offset of start of pattern in the structure */
40034a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint32 patternsize;		/* Size of the pattern itself in #of bytes */
40044a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint32 id;				/* id */
40054a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint32 reasonsize;		/* Size of the wakeup reason code */
40064a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint32 flags;			/* Flags to tell the pattern type and other properties */
4007832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* Mask follows the structure above */
4008832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* Pattern follows the mask is at 'patternoffset' from the start */
40098ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_wowl_pattern_t;
40108ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
40118ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
4012832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint			count;
4013832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wl_wowl_pattern_t	pattern[1];
40148ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_wowl_pattern_list_t;
40158ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
40168ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
4017832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8	pci_wakeind;	/* Whether PCI PMECSR PMEStatus bit was set */
4018832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	ucode_wakeind;	/* What wakeup-event indication was set by ucode */
40198ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_wowl_wakeind_t;
40208ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
40214a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
4022832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* per AC rate control related data structure */
40238ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_txrate_class {
4024832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		init_rate;
4025832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		min_rate;
4026832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8		max_rate;
40278ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_txrate_class_t;
40288ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
40298ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
40308ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4031832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Overlap BSS Scan parameters default, minimum, maximum */
4032832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_PASSIVE_DWELL_DEFAULT		20	/* unit TU */
4033832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_PASSIVE_DWELL_MIN			5	/* unit TU */
4034832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_PASSIVE_DWELL_MAX			1000	/* unit TU */
4035832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_ACTIVE_DWELL_DEFAULT		10	/* unit TU */
4036832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_ACTIVE_DWELL_MIN			10	/* unit TU */
4037832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_ACTIVE_DWELL_MAX			1000	/* unit TU */
4038832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_DEFAULT	300	/* unit Sec */
4039832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MIN		10	/* unit Sec */
4040832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_WIDTHSCAN_INTERVAL_MAX		900	/* unit Sec */
4041832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_DEFAULT	5
4042832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MIN	5
4043832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_CHANWIDTH_TRANSITION_DLY_MAX	100
4044832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_DEFAULT	200	/* unit TU */
4045832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MIN	200	/* unit TU */
4046832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_PASSIVE_TOTAL_PER_CHANNEL_MAX	10000	/* unit TU */
4047832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_DEFAULT	20	/* unit TU */
4048832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MIN	20	/* unit TU */
4049832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_ACTIVE_TOTAL_PER_CHANNEL_MAX	10000	/* unit TU */
4050832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_DEFAULT	25	/* unit percent */
4051832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MIN		0	/* unit percent */
4052832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLC_OBSS_SCAN_ACTIVITY_THRESHOLD_MAX		100	/* unit percent */
4053832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4054832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* structure for Overlap BSS scan arguments */
40558ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_obss_scan_arg {
4056832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int16	passive_dwell;
4057832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int16	active_dwell;
4058832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int16	bss_widthscan_interval;
4059832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int16	passive_total;
4060832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int16	active_total;
4061832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int16	chanwidth_transition_delay;
4062832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int16	activity_threshold;
40638ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_obss_scan_arg_t;
40648ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4065832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_OBSS_SCAN_PARAM_LEN	sizeof(wl_obss_scan_arg_t)
4066832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_MIN_NUM_OBSS_SCAN_ARG 7	/* minimum number of arguments required for OBSS Scan */
40678ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4068832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_COEX_INFO_MASK		0x07
4069832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_COEX_INFO_REQ		0x01
4070832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_COEX_40MHZ_INTOLERANT	0x02
4071832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WL_COEX_WIDTH20			0x04
40728ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4073832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	WLC_RSSI_INVALID	 0	/* invalid RSSI value */
40748ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
40758ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define MAX_RSSI_LEVELS 8
40768ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4077832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* RSSI event notification configuration. */
40788ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_rssi_event {
4079832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 rate_limit_msec;		/* # of events posted to application will be limited to
4080832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * one per specified period (0 to disable rate limit).
4081832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 */
4082832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 num_rssi_levels;		/* Number of entries in rssi_levels[] below */
4083832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8 rssi_levels[MAX_RSSI_LEVELS];	/* Variable number of RSSI levels. An event
4084832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 * will be posted each time the RSSI of received
4085832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 * beacons/packets crosses a level.
4086832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 */
40878ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_rssi_event_t;
40888ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
40898ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_action_obss_coex_req {
40908ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 info;
40918ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 num;
40928ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 ch_list[1];
40938ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_action_obss_coex_req_t;
40948ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
40958ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4096832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* IOVar parameter block for small MAC address array with type indicator */
4097832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_IOV_MAC_PARAM_LEN  4
40988ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4099832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_IOV_PKTQ_LOG_PRECS 16
41008ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4101832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
4102832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 num_addrs;
4103832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	char   addr_type[WL_IOV_MAC_PARAM_LEN];
4104832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr ea[WL_IOV_MAC_PARAM_LEN];
4105832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_iov_mac_params_t;
41068ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
41078ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4108832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Parameter block for PKTQ_LOG statistics */
4109832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
4110832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 requested;      /* packets requested to be stored */
4111832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 stored;         /* packets stored */
4112832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 saved;          /* packets saved,
4113832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	                          because a lowest priority queue has given away one packet
4114832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	                       */
4115832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 selfsaved;      /* packets saved,
4116832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	                          because an older packet from the same queue has been dropped
4117832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	                       */
4118832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 full_dropped;   /* packets dropped,
4119832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	                          because pktq is full with higher precedence packets
4120832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	                       */
4121832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 dropped;        /* packets dropped because pktq per that precedence is full */
4122832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 sacrificed;     /* packets dropped,
4123832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	                          in order to save one from a queue of a highest priority
4124832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	                       */
4125832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 busy;           /* packets droped because of hardware/transmission error */
4126832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 retry;          /* packets re-sent because they were not received */
4127832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 ps_retry;       /* packets retried again prior to moving power save mode */
4128832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 retry_drop;     /* packets finally dropped after retry limit */
4129832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 max_avail;      /* the high-water mark of the queue capacity for packets -
4130832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	                          goes to zero as queue fills
4131832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	                       */
4132832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 max_used;       /* the high-water mark of the queue utilisation for packets -
4133832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	                          increases with use ('inverse' of max_avail)
4134832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	                       */
4135832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 queue_capacity; /* the maximum capacity of the queue */
4136832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} pktq_log_counters_v01_t;
4137832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4138832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define sacrified sacrificed
41398ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4140832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
4141832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8                num_prec[WL_IOV_MAC_PARAM_LEN];
4142832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	pktq_log_counters_v01_t  counters[WL_IOV_MAC_PARAM_LEN][WL_IOV_PKTQ_LOG_PRECS];
4143832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	char                 headings[1];
4144832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} pktq_log_format_v01_t;
41458ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
41468ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4147832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
4148832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32               version;
4149832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	wl_iov_mac_params_t  params;
4150832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	union {
4151832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt		pktq_log_format_v01_t v01;
4152832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	} pktq_log;
4153832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_iov_pktq_log_t;
4154832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4155832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4156832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* **** EXTLOG **** */
4157832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define EXTLOG_CUR_VER		0x0100
4158832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4159832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define MAX_ARGSTR_LEN		18 /* At least big enough for storing ETHER_ADDR_STR_LEN */
4160832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4161832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* log modules (bitmap) */
4162832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LOG_MODULE_COMMON	0x0001
4163832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LOG_MODULE_ASSOC	0x0002
4164832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LOG_MODULE_EVENT	0x0004
4165832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LOG_MODULE_MAX		3			/* Update when adding module */
4166832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4167832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* log levels */
4168832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_LOG_LEVEL_DISABLE	0
4169832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_LOG_LEVEL_ERR	1
4170832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_LOG_LEVEL_WARN	2
4171832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_LOG_LEVEL_INFO	3
4172832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_LOG_LEVEL_MAX	WL_LOG_LEVEL_INFO	/* Update when adding level */
4173832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4174832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* flag */
4175832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LOG_FLAG_EVENT		1
4176832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4177832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* log arg_type */
4178832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LOG_ARGTYPE_NULL	0
4179832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LOG_ARGTYPE_STR		1	/* %s */
4180832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LOG_ARGTYPE_INT		2	/* %d */
4181832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LOG_ARGTYPE_INT_STR	3	/* %d...%s */
4182832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LOG_ARGTYPE_STR_INT	4	/* %s...%d */
41838ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
41848ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wlc_extlog_cfg {
41858ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int max_number;
4186832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 module;	/* bitmap */
41878ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 level;
41888ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 flag;
41898ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 version;
41908ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wlc_extlog_cfg_t;
41918ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
41928ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct log_record {
41938ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 time;
41948ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 module;
41958ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 id;
41968ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 level;
41978ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 sub_unit;
41988ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 seq_num;
41998ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int32 arg;
42008ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	char str[MAX_ARGSTR_LEN];
42018ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} log_record_t;
42028ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
42038ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wlc_extlog_req {
42048ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 from_last;
42058ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 num;
42068ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wlc_extlog_req_t;
42078ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
42088ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wlc_extlog_results {
42098ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 version;
42108ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 record_len;
42118ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 num;
42128ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	log_record_t logs[1];
42138ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wlc_extlog_results_t;
42148ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
42158ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct log_idstr {
4216832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	id;
4217832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16	flag;
4218832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8	arg_type;
4219832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	const char	*fmt_str;
42208ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} log_idstr_t;
42218ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4222832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define FMTSTRF_USER		1
42238ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4224832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* flat ID definitions
4225832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * New definitions HAVE TO BE ADDED at the end of the table. Otherwise, it will
4226832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * affect backward compatibility with pre-existing apps
4227832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
42288ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef enum {
42298ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_DRIVER_UP_ID = 0,
42308ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_DRIVER_DOWN_ID = 1,
42318ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_SUSPEND_MAC_FAIL_ID = 2,
42328ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_NO_PROGRESS_ID = 3,
42338ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_RFDISABLE_ID = 4,
42348ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_REG_PRINT_ID = 5,
42358ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_EXPTIME_ID = 6,
42368ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_JOIN_START_ID = 7,
42378ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_JOIN_COMPLETE_ID = 8,
42388ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_NO_NETWORKS_ID = 9,
42398ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_SECURITY_MISMATCH_ID = 10,
42408ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_RATE_MISMATCH_ID = 11,
42418ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_AP_PRUNED_ID = 12,
42428ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_KEY_INSERTED_ID = 13,
42438ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_DEAUTH_ID = 14,
42448ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_DISASSOC_ID = 15,
42458ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_LINK_UP_ID = 16,
42468ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_LINK_DOWN_ID = 17,
42478ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_RADIO_HW_OFF_ID = 18,
42488ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_RADIO_HW_ON_ID = 19,
42498ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_EVENT_DESC_ID = 20,
42508ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_PNP_SET_POWER_ID = 21,
42518ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_RADIO_SW_OFF_ID = 22,
42528ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_RADIO_SW_ON_ID = 23,
42538ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_PWD_MISMATCH_ID = 24,
42548ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_FATAL_ERROR_ID = 25,
42558ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_AUTH_FAIL_ID = 26,
42568ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_ASSOC_FAIL_ID = 27,
42578ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_IBSS_FAIL_ID = 28,
42588ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_EXTAP_FAIL_ID = 29,
42598ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	FMTSTR_MAX_ID
42608ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} log_fmtstr_id_t;
42618ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
42628ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#ifdef DONGLEOVERLAYS
42638ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
4264832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 flags_idx;	/* lower 8 bits: overlay index; upper 24 bits: flags */
4265832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 offset;		/* offset into overlay region to write code */
4266832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 len;			/* overlay code len */
4267832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* overlay code follows this struct */
42688ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_ioctl_overlay_t;
42698ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
42708ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define OVERLAY_IDX_MASK		0x000000ff
42718ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define OVERLAY_IDX_SHIFT		0
42728ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define OVERLAY_FLAGS_MASK		0xffffff00
42738ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define OVERLAY_FLAGS_SHIFT		8
4274832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* overlay written to device memory immediately after loading the base image */
42758ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define OVERLAY_FLAG_POSTLOAD	0x100
4276832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* defer overlay download until the device responds w/WLC_E_OVL_DOWNLOAD event */
42778ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define OVERLAY_FLAG_DEFER_DL	0x200
4278832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* overlay downloaded prior to the host going to sleep */
42798ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define OVERLAY_FLAG_PRESLEEP	0x400
42808ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
42818ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define OVERLAY_DOWNLOAD_CHUNKSIZE	1024
4282832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#endif /* DONGLEOVERLAYS */
42838ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
428466981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
428566981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
4286832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* no default structure packing */
42878ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#include <packed_section_end.h>
42888ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4289832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* require strict packing */
42908ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#include <packed_section_start.h>
429166981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
429266981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
429366981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
4294832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Structures and constants used for "vndr_ie" IOVar interface */
4295832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define VNDR_IE_CMD_LEN		4	/* length of the set command string:
4296832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 * "add", "del" (+ NUL)
4297832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt					 */
4298832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4299832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* 802.11 Mgmt Packet flags */
4300832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define VNDR_IE_BEACON_FLAG	0x1
4301832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define VNDR_IE_PRBRSP_FLAG	0x2
4302832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define VNDR_IE_ASSOCRSP_FLAG	0x4
4303832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define VNDR_IE_AUTHRSP_FLAG	0x8
4304832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define VNDR_IE_PRBREQ_FLAG	0x10
4305832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define VNDR_IE_ASSOCREQ_FLAG	0x20
4306832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define VNDR_IE_IWAPID_FLAG	0x40 /* vendor IE in IW advertisement protocol ID field */
4307832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define VNDR_IE_CUSTOM_FLAG	0x100 /* allow custom IE id */
4308832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4309832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define VNDR_IE_INFO_HDR_LEN	(sizeof(uint32))
43108ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
43118ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct {
4312832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 pktflag;			/* bitmask indicating which packet(s) contain this IE */
4313832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	vndr_ie_t vndr_ie_data;		/* vendor IE data */
43148ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} BWL_POST_PACKED_STRUCT vndr_ie_info_t;
43158ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
43168ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct {
4317832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int iecount;			/* number of entries in the vndr_ie_list[] array */
4318832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	vndr_ie_info_t vndr_ie_list[1];	/* variable size list of vndr_ie_info_t structs */
43198ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} BWL_POST_PACKED_STRUCT vndr_ie_buf_t;
43208ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
43218ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct {
4322832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	char cmd[VNDR_IE_CMD_LEN];	/* vndr_ie IOVar set command : "add", "del" + NUL */
4323832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	vndr_ie_buf_t vndr_ie_buffer;	/* buffer containing Vendor IE list information */
43248ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} BWL_POST_PACKED_STRUCT vndr_ie_setbuf_t;
43258ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4326832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* tag_ID/length/value_buffer tuple */
4327832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct {
4328832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8	id;
4329832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8	len;
4330832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8	data[1];
4331832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} BWL_POST_PACKED_STRUCT tlv_t;
43328ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4333832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct {
4334832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 pktflag;			/* bitmask indicating which packet(s) contain this IE */
4335832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	tlv_t ie_data;		/* IE data */
4336832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} BWL_POST_PACKED_STRUCT ie_info_t;
43378ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4338832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct {
4339832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int iecount;			/* number of entries in the ie_list[] array */
4340832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	ie_info_t ie_list[1];	/* variable size list of ie_info_t structs */
4341832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} BWL_POST_PACKED_STRUCT ie_buf_t;
4342832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4343832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct {
4344832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	char cmd[VNDR_IE_CMD_LEN];	/* ie IOVar set command : "add" + NUL */
4345832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	ie_buf_t ie_buffer;	/* buffer containing IE list information */
4346832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} BWL_POST_PACKED_STRUCT ie_setbuf_t;
4347832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4348832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct {
4349832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 pktflag;		/* bitmask indicating which packet(s) contain this IE */
4350832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 id;		/* IE type */
4351832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} BWL_POST_PACKED_STRUCT ie_getbuf_t;
4352832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4353832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* structures used to define format of wps ie data from probe requests */
4354832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* passed up to applications via iovar "prbreq_wpsie" */
43558ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct sta_prbreq_wps_ie_hdr {
43568ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	struct ether_addr staAddr;
43578ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 ieLen;
43588ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_hdr_t;
43598ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
43608ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct sta_prbreq_wps_ie_data {
43618ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	sta_prbreq_wps_ie_hdr_t hdr;
43628ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 ieData[1];
43638ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_data_t;
43648ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
43658ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct sta_prbreq_wps_ie_list {
43668ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 totLen;
43678ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 ieDataList[1];
43688ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} BWL_POST_PACKED_STRUCT sta_prbreq_wps_ie_list_t;
43698ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
43708ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
43718ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#ifdef WLMEDIA_TXFAILEVENT
43728ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef BWL_PRE_PACKED_STRUCT struct {
4373832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	char   dest[ETHER_ADDR_LEN]; /* destination MAC */
4374832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8  prio;            /* Packet Priority */
4375832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8  flags;           /* Flags           */
4376832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 tsf_l;           /* TSF timer low   */
4377832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 tsf_h;           /* TSF timer high  */
4378832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 rates;           /* Main Rates      */
4379832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 txstatus;        /* TX Status       */
43808ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} BWL_POST_PACKED_STRUCT txfailinfo_t;
4381832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#endif /* WLMEDIA_TXFAILEVENT */
43828ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
438366981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
438466981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
4385832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* no strict structure packing */
43868ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#include <packed_section_end.h>
43878ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
438866981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#ifndef LINUX_POSTMOGRIFY_REMOVAL
4389832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Global ASSERT Logging */
4390832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define ASSERTLOG_CUR_VER	0x0100
4391832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define MAX_ASSRTSTR_LEN	64
43928ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
43938ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct assert_record {
43948ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 time;
43958ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 seq_num;
43968ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	char str[MAX_ASSRTSTR_LEN];
43978ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} assert_record_t;
43988ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
43998ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct assertlog_results {
44008ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 version;
44018ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint16 record_len;
44028ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 num;
44038ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	assert_record_t logs[1];
44048ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} assertlog_results_t;
44058ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4406832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define LOGRRC_FIX_LEN	8
44078ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define IOBUF_ALLOWED_NUM_OF_LOGREC(type, len) ((len - LOGRRC_FIX_LEN)/sizeof(type))
44088ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4409832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4410832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* channel interference measurement (chanim) related defines */
4411832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4412832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* chanim mode */
4413832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CHANIM_DISABLE	0	/* disabled */
4414832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CHANIM_DETECT	1	/* detection only */
4415832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CHANIM_EXT		2 	/* external state machine */
4416832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CHANIM_ACT		3	/* full internal state machine, detect + act */
4417832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CHANIM_MODE_MAX 4
4418832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4419832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* define for apcs reason code */
4420832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define APCS_INIT		0
4421832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define APCS_IOCTL 		1
4422832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define APCS_CHANIM 	2
4423832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define APCS_CSTIMER	3
4424832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define APCS_BTA		4
4425832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4426832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* number of ACS record entries */
4427832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CHANIM_ACS_RECORD			10
4428832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4429832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* CHANIM */
4430832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CCASTATS_TXDUR  0
4431832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CCASTATS_INBSS  1
4432832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CCASTATS_OBSS   2
4433832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CCASTATS_NOCTG  3
4434832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CCASTATS_NOPKT  4
4435832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CCASTATS_DOZE   5
4436832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CCASTATS_TXOP	6
4437832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CCASTATS_GDTXDUR        7
4438832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CCASTATS_BDTXDUR        8
4439832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CCASTATS_MAX    9
4440832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4441832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* chanim acs record */
44428ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
44438ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	bool valid;
44448ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 trigger;
44458ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	chanspec_t selected_chspc;
4446832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8 bgnoise;
44478ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 glitch_cnt;
44488ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 ccastats;
44498ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint timestamp;
44508ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} chanim_acs_record_t;
44518ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
44528ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
44538ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	chanim_acs_record_t acs_record[CHANIM_ACS_RECORD];
44548ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 count;
44558ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint timestamp;
44568ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_acs_record_t;
44578ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4458832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct chanim_stats {
4459832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 glitchcnt;               /* normalized as per second count */
4460832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 badplcp;                 /* normalized as per second count */
4461832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 ccastats[CCASTATS_MAX]; 	/* normalized as 0-255 */
4462832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8 bgnoise;					/* background noise level (in dBm) */
4463832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t chanspec;
4464832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 timestamp;
4465832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} chanim_stats_t;
44668ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4467832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_CHANIM_STATS_VERSION 1
4468832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_CHANIM_COUNT_ALL	0xff
4469832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_CHANIM_COUNT_ONE	0x1
44708ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4471832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
4472832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 buflen;
4473832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 version;
4474832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 count;
4475832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanim_stats_t stats[1];
4476832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_chanim_stats_t;
4477832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4478832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_CHANIM_STATS_FIXED_LEN OFFSETOF(wl_chanim_stats_t, stats)
4479832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4480832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Noise measurement metrics. */
4481832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NOISE_MEASURE_KNOISE	0x1
44828ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4483832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* scb probe parameter */
4484832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
4485832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 scb_timeout;
4486832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 scb_activity_time;
4487832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 scb_max_probe;
4488832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_scb_probe_t;
4489832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4490832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* ap tpc modes */
4491832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	AP_TPC_OFF		0
4492832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	AP_TPC_BSS_PWR		1	/* BSS power control */
4493832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define AP_TPC_AP_PWR		2	/* AP power control */
4494832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	AP_TPC_AP_BSS_PWR	3	/* Both AP and BSS power control */
4495832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define AP_TPC_MAX_LINK_MARGIN	127
4496832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
44974a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt/* ap tpc modes */
44984a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define	AP_TPC_OFF		0
44994a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define	AP_TPC_BSS_PWR		1	/* BSS power control */
45004a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define AP_TPC_AP_PWR		2	/* AP power control */
45014a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define	AP_TPC_AP_BSS_PWR	3	/* Both AP and BSS power control */
45024a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define AP_TPC_MAX_LINK_MARGIN	127
45034a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
4504832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* structure/defines for selective mgmt frame (smf) stats support */
4505832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4506832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define SMFS_VERSION 1
4507832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* selected mgmt frame (smf) stats element */
45088ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_smfs_elem {
45098ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 count;
4510832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 code;  /* SC or RC code */
45118ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_smfs_elem_t;
45128ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
45138ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_smf_stats {
45148ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 version;
4515832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 length;	/* reserved for future usage */
45168ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 type;
45178ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 codetype;
45188ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 ignored_cnt;
45198ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 malformed_cnt;
4520832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 count_total; /* count included the interested group */
45218ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	wl_smfs_elem_t elem[1];
45228ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_smf_stats_t;
45238ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
45248ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_SMFSTATS_FIXED_LEN OFFSETOF(wl_smf_stats_t, elem);
45258ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
45268ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidtenum {
45278ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SMFS_CODETYPE_SC,
45288ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SMFS_CODETYPE_RC
45298ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt};
45308ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4531832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* reuse two number in the sc/rc space */
4532832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define	SMFS_CODE_MALFORMED 0xFFFE
4533832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define SMFS_CODE_IGNORED 	0xFFFD
45348ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
45358ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef enum smfs_type {
45368ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SMFS_TYPE_AUTH,
45378ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SMFS_TYPE_ASSOC,
45388ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SMFS_TYPE_REASSOC,
45398ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SMFS_TYPE_DISASSOC_TX,
45408ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SMFS_TYPE_DISASSOC_RX,
45418ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SMFS_TYPE_DEAUTH_TX,
45428ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SMFS_TYPE_DEAUTH_RX,
45438ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SMFS_TYPE_MAX
45448ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} smfs_type_t;
45458ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
45468ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#ifdef PHYMON
45478ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
45488ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define PHYMON_VERSION 1
45498ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
45508ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_phycal_core_state {
4551832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* Tx IQ/LO calibration coeffs */
45528ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int16 tx_iqlocal_a;
45538ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int16 tx_iqlocal_b;
45548ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int8 tx_iqlocal_ci;
45558ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int8 tx_iqlocal_cq;
45568ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int8 tx_iqlocal_di;
45578ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int8 tx_iqlocal_dq;
45588ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int8 tx_iqlocal_ei;
45598ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int8 tx_iqlocal_eq;
45608ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int8 tx_iqlocal_fi;
45618ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int8 tx_iqlocal_fq;
45628ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4563832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* Rx IQ calibration coeffs */
45648ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int16 rx_iqcal_a;
45658ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int16 rx_iqcal_b;
45668ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4567832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 tx_iqlocal_pwridx; /* Tx Power Index for Tx IQ/LO calibration */
4568832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 papd_epsilon_table[64]; /* PAPD epsilon table */
4569832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int16 papd_epsilon_offset; /* PAPD epsilon offset */
4570832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 curr_tx_pwrindex; /* Tx power index */
4571832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8 idle_tssi; /* Idle TSSI */
4572832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8 est_tx_pwr; /* Estimated Tx Power (dB) */
4573832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8 est_rx_pwr; /* Estimated Rx Power (dB) from RSSI */
4574832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 rx_gaininfo; /* Rx gain applied on last Rx pkt */
4575832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 init_gaincode; /* initgain required for ACI */
45768ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int8 estirr_tx;
45778ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int8 estirr_rx;
45788ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
45798ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_phycal_core_state_t;
45808ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
45818ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_phycal_state {
45828ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	int version;
4583832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8 num_phy_cores; /* number of cores */
4584832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8 curr_temperature; /* on-chip temperature sensor reading */
4585832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t chspec; /* channspec for this state */
4586832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	bool aci_state; /* ACI state: ON/OFF */
4587832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 crsminpower; /* crsminpower required for ACI */
4588832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 crsminpowerl; /* crsminpowerl required for ACI */
4589832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 crsminpoweru; /* crsminpoweru required for ACI */
45908ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	wl_phycal_core_state_t phycal_core[1];
45918ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_phycal_state_t;
45928ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
45938ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define WL_PHYCAL_STAT_FIXED_LEN OFFSETOF(wl_phycal_state_t, phycal_core)
4594832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#endif /* PHYMON */
45958ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4596832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* discovery state */
45978ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_p2p_disc_st {
4598832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 state;	/* see state */
4599832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t chspec;	/* valid in listen state */
4600832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 dwell;	/* valid in listen state, in ms */
46018ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_p2p_disc_st_t;
46028ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4603832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* state */
4604832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_DISC_ST_SCAN	0
4605832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_DISC_ST_LISTEN	1
4606832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_DISC_ST_SEARCH	2
46078ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4608832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* scan request */
46098ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_p2p_scan {
4610832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 type;		/* 'S' for WLC_SCAN, 'E' for "escan" */
46118ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint8 reserved[3];
4612832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* scan or escan parms... */
46138ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_p2p_scan_t;
46148ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4615832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* i/f request */
46168ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_p2p_if {
46178ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	struct ether_addr addr;
4618832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 type;	/* see i/f type */
4619832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t chspec;	/* for p2p_ifadd GO */
46208ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_p2p_if_t;
46218ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4622832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* i/f type */
4623832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_IF_CLIENT	0
4624832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_IF_GO		1
4625832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_IF_DYNBCN_GO	2
4626832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_IF_DEV		3
46278ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4628832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* i/f query */
46298ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_p2p_ifq {
46308ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint bsscfgidx;
46318ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	char ifname[BCM_MSG_IFNAME_MAX];
46328ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_p2p_ifq_t;
46338ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4634832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* OppPS & CTWindow */
46358ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_p2p_ops {
4636832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 ops;	/* 0: disable 1: enable */
4637832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 ctw;	/* >= 10 */
46388ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_p2p_ops_t;
46398ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4640832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* absence and presence request */
46418ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_p2p_sched_desc {
46428ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 start;
46438ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 interval;
46448ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 duration;
4645832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 count;	/* see count */
46468ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_p2p_sched_desc_t;
46478ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4648832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* count */
4649832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_SCHED_RSVD	0
4650832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_SCHED_REPEAT	255	/* anything > 255 will be treated as 255 */
46518ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
46528ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct wl_p2p_sched {
4653832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 type;	/* see schedule type */
4654832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 action;	/* see schedule action */
4655832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 option;	/* see schedule option */
46568ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	wl_p2p_sched_desc_t desc[1];
46578ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} wl_p2p_sched_t;
4658832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_SCHED_FIXED_LEN		3
4659832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4660832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* schedule type */
4661832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_SCHED_TYPE_ABS		0	/* Scheduled Absence */
4662832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_SCHED_TYPE_REQ_ABS	1	/* Requested Absence */
4663832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4664832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* schedule action during absence periods (for WL_P2P_SCHED_ABS type) */
4665832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_SCHED_ACTION_NONE	0	/* no action */
4666832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_SCHED_ACTION_DOZE	1	/* doze */
4667832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* schedule option - WL_P2P_SCHED_TYPE_REQ_ABS */
4668832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_SCHED_ACTION_GOOFF	2	/* turn off GO beacon/prbrsp functions */
4669832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* schedule option - WL_P2P_SCHED_TYPE_XXX */
4670832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_SCHED_ACTION_RESET	255	/* reset */
4671832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4672832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* schedule option - WL_P2P_SCHED_TYPE_ABS */
4673832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_SCHED_OPTION_NORMAL	0	/* normal start/interval/duration/count */
4674832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_SCHED_OPTION_BCNPCT	1	/* percentage of beacon interval */
4675832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* schedule option - WL_P2P_SCHED_TYPE_REQ_ABS */
4676832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_SCHED_OPTION_TSFOFS	2	/* normal start/internal/duration/count with
4677832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 * start being an offset of the 'current' TSF
4678832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 */
4679832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4680832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* feature flags */
4681832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_FEAT_GO_CSA	(1 << 0)	/* GO moves with the STA using CSA method */
4682832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_FEAT_GO_NOLEGACY	(1 << 1)	/* GO does not probe respond to non-p2p probe
4683832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 * requests
4684832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt						 */
4685832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_P2P_FEAT_RESTRICT_DEV_RESP (1 << 2)	/* Restrict p2p dev interface from responding */
4686832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4687832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#ifdef WLNIC
4688832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* nic_cnx iovar */
4689832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wl_nic_cnx {
4690832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 opcode;
4691832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr addr;
4692832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	/* the following are valid for WL_NIC_CNX_CONN */
4693832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 SSID_len;
4694832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 SSID[32];
4695832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr abssid;
4696832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 join_period;
4697832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_nic_cnx_t;
4698832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4699832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* opcode */
4700832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NIC_CNX_ADD	0	/* add NIC connection */
4701832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NIC_CNX_DEL	1	/* delete NIC connection */
4702832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NIC_CNX_IDX	2	/* query NIC connection index */
4703832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NIC_CNX_CONN	3	/* join/create network */
4704832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NIC_CNX_DIS	4	/* disconnect from network */
4705832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4706832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* nic_cfg iovar */
4707832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wl_nic_cfg {
4708832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 version;
4709832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 beacon_mode;
4710832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint16 beacon_interval;
4711832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 diluted_beacon_period;
4712832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 repeat_EQC;
4713832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 scan_length;
4714832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 scan_interval;
4715832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 scan_probability;
4716832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 awake_window_length;
4717832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int8 TSF_correction;
4718832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 ASID;
4719832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 channel_usage_mode;
4720832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_nic_cfg_t;
4721832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4722832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* version */
4723832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NIC_CFG_VER	1
4724832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4725832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* beacon_mode */
4726832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NIC_BCN_NORM		0
4727832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NIC_BCN_DILUTED	1
4728832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4729832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* channel_usage_mode */
4730832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NIC_CHAN_STATIC	0
4731832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NIC_CHAN_CYCLE	1
4732832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4733832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* nic_cfg iovar */
4734832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wl_nic_frm {
4735832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 type;
4736832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	struct ether_addr da;
4737832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 body[1];
4738832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_nic_frm_t;
47398ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4740832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* type */
4741832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NIC_FRM_MYNET	1
4742832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_NIC_FRM_ACTION	2
47438ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4744832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* i/f query */
4745832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wl_nic_ifq {
4746832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint bsscfgidx;
4747832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	char ifname[BCM_MSG_IFNAME_MAX];
4748832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_nic_ifq_t;
474966981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt
475066981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt/* data mode */
475166981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt/* nic_dm iovar */
475266981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidttypedef struct wl_nic_dm {
475366981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt	uint8 enab;
475466981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt	chanspec_t chspec;
475566981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt} wl_nic_dm_t;
4756832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#endif /* WLNIC */
47578ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4758832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* RFAWARE def */
4759832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define BCM_ACTION_RFAWARE		0x77
47608ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt#define BCM_ACTION_RFAWARE_DCS  0x01
47618ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4762832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* DCS reason code define */
4763832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define BCM_DCS_IOVAR		0x1
4764832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define BCM_DCS_UNKNOWN		0xFF
47658ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4766832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wl_bcmdcs_data {
4767832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint reason;
4768832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	chanspec_t chspec;
4769832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_bcmdcs_data_t;
47708ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4771832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* n-mode support capability */
4772832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* 2x2 includes both 1x1 & 2x2 devices
4773832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * reserved #define 2 for future when we want to separate 1x1 & 2x2 and
4774832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * control it independently
4775832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
4776832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_11N_2x2			1
4777832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_11N_3x3			3
4778832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WL_11N_4x4			4
4779832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4780832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* define 11n feature disable flags */
4781832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLFEATURE_DISABLE_11N		0x00000001
4782832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLFEATURE_DISABLE_11N_STBC_TX	0x00000002
4783832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLFEATURE_DISABLE_11N_STBC_RX	0x00000004
4784832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLFEATURE_DISABLE_11N_SGI_TX	0x00000008
4785832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLFEATURE_DISABLE_11N_SGI_RX	0x00000010
4786832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLFEATURE_DISABLE_11N_AMPDU_TX	0x00000020
4787832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLFEATURE_DISABLE_11N_AMPDU_RX	0x00000040
4788832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLFEATURE_DISABLE_11N_GF	0x00000080
4789832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4790832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Proxy STA modes */
4791832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define PSTA_MODE_DISABLED		0
4792832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define PSTA_MODE_PROXY			1
4793832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define PSTA_MODE_REPEATER		2
4794832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4795832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4796832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* NAT configuration */
47978ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
4798832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 ipaddr;		/* interface ip address */
4799832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 ipaddr_mask;	/* interface ip address mask */
4800832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 ipaddr_gateway;	/* gateway ip address */
4801832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 mac_gateway[6];	/* gateway mac address */
4802832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint32 ipaddr_dns;	/* DNS server ip address, valid only for public if */
4803832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 mac_dns[6];	/* DNS server mac address,  valid only for public if */
4804832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint8 GUID[38];		/* interface GUID */
4805832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} nat_if_info_t;
48068ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
48078ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct {
4808832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	uint op;		/* operation code */
4809832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	bool pub_if;		/* set for public if, clear for private if */
4810832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	nat_if_info_t if_info;	/* interface info */
4811832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} nat_cfg_t;
48128ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4813832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* op code in nat_cfg */
4814832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NAT_OP_ENABLE		1	/* enable NAT on given interface */
4815832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NAT_OP_DISABLE		2	/* disable NAT on given interface */
4816832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NAT_OP_DISABLE_ALL	3	/* disable NAT on all interfaces */
48178ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4818832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* NAT state */
4819832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NAT_STATE_ENABLED	1	/* NAT is enabled */
4820832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define NAT_STATE_DISABLED	2	/* NAT is disabled */
48218ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4822832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct {
4823832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int state;	/* NAT state returned */
4824832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} nat_state_t;
48258ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4826832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#ifdef PROP_TXSTATUS
4827832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* Bit definitions for tlv iovar */
4828832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/*
4829832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * enable RSSI signals:
4830832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * WLFC_CTL_TYPE_RSSI
4831832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
4832832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLFC_FLAGS_RSSI_SIGNALS		0x0001
48338ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4834832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* enable (if/mac_open, if/mac_close,, mac_add, mac_del) signals:
4835832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *
4836832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * WLFC_CTL_TYPE_MAC_OPEN
4837832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * WLFC_CTL_TYPE_MAC_CLOSE
4838832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *
4839832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * WLFC_CTL_TYPE_INTERFACE_OPEN
4840832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * WLFC_CTL_TYPE_INTERFACE_CLOSE
4841832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *
4842832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * WLFC_CTL_TYPE_MACDESC_ADD
4843832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * WLFC_CTL_TYPE_MACDESC_DEL
4844832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt *
4845832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
4846832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLFC_FLAGS_XONXOFF_SIGNALS	0x0002
48478ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4848832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* enable (status, fifo_credit, mac_credit) signals
4849832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * WLFC_CTL_TYPE_MAC_REQUEST_CREDIT
4850832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * WLFC_CTL_TYPE_TXSTATUS
4851832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt * WLFC_CTL_TYPE_FIFO_CREDITBACK
4852832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt */
4853832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLFC_FLAGS_CREDIT_STATUS_SIGNALS	0x0004
48548ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4855832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLFC_FLAGS_HOST_PROPTXSTATUS_ACTIVE	0x0008
4856832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLFC_FLAGS_PSQ_GENERATIONFSM_ENABLE	0x0010
4857832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLFC_FLAGS_PSQ_ZERO_BUFFER_ENABLE	0x0020
4858832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define WLFC_FLAGS_HOST_RXRERODER_ACTIVE	0x0040
4859832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#endif /* PROP_TXSTATUS */
48608ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4861832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define BTA_STATE_LOG_SZ	64
48628ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4863832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* BTAMP Statemachine states */
48648ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidtenum {
48658ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	HCIReset = 1,
48668ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	HCIReadLocalAMPInfo,
48678ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	HCIReadLocalAMPASSOC,
48688ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	HCIWriteRemoteAMPASSOC,
48698ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	HCICreatePhysicalLink,
48708ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	HCIAcceptPhysicalLinkRequest,
48718ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	HCIDisconnectPhysicalLink,
48728ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	HCICreateLogicalLink,
48738ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	HCIAcceptLogicalLink,
48748ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	HCIDisconnectLogicalLink,
48758ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	HCILogicalLinkCancel,
48768ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	HCIAmpStateChange,
48778ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	HCIWriteLogicalLinkAcceptTimeout
48788ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt};
48798ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
48808ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidttypedef struct flush_txfifo {
48818ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 txfifobmp;
48828ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	uint32 hwtxfifoflush;
48838ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	struct ether_addr ea;
48848ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt} flush_txfifo_t;
48858ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4886832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CHANNEL_5G_LOW_START	36	/* 5G low (36..48) CDD enable/disable bit mask */
4887832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CHANNEL_5G_MID_START	52	/* 5G mid (52..64) CDD enable/disable bit mask */
4888832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CHANNEL_5G_HIGH_START	100	/* 5G high (100..140) CDD enable/disable bit mask */
4889832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#define CHANNEL_5G_UPPER_START	149	/* 5G upper (149..161) CDD enable/disable bit mask */
48908ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
48918ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidtenum {
48928ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SPATIAL_MODE_2G_IDX = 0,
48938ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SPATIAL_MODE_5G_LOW_IDX,
48948ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SPATIAL_MODE_5G_MID_IDX,
48958ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SPATIAL_MODE_5G_HIGH_IDX,
48968ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SPATIAL_MODE_5G_UPPER_IDX,
48978ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt	SPATIAL_MODE_MAX_IDX
48988ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt};
48998ce1727333a1c411bb88330d69f82386a118c6bfDmitry Shmidt
4900832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt/* IOVAR "mempool" parameter. Used to retrieve a list of memory pool statistics. */
4901832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidttypedef struct wl_mempool_stats {
4902832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	int	num;		/* Number of memory pools */
4903832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt	bcm_mp_stats_t s[1];	/* Variable array of memory pool stats. */
4904832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt} wl_mempool_stats_t;
4905832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
4906832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt
49074a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt/* D0 Coalescing */
49084a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define IPV4_ARP_FILTER		0x0001
49094a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define IPV4_NETBT_FILTER	0x0002
49104a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define IPV4_LLMNR_FILTER	0x0004
49114a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define IPV4_SSDP_FILTER	0x0008
49124a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define IPV4_WSD_FILTER		0x0010
49134a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define IPV6_NETBT_FILTER	0x0200
49144a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define IPV6_LLMNR_FILTER	0x0400
49154a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define IPV6_SSDP_FILTER	0x0800
49164a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define IPV6_WSD_FILTER		0x1000
49174a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
49184a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt/* Network Offload Engine */
49194a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt#define NWOE_OL_ENABLE		0x00000001
49204a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
49214a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidttypedef struct {
49224a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint32 ipaddr;
49234a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint32 ipaddr_netmask;
49244a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	uint32 ipaddr_gateway;
49254a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt} nwoe_ifconfig_t;
49264a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
49274a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt/*
49284a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt * Traffic management structures/defines.
49294a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt */
49304a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
49317e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt/* Traffic management bandwidth parameters */
49327e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt#define TRF_MGMT_MAX_PRIORITIES                 3
49334a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
49347e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt#define TRF_MGMT_FLAG_ADD_DSCP                  0x0001  /* Add DSCP to IP TOS field */
49357e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt#define TRF_MGMT_FLAG_DISABLE_SHAPING           0x0002  /* Only support traffic clasification */
49367e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt#define TRF_MGMT_FLAG_DISABLE_PRIORITY_TAGGING  0x0004  /* Don't override packet's priority */
49374a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
49384a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt/* Traffic management priority classes */
49397e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidttypedef enum trf_mgmt_priority_class {
49407e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	trf_mgmt_priority_low           = 0,            /* Maps to 802.1p BO */
49417e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	trf_mgmt_priority_medium        = 1,            /* Maps to 802.1p BE */
49427e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	trf_mgmt_priority_high          = 2,            /* Maps to 802.1p VI */
49437e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	trf_mgmt_priority_invalid       = (trf_mgmt_priority_high + 1)
49444a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt} trf_mgmt_priority_class_t;
49454a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
49464a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt/* Traffic management configuration parameters */
49477e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidttypedef struct trf_mgmt_config {
49487e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  trf_mgmt_enabled;                           /* 0 - disabled, 1 - enabled */
49497e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  flags;                                      /* See TRF_MGMT_FLAG_xxx defines */
49507e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  host_ip_addr;                               /* My IP address to determine subnet */
49517e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  host_subnet_mask;                           /* My subnet mask */
49527e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  downlink_bandwidth;                         /* In units of kbps */
49537e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  uplink_bandwidth;                           /* In units of kbps */
49547e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  min_tx_bandwidth[TRF_MGMT_MAX_PRIORITIES];  /* Minimum guaranteed tx bandwidth */
49557e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  min_rx_bandwidth[TRF_MGMT_MAX_PRIORITIES];  /* Minimum guaranteed rx bandwidth */
49564a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt} trf_mgmt_config_t;
49574a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
49584a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt/* Traffic management filter */
49597e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidttypedef struct trf_mgmt_filter {
49607e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	struct ether_addr           dst_ether_addr;         /* His L2 address */
49617e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32                      dst_ip_addr;            /* His IP address */
49627e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint16                      dst_port;               /* His L4 port */
49637e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint16                      src_port;               /* My L4 port */
49647e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint16                      prot;                   /* L4 protocol (only TCP or UDP) */
49657e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint16                      flags;                  /* TBD. For now, this must be zero. */
49667e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	trf_mgmt_priority_class_t   priority;               /* Priority for filtered packets */
49674a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt} trf_mgmt_filter_t;
49684a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
49697e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt/* Traffic management filter list (variable length) */
49707e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidttypedef struct trf_mgmt_filter_list     {
49717e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32              num_filters;
49724a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt	trf_mgmt_filter_t   filter[1];
49734a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt} trf_mgmt_filter_list_t;
49744a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
49757e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt/* Traffic management global info used for all queues */
49767e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidttypedef struct trf_mgmt_global_info {
49777e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  maximum_bytes_per_second;
49787e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  maximum_bytes_per_sampling_period;
49797e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  total_bytes_consumed_per_second;
49807e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  total_bytes_consumed_per_sampling_period;
49817e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  total_unused_bytes_per_sampling_period;
49827e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt} trf_mgmt_global_info_t;
49837e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt
49847e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt/* Traffic management shaping info per priority queue */
49857e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidttypedef struct trf_mgmt_shaping_info {
49867e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  gauranteed_bandwidth_percentage;
49877e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  guaranteed_bytes_per_second;
49887e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  guaranteed_bytes_per_sampling_period;
49897e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  num_bytes_produced_per_second;
49907e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  num_bytes_consumed_per_second;
49917e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  num_queued_packets;                         /* Number of packets in queue */
49927e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  num_queued_bytes;                           /* Number of bytes in queue */
49934a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt} trf_mgmt_shaping_info_t;
49944a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
49954a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt/* Traffic management shaping info array */
49967e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidttypedef struct trf_mgmt_shaping_info_array {
49977e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	trf_mgmt_global_info_t   tx_global_shaping_info;
49987e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	trf_mgmt_shaping_info_t  tx_queue_shaping_info[TRF_MGMT_MAX_PRIORITIES];
49997e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	trf_mgmt_global_info_t   rx_global_shaping_info;
50007e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	trf_mgmt_shaping_info_t  rx_queue_shaping_info[TRF_MGMT_MAX_PRIORITIES];
50014a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt} trf_mgmt_shaping_info_array_t;
50024a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
50034a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
50044a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt/* Traffic management statistical counters */
50057e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidttypedef struct trf_mgmt_stats {
50067e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  num_processed_packets;      /* Number of packets processed */
50077e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  num_processed_bytes;        /* Number of bytes processed */
50087e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint32  num_discarded_packets;      /* Number of packets discarded from queue */
50094a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt} trf_mgmt_stats_t;
50104a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
50117e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt/* Traffic management statisics array */
50127e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidttypedef struct trf_mgmt_stats_array     {
50137e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	trf_mgmt_stats_t  tx_queue_stats[TRF_MGMT_MAX_PRIORITIES];
50147e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	trf_mgmt_stats_t  rx_queue_stats[TRF_MGMT_MAX_PRIORITIES];
50154a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt} trf_mgmt_stats_array_t;
50164a3a0faf9abf605caf9ff7b27755d867b9ac9403Dmitry Shmidt
50177e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidttypedef struct powersel_params {
50187e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	/* LPC Params exposed via IOVAR */
50197e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	int32		tp_ratio_thresh;  /* Throughput ratio threshold */
50207e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint8		rate_stab_thresh; /* Thresh for rate stability based on nupd */
50217e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint8		pwr_stab_thresh; /* Number of successes before power step down */
50227e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt	uint8		pwr_sel_exp_time; /* Time lapse for expiry of database */
50237e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt} powersel_params_t;
50247e08da1fab9c184a9e4b1f640e0100b6e92a3e0bDmitry Shmidt
502566981be398731073dc68d703327d2cf24bd9c6abDmitry Shmidt#endif /* LINUX_POSTMOGRIFY_REMOVAL */
5026832523286e7a5d2fb5ea9f4b87659508d44cdf45Dmitry Shmidt#endif /* _wlioctl_h_ */
5027