Setting up repository
[linux-libre-firmware.git] / ath9k_htc / target_firmware / magpie_fw_dev / target / inc / adf_net_wcmd.h
1 /*
2  * Copyright (c) 2013 Qualcomm Atheros, Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted (subject to the limitations in the
7  * disclaimer below) provided that the following conditions are met:
8  *
9  *  * Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  *
12  *  * Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the
15  *    distribution.
16  *
17  *  * Neither the name of Qualcomm Atheros nor the names of its
18  *    contributors may be used to endorse or promote products derived
19  *    from this software without specific prior written permission.
20  *
21  * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
22  * GRANTED BY THIS LICENSE.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
23  * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
24  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
30  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
31  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
32  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
33  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34  */
35 /**
36  * Copyright (c) Atheros Communications Inc. 2002-2008
37  * 
38  */
39
40 #ifndef __ADF_NET_WCMD_H
41 #define __ADF_NET_WCMD_H
42
43 #include <adf_os_stdtypes.h>
44 #include <adf_os_types.h>
45 #include <adf_net_types.h>
46
47
48
49 /**
50  * Defines
51  */
52 #define ADF_NET_WCMD_NAME_SIZE          __ADF_OS_NAME_SIZE
53 #define ADF_NET_WCMD_NICK_NAME          32 /**< Max Device nick name size*/     
54 #define ADF_NET_WCMD_MODE_NAME_LEN      6 
55 #define ADF_NET_WCMD_IE_MAXLEN          256 /** Max Len for IE */
56
57 #define ADF_NET_WCMD_MAX_BITRATES       32
58 #define ADF_NET_WCMD_MAX_ENC_SZ         8
59 #define ADF_NET_WCMD_MAX_FREQ           32
60 #define ADF_NET_WCMD_MAX_TXPOWER        8
61 #define ADF_NET_WCMD_EVENT_CAP          6
62
63 /**
64  * @brief key set/get info
65  */
66 #define ADF_NET_WCMD_KEYBUF_SIZE        16
67 #define ADF_NET_WCMD_MICBUF_SIZE        16/**< space for tx+rx keys */ 
68 #define ADF_NET_WCMD_KEY_DEFAULT        0x80/**< default xmit key */
69 #define ADF_NET_WCMD_ADDR_LEN           6
70 #define ADF_NET_WCMD_KEYDATA_SZ          \
71     (ADF_NET_WCMD_KEYBUF_SIZE + ADF_NET_WCMD_MICBUF_SIZE)
72 /**
73  *  @brief key flags
74  *  XXX: enum's
75  */
76 #define ADF_NET_WCMD_VAPKEY_XMIT        0x01/**< xmit */
77 #define ADF_NET_WCMD_VAPKEY_RECV        0x02/**< recv */
78 #define ADF_NET_WCMD_VAPKEY_GROUP       0x04/**< WPA group*/ 
79 #define ADF_NET_WCMD_VAPKEY_SWCRYPT     0x10/**< Encrypt/decrypt*/ 
80 #define ADF_NET_WCMD_VAPKEY_SWMIC       0x20/**< Enmic/Demic */
81 #define ADF_NET_WCMD_VAPKEY_DEFAULT     0x80/**< Default key */
82
83 #define ADF_NET_WCMD_MAX_SSID           32
84 #define ADF_NET_WCMD_CHAN_BYTES         32
85
86 #define ADF_NET_WCMD_RTS_DEFAULT        512
87 #define ADF_NET_WCMD_RTS_MIN            1
88 #define ADF_NET_WCMD_RTS_MAX            2346
89
90 #define ADF_NET_WCMD_FRAG_MIN           256
91 #define ADF_NET_WCMD_FRAG_MAX           2346
92 /**
93  *  @brief  Maximum number of address that you may get in the
94  *          list of access ponts
95  */
96 #define  ADF_NET_WCMD_MAX_AP            64
97
98 #define ADF_NET_WCMD_RATE_MAXSIZE       30
99 #define ADF_NET_WCMD_NUM_TR_ENTS        128
100 /**
101  * @brief Ethtool specific
102  */
103 #define ADF_NET_WCMD_BUSINFO_LEN        32
104 #define ADF_NET_WCMD_DRIVSIZ            32  
105 #define ADF_NET_WCMD_VERSIZ             32  
106 #define ADF_NET_WCMD_FIRMSIZ            32  
107 /**
108  * *******************************Enums******************
109  */
110 typedef enum adf_net_wcmd_vapmode{
111     ADF_NET_WCMD_VAPMODE_AUTO,   /**< Driver default*/
112     ADF_NET_WCMD_VAPMODE_ADHOC,  /**< Single cell*/
113     ADF_NET_WCMD_VAPMODE_INFRA,  /**< Multi Cell or Roaming*/
114     ADF_NET_WCMD_VAPMODE_MASTER, /**< Access Point*/
115     ADF_NET_WCMD_VAPMODE_REPEAT, /**< Wireless Repeater*/
116     ADF_NET_WCMD_VAPMODE_SECOND, /**< Secondary master or repeater*/
117     ADF_NET_WCMD_VAPMODE_MONITOR /**< Passive Monitor*/
118 }adf_net_wcmd_vapmode_t;
119 /**
120  *  @brief key type
121  */
122 typedef enum adf_net_wcmd_ciphermode{
123     ADF_NET_WCMD_CIPHERMODE_WEP,
124     ADF_NET_WCMD_CIPHERMODE_TKIP,
125     ADF_NET_WCMD_CIPHERMODE_AES_OCB,
126     ADF_NET_WCMD_CIPHERMODE_AES_CCM ,
127     ADF_NET_WCMD_CIPHERMODE_RESERVE,
128     ADF_NET_WCMD_CIPHERMODE_CKIP,
129     ADF_NET_WCMD_CIPHERMODE_NONE
130 }adf_net_wcmd_ciphermode_t;
131 /**
132  * @brief Get/Set wireless commands
133  */
134 typedef enum adf_net_wcmd_type{
135     /* net80211 */
136     ADF_NET_WCMD_GET_RTS_THRES,     
137     ADF_NET_WCMD_SET_RTS_THRES,     
138     ADF_NET_WCMD_GET_FRAGMENT,  
139     ADF_NET_WCMD_SET_FRAGMENT,  
140     ADF_NET_WCMD_GET_VAPMODE,   
141     ADF_NET_WCMD_SET_VAPMODE,
142     ADF_NET_WCMD_GET_BSSID, 
143     ADF_NET_WCMD_SET_BSSID, 
144     ADF_NET_WCMD_GET_NICKNAME,      
145     ADF_NET_WCMD_SET_NICKNAME,      
146     ADF_NET_WCMD_GET_FREQUENCY,     
147     ADF_NET_WCMD_SET_FREQUENCY,     
148     ADF_NET_WCMD_GET_ESSID, 
149     ADF_NET_WCMD_SET_ESSID, 
150     ADF_NET_WCMD_GET_TX_POWER,  
151     ADF_NET_WCMD_SET_TX_POWER,
152     ADF_NET_WCMD_GET_PARAM,
153     ADF_NET_WCMD_SET_PARAM,
154     ADF_NET_WCMD_GET_OPT_IE,
155     ADF_NET_WCMD_SET_OPT_IE,
156     ADF_NET_WCMD_GET_APP_IE_BUF,
157     ADF_NET_WCMD_SET_APP_IE_BUF,
158     ADF_NET_WCMD_SET_ENC,
159     ADF_NET_WCMD_GET_KEY,
160     ADF_NET_WCMD_SET_KEY,
161     ADF_NET_WCMD_GET_SCAN,      
162     ADF_NET_WCMD_SET_SCAN,      
163     ADF_NET_WCMD_GET_MODE,  
164     ADF_NET_WCMD_SET_MODE,  
165     ADF_NET_WCMD_GET_CHAN_LIST, 
166     ADF_NET_WCMD_SET_CHAN_LIST, 
167     ADF_NET_WCMD_GET_WMM_PARAM, 
168     ADF_NET_WCMD_SET_WMM_PARAM, 
169     ADF_NET_WCMD_GET_VAPNAME,
170     ADF_NET_WCMD_GET_IC_CAPS,
171     ADF_NET_WCMD_GET_RETRIES,
172     ADF_NET_WCMD_GET_WAP_LIST,
173     ADF_NET_WCMD_GET_ADDBA_STATUS,
174     ADF_NET_WCMD_GET_CHAN_INFO,
175     ADF_NET_WCMD_GET_WPA_IE,
176     ADF_NET_WCMD_GET_WSC_IE,
177     ADF_NET_WCMD_SET_TXPOWER_LIMIT,
178     ADF_NET_WCMD_SET_TURBO,
179     ADF_NET_WCMD_SET_FILTER,
180     ADF_NET_WCMD_SET_ADDBA_RESPONSE,
181     ADF_NET_WCMD_SET_MLME,
182     ADF_NET_WCMD_SET_SEND_ADDBA,
183     ADF_NET_WCMD_SET_SEND_DELBA,
184     ADF_NET_WCMD_SET_DELKEY,
185     ADF_NET_WCMD_SET_DELMAC,
186     ADF_NET_WCMD_SET_ADD_MAC,
187     ADF_NET_WCMD_GET_RANGE,
188     ADF_NET_WCMD_GET_POWER,
189     ADF_NET_WCMD_SET_POWER,
190     ADF_NET_WCMD_GET_DEVSTATS,
191     ADF_NET_WCMD_SET_MTU,
192     ADF_NET_WCMD_SET_SYSCTL,
193     ADF_NET_WCMD_GET_STA_STATS,/* stats_sta */
194     ADF_NET_WCMD_GET_VAP_STATS, /* stats_vap */
195     ADF_NET_WCMD_GET_STATION_LIST, /* station */
196     /* Device specific */
197     ADF_NET_WCMD_SET_DEV_VAP_CREATE,
198     ADF_NET_WCMD_SET_DEV_TX_TIMEOUT,        /* XXX:No data definition */
199     ADF_NET_WCMD_SET_DEV_MODE_INIT,         /* XXX:No data definition */
200     ADF_NET_WCMD_GET_DEV_STATUS,
201     ADF_NET_WCMD_GET_DEV_STATUS_CLR,        /* XXX:No data definition */
202     ADF_NET_WCMD_GET_DEV_DIALOG,
203     ADF_NET_WCMD_GET_DEV_PHYERR,
204     ADF_NET_WCMD_GET_DEV_CWM,
205     ADF_NET_WCMD_GET_DEV_ETHTOOL,       
206     ADF_NET_WCMD_SET_DEV_MAC,
207     ADF_NET_WCMD_SET_DEV_CAP,/*ATH_CAP*/
208     /* Device write specific */
209     ADF_NET_WCMD_SET_DEV_EIFS_MASK,
210     ADF_NET_WCMD_SET_DEV_EIFS_DUR,
211     ADF_NET_WCMD_SET_DEV_SLOTTIME,
212     ADF_NET_WCMD_SET_DEV_ACKTIMEOUT,
213     ADF_NET_WCMD_SET_DEV_CTSTIMEOUT,
214     ADF_NET_WCMD_SET_DEV_SOFTLED,
215     ADF_NET_WCMD_SET_DEV_LEDPIN,
216     ADF_NET_WCMD_SET_DEV_DEBUG,
217     ADF_NET_WCMD_SET_DEV_TXANTENNA,
218     ADF_NET_WCMD_SET_DEV_RXANTENNA,
219     ADF_NET_WCMD_SET_DEV_DIVERSITY,
220     ADF_NET_WCMD_SET_DEV_TXINTRPERIOD,
221     ADF_NET_WCMD_SET_DEV_FFTXQMIN,
222     ADF_NET_WCMD_SET_DEV_TKIPMIC,
223     ADF_NET_WCMD_SET_DEV_GLOBALTXTIMEOUT,
224     ADF_NET_WCMD_SET_DEV_SW_WSC_BUTTON,
225     /* Device read specific */
226     ADF_NET_WCMD_GET_DEV_EIFS_MASK,
227     ADF_NET_WCMD_GET_DEV_EIFS_DUR,
228     ADF_NET_WCMD_GET_DEV_SLOTTIME,
229     ADF_NET_WCMD_GET_DEV_ACKTIMEOUT,
230     ADF_NET_WCMD_GET_DEV_CTSTIMEOUT,
231     ADF_NET_WCMD_GET_DEV_SOFTLED,
232     ADF_NET_WCMD_GET_DEV_LEDPIN,
233     ADF_NET_WCMD_GET_DEV_COUNTRYCODE,
234     ADF_NET_WCMD_GET_DEV_REGDOMAIN,
235     ADF_NET_WCMD_GET_DEV_DEBUG,
236     ADF_NET_WCMD_GET_DEV_TXANTENNA,
237     ADF_NET_WCMD_GET_DEV_RXANTENNA,
238     ADF_NET_WCMD_GET_DEV_DIVERSITY,
239     ADF_NET_WCMD_GET_DEV_TXINTRPERIOD,
240     ADF_NET_WCMD_GET_DEV_FFTXQMIN,
241     ADF_NET_WCMD_GET_DEV_TKIPMIC,
242     ADF_NET_WCMD_GET_DEV_GLOBALTXTIMEOUT,
243     ADF_NET_WCMD_GET_DEV_SW_WSC_BUTTON
244 }adf_net_wcmd_type_t;
245 /**
246  * @brief Opmodes for the VAP
247  */
248 typedef enum adf_net_wcmd_opmode{
249     ADF_NET_WCMD_OPMODE_IBSS,/**< IBSS (adhoc) station */
250     ADF_NET_WCMD_OPMODE_STA,/**< Infrastructure station */
251     ADF_NET_WCMD_OPMODE_WDS,/**< WDS link */
252     ADF_NET_WCMD_OPMODE_AHDEMO,/**< Old lucent compatible adhoc demo */
253     ADF_NET_WCMD_OPMODE_RESERVE0,/**<XXX: future use*/
254     ADF_NET_WCMD_OPMODE_RESERVE1,/**<XXX: future use*/
255     ADF_NET_WCMD_OPMODE_HOSTAP,/**< Software Access Point*/
256     ADF_NET_WCMD_OPMODE_RESERVE2,/**<XXX: future use*/
257     ADF_NET_WCMD_OPMODE_MONITOR/**< Monitor mode*/
258 }adf_net_wcmd_opmode_t;
259
260 /**
261  * brief PHY modes for VAP
262  */
263 typedef enum adf_net_wcmd_phymode{
264     ADF_NET_WCMD_PHYMODE_AUTO=0,/**< autoselect */
265     ADF_NET_WCMD_PHYMODE_11A=1,/**< 5GHz, OFDM */
266     ADF_NET_WCMD_PHYMODE_11B=2,/**< 2GHz, CCK */
267     ADF_NET_WCMD_PHYMODE_11G=3,/**< 2GHz, OFDM */
268     ADF_NET_WCMD_PHYMODE_FH=4,/**< 2GHz, GFSK */
269     ADF_NET_WCMD_PHYMODE_TURBO_A=5,/**< 5GHz, OFDM, 2 x clk dynamic turbo */
270     ADF_NET_WCMD_PHYMODE_TURBO_G=6,/**< 2GHz, OFDM, 2 x clk dynamic turbo*/
271     ADF_NET_WCMD_PHYMODE_11NA=7,/**< 5GHz, OFDM + MIMO*/
272     ADF_NET_WCMD_PHYMODE_11NG=8,/**< 2GHz, OFDM + MIMO*/
273     ADF_NET_WCMD_PHYMODE_TURBO_STATIC_A=9,/**< Turbo Static A*/
274 }adf_net_wcmd_phymode_t;
275 /**
276  * @brief param id
277  */
278 typedef enum adf_net_wcmd_param_id{
279     ADF_NET_WCMD_PARAM_TURBO = 1,/**<turbo mode */
280     ADF_NET_WCMD_PARAM_MODE,/**< phy mode (11a, 11b, etc.) */
281     ADF_NET_WCMD_PARAM_AUTHMODE,/**< authentication mode */
282     ADF_NET_WCMD_PARAM_PROTMODE,/**< 802.11g protection */
283     ADF_NET_WCMD_PARAM_MCASTCIPHER,/**< multicast/default cipher */
284     ADF_NET_WCMD_PARAM_MCASTKEYLEN,/**< multicast key length */
285     ADF_NET_WCMD_PARAM_UCASTCIPHERS,/**< unicast cipher suites */
286     ADF_NET_WCMD_PARAM_UCASTCIPHER,/**< unicast cipher */
287     ADF_NET_WCMD_PARAM_UCASTKEYLEN,/**< unicast key length */
288     ADF_NET_WCMD_PARAM_WPA,/**< WPA mode (0,1,2) */
289     ADF_NET_WCMD_PARAM_ROAMING,/**< roaming mode */
290     ADF_NET_WCMD_PARAM_PRIVACY,/**< privacy invoked */
291     ADF_NET_WCMD_PARAM_COUNTERMEASURES,/**< WPA/TKIP countermeasures */
292     ADF_NET_WCMD_PARAM_DROPUNENCRYPTED,/**< discard unencrypted frames */
293     ADF_NET_WCMD_PARAM_DRIVER_CAPS,/**< driver capabilities */
294     ADF_NET_WCMD_PARAM_MACCMD,/**< MAC ACL operation */
295     ADF_NET_WCMD_PARAM_WMM,/**< WMM mode (on, off) */
296     ADF_NET_WCMD_PARAM_HIDESSID,/**< hide SSID mode (on, off) */
297     ADF_NET_WCMD_PARAM_APBRIDGE,/**< AP inter-sta bridging */
298     ADF_NET_WCMD_PARAM_KEYMGTALGS,/**< key management algorithms */
299     ADF_NET_WCMD_PARAM_RSNCAPS,/**< RSN capabilities */
300     ADF_NET_WCMD_PARAM_INACT,/**< station inactivity timeout */
301     ADF_NET_WCMD_PARAM_INACT_AUTH,/**< station auth inact timeout */
302     ADF_NET_WCMD_PARAM_INACT_INIT,/**< station init inact timeout */
303     ADF_NET_WCMD_PARAM_ABOLT,/**< Atheros Adv. Capabilities */
304     ADF_NET_WCMD_PARAM_DTIM_PERIOD,/**< DTIM period (beacons) */
305     ADF_NET_WCMD_PARAM_BEACON_INTERVAL,/**< beacon interval (ms) */
306     ADF_NET_WCMD_PARAM_DOTH,/**< 11.h is on/off */
307     ADF_NET_WCMD_PARAM_PWRTARGET,/**< Current Channel Pwr Constraint */
308     ADF_NET_WCMD_PARAM_GENREASSOC,/**< Generate a reassociation request */
309     ADF_NET_WCMD_PARAM_COMPRESSION,/**< compression */
310     ADF_NET_WCMD_PARAM_FF,/**< fast frames support  */
311     ADF_NET_WCMD_PARAM_XR,/**< XR support */
312     ADF_NET_WCMD_PARAM_BURST,/**< burst mode */
313     ADF_NET_WCMD_PARAM_PUREG,/**< pure 11g (no 11b stations) */
314     ADF_NET_WCMD_PARAM_AR,/**< AR support */
315     ADF_NET_WCMD_PARAM_WDS,/**< Enable 4 address processing */
316     ADF_NET_WCMD_PARAM_BGSCAN,/**< bg scanning (on, off) */
317     ADF_NET_WCMD_PARAM_BGSCAN_IDLE,/**< bg scan idle threshold */
318     ADF_NET_WCMD_PARAM_BGSCAN_INTERVAL,/**< bg scan interval */
319     ADF_NET_WCMD_PARAM_MCAST_RATE,/**< Multicast Tx Rate */
320     ADF_NET_WCMD_PARAM_COVERAGE_CLASS,/**< coverage class */
321     ADF_NET_WCMD_PARAM_COUNTRY_IE,/**< enable country IE */
322     ADF_NET_WCMD_PARAM_SCANVALID,/**< scan cache valid threshold */
323     ADF_NET_WCMD_PARAM_ROAM_RSSI_11A,/**< rssi threshold in 11a */
324     ADF_NET_WCMD_PARAM_ROAM_RSSI_11B,/**< rssi threshold in 11b */
325     ADF_NET_WCMD_PARAM_ROAM_RSSI_11G,/**< rssi threshold in 11g */
326     ADF_NET_WCMD_PARAM_ROAM_RATE_11A,/**< tx rate threshold in 11a */
327     ADF_NET_WCMD_PARAM_ROAM_RATE_11B,/**< tx rate threshold in 11b */
328     ADF_NET_WCMD_PARAM_ROAM_RATE_11G,/**< tx rate threshold in 11g */
329     ADF_NET_WCMD_PARAM_UAPSDINFO,/**< value for qos info field */
330     ADF_NET_WCMD_PARAM_SLEEP,/**< force sleep/wake */
331     ADF_NET_WCMD_PARAM_QOSNULL,/**< force sleep/wake */
332     ADF_NET_WCMD_PARAM_PSPOLL,/**< force ps-poll generation (sta only) */
333     ADF_NET_WCMD_PARAM_EOSPDROP,/**< force uapsd EOSP drop (ap only) */
334     ADF_NET_WCMD_PARAM_MARKDFS,/**< mark a dfs interference channel*/
335     ADF_NET_WCMD_PARAM_REGCLASS,/**< enable regclass ids in country IE */
336     ADF_NET_WCMD_PARAM_CHANBW,/**< set chan bandwidth preference */
337     ADF_NET_WCMD_PARAM_WMM_AGGRMODE,/**< set WMM Aggressive Mode */
338     ADF_NET_WCMD_PARAM_SHORTPREAMBLE,/**< enable/disable short Preamble */
339     ADF_NET_WCMD_PARAM_BLOCKDFSCHAN,/**< enable/disable use of DFS channels */
340     ADF_NET_WCMD_PARAM_CWM_MODE,/**< CWM mode */
341     ADF_NET_WCMD_PARAM_CWM_EXTOFFSET,/**< Ext. channel offset */
342     ADF_NET_WCMD_PARAM_CWM_EXTPROTMODE,/**< Ext. Chan Protection mode */
343     ADF_NET_WCMD_PARAM_CWM_EXTPROTSPACING,/**< Ext. chan Protection spacing */
344     ADF_NET_WCMD_PARAM_CWM_ENABLE,/**< State machine enabled */
345     ADF_NET_WCMD_PARAM_CWM_EXTBUSYTHRESHOLD,/**< Ext. chan busy threshold*/
346     ADF_NET_WCMD_PARAM_CWM_CHWIDTH,/**< Current channel width */
347     ADF_NET_WCMD_PARAM_SHORT_GI,/**< half GI */
348     ADF_NET_WCMD_PARAM_FAST_CC,/**< fast channel change */
349     /**
350      * 11n A-MPDU, A-MSDU support
351      */ 
352     ADF_NET_WCMD_PARAM_AMPDU,/**< 11n a-mpdu support */
353     ADF_NET_WCMD_PARAM_AMPDU_LIMIT,/**< a-mpdu length limit */
354     ADF_NET_WCMD_PARAM_AMPDU_DENSITY,/**< a-mpdu density */
355     ADF_NET_WCMD_PARAM_AMPDU_SUBFRAMES,/**< a-mpdu subframe limit */
356     ADF_NET_WCMD_PARAM_AMSDU,/**< a-msdu support */
357     ADF_NET_WCMD_PARAM_AMSDU_LIMIT,/**< a-msdu length limit */
358     ADF_NET_WCMD_PARAM_COUNTRYCODE,/**< Get country code */
359     ADF_NET_WCMD_PARAM_TX_CHAINMASK,/**< Tx chain mask */
360     ADF_NET_WCMD_PARAM_RX_CHAINMASK,/**< Rx chain mask */
361     ADF_NET_WCMD_PARAM_RTSCTS_RATECODE,/**< RTS Rate code */
362     ADF_NET_WCMD_PARAM_HT_PROTECTION,/**< Protect traffic in HT mode */
363     ADF_NET_WCMD_PARAM_RESET_ONCE,/**< Force a reset */
364     ADF_NET_WCMD_PARAM_SETADDBAOPER,/**< Set ADDBA mode */
365     ADF_NET_WCMD_PARAM_TX_CHAINMASK_LEGACY,/**< Tx chain mask */
366     ADF_NET_WCMD_PARAM_11N_RATE,/**< Set ADDBA mode */
367     ADF_NET_WCMD_PARAM_11N_RETRIES,/**< Tx chain mask for legacy clients */
368     ADF_NET_WCMD_PARAM_WDS_AUTODETECT,/**< Autodetect/DelBa for WDS mode */
369     ADF_NET_WCMD_PARAM_RB,/**< Switch in/out of RB */
370     /**
371      * RB Detection knobs.
372      */ 
373     ADF_NET_WCMD_PARAM_RB_DETECT,/**< Do RB detection */
374     ADF_NET_WCMD_PARAM_RB_SKIP_THRESHOLD,/**< seqno-skip-by-1s to detect */
375     ADF_NET_WCMD_PARAM_RB_TIMEOUT,/**< (in ms) to restore non-RB */
376     ADF_NET_WCMD_PARAM_NO_HTIE,/**< Control HT IEs are sent out or parsed */
377     ADF_NET_WCMD_PARAM_MAXSTA/**< Config max allowable staions for each VAP */
378 }adf_net_wcmd_param_id_t;
379
380 /**
381  *  @brief APPIEBUF related definations
382  */
383 typedef enum adf_net_wcmd_appie_frame{
384     ADF_NET_WCMD_APPIE_FRAME_BEACON,
385     ADF_NET_WCMD_APPIE_FRAME_PROBE_REQ,
386     ADF_NET_WCMD_APPIE_FRAME_PROBE_RESP,
387     ADF_NET_WCMD_APPIE_FRAME_ASSOC_REQ,
388     ADF_NET_WCMD_APPIE_FRAME_ASSOC_RESP,
389     ADF_NET_WCMD_APPIE_NUM_OF_FRAME
390 }adf_net_wcmd_appie_frame_t;
391 /**
392  * @brief filter pointer info
393  */
394 typedef enum adf_net_wcmd_filter_type{
395     ADF_NET_WCMD_FILTER_TYPE_BEACON=0x1,
396     ADF_NET_WCMD_FILTER_TYPE_PROBE_REQ=0x2,
397     ADF_NET_WCMD_FILTER_TYPE_PROBE_RESP=0x4,
398     ADF_NET_WCMD_FILTER_TYPE_ASSOC_REQ=0x8,
399     ADF_NET_WCMD_FILTER_TYPE_ASSOC_RESP=0x10,
400     ADF_NET_WCMD_FILTER_TYPE_AUTH=0x20,
401     ADF_NET_WCMD_FILTER_TYPE_DEAUTH=0x40,
402     ADF_NET_WCMD_FILTER_TYPE_DISASSOC=0x80,
403     ADF_NET_WCMD_FILTER_TYPE_ALL=0xFF,
404 }adf_net_wcmd_filter_type_t;
405 /**
406  * @brief mlme info pointer
407  */
408 typedef enum adf_net_wcmd_mlme_op_type{
409     ADF_NET_WCMD_MLME_ASSOC,
410     ADF_NET_WCMD_MLME_DISASSOC,
411     ADF_NET_WCMD_MLME_DEAUTH,
412     ADF_NET_WCMD_MLME_AUTHORIZE,
413     ADF_NET_WCMD_MLME_UNAUTHORIZE,
414 }adf_net_wcmd_mlme_op_type_t;
415
416 typedef enum adf_net_wcmd_wmmparams{
417     ADF_NET_WCMD_WMMPARAMS_CWMIN = 1,
418     ADF_NET_WCMD_WMMPARAMS_CWMAX,
419     ADF_NET_WCMD_WMMPARAMS_AIFS,
420     ADF_NET_WCMD_WMMPARAMS_TXOPLIMIT,
421     ADF_NET_WCMD_WMMPARAMS_ACM,
422     ADF_NET_WCMD_WMMPARAMS_NOACKPOLICY, 
423 }adf_net_wcmd_wmmparams_t;
424
425 /**
426  * @brief Power Management Flags
427  */
428 typedef enum adf_net_wcmd_pmflags{
429     ADF_NET_WCMD_POWER_ON  = 0x0,
430     ADF_NET_WCMD_POWER_MIN = 0x1,/**< Min */
431     ADF_NET_WCMD_POWER_MAX = 0x2,/**< Max */
432     ADF_NET_WCMD_POWER_REL = 0x4,/**< Not in seconds/ms/us */
433     ADF_NET_WCMD_POWER_MOD = 0xF,/**< Modify a parameter */
434     ADF_NET_WCMD_POWER_UCAST_R = 0x100,/**< Ucast messages */
435     ADF_NET_WCMD_POWER_MCAST_R = 0x200,/**< Mcast messages */
436     ADF_NET_WCMD_POWER_ALL_R = 0x300,/**< All messages though PM */
437     ADF_NET_WCMD_POWER_FORCE_S = 0x400,/**< Force PM to unicast */
438     ADF_NET_WCMD_POWER_REPEATER = 0x800,/**< Bcast messages in PM*/
439     ADF_NET_WCMD_POWER_MODE = 0xF00,/**< Power Management mode */
440     ADF_NET_WCMD_POWER_PERIOD = 0x1000,/**< Period/Duration of */
441     ADF_NET_WCMD_POWER_TIMEOUT = 0x2000,/**< Timeout (to go asleep) */
442     ADF_NET_WCMD_POWER_TYPE = 0xF000/**< Type of parameter */
443 }adf_net_wcmd_pmflags_t;
444 /**
445  * @brief Tx Power flags
446  */
447 typedef enum adf_net_wcmd_txpow_flags{
448     ADF_NET_WCMD_TXPOW_DBM = 0,/**< dBm */
449     ADF_NET_WCMD_TXPOW_MWATT = 0x1,/**< mW */
450     ADF_NET_WCMD_TXPOW_RELATIVE = 0x2,/**< Arbitrary units */
451     ADF_NET_WCMD_TXPOW_TYPE = 0xFF,/**< Type of value */    
452     ADF_NET_WCMD_TXPOW_RANGE = 0x1000/**< Range (min - max) */ 
453 }adf_net_wcmd_txpow_flags_t;
454 /**
455  * @brief Retry flags
456  */
457 typedef enum adf_net_wcmd_retry_flags{
458     ADF_NET_WCMD_RETRY_ON = 0x0,
459     ADF_NET_WCMD_RETRY_MIN = 0x1,/**< Value is a minimum */
460     ADF_NET_WCMD_RETRY_MAX = 0x2,/**< Maximum */
461     ADF_NET_WCMD_RETRY_RELATIVE = 0x4,/**< Not in seconds/ms/us */
462     ADF_NET_WCMD_RETRY_SHORT = 0x10,/**< Short packets  */
463     ADF_NET_WCMD_RETRY_LONG = 0x20,/**< Long packets */ 
464     ADF_NET_WCMD_RETRY_MODIFIER = 0xFF,/**< Modify a parameter */
465     ADF_NET_WCMD_RETRY_LIMIT = 0x1000,/**< Max retries*/
466     ADF_NET_WCMD_RETRY_LIFETIME = 0x2000,/**< Max retries us*/
467     ADF_NET_WCMD_RETRY_TYPE = 0xF000,/**< Parameter type */
468 }adf_net_wcmd_retry_flags_t;
469 /**
470  * @brief choose the CWM struct type
471  */
472 typedef enum adf_net_wcmd_cwmtype{
473     ADF_NET_WCMD_CWMTYPE_INFO=139,/**< driver requirement */
474     ADF_NET_WCMD_CWMTYPE_DBG/**< driver requirement */
475 }adf_net_wcmd_cwmtype_t;
476 /**
477  * @brief CWM Debug mode commands
478  */
479 typedef enum adf_net_wcmd_cwm_cmd{
480     ADF_NET_WCMD_CWM_CMD_EVENT,/**< Send Event */
481     ADF_NET_WCMD_CWM_CMD_CTL,/**< Ctrl channel busy */
482     ADF_NET_WCMD_CWM_CMD_EXT,/**< Ext chan busy */
483     ADF_NET_WCMD_CWM_CMD_VCTL,/**< virt ctrl chan busy*/
484     ADF_NET_DBGCWM_CMD_VEXT/**< virt extension channel busy*/
485 }adf_net_wcmd_cwm_cmd_t;
486
487 /**
488  * @brief CWM EVENTS
489  */
490 typedef enum adf_net_wcmd_cwm_event{
491     ADF_NET_WCMD_CWMEVENT_TXTIMEOUT,  /**< tx timeout interrupt */
492     ADF_NET_WCMD_CWMEVENT_EXTCHCLEAR, /**< ext channel sensing clear */
493     ADF_NET_WCMD_CWMEVENT_EXTCHBUSY,  /**< ext channel sensing busy */
494     ADF_NET_WCMD_CWMEVENT_EXTCHSTOP,  /**< ext channel sensing stop */
495     ADF_NET_WCMD_CWMEVENT_EXTCHRESUME,/**< ext channel sensing resume */
496     ADF_NET_WCMD_CWMEVENT_DESTCW20,   /**< dest channel width changed to 20 */
497     ADF_NET_WCMD_CWMEVENT_DESTCW40,   /**< dest channel width changed to 40 */
498     ADF_NET_WCMD_CWMEVENT_MAX 
499 } adf_net_wcmd_cwm_event_t;
500
501 /**
502  * @brief eth tool info
503  */
504 typedef enum adf_net_wcmd_ethtool_cmd{
505     ADF_NET_WCMD_ETHTOOL_GSET=0x1,/**< Get settings. */
506     ADF_NET_WCMD_ETHTOOL_SSET,/**< Set settings. */
507     ADF_NET_WCMD_ETHTOOL_GDRVINFO,/**< Get driver info. */
508     ADF_NET_WCMD_ETHTOOL_GREGS,/**< Get NIC registers. */
509     ADF_NET_WCMD_ETHTOOL_GWOL,/**< Wake-on-lan options. */
510     ADF_NET_WCMD_ETHTOOL_SWOL,/**< Set wake-on-lan options. */
511     ADF_NET_WCMD_ETHTOOL_GMSGLVL,/**< Get driver message level */
512     ADF_NET_WCMD_ETHTOOL_SMSGLVL,/**< Set driver msg level */
513     ADF_NET_WCMD_ETHTOOL_NWAY_RST,/**< Restart autonegotiation. */ 
514     ADF_NET_WCMD_ETHTOOL_GEEPROM,/**< Get EEPROM data */
515     ADF_NET_WCMD_ETHTOOL_SEEPROM,/** < Set EEPROM data. */
516     ADF_NET_WCMD_ETHTOOL_GCOALESCE,/** < Get coalesce config */
517     ADF_NET_WCMD_ETHTOOL_SCOALESCE,/** < Set coalesce config. */
518     ADF_NET_WCMD_ETHTOOL_GRINGPARAM,/** < Get ring parameters */
519     ADF_NET_WCMD_ETHTOOL_SRINGPARAM,/** < Set ring parameters. */
520     ADF_NET_WCMD_ETHTOOL_GPAUSEPARAM,/** < Get pause parameters */
521     ADF_NET_WCMD_ETHTOOL_SPAUSEPARAM,/** < Set pause parameters. */
522     ADF_NET_WCMD_ETHTOOL_GRXCSUM,/** < Get RX hw csum enable */
523     ADF_NET_WCMD_ETHTOOL_SRXCSUM,/** < Set RX hw csum enable */
524     ADF_NET_WCMD_ETHTOOL_GTXCSUM,/** < Get TX hw csum enable */
525     ADF_NET_WCMD_ETHTOOL_STXCSUM,/** < Set TX hw csum enable */
526     ADF_NET_WCMD_ETHTOOL_GSG,/** < Get scatter-gather enable */
527     ADF_NET_WCMD_ETHTOOL_SSG,/** < Set scatter-gather enable */
528     ADF_NET_WCMD_ETHTOOL_TEST,/** < execute NIC self-test. */
529     ADF_NET_WCMD_ETHTOOL_GSTRINGS,/** < get specified string set */
530     ADF_NET_WCMD_ETHTOOL_PHYS_ID,/** < identify the NIC */
531     ADF_NET_WCMD_ETHTOOL_GSTATS,/** < get NIC-specific statistics */
532     ADF_NET_WCMD_ETHTOOL_GTSO,/** < Get TSO enable (ethtool_value) */
533     ADF_NET_WCMD_ETHTOOL_STSO,/** < Set TSO enable (ethtool_value) */
534     ADF_NET_WCMD_ETHTOOL_GPERMADDR,/** < Get permanent hardware address */
535     ADF_NET_WCMD_ETHTOOL_GUFO,/** < Get UFO enable */
536     ADF_NET_WCMD_ETHTOOL_SUFO,/** < Set UFO enable */
537     ADF_NET_WCMD_ETHTOOL_GGSO,/** < Get GSO enable */
538     ADF_NET_WCMD_ETHTOOL_SGSO,/** < Set GSO enable */
539 }adf_net_wcmd_ethtool_cmd_t;
540
541 /**
542  * ***************************Structures***********************
543  */
544 /**
545  * @brief Information Element
546  */
547 typedef struct adf_net_ie_info{
548     a_uint16_t         len;
549     a_uint8_t          data[ADF_NET_WCMD_IE_MAXLEN];
550 }adf_net_ie_info_t;
551 /**
552  * @brief WCMD info
553  */
554 typedef struct adf_net_wcmd_vapname{
555     a_uint32_t     len;
556     a_uint8_t      name[ADF_NET_WCMD_NAME_SIZE];
557 }adf_net_wcmd_vapname_t;
558 /**
559  * @brief nickname pointer info
560  */
561 typedef struct adf_net_wcmd_nickname{
562     a_uint16_t      len;
563     a_uint8_t       name[ADF_NET_WCMD_NICK_NAME];
564 }adf_net_wcmd_nickname_t;
565 /**
566  * @brief missed frame info
567  */
568 typedef struct  adf_net_wcmd_miss{
569     a_uint32_t      beacon;/**< Others cases */
570 }adf_net_wcmd_miss_t;
571 /**
572  * @brief  discarded frame info
573  */
574 typedef struct  adf_net_wcmd_discard{
575     a_uint32_t      nwid;/**< Rx : Wrong nwid/essid */
576     a_uint32_t      code; /**< Rx : Unable to code/decode (WEP) */
577     a_uint32_t      fragment;/**< Rx : Can't perform MAC reassembly */
578     a_uint32_t      retries;/**< Tx : Max MAC retries num reached */
579     a_uint32_t      misc;/**< Others cases */
580 }adf_net_wcmd_discard_t;
581 /**
582  * @brief Link quality info
583  */
584 typedef struct  adf_net_wcmd_linkqty{
585     a_uint8_t       qual;/*link quality(retries, SNR, missed beacons)*/ 
586     a_uint8_t       level;/*Signal level (dBm) */
587     a_uint8_t       noise;/*Noise level (dBm) */
588     a_uint8_t       updated;/*Update flag*/
589 }adf_net_wcmd_linkqty_t;
590 /**
591  * @brief frequency info
592  */
593 typedef struct  adf_net_wcmd_freq{
594     a_int32_t       m;/*Mantissa */
595     a_int16_t       e;/*Exponent */
596     a_uint8_t       i;/*List index (when in range struct) */
597     a_uint8_t       flags;/*Flags (fixed/auto) */
598
599 }adf_net_wcmd_freq_t;
600 /**
601  * @brief VAP parameter range info
602  */
603 typedef struct adf_net_wcmd_vapparam_range{
604     
605     /**
606      * @brief Informative stuff (to choose between different
607      * interface) In theory this value should be the maximum
608      * benchmarked TCP/IP throughput, because with most of these
609      * devices the bit rate is meaningless (overhead an co) to
610      * estimate how fast the connection will go and pick the fastest
611      * one. I suggest people to play with Netperf or any
612      * benchmark...
613      */
614     a_uint32_t           throughput;/**< To give an idea... */
615     
616     /** @brief NWID (or domain id) */
617     a_uint32_t           min_nwid;/**< Min NWID to set */
618     a_uint32_t           max_nwid;/**< Max NWID to set */
619
620     /**
621      * @brief Old Frequency (backward compatibility - moved lower )
622      */
623     a_uint16_t           old_num_channels;
624     a_uint8_t            old_num_frequency;
625
626     /**@brief Wireless event capability bitmasks */
627     a_uint32_t          event_capa[ADF_NET_WCMD_EVENT_CAP];
628
629     /**@brief Signal level threshold range */
630     a_int32_t           sensitivity;
631
632     /**
633      * @brief Quality of link & SNR stuff Quality range (link,
634      * level, noise) If the quality is absolute, it will be in the
635      * range [0
636      * - max_qual], if the quality is dBm, it will be in the range
637      * [max_qual - 0]. Don't forget that we use 8 bit arithmetics...
638      */
639     adf_net_wcmd_linkqty_t       max_qual;/**< Link Quality*/
640
641     /**
642      * @brief This should contain the average/typical values of the
643      * quality indicator. This should be the threshold between a
644      * "good" and a "bad" link (example : monitor going from green
645      * to orange). Currently, user space apps like quality monitors
646      * don't have any way to calibrate the measurement. With this,
647      * they can split the range between 0 and max_qual in different
648      * quality level (using a geometric subdivision centered on the
649      * average). I expect that people doing the user space apps will
650      * feedback us on which value we need to put in each
651      * driver... 
652      */
653     adf_net_wcmd_linkqty_t       avg_qual; 
654
655     /**@brief Rates */
656     a_uint8_t           num_bitrates; /**< Number of entries in the list */
657     a_int32_t           bitrate[ADF_NET_WCMD_MAX_BITRATES]; /**< in bps */
658
659     /**@brief RTS threshold */
660     a_int32_t           min_rts; /**< Minimal RTS threshold */
661     a_int32_t           max_rts; /**< Maximal RTS threshold */
662
663     /**@brief Frag threshold */
664     a_int32_t           min_frag;/**< Minimal frag threshold */
665     a_int32_t           max_frag;/**< Maximal frag threshold */
666
667     /**@brief Power Management duration & timeout */
668     a_int32_t           min_pmp;/**< Minimal PM period */
669     a_int32_t           max_pmp;/**< Maximal PM period */
670     a_int32_t           min_pmt;/**< Minimal PM timeout */
671     a_int32_t           max_pmt;/**< Maximal PM timeout */
672     a_uint16_t          pmp_flags;/**< decode max/min PM period */
673     a_uint16_t          pmt_flags;/**< decode max/min PM timeout */
674     a_uint16_t          pm_capa;/**< PM options supported */
675
676     /**@brief Encoder stuff, Different token sizes */
677     a_uint16_t          enc_sz[ADF_NET_WCMD_MAX_ENC_SZ];
678     a_uint8_t           num_enc_sz; /**< Number of entry in the list */
679     a_uint8_t           max_enc_tk;/**< Max number of tokens */
680     /**@brief For drivers that need a "login/passwd" form */
681     a_uint8_t           enc_login_idx;/**< token index for login token */
682
683     /**@brief Transmit power */
684     a_uint16_t          txpower_capa;/**< options supported */
685     a_uint8_t           num_txpower;/**< Number of entries in the list */
686     a_int32_t           txpower[ADF_NET_WCMD_MAX_TXPOWER];/**< in bps */
687     
688     /**@brief Wireless Extension version info */
689     a_uint8_t           we_version_compiled;/**< Must be WIRELESS_EXT */
690     a_uint8_t           we_version_source;/**< Last update of source */
691     
692     /**@brief Retry limits and lifetime */
693     a_uint16_t          retry_capa;/**< retry options supported */
694     a_uint16_t          retry_flags;/**< decode max/min retry limit*/
695     a_uint16_t          r_time_flags;/**< Decode max/min retry life */
696     a_int32_t           min_retry;/**< Min retries */
697     a_int32_t           max_retry;/**< Max retries */
698     a_int32_t           min_r_time;/**< Min retry lifetime */
699     a_int32_t           max_r_time;/**< Max retry lifetime */
700     
701     /**@brief Frequency */
702     a_uint16_t          num_channels;/**< Num channels [0 - (num - 1)] */
703     a_uint8_t           num_frequency;/**< Num entries*/
704     /**
705      * Note : this frequency list doesn't need to fit channel
706      * numbers, because each entry contain its channel index
707      */
708     adf_net_wcmd_freq_t    freq[ADF_NET_WCMD_MAX_FREQ];
709     
710     a_uint32_t          enc_capa; /**< IW_ENC_CAPA_* bit field */
711 }adf_net_wcmd_vapparam_range_t;
712 /**
713  * @brief key info
714  */
715 typedef struct adf_net_wcmd_keyinfo{
716     a_uint8_t   ik_type; /**< key/cipher type */
717     a_uint8_t   ik_pad;
718     a_uint16_t  ik_keyix;/**< key index */
719     a_uint8_t   ik_keylen;/**< key length in bytes */
720     a_uint8_t   ik_flags;
721     a_uint8_t   ik_macaddr[ADF_NET_WCMD_ADDR_LEN];
722     a_uint64_t  ik_keyrsc;/**< key receive sequence counter */
723     a_uint64_t  ik_keytsc;/**< key transmit sequence counter */
724     a_uint8_t   ik_keydata[ADF_NET_WCMD_KEYDATA_SZ];
725 }adf_net_wcmd_keyinfo_t;
726
727 /**
728  * @brief bssid pointer info
729  */
730 typedef struct adf_net_wcmd_bssid{
731     a_uint8_t      bssid[ADF_NET_WCMD_ADDR_LEN];
732 }adf_net_wcmd_bssid_t;
733
734 /**
735  * @brief essid structure info
736  */
737 typedef struct  adf_net_wcmd_ssid{
738     a_uint8_t     byte[ADF_NET_WCMD_MAX_SSID];
739     a_uint16_t    len;/**< number of fields or size in bytes */
740     a_uint16_t    flags;/**< Optional  */
741 } adf_net_wcmd_ssid_t;
742
743 typedef struct adf_net_wcmd_param{
744     adf_net_wcmd_param_id_t   param_id;
745     a_uint32_t                value;
746 }adf_net_wcmd_param_t;
747
748 /**
749  * @brief optional IE pointer info
750  */
751 typedef adf_net_ie_info_t  adf_net_wcmd_optie_t;
752
753 /**
754  * @brief status of VAP interface 
755  */ 
756 typedef struct adf_net_wcmd_vapstats{
757     a_uint8_t                  status;/**< Status*/
758     adf_net_wcmd_linkqty_t     qual;/**< Quality of the link*/
759     adf_net_wcmd_discard_t     discard;/**< Packet discarded counts */ 
760     adf_net_wcmd_miss_t        miss;/**< Packet missed counts */
761 } adf_net_wcmd_vapstats_t;
762
763 /**
764  * @brief appie pointer info
765  */
766 typedef struct adf_net_wcmd_appie{
767     adf_net_wcmd_appie_frame_t     frmtype;
768     a_uint32_t                     len;
769     a_uint8_t                      data[ADF_NET_WCMD_IE_MAXLEN];
770 }adf_net_wcmd_appie_t;
771 /**
772  * @brief send ADDBA info pointer
773  */
774 typedef struct adf_net_wcmd_addba{
775     a_uint16_t  aid;
776     a_uint32_t  tid;
777     a_uint32_t  arg1;
778 }adf_net_wcmd_addba_t;
779 /**
780  * @brief ADDBA status pointer info
781  */
782 typedef struct adf_net_wcmd_addba_status{
783     a_uint16_t  aid;
784     a_uint32_t  tid;
785     a_uint16_t  status;
786 }adf_net_wcmd_addba_status_t;
787 /**
788  * @brief ADDBA response pointer info
789  */
790 typedef struct adf_net_wcmd_addba_resp{
791     a_uint16_t  aid;
792     a_uint32_t  tid;
793     a_uint32_t  arg1;
794 }adf_net_wcmd_addba_resp_t;
795
796 /**
797  * @brief send DELBA info pointer
798  */
799 typedef struct adf_net_wcmd_delba{
800     a_uint16_t  aid;
801     a_uint32_t  tid;
802     a_uint32_t  arg1;
803     a_uint32_t  arg2;
804 }adf_net_wcmd_delba_t;
805
806 /**
807  * @brief MLME
808  */
809 typedef struct adf_net_wcmd_mlme{
810     adf_net_wcmd_mlme_op_type_t  op;/**< operation to perform */ 
811     a_uint8_t                    reason;/**< 802.11 reason code */
812     //a_uint8_t                         macaddr[ADF_NET_WCMD_ADDR_LEN];
813     adf_net_ethaddr_t            mac;
814 }adf_net_wcmd_mlme_t;
815
816 /**
817  * @brief Set the active channel list.  Note this list is
818  * intersected with the available channel list in
819  * calculating the set of channels actually used in
820  * scanning.
821  */
822 typedef struct adf_net_wcmd_chanlist{
823     a_uint8_t   chanlist[ADF_NET_WCMD_CHAN_BYTES];
824 //    u_int16_t   len;
825 }adf_net_wcmd_chanlist_t;
826
827 /**
828  * @brief Channels are specified by frequency and attributes.
829  */
830 typedef struct adf_net_wcmd_chan{
831     a_uint16_t  freq;/**< setting in Mhz */
832     a_uint32_t  flags;/**< see below */
833     a_uint8_t   ieee;/**< IEEE channel number */
834     a_int8_t    maxregpower;/**< maximum regulatory tx power in dBm */
835     a_int8_t    maxpower;/**< maximum tx power in dBm */
836     a_int8_t    minpower;/**< minimum tx power in dBm */
837     a_uint8_t   regclassid;/**< regulatory class id */
838 } adf_net_wcmd_chan_t;
839 /**
840  * @brief channel info pointer
841  */
842 typedef struct adf_net_wcmd_chaninfo{
843     a_uint32_t            nchans;
844     adf_net_wcmd_chan_t   chans;
845 }adf_net_wcmd_chaninfo_t;
846
847 /**
848  * @brief wmm-param info 
849  */ 
850 typedef struct adf_net_wcmd_wmmparaminfo{
851     adf_net_wcmd_wmmparams_t  cmd;
852     a_uint32_t                ac;
853     a_uint32_t                bss;
854     a_uint32_t                value;
855 }adf_net_wcmd_wmmparaminfo_t;
856 /**
857  * @brief wpa ie pointer info
858  */
859 typedef struct adf_net_wcmd_wpaie{
860     adf_net_ethaddr_t  mac;
861     adf_net_ie_info_t  ie;
862 }adf_net_wcmd_wpaie_t;
863
864
865 /**
866  * @brief wsc ie pointer info
867  */
868 typedef struct adf_net_wcmd_wscie{
869     adf_net_ethaddr_t  mac;
870     adf_net_ie_info_t   ie;
871 }adf_net_wcmd_wscie_t;
872 /**
873  * @brief rts threshold set/get info
874  */
875 typedef struct adf_net_wcmd_rts_th{
876     a_uint16_t          threshold;
877     a_uint16_t          disabled;
878     a_uint16_t          fixed;
879 }adf_net_wcmd_rts_th_t;
880 /**
881  * @brief fragment threshold set/get info
882  */
883 typedef struct adf_net_wcmd_frag_th{
884     a_uint16_t     threshold;
885     a_uint16_t     disabled;
886     a_uint16_t     fixed;
887 }adf_net_wcmd_frag_th_t;
888 /**
889  * @brief ic_caps set/get/enable/disable info
890  */
891 typedef a_uint32_t     adf_net_wcmd_ic_caps_t;
892 /**
893  * @brief iv_opmode set/get/enable/disable info
894  */
895 typedef a_uint32_t     adf_net_wcmd_iv_opmode_t;
896 /**
897  * @brief retries set/get/enable/disable info
898  */
899 typedef struct adf_net_wcmd_retries{
900   a_int32_t          value;/**< The value of the parameter itself */
901   a_uint8_t          disabled;/**< Disable the feature */
902   a_uint16_t         flags;/**< Various specifc flags (if any) */
903 }adf_net_wcmd_retries_t;
904
905 /**
906  * @brief power set/get info
907  */
908 typedef struct adf_net_wcmd_power{
909   a_int32_t               value;/**< The value of the parameter itself */
910   a_uint8_t               disabled;/**< Disable the feature */
911   adf_net_wcmd_pmflags_t  flags;/**< Various specifc flags (if any) */
912   a_int32_t               fixed;/**< fixed */
913 }adf_net_wcmd_power_t;
914
915 /**
916  * @brief txpower set/get/enable/disable info
917  */
918 typedef struct adf_net_wcmd_txpower{
919     a_uint32_t                     txpower;
920     a_uint8_t                      fixed;
921     a_uint8_t                      disabled;
922     adf_net_wcmd_txpow_flags_t     flags;
923 }adf_net_wcmd_txpower_t;
924
925 /**
926  * @brief tx-power-limit info 
927  */ 
928 typedef a_uint32_t  adf_net_wcmd_txpowlimit_t;
929
930
931 /**
932  * @brief Scan result data returned
933  */
934 typedef struct adf_net_wcmd_scan_result{
935     a_uint16_t  isr_len;        /**< length (mult of 4) */
936     a_uint16_t  isr_freq;       /**< MHz */
937     a_uint32_t  isr_flags;     /**< channel flags */
938     a_uint8_t   isr_noise;
939     a_uint8_t   isr_rssi;
940     a_uint8_t   isr_intval;     /**< beacon interval */
941     a_uint16_t  isr_capinfo;    /**< capabilities */
942     a_uint8_t   isr_erp;        /**< ERP element */
943     a_uint8_t   isr_bssid[ADF_NET_WCMD_ADDR_LEN];
944     a_uint8_t   isr_nrates;
945     a_uint8_t   isr_rates[ADF_NET_WCMD_RATE_MAXSIZE];
946     a_uint8_t   isr_ssid_len;   /**< SSID length */
947     a_uint8_t   isr_ie_len;     /**< IE length */
948     a_uint8_t   isr_pad[5];
949     /* variable length SSID followed by IE data */
950 } adf_net_wcmd_scan_result_t;
951
952 /**
953  * @brief scan request info
954  */
955 typedef struct adf_net_wcmd_scan{
956     adf_net_wcmd_scan_result_t  result[ADF_NET_WCMD_MAX_AP];
957     a_uint32_t                  len;/*Valid entries*/
958 }adf_net_wcmd_scan_t;
959 /**
960  * @brief waplist request info
961  */
962 typedef struct adf_net_wcmd_vaplist{
963     a_uint8_t          list[ADF_NET_WCMD_MAX_AP];
964     a_uint32_t         len;   
965 }adf_net_wcmd_vaplist_t;
966 /**
967  * @brief list of stations
968  */
969 typedef struct adf_net_wcmd_stainfo{
970     a_uint8_t          list[ADF_NET_WCMD_MAX_AP];
971     a_uint32_t         len;
972 } adf_net_wcmd_stainfo_t;
973 /**
974  * @brief ath caps info
975  */
976 typedef struct adf_net_wcmd_devcap{ 
977     a_int32_t   cap; 
978     a_int32_t   setting; 
979 }adf_net_wcmd_devcap_t; 
980
981 /**
982  * @brief station stats
983  */
984 typedef struct adf_net_wcmd_stastats{
985     adf_net_ethaddr_t  mac;/**< MAC of the station*/
986     struct ns_data{
987         a_uint32_t  ns_rx_data;/**< rx data frames */
988         a_uint32_t  ns_rx_mgmt;/**< rx management frames */
989         a_uint32_t  ns_rx_ctrl;/**< rx control frames */
990         a_uint32_t  ns_rx_ucast;/**< rx unicast frames */
991         a_uint32_t  ns_rx_mcast;/**< rx multi/broadcast frames */
992         a_uint64_t  ns_rx_bytes;/**< rx data count (bytes) */
993         a_uint64_t  ns_rx_beacons;/**< rx beacon frames */
994         a_uint32_t  ns_rx_proberesp;/**< rx probe response frames */
995         
996         a_uint32_t  ns_rx_dup;/**< rx discard 'cuz dup */
997         a_uint32_t  ns_rx_noprivacy;/**< rx w/ wep but privacy off */
998         a_uint32_t  ns_rx_wepfail;/**< rx wep processing failed */
999         a_uint32_t  ns_rx_demicfail;/**< rx demic failed */
1000         a_uint32_t  ns_rx_decap;/**< rx decapsulation failed */
1001         a_uint32_t  ns_rx_defrag;/**< rx defragmentation failed */
1002         a_uint32_t  ns_rx_disassoc;/**< rx disassociation */
1003         a_uint32_t  ns_rx_deauth;/**< rx deauthentication */
1004         a_uint32_t  ns_rx_action;/**< rx action */
1005         a_uint32_t  ns_rx_decryptcrc;/**< rx decrypt failed on crc */
1006         a_uint32_t  ns_rx_unauth;/**< rx on unauthorized port */
1007         a_uint32_t  ns_rx_unencrypted;/**< rx unecrypted w/ privacy */
1008     
1009         a_uint32_t  ns_tx_data;/**< tx data frames */
1010         a_uint32_t  ns_tx_mgmt;/**< tx management frames */
1011         a_uint32_t  ns_tx_ucast;/**< tx unicast frames */
1012         a_uint32_t  ns_tx_mcast;/**< tx multi/broadcast frames */
1013         a_uint64_t  ns_tx_bytes;/**< tx data count (bytes) */
1014         a_uint32_t  ns_tx_probereq;/**< tx probe request frames */
1015         a_uint32_t  ns_tx_uapsd;/**< tx on uapsd queue */
1016         
1017         a_uint32_t  ns_tx_novlantag;/**< tx discard 'cuz no tag */
1018         a_uint32_t  ns_tx_vlanmismatch;/**< tx discard 'cuz bad tag */
1019     
1020         a_uint32_t  ns_tx_eosplost;/**< uapsd EOSP retried out */
1021     
1022         a_uint32_t  ns_ps_discard;/**< ps discard 'cuz of age */
1023     
1024         a_uint32_t  ns_uapsd_triggers;/**< uapsd triggers */
1025     
1026         /* MIB-related state */
1027         a_uint32_t  ns_tx_assoc;/**< [re]associations */
1028         a_uint32_t  ns_tx_assoc_fail;/**< [re]association failures */
1029         a_uint32_t  ns_tx_auth;/**< [re]authentications */
1030         a_uint32_t  ns_tx_auth_fail;/**< [re]authentication failures*/
1031         a_uint32_t  ns_tx_deauth;/**< deauthentications */
1032         a_uint32_t  ns_tx_deauth_code;/**< last deauth reason */
1033         a_uint32_t  ns_tx_disassoc;/**< disassociations */
1034         a_uint32_t  ns_tx_disassoc_code;/**< last disassociation reason */
1035         a_uint32_t  ns_psq_drops;/**< power save queue drops */
1036     }data;
1037 } adf_net_wcmd_stastats_t;
1038 /**
1039  * @brief 11n tx/rx stats
1040  */
1041 typedef struct adf_net_wcmd_11n_stats {
1042     a_uint32_t   tx_pkts;/**< total tx data packets */
1043     a_uint32_t   tx_checks;/**< tx drops in wrong state */
1044     a_uint32_t   tx_drops;/**< tx drops due to qdepth limit */
1045     a_uint32_t   tx_minqdepth;/**< tx when h/w queue depth is low */
1046     a_uint32_t   tx_queue;/**< tx pkts when h/w queue is busy */
1047     a_uint32_t   tx_comps;/**< tx completions */
1048     a_uint32_t   tx_stopfiltered;/**< tx pkts filtered for requeueing */
1049     a_uint32_t   tx_qnull;/**< txq empty occurences */
1050     a_uint32_t   tx_noskbs;/**< tx no skbs for encapsulations */
1051     a_uint32_t   tx_nobufs;/**< tx no descriptors */
1052     a_uint32_t   tx_badsetups;/**< tx key setup failures */
1053     a_uint32_t   tx_normnobufs;/**< tx no desc for legacy packets */
1054     a_uint32_t   tx_schednone;/**< tx schedule pkt queue empty */
1055     a_uint32_t   tx_bars;/**< tx bars sent */
1056     a_uint32_t   txbar_xretry;/**< tx bars excessively retried */
1057     a_uint32_t   txbar_compretries;/**< tx bars retried */
1058     a_uint32_t   txbar_errlast;/**< tx bars last frame failed */
1059     a_uint32_t   tx_compunaggr;/**< tx unaggregated frame completions */
1060     a_uint32_t   txunaggr_xretry;/**< tx unaggregated excessive retries */
1061     a_uint32_t   tx_compaggr;/**< tx aggregated completions */
1062     a_uint32_t   tx_bawadv;/**< tx block ack window advanced */
1063     a_uint32_t   tx_bawretries;/**< tx block ack window retries */
1064     a_uint32_t   tx_bawnorm;/**< tx block ack window additions */
1065     a_uint32_t   tx_bawupdates;/**< tx block ack window updates */
1066     a_uint32_t   tx_bawupdtadv;/**< tx block ack window advances */
1067     a_uint32_t   tx_retries;/**< tx retries of sub frames */
1068     a_uint32_t   tx_xretries;/**< tx excessive retries of aggregates */
1069     a_uint32_t   txaggr_noskbs;/**< tx no skbs for aggr encapsualtion */
1070     a_uint32_t   txaggr_nobufs;/**< tx no desc for aggr */
1071     a_uint32_t   txaggr_badkeys;/**< tx enc key setup failures */
1072     a_uint32_t   txaggr_schedwindow;/**< tx no frame scheduled: baw limited */
1073     a_uint32_t   txaggr_single;/**< tx frames not aggregated */
1074     a_uint32_t   txaggr_compgood;/**< tx aggr good completions */
1075     a_uint32_t   txaggr_compxretry;/**< tx aggr excessive retries */
1076     a_uint32_t   txaggr_compretries;/**< tx aggr unacked subframes */
1077     a_uint32_t   txunaggr_compretries;/**< tx non-aggr unacked subframes */
1078     a_uint32_t   txaggr_prepends;/**< tx aggr old frames requeued */
1079     a_uint32_t   txaggr_filtered;/**< filtered aggr packet */
1080     a_uint32_t   txaggr_fifo;/**< fifo underrun of aggregate */
1081     a_uint32_t   txaggr_xtxop;/**< txop exceeded for an aggregate */
1082     a_uint32_t   txaggr_desc_cfgerr;/**< aggregate descriptor config error */
1083     a_uint32_t   txaggr_data_urun;/**< data underrun for an aggregate */
1084     a_uint32_t   txaggr_delim_urun;/**< delimiter underrun for an aggregate */
1085     a_uint32_t   txaggr_errlast;/**< tx aggr: last sub-frame failed */
1086     a_uint32_t   txunaggr_errlast;/**< tx non-aggr: last frame failed */
1087     a_uint32_t   txaggr_longretries;/**< tx aggr h/w long retries */
1088     a_uint32_t   txaggr_shortretries;/**< tx aggr h/w short retries */
1089     a_uint32_t   txaggr_timer_exp;/**< tx aggr : tx timer expired */
1090     a_uint32_t   txaggr_babug;/**< tx aggr : BA bug */
1091     a_uint32_t   rx_pkts;/**< rx pkts */
1092     a_uint32_t   rx_aggr;/**< rx aggregated packets */
1093     a_uint32_t   rx_aggrbadver;/**< rx pkts with bad version */
1094     a_uint32_t   rx_bars;/**< rx bars */
1095     a_uint32_t   rx_nonqos;/**< rx non qos-data frames */
1096     a_uint32_t   rx_seqreset;/**< rx sequence resets */
1097     a_uint32_t   rx_oldseq;/**< rx old packets */
1098     a_uint32_t   rx_bareset;/**< rx block ack window reset */
1099     a_uint32_t   rx_baresetpkts;/**< rx pts indicated due to baw resets */
1100     a_uint32_t   rx_dup;/**< rx duplicate pkts */
1101     a_uint32_t   rx_baadvance;/**< rx block ack window advanced */
1102     a_uint32_t   rx_recvcomp;/**< rx pkt completions */
1103     a_uint32_t   rx_bardiscard;/**< rx bar discarded */
1104     a_uint32_t   rx_barcomps;/**< rx pkts unblocked on bar reception */
1105     a_uint32_t   rx_barrecvs;/**< rx pkt completions on bar reception */
1106     a_uint32_t   rx_skipped;/**< rx pkt sequences skipped on timeout */
1107     a_uint32_t   rx_comp_to;/**< rx indications due to timeout */
1108     a_uint32_t   wd_tx_active;/**< watchdog: tx is active */
1109     a_uint32_t   wd_tx_inactive;/**< watchdog: tx is not active */
1110     a_uint32_t   wd_tx_hung;/**< watchdog: tx is hung */
1111     a_uint32_t   wd_spurious;/**< watchdog: spurious tx hang */
1112     a_uint32_t   tx_requeue;/**< filter & requeue on 20/40 transitions */
1113     a_uint32_t   tx_drain_txq;/**< draining tx queue on error */
1114     a_uint32_t   tx_drain_tid;/**< draining tid buf queue on error */
1115     a_uint32_t   tx_drain_bufs;/**< buffers drained from pending tid queue */
1116     a_uint32_t   tx_tidpaused;/**< pausing tx on tid */
1117     a_uint32_t   tx_tidresumed;/**< resuming tx on tid */
1118     a_uint32_t   tx_unaggr_filtered;/**< unaggregated tx pkts filtered */
1119     a_uint32_t   tx_aggr_filtered;/**< aggregated tx pkts filtered */
1120     a_uint32_t   tx_filtered;/**< total sub-frames filtered */
1121     a_uint32_t   rx_rb_on;/**< total rb on-s */
1122     a_uint32_t   rx_rb_off;/**< total rb off-s */
1123 } adf_net_wcmd_11n_stats_t;
1124
1125
1126 /**
1127  * @brief ampdu info 
1128  */ 
1129 typedef struct adf_net_wcmd_ampdu_trc {
1130     a_uint32_t   tr_head;
1131     a_uint32_t   tr_tail;
1132     struct trc_entry{
1133         a_uint16_t   tre_seqst;/**< starting sequence of aggr */
1134         a_uint16_t   tre_baseqst;/**< starting sequence of ba */
1135         a_uint32_t   tre_npkts;/**< packets in aggregate */
1136         a_uint32_t   tre_aggrlen;/**< aggregation length */
1137         a_uint32_t   tre_bamap0;/**< block ack bitmap word 0 */
1138         a_uint32_t   tre_bamap1;/**< block ack bitmap word 1 */
1139     }tr_ents[ADF_NET_WCMD_NUM_TR_ENTS];
1140 } adf_net_wcmd_ampdu_trc_t;
1141
1142 /**
1143  * @brief phy stats info 
1144  */ 
1145 typedef struct adf_net_wcmd_phystats{
1146     a_uint32_t   ast_watchdog;/**< device reset by watchdog */
1147     a_uint32_t   ast_hardware;/**< fatal hardware error interrupts */
1148     a_uint32_t   ast_bmiss;/**< beacon miss interrupts */
1149     a_uint32_t   ast_rxorn;/**< rx overrun interrupts */
1150     a_uint32_t   ast_rxeol;/**< rx eol interrupts */
1151     a_uint32_t   ast_txurn;/**< tx underrun interrupts */
1152     a_uint32_t   ast_txto;/**< tx timeout interrupts */
1153     a_uint32_t   ast_cst;/**< carrier sense timeout interrupts */
1154     a_uint32_t   ast_mib;/**< mib interrupts */
1155     a_uint32_t   ast_tx_packets;/**< packet sent on the interface */
1156     a_uint32_t   ast_tx_mgmt;/**< management frames transmitted */
1157     a_uint32_t   ast_tx_discard;/**< frames discarded prior to assoc */
1158     a_uint32_t   ast_tx_invalid;/**< frames discarded 'cuz device gone */
1159     a_uint32_t   ast_tx_qstop;/**< tx queue stopped 'cuz full */
1160     a_uint32_t   ast_tx_encap;/**< tx encapsulation failed */
1161     a_uint32_t   ast_tx_nonode;/**< no node*/
1162     a_uint32_t   ast_tx_nobuf;/**< no buf */
1163     a_uint32_t   ast_tx_nobufmgt;/**< no buffer (mgmt)*/
1164     a_uint32_t   ast_tx_xretries;/**< too many retries */
1165     a_uint32_t   ast_tx_fifoerr;/**< FIFO underrun */
1166     a_uint32_t   ast_tx_filtered;/**< xmit filtered */
1167     a_uint32_t   ast_tx_timer_exp;/**< tx timer expired */
1168     a_uint32_t   ast_tx_shortretry;/**< on-chip retries (short) */
1169     a_uint32_t   ast_tx_longretry;/**< tx on-chip retries (long) */
1170     a_uint32_t   ast_tx_badrate;/**< tx failed 'cuz bogus xmit rate */
1171     a_uint32_t   ast_tx_noack;/**< tx frames with no ack marked */
1172     a_uint32_t   ast_tx_rts;/**< tx frames with rts enabled */
1173     a_uint32_t   ast_tx_cts;/**< tx frames with cts enabled */
1174     a_uint32_t   ast_tx_shortpre;/**< tx frames with short preamble */
1175     a_uint32_t   ast_tx_altrate;/**< tx frames with alternate rate */
1176     a_uint32_t   ast_tx_protect;/**< tx frames with protection */
1177     a_uint32_t   ast_rx_orn;/**< rx failed 'cuz of desc overrun */
1178     a_uint32_t   ast_rx_crcerr;/**< rx failed 'cuz of bad CRC */
1179     a_uint32_t   ast_rx_fifoerr;/**< rx failed 'cuz of FIFO overrun */
1180     a_uint32_t   ast_rx_badcrypt;/**< rx failed 'cuz decryption */
1181     a_uint32_t   ast_rx_badmic;/**< rx failed 'cuz MIC failure */
1182     a_uint32_t   ast_rx_phyerr;/**< rx PHY error summary count */
1183     a_uint32_t   ast_rx_phy[64];/**< rx PHY error per-code counts */
1184     a_uint32_t   ast_rx_tooshort;/**< rx discarded 'cuz frame too short */
1185     a_uint32_t   ast_rx_toobig;/**< rx discarded 'cuz frame too large */
1186     a_uint32_t   ast_rx_nobuf;/**< rx setup failed 'cuz no skbuff */
1187     a_uint32_t   ast_rx_packets;/**< packet recv on the interface */
1188     a_uint32_t   ast_rx_mgt;/**< management frames received */
1189     a_uint32_t   ast_rx_ctl;/**< control frames received */
1190     a_int8_t     ast_tx_rssi_combined;/**< tx rssi of last ack [combined] */
1191     a_int8_t     ast_tx_rssi_ctl0;/**< tx rssi of last ack [ctl, chain 0] */
1192     a_int8_t     ast_tx_rssi_ctl1;/**< tx rssi of last ack [ctl, chain 1] */
1193     a_int8_t     ast_tx_rssi_ctl2;/**< tx rssi of last ack [ctl, chain 2] */
1194     a_int8_t     ast_tx_rssi_ext0;/**< tx rssi of last ack [ext, chain 0] */
1195     a_int8_t     ast_tx_rssi_ext1;/**< tx rssi of last ack [ext, chain 1] */
1196     a_int8_t     ast_tx_rssi_ext2;/**< tx rssi of last ack [ext, chain 2] */
1197     a_int8_t     ast_rx_rssi_combined;/**< rx rssi from histogram [combined]*/
1198     a_int8_t     ast_rx_rssi_ctl0;/**< rx rssi from histogram [ctl, chain 0] */
1199     a_int8_t     ast_rx_rssi_ctl1;/**< rx rssi from histogram [ctl, chain 1] */
1200     a_int8_t     ast_rx_rssi_ctl2;/**< rx rssi from histogram [ctl, chain 2] */
1201     a_int8_t     ast_rx_rssi_ext0;/**< rx rssi from histogram [ext, chain 0] */
1202     a_int8_t     ast_rx_rssi_ext1;/**< rx rssi from histogram [ext, chain 1] */
1203     a_int8_t     ast_rx_rssi_ext2;/**< rx rssi from histogram [ext, chain 2] */
1204     a_uint32_t   ast_be_xmit;/**< beacons transmitted */
1205     a_uint32_t   ast_be_nobuf;/**< no skbuff available for beacon */
1206     a_uint32_t   ast_per_cal;/**< periodic calibration calls */
1207     a_uint32_t   ast_per_calfail;/**< periodic calibration failed */
1208     a_uint32_t   ast_per_rfgain;/**< periodic calibration rfgain reset */
1209     a_uint32_t   ast_rate_calls;/**< rate control checks */
1210     a_uint32_t   ast_rate_raise;/**< rate control raised xmit rate */
1211     a_uint32_t   ast_rate_drop;/**< rate control dropped xmit rate */
1212     a_uint32_t   ast_ant_defswitch;/**< rx/default antenna switches */
1213     a_uint32_t   ast_ant_txswitch;/**< tx antenna switches */
1214     a_uint32_t   ast_ant_rx[8];/**< rx frames with antenna */
1215     a_uint32_t   ast_ant_tx[8];/**< tx frames with antenna */
1216     a_uint32_t   ast_suspend;/**< driver suspend calls */
1217     a_uint32_t   ast_resume;/**< driver resume calls  */
1218     a_uint32_t   ast_shutdown;/**< driver shutdown calls  */
1219     a_uint32_t   ast_init;/**< driver init calls  */
1220     a_uint32_t   ast_stop;/**< driver stop calls  */
1221     a_uint32_t   ast_reset;/**< driver resets      */
1222     a_uint32_t   ast_nodealloc;/**< nodes allocated    */
1223     a_uint32_t   ast_nodefree;/**< nodes deleted      */
1224     a_uint32_t   ast_keyalloc;/**< keys allocated     */
1225     a_uint32_t   ast_keydelete;/**< keys deleted       */
1226     a_uint32_t   ast_bstuck;/**< beacon stuck       */
1227     a_uint32_t   ast_draintxq;/**< drain tx queue     */
1228     a_uint32_t   ast_stopdma;/**< stop tx queue dma  */
1229     a_uint32_t   ast_stoprecv;/**< stop recv          */
1230     a_uint32_t   ast_startrecv;/**< start recv         */
1231     a_uint32_t   ast_flushrecv;/**< flush recv         */
1232     a_uint32_t   ast_chanchange;/**< channel changes    */
1233     a_uint32_t   ast_fastcc;/**< Number of fast channel changes */
1234     a_uint32_t   ast_fastcc_errs;/**< Number of failed fast channel changes */
1235     a_uint32_t   ast_chanset;/**< channel sets       */
1236     a_uint32_t   ast_cwm_mac;/**< CWM - mac mode switch */
1237     a_uint32_t   ast_cwm_phy;/**< CWM - phy mode switch */
1238     a_uint32_t   ast_cwm_requeue;/**< CWM - requeue dest node packets */
1239     a_uint32_t   ast_rx_delim_pre_crcerr;/**< pre-delimit crc errors */
1240     a_uint32_t   ast_rx_delim_post_crcerr;/**< post-delimit crc errors */
1241     a_uint32_t   ast_rx_decrypt_busyerr;/**< decrypt busy errors */
1242
1243     adf_net_wcmd_11n_stats_t  ast_11n;/**< 11n statistics */
1244     adf_net_wcmd_ampdu_trc_t  ast_trc;/**< ampdu trc */
1245 } adf_net_wcmd_phystats_t;
1246
1247 /**
1248  * @brief diag info 
1249  */ 
1250 typedef struct adf_net_wcmd_diag{
1251     a_int8_t     ad_name[ADF_NET_WCMD_NAME_SIZE];/**< if name*/
1252     a_uint16_t   ad_id;
1253     a_uint16_t   ad_in_size;/**< pack to fit, yech */
1254     a_uint8_t    *ad_in_data;
1255     a_uint8_t    *ad_out_data;
1256     a_uint32_t   ad_out_size;
1257 }adf_net_wcmd_diag_t;
1258
1259 /*
1260  * Device phyerr ioctl info
1261  */
1262 typedef struct adf_net_wcmd_phyerr{
1263     a_int8_t     ad_name[ADF_NET_WCMD_NAME_SIZE];/**< if name, e.g. "ath0" */
1264     a_uint16_t   ad_id;
1265     a_uint16_t   ad_in_size;                /**< pack to fit, yech */
1266     a_uint8_t    *ad_in_data;
1267     a_uint8_t    *ad_out_data;
1268     a_uint32_t   ad_out_size;
1269 }adf_net_wcmd_phyerr_t;
1270 /**
1271  * @brief cwm-info
1272  */
1273 typedef struct adf_net_wcmd_cwminfo{
1274     a_uint32_t  ci_chwidth; /**< channel width */
1275     a_uint32_t  ci_macmode; /**< MAC mode */
1276     a_uint32_t  ci_phymode; /**< Phy mode */
1277     a_uint32_t  ci_extbusyper; /**< extension busy (percent) */
1278 } adf_net_wcmd_cwminfo_t;
1279
1280 /**
1281  * @brief cwm-dbg
1282  */
1283 typedef struct adf_net_wcmd_cwmdbg{
1284     adf_net_wcmd_cwm_cmd_t    dc_cmd;/**< dbg commands*/
1285     adf_net_wcmd_cwm_event_t  dc_arg;/**< events*/
1286 } adf_net_wcmd_cwmdbg_t;    
1287
1288 /**
1289  * @brief device cwm info
1290  */
1291 typedef struct adf_net_wcmd_cwm{
1292     adf_net_wcmd_cwmtype_t      type;
1293     union{
1294         adf_net_wcmd_cwmdbg_t   dbg;
1295         adf_net_wcmd_cwminfo_t  info;
1296     }cwm;
1297 }adf_net_wcmd_cwm_t;
1298 /**
1299  * @brief Helpers to access the CWM structures
1300  */
1301 #define cwm_dbg         cwm.dbg
1302 #define cwm_info        cwm.info
1303
1304 /**
1305  * @brief eth tool info
1306  */
1307 typedef struct adf_net_wcmd_ethtool{
1308     a_uint32_t  cmd;/*XXX:???*/
1309     a_int8_t    driver[ADF_NET_WCMD_DRIVSIZ];/**< driver short name */
1310     a_int8_t    version[ADF_NET_WCMD_VERSIZ];/**< driver ver string */
1311     a_int8_t    fw_version[ADF_NET_WCMD_FIRMSIZ];/**< firmware ver string*/
1312     a_int8_t    bus_info[ADF_NET_WCMD_BUSINFO_LEN];/**< Bus info */ 
1313     a_int8_t    reserved1[32];
1314     a_int8_t    reserved2[16];
1315     a_uint32_t  n_stats;/**< number of u64's from ETHTOOL_GSTATS */
1316     a_uint32_t  testinfo_len;   
1317     a_uint32_t  eedump_len;/**< Size of data from EEPROM(bytes) */
1318     a_uint32_t  regdump_len;/**< Size of data from REG(bytes) */
1319 }adf_net_wcmd_ethtool_t ;
1320
1321 typedef struct adf_net_wcmd_ethtool_info{
1322     adf_net_wcmd_ethtool_cmd_t     cmd;/*XXX:???*/
1323     adf_net_wcmd_ethtool_t         drv;
1324 }adf_net_wcmd_ethtool_info_t;
1325
1326 /** 
1327  * @brief vap create flag info 
1328  */ 
1329 typedef enum adf_net_wcmd_vapcreate_flags{
1330     ADF_NET_WCMD_CLONE_BSSID=0x1,/**< allocate unique mac/bssid */
1331     ADF_NET_WCMD_NO_STABEACONS/**< Do not setup the sta beacon timers*/ 
1332 }adf_net_wcmd_vapcreate_flags_t;
1333
1334 /**
1335  * @brief VAP info structure used during VAPCREATE
1336  */
1337 typedef struct adf_net_wcmd_vapinfo{
1338     a_uint8_t                       icp_name[ADF_NET_WCMD_NAME_SIZE];
1339     adf_net_wcmd_opmode_t           icp_opmode;/**< operating mode */
1340     adf_net_wcmd_vapcreate_flags_t  icp_flags;
1341 }adf_net_wcmd_vapinfo_t;
1342
1343
1344 /**
1345  * @brief ath stats info
1346  */
1347 typedef struct adf_net_wcmd_devstats{
1348     a_uint64_t   rx_packets;/**< total packets received       */
1349     a_uint64_t   tx_packets;/**< total packets transmitted    */
1350     a_uint64_t   rx_bytes;/**< total bytes received         */
1351     a_uint64_t   tx_bytes;/**< total bytes transmitted      */
1352     a_uint64_t   rx_errors;/**< bad packets received         */
1353     a_uint64_t   tx_errors;/**< packet transmit problems     */
1354     a_uint64_t   rx_dropped;/**< no space in linux buffers    */
1355     a_uint64_t   tx_dropped;/**< no space available in linux  */
1356     a_uint64_t   multicast;/**< multicast packets received   */
1357     a_uint64_t   collisions;
1358     
1359     /* detailed rx_errors: */
1360     a_uint64_t   rx_length_errors;
1361     a_uint64_t   rx_over_errors;/**< receiver ring buff overflow  */
1362     a_uint64_t   rx_crc_errors;/**< recved pkt with crc error    */
1363     a_uint64_t   rx_frame_errors;/**< recv'd frame alignment error */
1364     a_uint64_t   rx_fifo_errors;/**< recv'r fifo overrun          */
1365     a_uint64_t   rx_missed_errors;/**< receiver missed packet       */
1366     
1367     /* detailed tx_errors */
1368     a_uint64_t   tx_aborted_errors;
1369     a_uint64_t   tx_carrier_errors;
1370     a_uint64_t   tx_fifo_errors;
1371     a_uint64_t   tx_heartbeat_errors;
1372     a_uint64_t   tx_window_errors;
1373     
1374     /* for cslip etc */
1375     a_uint64_t   rx_compressed;
1376     a_uint64_t   tx_compressed;
1377 }adf_net_wcmd_devstats_t;
1378
1379
1380 /**
1381  * @brief mtu set/get/enable/disable info
1382  */
1383 typedef  a_uint32_t     adf_net_wcmd_mtu_t;
1384 /**
1385  * @brief turbo
1386  */
1387 typedef  a_uint32_t     adf_net_wcmd_turbo_t;
1388
1389 typedef union adf_net_wcmd_data{
1390     adf_net_wcmd_vapname_t          vapname;/*XXX: ???*/
1391     adf_net_wcmd_bssid_t            bssid;
1392     adf_net_wcmd_nickname_t         nickname;
1393     adf_net_wcmd_ssid_t             essid;
1394     adf_net_wcmd_rts_th_t           rts;/*GET_RTS_THRES & SET_RTS_THRES*/
1395     adf_net_wcmd_frag_th_t          frag;/*GET_FRAG & SET_FRAG*/
1396     adf_net_wcmd_ic_caps_t          ic_caps;
1397     adf_net_wcmd_iv_opmode_t        iv_opmode;
1398     adf_net_wcmd_freq_t             freq;
1399     adf_net_wcmd_retries_t          retries;
1400     adf_net_wcmd_txpower_t          txpower;
1401     adf_net_wcmd_txpowlimit_t       txpowlimit;
1402     adf_net_wcmd_vaplist_t          vaplist;
1403     adf_net_wcmd_phymode_t          phymode;
1404     adf_net_wcmd_vapmode_t          vapmode;/*GET_OPMODE & SET_OPMODE*/
1405     adf_net_wcmd_devcap_t           devcap;
1406     adf_net_wcmd_turbo_t            turbo;
1407     adf_net_wcmd_param_t            param;
1408     adf_net_wcmd_optie_t            optie;
1409     adf_net_wcmd_appie_t            appie;
1410     adf_net_wcmd_filter_type_t      filter;
1411     adf_net_wcmd_addba_t            addba;
1412     adf_net_wcmd_delba_t            delba;
1413     adf_net_wcmd_addba_status_t     addba_status;
1414     adf_net_wcmd_addba_resp_t       addba_resp;
1415     adf_net_wcmd_keyinfo_t          key;
1416     adf_net_wcmd_mlme_t             mlme;
1417     adf_net_wcmd_chanlist_t         chanlist;
1418     adf_net_wcmd_chaninfo_t         chaninfo;
1419     adf_net_wcmd_wmmparaminfo_t     wmmparam;
1420     adf_net_wcmd_wpaie_t            wpaie;
1421     adf_net_wcmd_wscie_t            wscie;
1422     adf_net_wcmd_power_t            power;
1423     adf_net_wcmd_stainfo_t          station;
1424     adf_net_wcmd_diag_t             dev_diag;
1425     adf_net_wcmd_phyerr_t           phyerr;
1426     adf_net_wcmd_cwm_t              cwm;
1427     adf_net_wcmd_ethtool_info_t     ethtool;
1428     adf_net_wcmd_vapinfo_t          vap_info;/**< during vapcreate*/
1429
1430     adf_net_wcmd_mtu_t              mtu;
1431     adf_net_ethaddr_t               mac;/*MAC addr of VAP or Dev */
1432
1433     adf_net_wcmd_scan_t             *scan;
1434     adf_net_wcmd_vapparam_range_t   *range;
1435     adf_net_wcmd_stastats_t         *stats_sta;
1436     adf_net_wcmd_vapstats_t         *stats_vap;/*XXX: name*/
1437     adf_net_wcmd_phystats_t         *stats_phy;
1438     adf_net_wcmd_devstats_t         *stats_dev;
1439
1440     a_uint32_t                      datum;/*for sysctl*/
1441 } adf_net_wcmd_data_t;
1442
1443 /**
1444  * @brief ioctl structure to configure the wireless interface.
1445  */ 
1446 typedef struct adf_net_wcmd{
1447     char                     if_name[ADF_NET_WCMD_NAME_SIZE];/**< Iface name*/
1448     adf_net_wcmd_type_t      type;             /**< Type of wcmd */
1449     adf_net_wcmd_data_t      data;             /**< Data */       
1450 } adf_net_wcmd_t;
1451 /**
1452  * @brief helper macros
1453  */
1454 #define d_vapname               data.vapname
1455 #define d_bssid                 data.bssid
1456 #define d_nickname              data.nickname
1457 #define d_essid                 data.essid
1458 #define d_rts                   data.rts
1459 #define d_frag                  data.frag
1460 #define d_iccaps                data.ic_caps
1461 #define d_ivopmode              data.iv_opmode
1462 #define d_freq                  data.freq
1463 #define d_retries               data.retries
1464 #define d_txpower               data.txpower
1465 #define d_txpowlimit            data.txpowlimit
1466 #define d_vaplist               data.vaplist
1467 #define d_scan                  data.scan
1468 #define d_phymode               data.phymode
1469 #define d_opmode                data.opmode
1470 #define d_devcap                data.devcap
1471 #define d_turbo                 data.turbo
1472 #define d_param                 data.param
1473 #define d_optie                 data.optie
1474 #define d_appie                 data.appie
1475 #define d_filter                data.filter
1476 #define d_addba                 data.addba
1477 #define d_delba                 data.delba
1478 #define d_addba_status          data.addba_status
1479 #define d_addba_resp            data.addba_resp
1480 #define d_key                   data.key
1481 #define d_mlme                  data.mlme
1482 #define d_chanlist              data.chanlist
1483 #define d_chaninfo              data.chaninfo
1484 #define d_wmmparam              data.wmmparam
1485 #define d_wpaie                 data.wpaie
1486 #define d_wscie                 data.wscie
1487 #define d_power                 data.power
1488 #define d_station               data.station
1489 #define d_range                 data.range
1490 #define d_stastats              data.stats_sta
1491 #define d_vapstats              data.stats_vap
1492 #define d_devstats              data.stats_dev
1493 #define d_phystats              data.stats_phy
1494 #define d_daig                  data.dev_diag
1495 #define d_phyerr                data.phyerr
1496 #define d_cwm                   data.cwm
1497 #define d_ethtool               data.ethtool
1498 #define d_vapinfo               data.vap_info
1499 #define d_mtu                   data.mtu
1500 #define d_mac                   data.mac
1501 #define d_datum                 data.datum
1502
1503
1504 typedef struct adf_net_wcmd_chansw{
1505     a_uint8_t    chan;
1506     a_uint8_t    ttbt;
1507 }adf_net_wcmd_chansw_t;
1508 /** 
1509  * ***************************Unresoloved*******************
1510  */
1511 // typedef struct adf_net_wcmd_chansw_info{
1512 //     a_uint8_t    chan;
1513 //     a_uint8_t   ttbt;
1514 // }adf_net_wcmd_chansw_info_t;
1515 // 
1516 /**
1517  * @brief ath mac info
1518  */
1519 // typedef struct {
1520 //     a_uint16_t sa_family;/**< address family, AF_xxx*/
1521 //     a_int8_t   sa_data[ADF_NET_WCMD_ADDR_LEN];/**< 14 bytes address */ 
1522 // }adf_net_wcmd_ath_mac_info_t;
1523 #endif