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