wifi: renew patch drivers/net/wireless
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / combo_mt66xx / mt6628 / wlan / include / nic_cmd_event.h
1 /*
2 ** $Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/nic_cmd_event.h#1 $
3 */
4
5 /*! \file   "nic_cmd_event.h"
6     \brief This file contains the declairation file of the WLAN OID processing routines
7            of Windows driver for MediaTek Inc. 802.11 Wireless LAN Adapters.
8 */
9
10
11
12 /*
13 ** $Log: nic_cmd_event.h $
14  *
15  * 03 29 2012 eason.tsai
16  * [WCXRP00001216] [MT6628 Wi-Fi][Driver]add conditional define
17  * add conditional define.
18  *
19  * 03 04 2012 eason.tsai
20  * NULL
21  * modify the cal fail report code.
22  *
23  * 01 06 2012 wh.su
24  * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function
25  * redefine the CMD_ID_SET_TXPWR_CTRL value.
26  *
27  * 01 05 2012 wh.su
28  * [WCXRP00001153] [MT6620 Wi-Fi][Driver] Adding the get_ch_list and set_tx_power proto type function
29  * Adding the related ioctl / wlan oid function to set the Tx power cfg.
30  *
31  * 11 30 2011 cm.chang
32  * [WCXRP00001128] [MT5931 Wi-Fi][FW] Update BB/RF setting based on RF doc v0.7 for LGE spec
33  * 1. Add a new CMD for driver to set device mode
34  * 2. Update calibration parameters
35  *
36  * 11 19 2011 yuche.tsai
37  * NULL
38  * Update RSSI for P2P.
39  *
40  * 11 18 2011 yuche.tsai
41  * NULL
42  * CONFIG P2P support RSSI query, default turned off.
43  *
44  * 11 10 2011 eddie.chen
45  * [WCXRP00001096] [MT6620 Wi-Fi][Driver/FW] Enhance the log function (xlog)
46  * Add TX_DONE status detail information.
47  *
48  * 11 08 2011 tsaiyuan.hsu
49  * [WCXRP00001083] [MT6620 Wi-Fi][DRV]] dump debug counter or frames when debugging is triggered
50  * check if CFG_SUPPORT_SWCR is defined to aoid compiler error.
51  *
52  * 11 07 2011 tsaiyuan.hsu
53  * [WCXRP00001083] [MT6620 Wi-Fi][DRV]] dump debug counter or frames when debugging is triggered
54  * add debug counters and periodically dump counters for debugging.
55  *
56  * 10 26 2011 cp.wu
57  * [WCXRP00001065] [MT6620 Wi-Fi][MT5931][FW][DRV] Adding parameter for controlling minimum channel dwell time for scanning
58  * add interface for control minimum channel dwell time for scanning.
59  *
60  * 09 20 2011 cm.chang
61  * [WCXRP00000997] [MT6620 Wi-Fi][Driver][FW] Handle change of BSS preamble type and slot time
62  * New CMD definition about RLM parameters
63  *
64  * 08 31 2011 cm.chang
65  * [WCXRP00000969] [MT6620 Wi-Fi][Driver][FW] Channel list for 5G band based on country code
66  * .
67  *
68  * 08 25 2011 chinghwa.yu
69  * [WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm
70  * Add DFS switch.
71  *
72  * 08 24 2011 chinghwa.yu
73  * [WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm
74  * Update RDD test mode cases.
75  *
76  * 08 15 2011 cp.wu
77  * [WCXRP00000851] [MT6628 Wi-Fi][Driver] Add HIFSYS related definition to driver source tree
78  * add MT6628-specific definitions.
79  *
80  * 08 11 2011 cp.wu
81  * [WCXRP00000830] [MT6620 Wi-Fi][Firmware] Use MDRDY counter to detect empty channel for shortening scan time
82  * sparse channel detection:
83  * driver: collect sparse channel information with scan-done event
84  *
85  * 08 09 2011 cp.wu
86  * [WCXRP00000702] [MT5931][Driver] Modify initialization sequence for E1 ASIC[WCXRP00000913] [MT6620 Wi-Fi] create repository of source code dedicated for MT6620 E6 ASIC
87  * add CCK-DSSS TX-PWR control field in NVRAM and CMD definition for MT5931-MP
88  *
89  * 08 03 2011 terry.wu
90  * [WCXRP00000899] [MT6620] [FW] Reply probe rsp in FW for hotspot mode
91  * Reply Probe Rsp in FW for Hotspot Mode.
92  *
93  *
94  *
95  * 08 03 2011 terry.wu
96  * [WCXRP00000899] [MT6620] [FW] Reply probe rsp in FW for hotspot mode
97  * Reply Probe Rsp in FW for Hotspot Mode.
98  *
99  *
100  * 08 03 2011 terry.wu
101  * [WCXRP00000899] [MT6620] [FW] Reply probe rsp in FW for hotspot mode
102  * Reply Probe Rsp in FW for Hotspot Mode.
103  *
104  * 08 03 2011 terry.wu
105  * [WCXRP00000899] [MT6620] [FW] Reply probe rsp in FW for hotspot mode
106  * Reply Probe Rsp in FW for Hotspot Mode.
107  *
108  * 07 28 2011 chinghwa.yu
109  * [WCXRP00000063] Update BCM CoEx design and settings
110  * Add BWCS cmd and event.
111  *
112  * 07 22 2011 jeffrey.chang
113  * [WCXRP00000864] [MT5931] Add command to adjust OSC stable time
114  * add osc stable time command structure
115  *
116  * 07 22 2011 jeffrey.chang
117  * [WCXRP00000864] [MT5931] Add command to adjust OSC stable time
118  * modify driver to set OSC stable time after f/w download
119  *
120  * 07 18 2011 chinghwa.yu
121  * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm
122  * Add CMD/Event for RDD and BWCS.
123  *
124  * 07 18 2011 cp.wu
125  * [WCXRP00000858] [MT5931][Driver][Firmware] Add support for scan to search for more than one SSID in a single scanning request
126  * add framework in driver domain for supporting new SCAN_REQ_V2 for more than 1 SSID support as well as uProbeDelay in NDIS 6.x driver model
127  *
128  * 06 23 2011 cp.wu
129  * [WCXRP00000812] [MT6620 Wi-Fi][Driver] not show NVRAM when there is no valid MAC address in NVRAM content
130  * check with firmware for valid MAC address.
131  *
132  * 06 23 2011 cp.wu
133  * [WCXRP00000798] [MT6620 Wi-Fi][Firmware] Follow-ups for WAPI frequency offset workaround in firmware SCN module
134  * change parameter name from PeerAddr to BSSID
135  *
136  * 06 20 2011 cp.wu
137  * [WCXRP00000798] [MT6620 Wi-Fi][Firmware] Follow-ups for WAPI frequency offset workaround in firmware SCN module
138  * 1. specify target's BSSID when requesting channel privilege.
139  * 2. pass BSSID information to firmware domain
140  *
141  * 06 09 2011 tsaiyuan.hsu
142  * [WCXRP00000760] [MT5931 Wi-Fi][FW] Refine rxmHandleMacRxDone to reduce code size
143  * move send_auth at rxmHandleMacRxDone in firmware to driver to reduce code size.
144  *
145  * 05 27 2011 cp.wu
146  * [WCXRP00000749] [MT6620 Wi-Fi][Driver] Add band edge tx power control to Wi-Fi NVRAM
147  * invoke CMD_ID_SET_EDGE_TXPWR_LIMIT when there is valid data exist in NVRAM content.
148  *
149  * 04 18 2011 terry.wu
150  * [WCXRP00000660] [MT6620 Wi-Fi][Driver] Remove flag CFG_WIFI_DIRECT_MOVED
151  * Remove flag CFG_WIFI_DIRECT_MOVED.
152  *
153  * 03 31 2011 chinglan.wang
154  * [WCXRP00000613] [MT6620 Wi-Fi] [FW] [Driver] BssInfo can get the security mode which is WPA/WPA2/WAPI or not.
155  * .
156  *
157  * 03 18 2011 cm.chang
158  * [WCXRP00000576] [MT6620 Wi-Fi][Driver][FW] Remove P2P compile option in scan req/cancel command
159  * As CR title
160  *
161  * 03 17 2011 yarco.yang
162  * [WCXRP00000569] [MT6620 Wi-Fi][F/W][Driver] Set multicast address support current network usage
163  * .
164  *
165  * 03 07 2011 wh.su
166  * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code
167  * rename the define to anti_pviracy.
168  *
169  * 03 05 2011 wh.su
170  * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code
171  * add the code to get the check rsponse and indicate to app.
172  *
173  * 03 02 2011 wh.su
174  * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code
175  * Add Security check related code.
176  *
177  * 03 02 2011 george.huang
178  * [WCXRP00000504] [MT6620 Wi-Fi][FW] Support Sigma CAPI for power saving related command
179  * Support UAPSD/OppPS/NoA parameter setting
180  *
181  * 02 16 2011 cm.chang
182  * [WCXRP00000447] [MT6620 Wi-Fi][FW] Support new NVRAM update mechanism
183  * .
184  *
185  * 02 10 2011 cp.wu
186  * [WCXRP00000434] [MT6620 Wi-Fi][Driver] Obsolete unused event packet handlers
187  * EVENT_ID_CONNECTION_STATUS has been obsoleted and no need to handle.
188  *
189  * 02 08 2011 eddie.chen
190  * [WCXRP00000426] [MT6620 Wi-Fi][FW/Driver] Add STA aging timeout and defualtHwRatein AP mode
191  * Add event STA agint timeout
192  *
193  * 01 27 2011 tsaiyuan.hsu
194  * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support
195  * add roaming fsm
196  * 1. not support 11r, only use strength of signal to determine roaming.
197  * 2. not enable CFG_SUPPORT_ROAMING until completion of full test.
198  * 3. in 6620, adopt work-around to avoid sign extension problem of cck of hw
199  * 4. assume that change of link quality in smooth way.
200  *
201  * 01 25 2011 yuche.tsai
202  * [WCXRP00000352] [Volunteer Patch][MT6620][Driver] P2P Statsion Record Client List Issue
203  * Update cmd format of BSS INFO, always sync OwnMac to FW no matter P2P is enabled or not..
204  *
205  * 01 20 2011 eddie.chen
206  * [WCXRP00000374] [MT6620 Wi-Fi][DRV] SW debug control
207  * Add Oid for sw control debug command
208  *
209  * 01 15 2011 puff.wen
210  * NULL
211  * Add Stress test
212  *
213  * 01 12 2011 cm.chang
214  * [WCXRP00000354] [MT6620 Wi-Fi][Driver][FW] Follow NVRAM bandwidth setting
215  * Sync HT operation element information from host to FW
216  *
217  * 01 12 2011 cm.chang
218  * [WCXRP00000354] [MT6620 Wi-Fi][Driver][FW] Follow NVRAM bandwidth setting
219  * User-defined bandwidth is for 2.4G and 5G individually
220  *
221  * 12 29 2010 eddie.chen
222  * [WCXRP00000322] Add WMM IE in beacon,
223
224 Add per station flow control when STA is in PS
225
226
227  * 1) PS flow control event
228  *
229  * 2) WMM IE in beacon, assoc resp, probe resp
230  *
231  * 12 28 2010 cp.wu
232  * [WCXRP00000269] [MT6620 Wi-Fi][Driver][Firmware] Prepare for v1.1 branch release
233  * report EEPROM used flag via NIC_CAPABILITY
234  *
235  * 12 28 2010 cp.wu
236  * [WCXRP00000269] [MT6620 Wi-Fi][Driver][Firmware] Prepare for v1.1 branch release
237  * integrate with 'EEPROM used' flag for reporting correct capability to Engineer Mode/META and other tools
238  *
239  * 12 23 2010 george.huang
240  * [WCXRP00000152] [MT6620 Wi-Fi] AP mode power saving function
241  * 1. update WMM IE parsing, with ASSOC REQ handling
242  * 2. extend U-APSD parameter passing from driver to FW
243  *
244  * 12 07 2010 cm.chang
245  * [WCXRP00000239] MT6620 Wi-Fi][Driver][FW] Merge concurrent branch back to maintrunk
246  * 1. BSSINFO include RLM parameter
247  * 2. free all sta records when network is disconnected
248  *
249  * 12 07 2010 cm.chang
250  * [WCXRP00000238] MT6620 Wi-Fi][Driver][FW] Support regulation domain setting from NVRAM and supplicant
251  * 1. Country code is from NVRAM or supplicant
252  * 2. Change band definition in CMD/EVENT.
253  *
254  * 11 29 2010 cm.chang
255  * [WCXRP00000210] [MT6620 Wi-Fi][Driver][FW] Set RCPI value in STA_REC for initial TX rate selection of auto-rate algorithm
256  * Sync RCPI of STA_REC to FW as reference of initial TX rate
257  *
258  * 11 08 2010 cm.chang
259  * [WCXRP00000169] [MT6620 Wi-Fi][Driver][FW] Remove unused CNM recover message ID
260  * Remove CNM channel reover message ID
261  *
262  * 11 01 2010 cp.wu
263  * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000150] [MT6620 Wi-Fi][Driver] Add implementation for querying current TX rate from firmware auto rate module
264  * 1) Query link speed (TX rate) from firmware directly with buffering mechanism to reduce overhead
265  * 2) Remove CNM CH-RECOVER event handling
266  * 3) cfg read/write API renamed with kal prefix for unified naming rules.
267  *
268  * 10 26 2010 cp.wu
269  * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000137] [MT6620 Wi-Fi] [FW] Support NIC capability query command
270  * 1) update NVRAM content template to ver 1.02
271  * 2) add compile option for querying NIC capability (default: off)
272  * 3) modify AIS 5GHz support to run-time option, which could be turned on by registry or NVRAM setting
273  * 4) correct auto-rate compiler error under linux (treat warning as error)
274  * 5) simplify usage of NVRAM and REG_INFO_T
275  * 6) add version checking between driver and firmware
276  *
277  * 10 25 2010 cp.wu
278  * [WCXRP00000133] [MT6620 Wi-Fi] [FW][Driver] Change TX power offset band definition
279  * follow-up for CMD_5G_PWR_OFFSET_T definition change
280  *
281  * 10 20 2010 cp.wu
282  * [WCXRP00000117] [MT6620 Wi-Fi][Driver] Add logic for suspending driver when MT6620 is not responding anymore
283  * use OID_CUSTOM_TEST_MODE as indication for driver reset
284  * by dropping pending TX packets
285  *
286  * 10 20 2010 wh.su
287  * [WCXRP00000124] [MT6620 Wi-Fi] [Driver] Support the dissolve P2P Group
288  * Add the code to support disconnect p2p group
289  *
290  * 09 15 2010 cm.chang
291  * NULL
292  * Add new CMD for TX power, 5G power offset and power parameters
293  *
294  * 09 07 2010 yuche.tsai
295  * NULL
296  * Add a pointer in P2P SCAN RESULT structure. This pointer
297  * is pointed to a IE buffer for this P2p device.
298  *
299  * 09 07 2010 wh.su
300  * NULL
301  * adding the code for beacon/probe req/ probe rsp wsc ie at p2p.
302  *
303  * 09 03 2010 kevin.huang
304  * NULL
305  * Refine #include sequence and solve recursive/nested #include issue
306  *
307  * 08 23 2010 chinghwa.yu
308  * NULL
309  * Update for BOW.
310  *
311  * 08 20 2010 cm.chang
312  * NULL
313  * Migrate RLM code to host from FW
314  *
315  * 08 16 2010 george.huang
316  * NULL
317  * add new CMD ID definition
318  *
319  * 08 16 2010 yuche.tsai
320  * NULL
321  * Add a field in BSS INFO cmd to change interface address for P2P. (switching between Device Addr & Interface Addr)
322  *
323  * 08 12 2010 yuche.tsai
324  * NULL
325  * Add interface address indication when indicate connection status.
326  * It is requested by supplicant to do 4 way handshake.
327  *
328  * 08 07 2010 wh.su
329  * NULL
330  * adding the privacy related code for P2P network
331  *
332  * 08 05 2010 yuche.tsai
333  * NULL
334  * Change data structure for P2P Device scan result, all channel time for scan command.
335  *
336  * 08 04 2010 george.huang
337  * NULL
338  * handle change PS mode OID/ CMD
339  *
340  * 08 04 2010 yarco.yang
341  * NULL
342  * Add TX_AMPDU and ADDBA_REJECT command
343  *
344  * 08 03 2010 george.huang
345  * NULL
346  * handle event for updating NOA parameters indicated from FW
347  *
348  * 08 02 2010 george.huang
349  * NULL
350  * add WMM-PS test related OID/ CMD handlers
351  *
352  * 07 28 2010 cp.wu
353  * NULL
354  * sync. CMD_BSS_INFO structure change to CMD-EVENT v0.15.
355  *
356  * 07 26 2010 yuche.tsai
357  *
358  * Add P2P Device Found Event.
359  * Channel extention option in scan abort command.
360  *
361  * 07 23 2010 cp.wu
362  *
363  * add AIS-FSM handling for beacon timeout event.
364  *
365  * 07 21 2010 yuche.tsai
366  *
367  * Add for P2P Scan Result Parsing & Saving.
368  *
369  * 07 20 2010 george.huang
370  *
371  * DWORD align for the CMD data structure
372  *
373  * 07 20 2010 cp.wu
374  *
375  * pass band information for scan in an efficient way by mapping ENUM_BAND_T into UINT_8..
376  *
377  * 07 19 2010 wh.su
378  *
379  * update for security supporting.
380  *
381  * 07 19 2010 cm.chang
382  *
383  * Set RLM parameters and enable CNM channel manager
384  *
385  * 07 16 2010 yarco.yang
386  *
387  * 1. Support BSS Absence/Presence Event
388  * 2. Support STA change PS mode Event
389  * 3. Support BMC forwarding for AP mode.
390  *
391  * 07 14 2010 cp.wu
392  *
393  * [WPD00003833] [MT6620 and MT5931] Driver migration.
394  * pass band with channel number information as scan parameter
395  *
396  * 07 14 2010 yarco.yang
397  *
398  * 1. Remove CFG_MQM_MIGRATION
399  * 2. Add CMD_UPDATE_WMM_PARMS command
400  *
401  * 07 09 2010 cp.wu
402  *
403  * reorder members of CMD_SET_BSS_INFO.
404  *
405  * 07 08 2010 cp.wu
406  *
407  * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
408  *
409  * 07 07 2010 cp.wu
410  * [WPD00003833][MT6620 and MT5931] Driver migration
411  * update prStaRecOfAP with BSS-INFO.
412  *
413  * 07 07 2010 cm.chang
414  * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
415  * Support state of STA record change from 1 to 1
416  *
417  * 07 01 2010 cm.chang
418  * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
419  * Support sync command of STA_REC
420  *
421  * 07 01 2010 cp.wu
422  * [WPD00003833][MT6620 and MT5931] Driver migration
423  * implementation of DRV-SCN and related mailbox message handling.
424  *
425  * 06 30 2010 cp.wu
426  * [WPD00003833][MT6620 and MT5931] Driver migration
427  * sync. with CMD/EVENT document ver0.07.
428  *
429  * 06 29 2010 cp.wu
430  * [WPD00003833][MT6620 and MT5931] Driver migration
431  * correct variable naming for 8-bit variable used in CMD_BEACON_TEMPLATE_UPDATE.
432  *
433  * 06 29 2010 cp.wu
434  * [WPD00003833][MT6620 and MT5931] Driver migration
435  * 1) sync to. CMD/EVENT document v0.03
436  * 2) simplify DTIM period parsing in scan.c only, bss.c no longer parses it again.
437  * 3) send command packet to indicate FW-PM after
438  *     a) 1st beacon is received after AIS has connected to an AP
439  *     b) IBSS-ALONE has been created
440  *     c) IBSS-MERGE has occured
441  *
442  * 06 28 2010 george.huang
443  * [WPD00001556]Basic power managemenet function
444  * Create beacon update path, with expose bssUpdateBeaconContent()
445  *
446  * 06 22 2010 cp.wu
447  * [WPD00003833][MT6620 and MT5931] Driver migration
448  * 1) add command warpper for STA-REC/BSS-INFO sync.
449  * 2) enhance command packet sending procedure for non-oid part
450  * 3) add command packet definitions for STA-REC/BSS-INFO sync.
451  *
452  * 06 21 2010 cp.wu
453  * [WPD00003833][MT6620 and MT5931] Driver migration
454  * add BSS/STA_REC commands for integration.
455  *
456  * 06 21 2010 yarco.yang
457  * [WPD00003837][MT6620]Data Path Refine
458  * Add TX Done Event handle entry
459  *
460  * 06 10 2010 cp.wu
461  * [WPD00003833][MT6620 and MT5931] Driver migration
462  * 1) eliminate CFG_CMD_EVENT_VERSION_0_9
463  * 2) when disconnected, indicate nic directly (no event is needed)
464  *
465  * 06 06 2010 kevin.huang
466  * [WPD00003832][MT6620 5931] Create driver base
467  * [MT6620 5931] Create driver base
468  *
469  * 05 20 2010 cp.wu
470  * [WPD00001943]Create WiFi test driver framework on WinXP
471  * 1) integrate OID_GEN_NETWORK_LAYER_ADDRESSES with CMD_ID_SET_IP_ADDRESS
472  * 2) buffer statistics data for 2 seconds
473  * 3) use default value for adhoc parameters instead of 0
474  *
475  * 05 19 2010 cp.wu
476  * [WPD00001943]Create WiFi test driver framework on WinXP
477  * 1) do not take timeout mechanism for power mode oids
478  * 2) retrieve network type from connection status
479  * 3) after disassciation, set radio state to off
480  * 4) TCP option over IPv6 is supported
481  *
482  * 05 17 2010 cp.wu
483  * [WPD00001943]Create WiFi test driver framework on WinXP
484  * correct OID_802_11_DISASSOCIATE handling.
485  *
486  * 05 17 2010 cp.wu
487  * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support
488  * 1) add timeout handler mechanism for pending command packets
489  * 2) add p2p add/removal key
490  *
491  * 04 13 2010 cp.wu
492  * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support
493  * add framework for BT-over-Wi-Fi support.
494  *  *  *  *  *  *  *  *  *  * 1) prPendingCmdInfo is replaced by queue for multiple handler capability
495  *  *  *  *  *  *  *  *  *  * 2) command sequence number is now increased atomically
496  *  *  *  *  *  *  *  *  *  * 3) private data could be hold and taken use for other purpose
497  *
498  * 04 06 2010 cp.wu
499  * [WPD00001943]Create WiFi test driver framework on WinXP
500  * sync statistics data structure definition with firmware implementation
501  *
502  * 03 30 2010 cp.wu
503  * [WPD00001943]Create WiFi test driver framework on WinXP
504  * statistics information OIDs are now handled by querying from firmware domain
505  *
506  * 03 26 2010 cp.wu
507  * [WPD00001943]Create WiFi test driver framework on WinXP
508  * indicate media stream mode after set is done
509  *
510  * 03 26 2010 cp.wu
511  * [WPD00001943]Create WiFi test driver framework on WinXP
512  * add a temporary flag for integration with CMD/EVENT v0.9.
513  *
514  * 03 25 2010 cp.wu
515  * [WPD00001943]Create WiFi test driver framework on WinXP
516  * 1) correct OID_802_11_CONFIGURATION with frequency setting behavior.
517  *  * the frequency is used for adhoc connection only
518  *  * 2) update with SD1 v0.9 CMD/EVENT documentation
519  *
520  * 03 24 2010 jeffrey.chang
521  * [WPD00003826]Initial import for Linux port
522  * initial import for Linux port
523  *
524  * 03 22 2010 cp.wu
525  * [WPD00003824][MT6620 Wi-Fi][New Feature] Add support of large scan list
526  * Implement feature needed by CR: WPD00003824: refining association command by pasting scanning result
527  *
528  * 03 19 2010 cp.wu
529  * [WPD00001943]Create WiFi test driver framework on WinXP
530  * 1) add ACPI D0/D3 state switching support
531  *  *  *  *  *  * 2) use more formal way to handle interrupt when the status is retrieved from enhanced RX response
532  *
533  * 03 15 2010 kevin.huang
534  * [WPD00003820][MT6620 Wi-Fi] Modify the code for meet the WHQL test
535  * Add event for activate STA_RECORD_T
536  *
537  * 03 03 2010 cp.wu
538  * [WPD00001943]Create WiFi test driver framework on WinXP
539  * implement custom OID: EEPROM read/write access
540  *
541  * 03 03 2010 cp.wu
542  * [WPD00001943]Create WiFi test driver framework on WinXP
543  * implement OID_802_3_MULTICAST_LIST oid handling
544  *
545  * 02 26 2010 cp.wu
546  * [WPD00001943]Create WiFi test driver framework on WinXP
547  * move EVENT_ID_ASSOC_INFO from nic_rx.c to gl_kal_ndis_51.c
548  * 'cause it involves OS dependent data structure handling
549  *
550  * 02 25 2010 cp.wu
551  * [WPD00001943]Create WiFi test driver framework on WinXP
552  * send CMD_ID_INFRASTRUCTURE when handling OID_802_11_INFRASTRUCTURE_MODE set.
553  *
554  * 02 09 2010 cp.wu
555  * [WPD00001943]Create WiFi test driver framework on WinXP
556  * 1. Permanent and current MAC address are now retrieved by CMD/EVENT packets instead of hard-coded address
557  *  *  *  *  * 2. follow MSDN defined behavior when associates to another AP
558  *  *  *  *  * 3. for firmware download, packet size could be up to 2048 bytes
559  *
560  * 01 27 2010 wh.su
561  * [WPD00003816][MT6620 Wi-Fi] Adding the security support
562  * .
563  *
564  * 01 27 2010 cp.wu
565  * [WPD00001943]Create WiFi test driver framework on WinXP
566  * 1. eliminate improper variable in rHifInfo
567  *  *  *  *  *  * 2. block TX/ordinary OID when RF test mode is engaged
568  *  *  *  *  *  * 3. wait until firmware finish operation when entering into and leaving from RF test mode
569  *  *  *  *  *  * 4. correct some HAL implementation
570  *
571  * 01 22 2010 cp.wu
572  * [WPD00001943]Create WiFi test driver framework on WinXP
573  * implement following 802.11 OIDs:
574  *  *  * OID_802_11_RSSI,
575  *  *  * OID_802_11_RSSI_TRIGGER,
576  *  *  * OID_802_11_STATISTICS,
577  *  *  * OID_802_11_DISASSOCIATE,
578  *  *  * OID_802_11_POWER_MODE
579  *
580  * 01 21 2010 cp.wu
581  * [WPD00001943]Create WiFi test driver framework on WinXP
582  * implement OID_802_11_MEDIA_STREAM_MODE
583  *
584  * 01 21 2010 cp.wu
585  * [WPD00001943]Create WiFi test driver framework on WinXP
586  * implement OID_802_11_SUPPORTED_RATES / OID_802_11_DESIRED_RATES
587  *
588  * 12 30 2009 cp.wu
589  * [WPD00001943]Create WiFi test driver framework on WinXP
590  * 1) According to CMD/EVENT documentation v0.8,
591  *  *  *  *  *  * OID_CUSTOM_TEST_RX_STATUS & OID_CUSTOM_TEST_TX_STATUS is no longer used,
592  *  *  *  *  *  * and result is retrieved by get ATInfo instead
593  *  *  *  *  *  * 2) add 4 counter for recording aggregation statistics
594 **  \main\maintrunk.MT6620WiFiDriver_Prj\20 2009-12-11 18:35:07 GMT mtk02752
595 **  add CMD added in CMD/EVEN document v0.8
596 **  \main\maintrunk.MT6620WiFiDriver_Prj\19 2009-12-10 16:39:37 GMT mtk02752
597 **  eliminate unused definitions
598 **  \main\maintrunk.MT6620WiFiDriver_Prj\18 2009-12-10 09:55:11 GMT mtk02752
599 **  command ID/event ID revised
600 **  \main\maintrunk.MT6620WiFiDriver_Prj\17 2009-12-09 13:57:37 GMT MTK02468
601 **  Added event ids (EVENT_ID_RX_ADDBA and EVENT_ID_RX_DELBA)
602 **  \main\maintrunk.MT6620WiFiDriver_Prj\16 2009-12-08 17:35:39 GMT mtk02752
603 **  + add event ID for EVENT_ID_TEST_STATUS (rf test)
604 **  \main\maintrunk.MT6620WiFiDriver_Prj\15 2009-12-07 23:01:09 GMT mtk02752
605 **  add data structure for RF_TEST
606 **  \main\maintrunk.MT6620WiFiDriver_Prj\14 2009-12-03 16:22:56 GMT mtk01461
607 **  Modify the element - i4RSSI in EVENT of SCAN RESULT
608 **  \main\maintrunk.MT6620WiFiDriver_Prj\13 2009-11-30 10:54:44 GMT mtk02752
609 **  1st DW of WIFI_CMD_T is shared with HIF_TX_HEADER_T, while 1st DW of WIFI_EVENT_T is shared with HIF_RX_HEADER_T
610 **  \main\maintrunk.MT6620WiFiDriver_Prj\12 2009-11-26 10:16:58 GMT mtk02752
611 **  resync EVENT_CONNECTION_STATUS
612 **  \main\maintrunk.MT6620WiFiDriver_Prj\11 2009-11-25 21:34:01 GMT mtk02752
613 **  sync. EVENT_SCAN_RESULT_T with firmware
614 **  \main\maintrunk.MT6620WiFiDriver_Prj\10 2009-11-25 21:03:48 GMT mtk02752
615 **  refine MGMT_FRAME
616 **  \main\maintrunk.MT6620WiFiDriver_Prj\9 2009-11-25 18:17:47 GMT mtk02752
617 **  refine GL_WLAN_INFO_T for buffering scan result and presume max. ie length = 600 bytes
618 **  \main\maintrunk.MT6620WiFiDriver_Prj\8 2009-11-24 22:41:20 GMT mtk02752
619 **  add EVENT_SCAN_RESULT_T definition
620 **  \main\maintrunk.MT6620WiFiDriver_Prj\7 2009-11-23 20:29:16 GMT mtk02752
621 **   fix typo
622 **  \main\maintrunk.MT6620WiFiDriver_Prj\6 2009-11-23 14:46:01 GMT mtk02752
623 **  add new command/event structure upon CM@SD1's documentation
624 **  \main\maintrunk.MT6620WiFiDriver_Prj\5 2009-11-13 15:13:40 GMT mtk02752
625 **  add command definition for CMD_BUILD_CONNECTION and EVENT_CONNECTION_STATUS
626 **  \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-05-20 12:22:22 GMT mtk01461
627 **  Add SeqNum field to Event Header
628 **  \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-04-29 15:42:11 GMT mtk01461
629 **  Update structure of HIF_EVENT_HEADER_T and EVENT_HDR_SIZE
630 **  \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-04-21 12:10:36 GMT mtk01461
631 **  Add Common Set CMD Callback for MCR Write and other Set OID
632 **  \main\maintrunk.MT6620WiFiDriver_Prj\1 2009-04-21 01:40:17 GMT mtk01461
633 **  Command Done Handler
634 */
635 #ifndef _NIC_CMD_EVENT_H
636 #define _NIC_CMD_EVENT_H
637
638 /*******************************************************************************
639 *                         C O M P I L E R   F L A G S
640 ********************************************************************************
641 */
642
643 /*******************************************************************************
644 *                    E X T E R N A L   R E F E R E N C E S
645 ********************************************************************************
646 */
647
648 /*******************************************************************************
649 *                              C O N S T A N T S
650 ********************************************************************************
651 */
652 #define CMD_STATUS_SUCCESS      0
653 #define CMD_STATUS_REJECTED     1
654 #define CMD_STATUS_UNKNOWN      2
655
656 #define EVENT_HDR_SIZE          OFFSET_OF(WIFI_EVENT_T, aucBuffer[0])
657
658 #define MAX_IE_LENGTH       (600)
659 #define MAX_WSC_IE_LENGTH   (400)
660
661 /* Action field in structure CMD_CH_PRIVILEGE_T */
662 #define CMD_CH_ACTION_REQ           0
663 #define CMD_CH_ACTION_ABORT         1
664
665 /* Status field in structure EVENT_CH_PRIVILEGE_T */
666 #define EVENT_CH_STATUS_GRANT       0
667
668
669 typedef enum _ENUM_CMD_ID_T {
670     CMD_ID_TEST_MODE = 1,               /* 0x01 (Set) */
671     CMD_ID_RESET_REQUEST,               /* 0x02 (Set) */
672     CMD_ID_BUILD_CONNECTION,            /* 0x03 (Set) */
673     CMD_ID_SCAN_REQ_V2,                 /* 0x04 (Set) */
674     CMD_ID_NIC_POWER_CTRL,              /* 0x05 (Set) */
675     CMD_ID_POWER_SAVE_MODE,             /* 0x06 (Set) */
676     CMD_ID_LINK_ATTRIB,                 /* 0x07 (Set) */
677     CMD_ID_ADD_REMOVE_KEY,              /* 0x08 (Set) */
678     CMD_ID_DEFAULT_KEY_ID,              /* 0x09 (Set) */
679     CMD_ID_INFRASTRUCTURE,              /* 0x0a (Set) */
680     CMD_ID_SET_RX_FILTER,               /* 0x0b (Set) */
681     CMD_ID_DOWNLOAD_BUF,                /* 0x0c (Set) */
682     CMD_ID_WIFI_START,                  /* 0x0d (Set) */
683     CMD_ID_CMD_BT_OVER_WIFI,            /* 0x0e (Set) */
684     CMD_ID_SET_MEDIA_CHANGE_DELAY_TIME, /* 0x0f (Set) */
685     CMD_ID_SEND_ADDBA_RSP,              /* 0x10 (Set) */
686     CMD_ID_WAPI_MODE,                   /* 0x11 (Set)  (obsolete) */
687     CMD_ID_WAPI_ASSOC_INFO,             /* 0x12 (Set)  (obsolete) */
688     CMD_ID_SET_DOMAIN_INFO,             /* 0x13 (Set) */
689     CMD_ID_SET_IP_ADDRESS,              /* 0x14 (Set) */
690     CMD_ID_BSS_ACTIVATE_CTRL,           /* 0x15 (Set) */
691     CMD_ID_SET_BSS_INFO,                /* 0x16 (Set) */
692     CMD_ID_UPDATE_STA_RECORD,           /* 0x17 (Set) */
693     CMD_ID_REMOVE_STA_RECORD,           /* 0x18 (Set) */
694     CMD_ID_INDICATE_PM_BSS_CREATED,     /* 0x19 (Set) */
695     CMD_ID_INDICATE_PM_BSS_CONNECTED,   /* 0x1a (Set) */
696     CMD_ID_INDICATE_PM_BSS_ABORT,       /* 0x1b (Set) */
697     CMD_ID_UPDATE_BEACON_CONTENT,       /* 0x1c (Set) */
698     CMD_ID_SET_BSS_RLM_PARAM,           /* 0x1d (Set) */
699     CMD_ID_SCAN_REQ,                    /* 0x1e (Set) */
700     CMD_ID_SCAN_CANCEL,                 /* 0x1f (Set) */
701     CMD_ID_CH_PRIVILEGE,                /* 0x20 (Set) */
702     CMD_ID_UPDATE_WMM_PARMS,            /* 0x21 (Set) */
703     CMD_ID_SET_WMM_PS_TEST_PARMS,       /* 0x22 (Set) */
704     CMD_ID_TX_AMPDU,                    /* 0x23 (Set) */
705     CMD_ID_ADDBA_REJECT,                /* 0x24 (Set) */
706     CMD_ID_SET_PS_PROFILE_ADV,          /* 0x25 (Set) */
707     CMD_ID_SET_RAW_PATTERN,             /* 0x26 (Set) */
708     CMD_ID_CONFIG_PATTERN_FUNC,         /* 0x27 (Set) */
709     CMD_ID_SET_TX_PWR,                  /* 0x28 (Set) */
710     CMD_ID_SET_5G_PWR_OFFSET,           /* 0x29 (Set) */
711     CMD_ID_SET_PWR_PARAM,               /* 0x2A (Set) */
712     CMD_ID_P2P_ABORT,                   /* 0x2B (Set) */
713 #if CFG_STRESS_TEST_SUPPORT
714         CMD_ID_RANDOM_RX_RESET_EN = 0x2C,       /* 0x2C (Set ) */
715         CMD_ID_RANDOM_RX_RESET_DE = 0x2D,       /* 0x2D (Set ) */
716         CMD_ID_SAPP_EN            = 0x2E,       /* 0x2E (Set ) */
717         CMD_ID_SAPP_DE            = 0x2F,       /* 0x2F (Set ) */
718 #endif
719     CMD_ID_ROAMING_TRANSIT  = 0x30,     /* 0x30 (Set) */
720     CMD_ID_SET_PHY_PARAM,               /* 0x31 (Set) */
721     CMD_ID_SET_NOA_PARAM,               /* 0x32 (Set) */
722     CMD_ID_SET_OPPPS_PARAM,             /* 0x33 (Set) */
723     CMD_ID_SET_UAPSD_PARAM,             /* 0x34 (Set) */
724     CMD_ID_SET_SIGMA_STA_SLEEP,         /* 0x35 (Set) */
725     CMD_ID_SET_EDGE_TXPWR_LIMIT,        /* 0x36 (Set) */
726     CMD_ID_SET_DEVICE_MODE,             /* 0x37 (Set) */
727     CMD_ID_SET_TXPWR_CTRL,              /* 0x38 (Set) */
728     CMD_ID_SET_AUTOPWR_CTRL,            /* 0x39 (Set) */
729     CMD_ID_SET_WFD_CTRL  = 0x3A,        /* 0x3A (Set) */
730
731     CMD_ID_GET_NIC_CAPABILITY = 0x80,   /* 0x80 (Query) */
732     CMD_ID_GET_LINK_QUALITY,            /* 0x81 (Query) */
733     CMD_ID_GET_STATISTICS,              /* 0x82 (Query) */
734     CMD_ID_GET_CONNECTION_STATUS,       /* 0x83 (Query) */
735     CMD_ID_GET_ASSOC_INFO,              /* 0x84 (Query) (obsolete) */
736     CMD_ID_GET_STA_STATISTICS = 0x85,   /* 0x85 (Query) */
737
738     CMD_ID_BASIC_CONFIG = 0xc1,         /* 0xc1 (Set / Query) */
739     CMD_ID_ACCESS_REG,                  /* 0xc2 (Set / Query) */
740     CMD_ID_MAC_MCAST_ADDR,              /* 0xc3 (Set / Query) */
741     CMD_ID_802_11_PMKID,                /* 0xc4 (Set / Query) */
742     CMD_ID_ACCESS_EEPROM,               /* 0xc5 (Set / Query) */
743     CMD_ID_SW_DBG_CTRL,                 /* 0xc6 (Set / Query) */
744 #if 1/* CFG_SUPPORT_ANTI_PIRACY */
745     CMD_ID_SEC_CHECK,                    /* 0xc7 (Set / Query) */
746 #endif
747     CMD_ID_DUMP_MEM,                      /* 0xc8 (Query) */
748
749 #if CFG_SUPPORT_RDD_TEST_MODE
750     CMD_ID_SET_RDD_CH = 0xE1,
751 #endif
752
753     CMD_ID_SET_BWCS = 0xF1,
754 #if CFG_SUPPORT_OSC_SETTING && defined(MT5931)
755     CMD_ID_SET_OSC = 0xf2,
756 #endif
757 #if CFG_SUPPORT_BUILD_DATE_CODE
758     CMD_ID_GET_BUILD_DATE_CODE = 0xF8,
759 #endif
760     CMD_ID_GET_BSS_INFO = 0xF9
761
762 } ENUM_CMD_ID_T, *P_ENUM_CMD_ID_T;
763
764 typedef enum _ENUM_EVENT_ID_T {
765     EVENT_ID_CMD_RESULT = 1,            /* 0x01 (Query) */
766     EVENT_ID_NIC_CAPABILITY,            /* 0x02 (Query) */
767     EVENT_ID_CONNECTION_STATUS,         /* 0x03 (Query / Unsolicited) (obsolete) */
768     EVENT_ID_SCAN_RESULT,               /* 0x04 (Query / Unsolicited) (obselete) */
769     EVENT_ID_LINK_QUALITY,              /* 0x05 (Query / Unsolicited) */
770     EVENT_ID_STATISTICS,                /* 0x06 (Query) */
771     EVENT_ID_MIC_ERR_INFO,              /* 0x07 (Unsolicited) */
772     EVENT_ID_ASSOC_INFO,                /* 0x08 (Query - CMD_ID_GET_ASSOC_INFO) */
773     EVENT_ID_BASIC_CONFIG,              /* 0x09 (Query - CMD_ID_BASIC_CONFIG) */
774     EVENT_ID_ACCESS_REG,                /* 0x0a (Query - CMD_ID_ACCESS_REG) */
775     EVENT_ID_MAC_MCAST_ADDR,            /* 0x0b (Query - CMD_ID_MAC_MCAST_ADDR) */
776     EVENT_ID_802_11_PMKID,              /* 0x0c (Query - CMD_ID_802_11_PMKID) */
777     EVENT_ID_ACCESS_EEPROM,             /* 0x0d (Query - CMD_ID_ACCESS_EEPROM) */
778     EVENT_ID_SLEEPY_NOTIFY,             /* 0x0e (Query) */
779     EVENT_ID_BT_OVER_WIFI,              /* 0x0f (Unsolicited) */
780     EVENT_ID_TEST_STATUS,               /* 0x10 (Query - CMD_ID_TEST_MODE) */
781     EVENT_ID_RX_ADDBA,                  /* 0x11 (Unsolicited) (obsolete) */
782     EVENT_ID_RX_DELBA,                  /* 0x12 (Unsolicited) (obsolete) */
783     EVENT_ID_ACTIVATE_STA_REC_T,        /* 0x13 (Unsolicited) */
784     EVENT_ID_DEACTIVATE_STA_REC_T,      /* 0x14 (Unsolicited) */
785     EVENT_ID_SCAN_DONE,                 /* 0x15 (Unsoiicited) */
786     EVENT_ID_RX_FLUSH,                  /* 0x16 (Unsolicited) */
787     EVENT_ID_TX_DONE,                   /* 0x17 (Unsolicited) */
788     EVENT_ID_CH_PRIVILEGE,              /* 0x18 (Unsolicited) */
789     EVENT_ID_BSS_ABSENCE_PRESENCE = 0x19,  /* 0x19 (Unsolicited) */
790     EVENT_ID_STA_CHANGE_PS_MODE,        /* 0x1A (Unsolicited) */
791     EVENT_ID_BSS_BEACON_TIMEOUT,        /* 0x1B (Unsolicited) */
792     EVENT_ID_UPDATE_NOA_PARAMS,         /* 0x1C (Unsolicited) */
793     EVENT_ID_AP_OBSS_STATUS,            /* 0x1D (Unsolicited) */
794     EVENT_ID_STA_UPDATE_FREE_QUOTA,     /* 0x1E (Unsolicited) */
795     EVENT_ID_SW_DBG_CTRL,               /* 0x1F (Query - CMD_ID_SW_DBG_CTRL) */
796     EVENT_ID_ROAMING_STATUS,            /* 0x20 (Unsolicited) */
797     EVENT_ID_STA_AGING_TIMEOUT,         /* 0x21 (Unsolicited) */
798 #if 1 /* CFG_SUPPORT_ANTI_PIRACY */
799     EVENT_ID_SEC_CHECK_RSP,              /* 0x22 (Unsolicited) */
800 #endif
801     EVENT_ID_SEND_DEAUTH,               /* 0x23 (Unsolicited) */
802
803 #if CFG_SUPPORT_RDD_TEST_MODE
804     EVENT_ID_UPDATE_RDD_STATUS,          /* 0x24 (Unsolicited) */
805 #endif
806
807 #if CFG_SUPPORT_BCM && CFG_SUPPORT_BCM_BWCS
808     EVENT_ID_UPDATE_BWCS_STATUS = 0x25,         /* 0x25 (Unsolicited) */
809     EVENT_ID_UPDATE_BCM_DEBUG,                    /* 0x26 (Unsolicited) */
810 #endif
811     EVENT_ID_RX_ERR,
812     EVENT_ID_DUMP_MEM,
813     EVENT_ID_STA_STATISTICS= 0x29,            /* 0x29 (Query ) */
814     EVENT_ID_STA_STATISTICS_UPDATE,           /* 0x2A (Unsolicited) */
815
816 #if CFG_SUPPORT_BUILD_DATE_CODE
817     EVENT_ID_BUILD_DATE_CODE = 0xF8,
818 #endif
819     EVENT_ID_GET_AIS_BSS_INFO = 0xF9
820
821 } ENUM_EVENT_ID_T, *P_ENUM_EVENT_ID_T;
822
823
824 /*******************************************************************************
825 *                             D A T A   T Y P E S
826 ********************************************************************************
827 */
828 #ifndef LINUX
829 typedef UINT_8 CMD_STATUS;
830 #endif
831 /* for Event Packet (via HIF-RX) */
832     /* following CM's documentation v0.7 */
833 typedef struct _WIFI_CMD_T {
834     UINT_16     u2TxByteCount_UserPriority;
835     UINT_8      ucEtherTypeOffset;
836     UINT_8      ucResource_PktType_CSflags;
837     UINT_8      ucCID;
838     UINT_8      ucSetQuery;
839     UINT_8      ucSeqNum;
840     UINT_8      aucReserved2;
841
842     UINT_8      aucBuffer[0];
843 } WIFI_CMD_T, *P_WIFI_CMD_T;
844
845 /* for Command Packet (via HIF-TX) */
846     /* following CM's documentation v0.7 */
847 typedef struct _WIFI_EVENT_T {
848     UINT_16     u2PacketLen;
849     UINT_16     u2PacketType;
850     UINT_8      ucEID;
851     UINT_8      ucSeqNum;
852     UINT_8      aucReserved2[2];
853
854     UINT_8      aucBuffer[0];
855 } WIFI_EVENT_T, *P_WIFI_EVENT_T;
856
857 // CMD_ID_TEST_MODE
858 typedef struct _CMD_TEST_CTRL_T {
859     UINT_8      ucAction;
860     UINT_8      aucReserved[3];
861     union {
862         UINT_32                 u4OpMode;
863         UINT_32                 u4ChannelFreq;
864         PARAM_MTK_WIFI_TEST_STRUC_T rRfATInfo;
865     } u;
866 } CMD_TEST_CTRL_T, *P_CMD_TEST_CTRL_T;
867
868 // EVENT_TEST_STATUS
869 typedef struct _PARAM_CUSTOM_RFTEST_TX_STATUS_STRUC_T {
870     UINT_32             u4PktSentStatus;
871     UINT_32             u4PktSentCount;
872     UINT_16             u2AvgAlc;
873     UINT_8              ucCckGainControl;
874     UINT_8              ucOfdmGainControl;
875 } PARAM_CUSTOM_RFTEST_TX_STATUS_STRUC_T, *P_PARAM_CUSTOM_RFTEST_TX_STATUS_STRUC_T;
876
877 typedef struct  _PARAM_CUSTOM_RFTEST_RX_STATUS_STRUC_T {
878     UINT_32             u4IntRxOk;            /*!< number of packets that Rx ok from interrupt */
879     UINT_32             u4IntCrcErr;          /*!< number of packets that CRC error from interrupt */
880     UINT_32             u4IntShort;           /*!< number of packets that is short preamble from interrupt */
881     UINT_32             u4IntLong;            /*!< number of packets that is long preamble from interrupt */
882     UINT_32             u4PauRxPktCount;      /*!< number of packets that Rx ok from PAU */
883     UINT_32             u4PauCrcErrCount;     /*!< number of packets that CRC error from PAU */
884     UINT_32             u4PauRxFifoFullCount; /*!< number of packets that is short preamble from PAU */
885     UINT_32             u4PauCCACount;        /*!< CCA rising edge count */
886 } PARAM_CUSTOM_RFTEST_RX_STATUS_STRUC_T, *P_PARAM_CUSTOM_RFTEST_RX_STATUS_STRUC_T;
887
888 typedef union _EVENT_TEST_STATUS {
889     PARAM_MTK_WIFI_TEST_STRUC_T             rATInfo;
890 //    PARAM_CUSTOM_RFTEST_TX_STATUS_STRUC_T   rTxStatus;
891 //    PARAM_CUSTOM_RFTEST_RX_STATUS_STRUC_T   rRxStatus;
892 } EVENT_TEST_STATUS, *P_EVENT_TEST_STATUS;
893
894 // CMD_BUILD_CONNECTION
895 typedef struct _CMD_BUILD_CONNECTION {
896     UINT_8      ucInfraMode;
897     UINT_8      ucAuthMode;
898     UINT_8      ucEncryptStatus;
899     UINT_8      ucSsidLen;
900     UINT_8      aucSsid[PARAM_MAX_LEN_SSID];
901     UINT_8      aucBssid[PARAM_MAC_ADDR_LEN];
902
903     /* Ad-hoc mode */
904     UINT_16     u2BeaconPeriod;
905     UINT_16     u2ATIMWindow;
906     UINT_8      ucJoinOnly;
907     UINT_8      ucReserved;
908     UINT_32     u4FreqInKHz;
909
910     /* for faster connection */
911     UINT_8      aucScanResult[0];
912 } CMD_BUILD_CONNECTION, *P_CMD_BUILD_CONNECTION;
913
914 //CMD_ADD_REMOVE_KEY
915 typedef struct _CMD_802_11_KEY {
916     UINT_8      ucAddRemove;
917     UINT_8      ucTxKey;
918     UINT_8      ucKeyType;
919     UINT_8      ucIsAuthenticator;
920     UINT_8      aucPeerAddr[6];
921     UINT_8      ucNetType;
922     UINT_8      ucAlgorithmId;
923     UINT_8      ucKeyId;
924     UINT_8      ucKeyLen;
925     UINT_8      aucReverved[2];
926     UINT_8      aucKeyMaterial[32];
927     UINT_8      aucKeyRsc[16];
928 } CMD_802_11_KEY, *P_CMD_802_11_KEY;
929
930 /* WPA2 PMKID cache structure */
931 typedef struct _PMKID_ENTRY_T {
932     PARAM_BSSID_INFO_T  rBssidInfo;
933     BOOLEAN             fgPmkidExist;
934 } PMKID_ENTRY_T, *P_PMKID_ENTRY_T;
935
936 typedef struct _CMD_802_11_PMKID
937 {
938     ULONG               u4BSSIDInfoCount;
939     P_PMKID_ENTRY_T     arPMKIDInfo[1];
940 } CMD_802_11_PMKID, *P_CMD_802_11_PMKID;
941
942 // CMD_BASIC_CONFIG
943 typedef struct _CMD_CSUM_OFFLOAD {
944     UINT_16     u2RxChecksum; // bit0: IP, bit1: UDP, bit2: TCP
945     UINT_16     u2TxChecksum; // bit0: IP, bit1: UDP, bit2: TCP
946 } CMD_CSUM_OFFLOAD, *P_CMD_CSUM_OFFLOAD;
947
948 typedef struct _CMD_BASIC_CONFIG {
949     PARAM_MAC_ADDRESS   rMyMacAddr;
950     UINT_8              ucNative80211;
951     UINT_8              aucReserved[1];
952
953     CMD_CSUM_OFFLOAD    rCsumOffload;
954 } CMD_BASIC_CONFIG, *P_CMD_BASIC_CONFIG, EVENT_BASIC_CONFIG, *P_EVENT_BASIC_CONFIG;
955
956 // CMD_MAC_MCAST_ADDR
957 typedef struct _CMD_MAC_MCAST_ADDR {
958     UINT_32             u4NumOfGroupAddr;
959     UINT_8              ucNetTypeIndex;
960     UINT_8              aucReserved[3];
961     PARAM_MAC_ADDRESS   arAddress[MAX_NUM_GROUP_ADDR];
962 } CMD_MAC_MCAST_ADDR, *P_CMD_MAC_MCAST_ADDR, EVENT_MAC_MCAST_ADDR, *P_EVENT_MAC_MCAST_ADDR;
963
964 // CMD_ACCESS_EEPROM
965 typedef struct _CMD_ACCESS_EEPROM {
966     UINT_16             u2Offset;
967     UINT_16             u2Data;
968 } CMD_ACCESS_EEPROM, *P_CMD_ACCESS_EEPROM, EVENT_ACCESS_EEPROM, *P_EVENT_ACCESS_EEPROM;
969
970 typedef struct _CMD_CUSTOM_NOA_PARAM_STRUC_T {
971     UINT_32  u4NoaDurationMs;
972     UINT_32  u4NoaIntervalMs;
973     UINT_32  u4NoaCount;
974 } CMD_CUSTOM_NOA_PARAM_STRUC_T, *P_CMD_CUSTOM_NOA_PARAM_STRUC_T;
975
976 typedef struct _CMD_CUSTOM_OPPPS_PARAM_STRUC_T {
977     UINT_32  u4CTwindowMs;
978 } CMD_CUSTOM_OPPPS_PARAM_STRUC_T, *P_CMD_CUSTOM_OPPPS_PARAM_STRUC_T;
979
980 typedef struct _CMD_CUSTOM_UAPSD_PARAM_STRUC_T {
981     UINT_8  fgEnAPSD;
982     UINT_8  fgEnAPSD_AcBe;
983     UINT_8  fgEnAPSD_AcBk;
984     UINT_8  fgEnAPSD_AcVo;
985     UINT_8  fgEnAPSD_AcVi;
986     UINT_8  ucMaxSpLen;
987     UINT_8  aucResv[2];
988 } CMD_CUSTOM_UAPSD_PARAM_STRUC_T, *P_CMD_CUSTOM_UAPSD_PARAM_STRUC_T;
989
990 // EVENT_CONNECTION_STATUS
991 typedef struct _EVENT_CONNECTION_STATUS {
992     UINT_8  ucMediaStatus;
993     UINT_8  ucReasonOfDisconnect;
994
995     UINT_8  ucInfraMode;
996     UINT_8  ucSsidLen;
997     UINT_8  aucSsid[PARAM_MAX_LEN_SSID];
998     UINT_8  aucBssid[PARAM_MAC_ADDR_LEN];
999     UINT_8  ucAuthenMode;
1000     UINT_8  ucEncryptStatus;
1001     UINT_16 u2BeaconPeriod;
1002     UINT_16 u2AID;
1003     UINT_16 u2ATIMWindow;
1004     UINT_8  ucNetworkType;
1005     UINT_8  aucReserved[1];
1006     UINT_32 u4FreqInKHz;
1007
1008 #if CFG_ENABLE_WIFI_DIRECT
1009     UINT_8 aucInterfaceAddr[PARAM_MAC_ADDR_LEN];
1010 #endif
1011
1012 } EVENT_CONNECTION_STATUS, *P_EVENT_CONNECTION_STATUS;
1013
1014 // EVENT_NIC_CAPABILITY
1015 typedef struct _EVENT_NIC_CAPABILITY {
1016     UINT_16     u2ProductID;
1017     UINT_16     u2FwVersion;
1018     UINT_16     u2DriverVersion;
1019     UINT_8      ucHw5GBandDisabled;
1020     UINT_8      ucEepromUsed;
1021     UINT_8      ucEfuseValid;
1022     UINT_8      ucMacAddrValid;
1023 #if CFG_REPORT_RFBB_VERSION
1024     UINT_8      ucRfVersion;
1025     UINT_8      ucPhyVersion;
1026 #endif
1027 #if CFG_ENABLE_CAL_LOG
1028     UINT_8      ucRfCalFail;
1029     UINT_8      ucBbCalFail;
1030 #endif
1031     UINT_8      aucReserved[2];
1032 } EVENT_NIC_CAPABILITY, *P_EVENT_NIC_CAPABILITY;
1033
1034 // modified version of WLAN_BEACON_FRAME_BODY_T for simplier buffering
1035 typedef struct _WLAN_BEACON_FRAME_BODY_T_LOCAL {
1036     /* Beacon frame body */
1037     UINT_32     au4Timestamp[2];            /* Timestamp */
1038     UINT_16     u2BeaconInterval;           /* Beacon Interval */
1039     UINT_16     u2CapInfo;                  /* Capability */
1040     UINT_8      aucInfoElem[MAX_IE_LENGTH]; /* Various IEs, start from SSID */
1041     UINT_16     u2IELength;                 /* This field is *NOT* carried by F/W but caculated by nic_rx */
1042 } WLAN_BEACON_FRAME_BODY_T_LOCAL, *P_WLAN_BEACON_FRAME_BODY_T_LOCAL;
1043
1044 // EVENT_SCAN_RESULT
1045 typedef struct _EVENT_SCAN_RESULT_T {
1046     INT_32                          i4RSSI;
1047     UINT_32                         u4LinkQuality;
1048     UINT_32                         u4DSConfig; /* Center frequency */
1049     UINT_32                         u4DomainInfo; /* Require CM opinion */
1050     UINT_32                         u4Reserved;
1051     UINT_8                          ucNetworkType;
1052     UINT_8                          ucOpMode;
1053     UINT_8                          aucBssid[MAC_ADDR_LEN];
1054     UINT_8                          aucRatesEx[PARAM_MAX_LEN_RATES_EX];
1055     WLAN_BEACON_FRAME_BODY_T_LOCAL  rBeaconFrameBody;
1056 } EVENT_SCAN_RESULT_T, *P_EVENT_SCAN_RESULT_T;
1057
1058 /* event of tkip mic error */
1059 typedef struct _EVENT_MIC_ERR_INFO
1060 {
1061     UINT_32     u4Flags;
1062 } EVENT_MIC_ERR_INFO, *P_EVENT_MIC_ERR_INFO;
1063
1064 typedef struct _EVENT_PMKID_CANDIDATE_LIST_T
1065 {
1066     UINT_32     u4Version;            /*!< Version */
1067     UINT_32     u4NumCandidates;      /*!< How many candidates follow */
1068     PARAM_PMKID_CANDIDATE_T   arCandidateList[1];
1069 } EVENT_PMKID_CANDIDATE_LIST_T, *P_EVENT_PMKID_CANDIDATE_LIST_T;
1070
1071
1072 typedef struct _EVENT_CMD_RESULT {
1073         UINT_8          ucCmdID;
1074         UINT_8          ucStatus;
1075         UINT_8          aucReserved[2];
1076 } EVENT_CMD_RESULT, *P_EVENT_CMD_RESULT;
1077
1078 #if CFG_SUPPORT_OSC_SETTING && defined(MT5931)
1079 typedef struct _CMD_MCU_LP_PARAM_T {
1080     UINT_16     u2OscStableTime;
1081     UINT_8      ucReserved[6];
1082 } CMD_MCU_LP_PARAM_T, *P_CMD_MCU_LP_PARAM_T;
1083 #endif
1084
1085
1086 // CMD_ID_ACCESS_REG & EVENT_ID_ACCESS_REG
1087 typedef struct _CMD_ACCESS_REG {
1088     UINT_32     u4Address;
1089     UINT_32     u4Data;
1090 } CMD_ACCESS_REG, *P_CMD_ACCESS_REG;
1091
1092 // CMD_DUMP_MEMORY
1093 typedef struct _CMD_DUMP_MEM {
1094     UINT_32     u4Address;
1095     UINT_32     u4Length;
1096     UINT_32     u4RemainLength;
1097     UINT_8      ucFragNum;
1098 } CMD_DUMP_MEM, *P_CMD_DUMP_MEM;
1099
1100 typedef struct _EVENT_DUMP_MEM_T {
1101     UINT_32     u4Address;
1102     UINT_32     u4Length;
1103     UINT_32     u4RemainLength;
1104     UINT_8      ucFragNum;
1105     UINT_8      aucBuffer[1];
1106 } EVENT_DUMP_MEM_T, *P_EVENT_DUMP_MEM_T;
1107
1108 typedef struct _CMD_SW_DBG_CTRL_T {
1109     UINT_32     u4Id;
1110     UINT_32     u4Data;
1111     /* Debug Support */
1112     UINT_32         u4DebugCnt[64];
1113 } CMD_SW_DBG_CTRL_T, *P_CMD_SW_DBG_CTRL_T;
1114
1115
1116 // CMD_ID_LINK_ATTRIB
1117 typedef struct _CMD_LINK_ATTRIB {
1118     INT_8       cRssiTrigger;
1119     UINT_8      ucDesiredRateLen;
1120     UINT_16     u2DesiredRate[32];
1121     UINT_8      ucMediaStreamMode;
1122     UINT_8      aucReserved[1];
1123 } CMD_LINK_ATTRIB, *P_CMD_LINK_ATTRIB;
1124
1125 // CMD_ID_NIC_POWER_CTRL
1126 typedef struct _CMD_NIC_POWER_CTRL {
1127     UINT_8  ucPowerMode;
1128     UINT_8  aucReserved[3];
1129 } CMD_NIC_POWER_CTRL, *P_CMD_NIC_POWER_CTRL;
1130
1131 // CMD_ID_POWER_SAVE_MODE
1132 typedef struct _CMD_PS_PROFILE_T {
1133     UINT_8  ucNetTypeIndex;
1134     UINT_8  ucPsProfile;
1135     UINT_8  aucReserved[2];
1136 } CMD_PS_PROFILE_T, *P_CMD_PS_PROFILE_T;
1137
1138
1139 // EVENT_LINK_QUALITY
1140 typedef struct _EVENT_LINK_QUALITY {
1141     INT_8       cRssi;
1142     INT_8       cLinkQuality;
1143     UINT_16     u2LinkSpeed;
1144     UINT_8      ucMediumBusyPercentage;
1145 } EVENT_LINK_QUALITY, *P_EVENT_LINK_QUALITY;
1146
1147 #if CFG_SUPPORT_P2P_RSSI_QUERY
1148 // EVENT_LINK_QUALITY
1149 typedef struct _EVENT_LINK_QUALITY_EX {
1150     INT_8       cRssi;
1151     INT_8       cLinkQuality;
1152     UINT_16     u2LinkSpeed;
1153     UINT_8      ucMediumBusyPercentage;
1154     UINT_8     ucIsLQ0Rdy;
1155     INT_8       cRssiP2P;   /* For P2P Network. */
1156     INT_8       cLinkQualityP2P;
1157     UINT_16     u2LinkSpeedP2P;
1158     UINT_8      ucMediumBusyPercentageP2P;
1159     UINT_8     ucIsLQ1Rdy;
1160 } EVENT_LINK_QUALITY_EX, *P_EVENT_LINK_QUALITY_EX;
1161 #endif
1162
1163 // EVENT_ID_STATISTICS
1164 typedef struct _EVENT_STATISTICS {
1165     LARGE_INTEGER   rTransmittedFragmentCount;
1166     LARGE_INTEGER   rMulticastTransmittedFrameCount;
1167     LARGE_INTEGER   rFailedCount;
1168     LARGE_INTEGER   rRetryCount;
1169     LARGE_INTEGER   rMultipleRetryCount;
1170     LARGE_INTEGER   rRTSSuccessCount;
1171     LARGE_INTEGER   rRTSFailureCount;
1172     LARGE_INTEGER   rACKFailureCount;
1173     LARGE_INTEGER   rFrameDuplicateCount;
1174     LARGE_INTEGER   rReceivedFragmentCount;
1175     LARGE_INTEGER   rMulticastReceivedFrameCount;
1176     LARGE_INTEGER   rFCSErrorCount;
1177 } EVENT_STATISTICS, *P_EVENT_STATISTICS;
1178
1179 // EVENT_ID_FW_SLEEPY_NOTIFY
1180 typedef struct _EVENT_SLEEPY_NOTIFY {
1181     UINT_8  ucSleepyState;
1182     UINT_8  aucReserved[3];
1183 } EVENT_SLEEPY_NOTIFY, *P_EVENT_SLEEPY_NOTIFY;
1184
1185 typedef struct _EVENT_ACTIVATE_STA_REC_T {
1186     UINT_8      aucMacAddr[6];
1187     UINT_8      ucStaRecIdx;
1188     UINT_8      ucNetworkTypeIndex;
1189     BOOLEAN     fgIsQoS;
1190     BOOLEAN     fgIsAP;
1191     UINT_8      aucReserved[2];
1192 } EVENT_ACTIVATE_STA_REC_T, *P_EVENT_ACTIVATE_STA_REC_T;
1193
1194 typedef struct _EVENT_DEACTIVATE_STA_REC_T {
1195     UINT_8      ucStaRecIdx;
1196     UINT_8      aucReserved[3];
1197 } EVENT_DEACTIVATE_STA_REC_T, *P_EVENT_DEACTIVATE_STA_REC_T;
1198
1199 // CMD_BT_OVER_WIFI
1200 typedef struct _CMD_BT_OVER_WIFI {
1201     UINT_8              ucAction;       /* 0: query, 1: setup, 2: destroy */
1202     UINT_8              ucChannelNum;
1203     PARAM_MAC_ADDRESS   rPeerAddr;
1204     UINT_16             u2BeaconInterval;
1205     UINT_8              ucTimeoutDiscovery;
1206     UINT_8              ucTimeoutInactivity;
1207     UINT_8              ucRole;
1208     UINT_8              PAL_Capabilities;
1209     UINT_8              cMaxTxPower;
1210     UINT_8              ucChannelBand;
1211     UINT_8              ucReserved[1];
1212 } CMD_BT_OVER_WIFI, *P_CMD_BT_OVER_WIFI;
1213
1214 // EVENT_BT_OVER_WIFI
1215 typedef struct _EVENT_BT_OVER_WIFI {
1216     UINT_8      ucLinkStatus;
1217     UINT_8      ucSelectedChannel;
1218     INT_8       cRSSI;
1219     UINT_8      ucReserved[1];
1220 } EVENT_BT_OVER_WIFI, *P_EVENT_BT_OVER_WIFI;
1221
1222 // Same with DOMAIN_SUBBAND_INFO
1223 typedef struct _CMD_SUBBAND_INFO {
1224     UINT_8              ucRegClass;
1225     UINT_8              ucBand;
1226     UINT_8              ucChannelSpan;
1227     UINT_8              ucFirstChannelNum;
1228     UINT_8              ucNumChannels;
1229     UINT_8              aucReserved[3];
1230 } CMD_SUBBAND_INFO, *P_CMD_SUBBAND_INFO;
1231
1232 // CMD_SET_DOMAIN_INFO
1233 typedef struct _CMD_SET_DOMAIN_INFO_T {
1234     UINT_16             u2CountryCode;
1235     UINT_16             u2Reserved;
1236     CMD_SUBBAND_INFO    rSubBand[6];
1237
1238     UINT_8              uc2G4Bandwidth; /* CONFIG_BW_20_40M or CONFIG_BW_20M */
1239     UINT_8              uc5GBandwidth;  /* CONFIG_BW_20_40M or CONFIG_BW_20M */
1240     UINT_8              aucReserved[2];
1241 } CMD_SET_DOMAIN_INFO_T, *P_CMD_SET_DOMAIN_INFO_T;
1242
1243 // CMD_SET_IP_ADDRESS
1244 typedef struct _IPV4_NETWORK_ADDRESS {
1245     UINT_8 aucIpAddr[4];
1246 } IPV4_NETWORK_ADDRESS, *P_IPV4_NETWORK_ADDRESS;
1247
1248 typedef struct _CMD_SET_NETWORK_ADDRESS_LIST {
1249     UINT_8  ucNetTypeIndex;
1250     UINT_8  ucAddressCount;
1251     UINT_8  ucReserved[2];
1252     IPV4_NETWORK_ADDRESS arNetAddress[1];
1253 } CMD_SET_NETWORK_ADDRESS_LIST, *P_CMD_SET_NETWORK_ADDRESS_LIST;
1254
1255 typedef struct _PATTERN_DESCRIPTION {
1256     UINT_8      fgCheckBcA1;
1257     UINT_8      fgCheckMcA1;
1258     UINT_8      ePatternHeader;
1259     UINT_8      fgAndOp;
1260     UINT_8      fgNotOp;
1261     UINT_8      ucPatternMask;
1262     UINT_16    ucPatternOffset;
1263     UINT_8      aucPattern[8];
1264 } PATTERN_DESCRIPTION, *P_PATTERN_DESCRIPTION;
1265
1266 typedef struct _CMD_RAW_PATTERN_CONFIGURATION_T {
1267     PATTERN_DESCRIPTION arPatternDesc[4];
1268 } CMD_RAW_PATTERN_CONFIGURATION_T, *P_CMD_RAW_PATTERN_CONFIGURATION_T;
1269
1270 typedef struct _CMD_PATTERN_FUNC_CONFIG {
1271     BOOLEAN      fgBcA1En;
1272     BOOLEAN      fgMcA1En;
1273     BOOLEAN      fgBcA1MatchDrop;
1274     BOOLEAN      fgMcA1MatchDrop;
1275 } CMD_PATTERN_FUNC_CONFIG, *P_CMD_PATTERN_FUNC_CONFIG;
1276
1277
1278 typedef struct _EVENT_TX_DONE_T {
1279     UINT_8      ucPacketSeq;
1280         UINT_8          ucStatus;
1281     UINT_16     u2SequenceNumber;
1282     UINT_32     au4Reserved1;
1283     UINT_32     au4Reserved2;
1284     UINT_32     au4Reserved3;
1285 } EVENT_TX_DONE_T, *P_EVENT_TX_DONE_T;
1286
1287 typedef struct _CMD_BSS_ACTIVATE_CTRL {
1288     UINT_8  ucNetTypeIndex;
1289     UINT_8  ucActive;
1290     UINT_8  aucReserved[2];
1291 } CMD_BSS_ACTIVATE_CTRL, *P_CMD_BSS_ACTIVATE_CTRL;
1292
1293 typedef struct _CMD_SET_BSS_RLM_PARAM_T {
1294     UINT_8      ucNetTypeIndex;
1295     UINT_8      ucRfBand;
1296     UINT_8      ucPrimaryChannel;
1297     UINT_8      ucRfSco;
1298     UINT_8      ucErpProtectMode;
1299     UINT_8      ucHtProtectMode;
1300     UINT_8      ucGfOperationMode;
1301     UINT_8      ucTxRifsMode;
1302     UINT_16     u2HtOpInfo3;
1303     UINT_16     u2HtOpInfo2;
1304     UINT_8      ucHtOpInfo1;
1305     UINT_8      ucUseShortPreamble;
1306     UINT_8      ucUseShortSlotTime;
1307     UINT_8      ucCheckId;          /* Fixed value: 0x72 */
1308 } CMD_SET_BSS_RLM_PARAM_T, *P_CMD_SET_BSS_RLM_PARAM_T;
1309
1310 typedef struct _CMD_SET_BSS_INFO {
1311     UINT_8  ucNetTypeIndex;
1312     UINT_8  ucConnectionState;
1313     UINT_8  ucCurrentOPMode;
1314     UINT_8  ucSSIDLen;
1315     UINT_8  aucSSID[32];
1316     UINT_8  aucBSSID[6];
1317     UINT_8  ucIsQBSS;
1318     UINT_8  ucReserved1;
1319     UINT_16 u2OperationalRateSet;
1320     UINT_16 u2BSSBasicRateSet;
1321     UINT_8  ucStaRecIdxOfAP;
1322     UINT_8  ucReserved2;
1323     UINT_8  ucReserved3;
1324     UINT_8  ucNonHTBasicPhyType; /* For Slot Time and CWmin */
1325     UINT_8  ucAuthMode;
1326     UINT_8  ucEncStatus;
1327     UINT_8  ucPhyTypeSet;
1328     UINT_8  aucOwnMac[6];
1329         UINT_8  fgWapiMode;
1330         UINT_8  fgIsApMode;
1331     UINT_8  aucRsv[1];
1332     CMD_SET_BSS_RLM_PARAM_T rBssRlmParam;
1333 } CMD_SET_BSS_INFO, *P_CMD_SET_BSS_INFO;
1334
1335 typedef struct _CMD_UPDATE_STA_RECORD_T {
1336     UINT_8  ucIndex;
1337     UINT_8  ucStaType;
1338     UINT_8  aucMacAddr[MAC_ADDR_LEN];
1339     UINT_16 u2AssocId;
1340     UINT_16 u2ListenInterval;
1341     UINT_8  ucNetTypeIndex;
1342     UINT_8  ucDesiredPhyTypeSet;
1343     UINT_16 u2DesiredNonHTRateSet;
1344     UINT_16 u2BSSBasicRateSet;
1345     UINT_8  ucIsQoS;
1346     UINT_8  ucIsUapsdSupported;
1347     UINT_8  ucStaState;
1348     UINT_8  ucMcsSet;
1349     UINT_8  ucSupMcs32;
1350     UINT_8  ucAmpduParam;
1351     UINT_16 u2HtCapInfo;
1352     UINT_16 u2HtExtendedCap;
1353     UINT_32 u4TxBeamformingCap;
1354     UINT_8  ucAselCap;
1355     UINT_8  ucRCPI;
1356     UINT_8  ucNeedResp;
1357     UINT_8  ucUapsdAc;  /* b0~3: Trigger enabled, b4~7: Delivery enabled */
1358     UINT_8  ucUapsdSp;  /* 0: all, 1: max 2, 2: max 4, 3: max 6 */
1359     UINT_8  aucReserved[3];
1360     /* TBD */
1361 } CMD_UPDATE_STA_RECORD_T, *P_CMD_UPDATE_STA_RECORD_T;
1362
1363 typedef struct _CMD_REMOVE_STA_RECORD_T {
1364     UINT_8  ucIndex;
1365     UINT_8  ucReserved;
1366     UINT_8  aucMacAddr[MAC_ADDR_LEN];
1367 } CMD_REMOVE_STA_RECORD_T, *P_CMD_REMOVE_STA_RECORD_T;
1368
1369 typedef struct _CMD_INDICATE_PM_BSS_CREATED_T {
1370     UINT_8  ucNetTypeIndex;
1371     UINT_8  ucDtimPeriod;
1372     UINT_16 u2BeaconInterval;
1373     UINT_16 u2AtimWindow;
1374     UINT_8  aucReserved[2];
1375 } CMD_INDICATE_PM_BSS_CREATED, *P_CMD_INDICATE_PM_BSS_CREATED;
1376
1377 typedef struct _CMD_INDICATE_PM_BSS_CONNECTED_T {
1378     UINT_8  ucNetTypeIndex;
1379     UINT_8  ucDtimPeriod;
1380     UINT_16 u2AssocId;
1381     UINT_16 u2BeaconInterval;
1382     UINT_16 u2AtimWindow;
1383     UINT_8  fgIsUapsdConnection;
1384     UINT_8  ucBmpDeliveryAC;
1385     UINT_8  ucBmpTriggerAC;
1386     UINT_8  aucReserved[1];
1387 } CMD_INDICATE_PM_BSS_CONNECTED, *P_CMD_INDICATE_PM_BSS_CONNECTED;
1388
1389 typedef struct _CMD_INDICATE_PM_BSS_ABORT {
1390     UINT_8  ucNetTypeIndex;
1391     UINT_8  aucReserved[3];
1392 } CMD_INDICATE_PM_BSS_ABORT, *P_CMD_INDICATE_PM_BSS_ABORT;
1393
1394 typedef struct _CMD_BEACON_TEMPLATE_UPDATE {
1395     UINT_8    ucUpdateMethod; // 0: update randomly, 1: update all, 2: delete all (1 and 2 will update directly without search)
1396     UINT_8    ucNetTypeIndex;
1397     UINT_8    aucReserved[2];
1398     UINT_16   u2Capability;
1399     UINT_16   u2IELen;
1400     UINT_8    aucIE[MAX_IE_LENGTH];
1401 } CMD_BEACON_TEMPLATE_UPDATE, *P_CMD_BEACON_TEMPLATE_UPDATE;
1402
1403 typedef struct _CMD_SET_WMM_PS_TEST_STRUC_T {
1404     UINT_8  ucNetTypeIndex;
1405     UINT_8  bmfgApsdEnAc;           /* b0~3: trigger-en AC0~3. b4~7: delivery-en AC0~3 */
1406     UINT_8  ucIsEnterPsAtOnce;      /* enter PS immediately without 5 second guard after connected */
1407     UINT_8  ucIsDisableUcTrigger;   /* not to trigger UC on beacon TIM is matched (under U-APSD) */
1408 } CMD_SET_WMM_PS_TEST_STRUC_T, *P_CMD_SET_WMM_PS_TEST_STRUC_T;
1409
1410
1411 /* Definition for CHANNEL_INFO.ucBand:
1412  * 0:       Reserved
1413  * 1:       BAND_2G4
1414  * 2:       BAND_5G
1415  * Others:  Reserved
1416  */
1417 typedef struct _CHANNEL_INFO_T {
1418     UINT_8  ucBand;
1419     UINT_8  ucChannelNum;
1420 } CHANNEL_INFO_T, *P_CHANNEL_INFO_T;
1421
1422 typedef struct _CMD_SCAN_REQ_T {
1423     UINT_8          ucSeqNum;
1424     UINT_8          ucNetworkType;
1425     UINT_8          ucScanType;
1426     UINT_8          ucSSIDType;     /* BIT(0) wildcard / BIT(1) P2P-wildcard / BIT(2) specific */
1427     UINT_8          ucSSIDLength;
1428     UINT_8          aucReserved[1];
1429     UINT_16         u2ChannelMinDwellTime;
1430     UINT_8          aucSSID[32];
1431     UINT_16         u2ChannelDwellTime; /* For P2P */
1432     UINT_8          ucChannelType;
1433     UINT_8          ucChannelListNum;
1434     CHANNEL_INFO_T  arChannelList[32];
1435     UINT_16         u2IELen;
1436     UINT_8          aucIE[MAX_IE_LENGTH];
1437 } CMD_SCAN_REQ, *P_CMD_SCAN_REQ;
1438
1439 typedef struct _CMD_SCAN_REQ_V2_T {
1440     UINT_8          ucSeqNum;
1441     UINT_8          ucNetworkType;
1442     UINT_8          ucScanType;
1443     UINT_8          ucSSIDType;
1444     PARAM_SSID_T    arSSID[4];
1445     UINT_16         u2ProbeDelayTime;
1446     UINT_16         u2ChannelDwellTime; /* For P2P */
1447     UINT_8          ucChannelType;
1448     UINT_8          ucChannelListNum;
1449     CHANNEL_INFO_T  arChannelList[32];
1450     UINT_16         u2IELen;
1451     UINT_8          aucIE[MAX_IE_LENGTH];
1452 } CMD_SCAN_REQ_V2, *P_CMD_SCAN_REQ_V2;
1453
1454 typedef struct _CMD_SCAN_CANCEL_T {
1455     UINT_8          ucSeqNum;
1456     UINT_8          ucIsExtChannel;     /* For P2P channel extention. */
1457     UINT_8          aucReserved[2];
1458 } CMD_SCAN_CANCEL, *P_CMD_SCAN_CANCEL;
1459
1460 typedef struct _EVENT_SCAN_DONE_T {
1461     UINT_8          ucSeqNum;
1462     UINT_8          ucSparseChannelValid;
1463     CHANNEL_INFO_T  rSparseChannel;
1464 } EVENT_SCAN_DONE, *P_EVENT_SCAN_DONE;
1465
1466 typedef struct _CMD_CH_PRIVILEGE_T {
1467     UINT_8      ucNetTypeIndex;
1468     UINT_8      ucTokenID;
1469     UINT_8      ucAction;
1470     UINT_8      ucPrimaryChannel;
1471     UINT_8      ucRfSco;
1472     UINT_8      ucRfBand;
1473     UINT_8      ucReqType;
1474     UINT_8      ucReserved;
1475     UINT_32     u4MaxInterval;  /* In unit of ms */
1476     UINT_8      aucBSSID[6];
1477     UINT_8      aucReserved[2];
1478 } CMD_CH_PRIVILEGE_T, *P_CMD_CH_PRIVILEGE_T;
1479
1480 typedef struct _CMD_TX_PWR_T {
1481     INT_8       cTxPwr2G4Cck;           /* signed, in unit of 0.5dBm */
1482 #if defined(MT6620)
1483     INT_8       acReserved[3];
1484 #elif defined(MT5931) || defined(MT6628)
1485     INT_8       cTxPwr2G4Dsss;      /* signed, in unit of 0.5dBm */
1486     INT_8       acReserved[2];
1487 #else
1488     #error "No valid definition!"
1489 #endif
1490
1491     INT_8       cTxPwr2G4OFDM_BPSK;
1492     INT_8       cTxPwr2G4OFDM_QPSK;
1493     INT_8       cTxPwr2G4OFDM_16QAM;
1494     INT_8       cTxPwr2G4OFDM_Reserved;
1495     INT_8       cTxPwr2G4OFDM_48Mbps;
1496     INT_8       cTxPwr2G4OFDM_54Mbps;
1497
1498     INT_8       cTxPwr2G4HT20_BPSK;
1499     INT_8       cTxPwr2G4HT20_QPSK;
1500     INT_8       cTxPwr2G4HT20_16QAM;
1501     INT_8       cTxPwr2G4HT20_MCS5;
1502     INT_8       cTxPwr2G4HT20_MCS6;
1503     INT_8       cTxPwr2G4HT20_MCS7;
1504
1505     INT_8       cTxPwr2G4HT40_BPSK;
1506     INT_8       cTxPwr2G4HT40_QPSK;
1507     INT_8       cTxPwr2G4HT40_16QAM;
1508     INT_8       cTxPwr2G4HT40_MCS5;
1509     INT_8       cTxPwr2G4HT40_MCS6;
1510     INT_8       cTxPwr2G4HT40_MCS7;
1511
1512     INT_8       cTxPwr5GOFDM_BPSK;
1513     INT_8       cTxPwr5GOFDM_QPSK;
1514     INT_8       cTxPwr5GOFDM_16QAM;
1515     INT_8       cTxPwr5GOFDM_Reserved;
1516     INT_8       cTxPwr5GOFDM_48Mbps;
1517     INT_8       cTxPwr5GOFDM_54Mbps;
1518
1519     INT_8       cTxPwr5GHT20_BPSK;
1520     INT_8       cTxPwr5GHT20_QPSK;
1521     INT_8       cTxPwr5GHT20_16QAM;
1522     INT_8       cTxPwr5GHT20_MCS5;
1523     INT_8       cTxPwr5GHT20_MCS6;
1524     INT_8       cTxPwr5GHT20_MCS7;
1525
1526     INT_8       cTxPwr5GHT40_BPSK;
1527     INT_8       cTxPwr5GHT40_QPSK;
1528     INT_8       cTxPwr5GHT40_16QAM;
1529     INT_8       cTxPwr5GHT40_MCS5;
1530     INT_8       cTxPwr5GHT40_MCS6;
1531     INT_8       cTxPwr5GHT40_MCS7;
1532 } CMD_TX_PWR_T, *P_CMD_TX_PWR_T;
1533
1534 typedef struct _CMD_5G_PWR_OFFSET_T {
1535     INT_8       cOffsetBand0;       /* 4.915-4.980G */
1536     INT_8       cOffsetBand1;       /* 5.000-5.080G */
1537     INT_8       cOffsetBand2;       /* 5.160-5.180G */
1538     INT_8       cOffsetBand3;       /* 5.200-5.280G */
1539     INT_8       cOffsetBand4;       /* 5.300-5.340G */
1540     INT_8       cOffsetBand5;       /* 5.500-5.580G */
1541     INT_8       cOffsetBand6;       /* 5.600-5.680G */
1542     INT_8       cOffsetBand7;       /* 5.700-5.825G */
1543 } CMD_5G_PWR_OFFSET_T, *P_CMD_5G_PWR_OFFSET_T;
1544
1545 typedef struct _CMD_PWR_PARAM_T {
1546     UINT_32     au4Data[28];
1547     UINT_32     u4RefValue1;
1548     UINT_32     u4RefValue2;
1549 } CMD_PWR_PARAM_T, *P_CMD_PWR_PARAM_T;
1550
1551
1552 typedef struct _CMD_PHY_PARAM_T {
1553     UINT_8      aucData[144];           /* eFuse content */
1554 } CMD_PHY_PARAM_T, *P_CMD_PHY_PARAM_T;
1555
1556 typedef struct _CMD_AUTO_POWER_PARAM_T {
1557     UINT_8      ucType;        /* 0: Disable 1: Enalbe 0x10: Change paramters */
1558     UINT_8      ucNetTypeIndex;
1559     UINT_8      aucReserved[2];
1560     UINT_8      aucLevelRcpiTh[3];
1561     UINT_8      aucReserved2[1];
1562     INT_8       aicLevelPowerOffset[3];         /* signed, in unit of 0.5dBm */
1563     UINT_8      aucReserved3[1];
1564     UINT_8      aucReserved4[8];
1565 } CMD_AUTO_POWER_PARAM_T, *P_CMD_AUTO_POWER_PARAM_T;
1566
1567
1568 typedef struct _EVENT_CH_PRIVILEGE_T {
1569     UINT_8          ucNetTypeIndex;
1570     UINT_8          ucTokenID;
1571     UINT_8          ucStatus;
1572     UINT_8          ucPrimaryChannel;
1573     UINT_8          ucRfSco;
1574     UINT_8          ucRfBand;
1575     UINT_8          ucReqType;
1576     UINT_8          ucReserved;
1577     UINT_32         u4GrantInterval;    /* In unit of ms */
1578 } EVENT_CH_PRIVILEGE_T, *P_EVENT_CH_PRIVILEGE_T;
1579
1580 typedef struct _EVENT_BSS_BEACON_TIMEOUT_T {
1581     UINT_8  ucNetTypeIndex;
1582     UINT_8  aucReserved[3];
1583 } EVENT_BSS_BEACON_TIMEOUT_T, *P_EVENT_BSS_BEACON_TIMEOUT_T;
1584
1585 typedef struct _EVENT_STA_AGING_TIMEOUT_T {
1586     UINT_8  ucStaRecIdx;
1587     UINT_8  aucReserved[3];
1588 } EVENT_STA_AGING_TIMEOUT_T, *P_EVENT_STA_AGING_TIMEOUT_T;
1589
1590 typedef struct _EVENT_NOA_TIMING_T {
1591     UINT_8      fgIsInUse;              /* Indicate if this entry is in use or not */
1592     UINT_8      ucCount;                /* Count */
1593     UINT_8      aucReserved[2];
1594
1595     UINT_32     u4Duration;             /* Duration */
1596     UINT_32     u4Interval;             /* Interval */
1597     UINT_32     u4StartTime;            /* Start Time */
1598 } EVENT_NOA_TIMING_T, *P_EVENT_NOA_TIMING_T;
1599
1600 typedef struct _EVENT_UPDATE_NOA_PARAMS_T {
1601     UINT_8      ucNetTypeIndex;
1602     UINT_8      aucReserved[2];
1603     UINT_8      fgEnableOppPS;
1604     UINT_16     u2CTWindow;
1605
1606     UINT_8              ucNoAIndex;
1607     UINT_8              ucNoATimingCount; /* Number of NoA Timing */
1608     EVENT_NOA_TIMING_T  arEventNoaTiming[8/*P2P_MAXIMUM_NOA_COUNT*/];
1609 } EVENT_UPDATE_NOA_PARAMS_T, *P_EVENT_UPDATE_NOA_PARAMS_T;
1610
1611 typedef struct _EVENT_AP_OBSS_STATUS_T {
1612     UINT_8      ucNetTypeIndex;
1613     UINT_8      ucObssErpProtectMode;
1614     UINT_8      ucObssHtProtectMode;
1615     UINT_8      ucObssGfOperationMode;
1616     UINT_8      ucObssRifsOperationMode;
1617     UINT_8      ucObssBeaconForcedTo20M;
1618     UINT_8      aucReserved[2];
1619 } EVENT_AP_OBSS_STATUS_T, *P_EVENT_AP_OBSS_STATUS_T;
1620
1621 typedef struct _CMD_EDGE_TXPWR_LIMIT_T {
1622     INT_8       cBandEdgeMaxPwrCCK;
1623     INT_8       cBandEdgeMaxPwrOFDM20;
1624     INT_8       cBandEdgeMaxPwrOFDM40;
1625     INT_8       cReserved;
1626 } CMD_EDGE_TXPWR_LIMIT_T, *P_CMD_EDGE_TXPWR_LIMIT_T;
1627
1628 typedef struct _CMD_SET_DEVICE_MODE_T {
1629     UINT_16     u2ChipID;
1630     UINT_16     u2Mode;
1631 } CMD_SET_DEVICE_MODE_T, *P_CMD_SET_DEVICE_MODE_T;
1632
1633
1634 #if CFG_SUPPORT_RDD_TEST_MODE
1635 typedef struct _CMD_RDD_CH_T {
1636     UINT_8      ucRddTestMode;
1637     UINT_8      ucRddShutCh;
1638     UINT_8      ucRddStartCh;
1639     UINT_8      ucRddStopCh;
1640     UINT_8      ucRddDfs;
1641     UINT_8      ucReserved;
1642     UINT_8      ucReserved1;
1643     UINT_8      ucReserved2;
1644 } CMD_RDD_CH_T, *P_CMD_RDD_CH_T;
1645
1646 typedef struct _EVENT_RDD_STATUS_T {
1647     UINT_8  ucRddStatus;
1648     UINT_8  aucReserved[3];
1649 } EVENT_RDD_STATUS_T, *P_EVENT_RDD_STATUS_T;
1650 #endif
1651
1652 typedef struct _EVENT_AIS_BSS_INFO_T{
1653     ENUM_PARAM_MEDIA_STATE_T eConnectionState; /* Connected Flag used in AIS_NORMAL_TR */
1654     ENUM_OP_MODE_T eCurrentOPMode; /* Current Operation Mode - Infra/IBSS */
1655     BOOLEAN fgIsNetActive; /* TRUE if this network has been actived */
1656     UINT_8 ucReserved[3];
1657 }EVENT_AIS_BSS_INFO_T, *P_EVENT_AIS_BSS_INFO_T;
1658
1659 typedef struct _CMD_SET_TXPWR_CTRL_T{
1660     INT_8    c2GLegacyStaPwrOffset;  /* Unit: 0.5dBm, default: 0*/
1661     INT_8    c2GHotspotPwrOffset;
1662     INT_8    c2GP2pPwrOffset;
1663     INT_8    c2GBowPwrOffset;
1664     INT_8    c5GLegacyStaPwrOffset;   /* Unit: 0.5dBm, default: 0*/
1665     INT_8    c5GHotspotPwrOffset;
1666     INT_8    c5GP2pPwrOffset;
1667     INT_8    c5GBowPwrOffset;
1668     UINT_8  ucConcurrencePolicy;   /* TX power policy when concurrence
1669                                                             in the same channel
1670                                                             0: Highest power has priority
1671                                                             1: Lowest power has priority */
1672     INT_8    acReserved1[3];            /* Must be zero */
1673
1674     /* Power limit by channel for all data rates */
1675     INT_8    acTxPwrLimit2G[14];     /* Channel 1~14, Unit: 0.5dBm*/
1676     INT_8    acTxPwrLimit5G[4];       /* UNII 1~4 */
1677     INT_8    acReserved2[2];            /* Must be zero */
1678 } CMD_SET_TXPWR_CTRL_T, *P_CMD_SET_TXPWR_CTRL_T;
1679
1680 #if CFG_SUPPORT_BUILD_DATE_CODE
1681 typedef struct _CMD_GET_BUILD_DATE_CODE {
1682     UINT_8  aucReserved[4];
1683 } CMD_GET_BUILD_DATE_CODE, *P_CMD_GET_BUILD_DATE_CODE;
1684
1685 typedef struct _EVENT_BUILD_DATE_CODE {
1686     UINT_8      aucDateCode[16];
1687 } EVENT_BUILD_DATE_CODE, *P_EVENT_BUILD_DATE_CODE;
1688 #endif
1689
1690 /*******************************************************************************
1691 *                            P U B L I C   D A T A
1692 ********************************************************************************
1693 */
1694
1695 /*******************************************************************************
1696 *                           P R I V A T E   D A T A
1697 ********************************************************************************
1698 */
1699
1700 /*******************************************************************************
1701 *                                 M A C R O S
1702 ********************************************************************************
1703 */
1704
1705 /*******************************************************************************
1706 *                   F U N C T I O N   D E C L A R A T I O N S
1707 ********************************************************************************
1708 */
1709 VOID
1710 nicCmdEventQueryMcrRead (
1711     IN P_ADAPTER_T  prAdapter,
1712     IN P_CMD_INFO_T prCmdInfo,
1713     IN PUINT_8      pucEventBuf
1714     );
1715
1716 VOID
1717 nicCmdEventQueryMemDump (
1718     IN P_ADAPTER_T  prAdapter,
1719     IN P_CMD_INFO_T prCmdInfo,
1720     IN PUINT_8      pucEventBuf
1721     );
1722
1723 VOID
1724 nicCmdEventQuerySwCtrlRead (
1725     IN P_ADAPTER_T  prAdapter,
1726     IN P_CMD_INFO_T prCmdInfo,
1727     IN PUINT_8      pucEventBuf
1728     );
1729
1730
1731
1732 VOID
1733 nicCmdEventQueryRfTestATInfo(
1734     IN P_ADAPTER_T  prAdapter,
1735     IN P_CMD_INFO_T prCmdInfo,
1736     IN PUINT_8      pucEventBuf
1737     );
1738
1739 VOID
1740 nicCmdEventSetCommon (
1741     IN P_ADAPTER_T  prAdapter,
1742     IN P_CMD_INFO_T prCmdInfo,
1743     IN PUINT_8      pucEventBuf
1744     );
1745
1746 VOID
1747 nicCmdEventSetDisassociate (
1748     IN P_ADAPTER_T  prAdapter,
1749     IN P_CMD_INFO_T prCmdInfo,
1750     IN PUINT_8      pucEventBuf
1751     );
1752
1753 VOID
1754 nicCmdEventSetIpAddress (
1755     IN P_ADAPTER_T  prAdapter,
1756     IN P_CMD_INFO_T prCmdInfo,
1757     IN PUINT_8      pucEventBuf
1758     );
1759
1760 VOID
1761 nicCmdEventQueryLinkQuality(
1762     IN P_ADAPTER_T  prAdapter,
1763     IN P_CMD_INFO_T prCmdInfo,
1764     IN PUINT_8      pucEventBuf
1765     );
1766
1767 VOID
1768 nicCmdEventQueryLinkSpeed(
1769     IN P_ADAPTER_T  prAdapter,
1770     IN P_CMD_INFO_T prCmdInfo,
1771     IN PUINT_8      pucEventBuf
1772     );
1773
1774 VOID
1775 nicCmdEventQueryStatistics(
1776     IN P_ADAPTER_T  prAdapter,
1777     IN P_CMD_INFO_T prCmdInfo,
1778     IN PUINT_8      pucEventBuf
1779     );
1780
1781 VOID
1782 nicCmdEventEnterRfTest(
1783     IN P_ADAPTER_T  prAdapter,
1784     IN P_CMD_INFO_T prCmdInfo,
1785     IN PUINT_8      pucEventBuf
1786     );
1787
1788 VOID
1789 nicCmdEventLeaveRfTest(
1790     IN P_ADAPTER_T  prAdapter,
1791     IN P_CMD_INFO_T prCmdInfo,
1792     IN PUINT_8      pucEventBuf
1793     );
1794
1795 VOID
1796 nicCmdEventQueryAddress(
1797     IN P_ADAPTER_T  prAdapter,
1798     IN P_CMD_INFO_T prCmdInfo,
1799     IN PUINT_8      pucEventBuf
1800     );
1801
1802 VOID
1803 nicCmdEventQueryMcastAddr(
1804     IN P_ADAPTER_T  prAdapter,
1805     IN P_CMD_INFO_T prCmdInfo,
1806     IN PUINT_8      pucEventBuf
1807     );
1808
1809 VOID
1810 nicCmdEventQueryEepromRead(
1811     IN P_ADAPTER_T  prAdapter,
1812     IN P_CMD_INFO_T prCmdInfo,
1813     IN PUINT_8      pucEventBuf
1814     );
1815
1816 VOID
1817 nicCmdEventSetMediaStreamMode(
1818     IN P_ADAPTER_T  prAdapter,
1819     IN P_CMD_INFO_T prCmdInfo,
1820     IN PUINT_8      pucEventBuf
1821     );
1822
1823 /* Statistics responder */
1824 VOID
1825 nicCmdEventQueryXmitOk(
1826     IN P_ADAPTER_T  prAdapter,
1827     IN P_CMD_INFO_T prCmdInfo,
1828     IN PUINT_8      pucEventBuf
1829     );
1830
1831 VOID
1832 nicCmdEventQueryRecvOk(
1833     IN P_ADAPTER_T  prAdapter,
1834     IN P_CMD_INFO_T prCmdInfo,
1835     IN PUINT_8      pucEventBuf
1836     );
1837
1838 VOID
1839 nicCmdEventQueryXmitError(
1840     IN P_ADAPTER_T  prAdapter,
1841     IN P_CMD_INFO_T prCmdInfo,
1842     IN PUINT_8      pucEventBuf
1843     );
1844
1845 VOID
1846 nicCmdEventQueryRecvError(
1847     IN P_ADAPTER_T  prAdapter,
1848     IN P_CMD_INFO_T prCmdInfo,
1849     IN PUINT_8      pucEventBuf
1850     );
1851
1852 VOID
1853 nicCmdEventQueryRecvNoBuffer(
1854     IN P_ADAPTER_T  prAdapter,
1855     IN P_CMD_INFO_T prCmdInfo,
1856     IN PUINT_8      pucEventBuf
1857     );
1858
1859 VOID
1860 nicCmdEventQueryRecvCrcError(
1861     IN P_ADAPTER_T  prAdapter,
1862     IN P_CMD_INFO_T prCmdInfo,
1863     IN PUINT_8      pucEventBuf
1864     );
1865
1866 VOID
1867 nicCmdEventQueryRecvErrorAlignment(
1868     IN P_ADAPTER_T  prAdapter,
1869     IN P_CMD_INFO_T prCmdInfo,
1870     IN PUINT_8      pucEventBuf
1871     );
1872
1873 VOID
1874 nicCmdEventQueryXmitOneCollision(
1875     IN P_ADAPTER_T  prAdapter,
1876     IN P_CMD_INFO_T prCmdInfo,
1877     IN PUINT_8      pucEventBuf
1878     );
1879
1880 VOID
1881 nicCmdEventQueryXmitMoreCollisions(
1882     IN P_ADAPTER_T  prAdapter,
1883     IN P_CMD_INFO_T prCmdInfo,
1884     IN PUINT_8      pucEventBuf
1885     );
1886
1887 VOID
1888 nicCmdEventQueryXmitMaxCollisions(
1889     IN P_ADAPTER_T  prAdapter,
1890     IN P_CMD_INFO_T prCmdInfo,
1891     IN PUINT_8      pucEventBuf
1892     );
1893
1894 /* for timeout check */
1895 VOID
1896 nicOidCmdTimeoutCommon (
1897     IN P_ADAPTER_T  prAdapter,
1898     IN P_CMD_INFO_T prCmdInfo
1899     );
1900
1901 VOID
1902 nicCmdTimeoutCommon (
1903     IN P_ADAPTER_T  prAdapter,
1904     IN P_CMD_INFO_T prCmdInfo
1905     );
1906
1907 VOID
1908 nicOidCmdEnterRFTestTimeout (
1909     IN P_ADAPTER_T  prAdapter,
1910     IN P_CMD_INFO_T prCmdInfo
1911     );
1912
1913 #if CFG_SUPPORT_BUILD_DATE_CODE
1914 VOID
1915 nicCmdEventBuildDateCode (
1916     IN P_ADAPTER_T  prAdapter,
1917     IN P_CMD_INFO_T prCmdInfo,
1918     IN PUINT_8      pucEventBuf
1919     );
1920 #endif
1921
1922 VOID
1923 nicCmdEventGetBSSInfo (
1924     IN P_ADAPTER_T  prAdapter,
1925     IN P_CMD_INFO_T prCmdInfo,
1926     IN PUINT_8      pucEventBuf
1927     );
1928
1929
1930 /*******************************************************************************
1931 *                              F U N C T I O N S
1932 ********************************************************************************
1933 */
1934
1935 #endif /* _NIC_CMD_EVENT_H */
1936