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