support different wifi bt chip auto compatible
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / combo_mt66xx / mt6628 / wlan / include / config.h
1 /*
2 ** $Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/config.h#2 $
3 */
4
5 /*! \file   "config.h"
6     \brief  This file includes the various configurable parameters for customers
7
8     This file ncludes the configurable parameters except the paramters indicate the turning-on/off of some features
9 */
10
11
12
13 /*
14 ** $Log: config.h $
15  *
16  * 07 13 2012 cp.wu
17  * [WCXRP00001259] [MT6620 Wi-Fi][Driver][Firmware] Send a signal to firmware for termination after SDIO error has happened
18  * [driver domain] add force reset by host-to-device interrupt mechanism
19  *
20  * 06 13 2012 yuche.tsai
21  * NULL
22  * Update maintrunk driver.
23  * Add support for driver compose assoc request frame.
24  *
25  * 06 05 2012 tsaiyuan.hsu
26  * [WCXRP00001249] [ALPS.ICS] Daily build warning on "wlan/mgmt/swcr.c#1"
27  * resolve build waring for "WNM_UNIT_TEST not defined"..
28  *
29  * 06 04 2012 cp.wu
30  * [WCXRP00001245] [MT6620 Wi-Fi][Driver][Firmware] NPS Software Development
31  * discussed with WH, privacy bit in associate response is not necessary to be checked, and identified as association failure when mismatching with beacon/probe response
32  *
33  * 05 11 2012 cp.wu
34  * [WCXRP00001237] [MT6620 Wi-Fi][Driver] Show MAC address and MAC address source for ACS's convenience
35  * show MAC address & source while initiliazation
36  *
37  * 04 20 2012 cp.wu
38  * [WCXRP00000913] [MT6620 Wi-Fi] create repository of source code dedicated for MT6620 E6 ASIC
39  * correct macro
40  *
41  * 04 12 2012 terry.wu
42  * NULL
43  * Add AEE message support
44  * 1) Show AEE warning(red screen) if SDIO access error occurs
45  *
46  * 03 29 2012 eason.tsai
47  * [WCXRP00001216] [MT6628 Wi-Fi][Driver]add conditional define
48  * add conditional define.
49  *
50  * 03 02 2012 terry.wu
51  * NULL
52  * Enable CFG80211 Support.
53  *
54  * 01 05 2012 tsaiyuan.hsu
55  * [WCXRP00001157] [MT6620 Wi-Fi][FW][DRV] add timing measurement support for 802.11v
56  * add timing measurement support for 802.11v.
57  *
58  * 11 23 2011 cp.wu
59  * [WCXRP00001123] [MT6620 Wi-Fi][Driver] Add option to disable beacon content change detection
60  * add compile option to disable beacon content change detection.
61  *
62  * 11 18 2011 yuche.tsai
63  * NULL
64  * CONFIG P2P support RSSI query, default turned off.
65  *
66  * 10 28 2011 cp.wu
67  * [MT6620 Wi-Fi][Win32 Driver] Enable 5GHz support as default
68  * enable 5GHz as default for DaVinci trunk and V2.1 driver release .
69  *
70  * 10 18 2011 cp.wu
71  * [WCXRP00001022] [MT6628 Driver][Firmware Download] Add multi section independent download functionality
72  * surpress compiler warning for MT6628 build
73  *
74  * 10 12 2011 wh.su
75  * [WCXRP00001036] [MT6620 Wi-Fi][Driver][FW] Adding the 802.11w code for MFP
76  * adding the 802.11w related function and define .
77  *
78  * 10 03 2011 cp.wu
79  * [WCXRP00001022] [MT6628 Driver][Firmware Download] Add multi section independent download functionality
80  * enable divided firmware downloading.
81  *
82  * 10 03 2011 cp.wu
83  * [WCXRP00001022] [MT6628 Driver][Firmware Download] Add multi section independent download functionality
84  * add firmware download path in divided scatters.
85  *
86  * 10 03 2011 cp.wu
87  * [MT6628 Driver][Firmware Download] Add multi section independent download functionality
88  * add firmware downloading aggregated path.
89  *
90  * 09 28 2011 tsaiyuan.hsu
91  * [WCXRP00000900] [MT5931 Wi-Fi] Improve balance of TX and RX
92  * enlarge window size only by 4.
93  *
94  * 08 15 2011 cp.wu
95  * [WCXRP00000851] [MT6628 Wi-Fi][Driver] Add HIFSYS related definition to driver source tree
96  * reuse firmware download logic of MT6620 for MT6628.
97  *
98  * 08 15 2011 cp.wu
99  * [WCXRP00000851] [MT6628 Wi-Fi][Driver] Add HIFSYS related definition to driver source tree
100  * add MT6628-specific definitions.
101  *
102  * 08 15 2011 cp.wu
103  * [WCXRP00000913] [MT6620 Wi-Fi] create repository of source code dedicated for MT6620 E6 ASIC
104  * support to load different firmware image for E3/E4/E5 and E6 ASIC on win32 platforms.
105  *
106  * 08 12 2011 cp.wu
107  * [WCXRP00000913] [MT6620 Wi-Fi] create repository of source code dedicated for MT6620 E6 ASIC
108  * load WIFI_RAM_CODE_E6 for MT6620 E6 ASIC.
109  *
110  * 08 09 2011 chinghwa.yu
111  * [WCXRP00000063] Update BCM CoEx design and settings
112  * Add BWCS definition for MT6620.
113  *
114  * 07 28 2011 chinghwa.yu
115  * [WCXRP00000063] Update BCM CoEx design and settings
116  * Add BWCS cmd and event.
117  *
118  * 07 22 2011 jeffrey.chang
119  * [WCXRP00000864] [MT5931] Add command to adjust OSC stable time
120  * modify driver to set OSC stable time after f/w download
121  *
122  * 07 18 2011 chinghwa.yu
123  * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm
124  * Add CMD/Event for RDD and BWCS.
125  *
126  * 07 05 2011 yuche.tsai
127  * [WCXRP00000821] [Volunteer Patch][WiFi Direct][Driver] WiFi Direct Connection Speed Issue
128  * Refine compile flag.
129  *
130  * 07 05 2011 yuche.tsai
131  * [WCXRP00000821] [Volunteer Patch][WiFi Direct][Driver] WiFi Direct Connection Speed Issue
132  * Add wifi direct connection enhancement method I, II & VI.
133  *
134  * 06 24 2011 cp.wu
135  * [WCXRP00000702] [MT5931][Driver] Modify initialization sequence for E1 ASIC[WCXRP00000812] [MT6620 Wi-Fi][Driver] not show NVRAM when there is no valid MAC address in NVRAM content
136  * increase RX buffer number to have a 2:1 ping-pong ratio
137  *
138  * 06 23 2011 eddie.chen
139  * [WCXRP00000810] [MT5931][DRV/FW] Adjust TxRx Buffer number and Rx buffer size
140  * 1. Different TX RX buffer
141  * 2. Enlarge RX buffer and increase the number 8->11
142  * 3. Seperate the WINSZIE and RX buffer number
143  * 4. Fix RX maximum size in MAC
144  *
145  * 06 20 2011 terry.wu
146  * NULL
147  * Add BoW Rate Limitation.
148  *
149  * 06 17 2011 terry.wu
150  * NULL
151  * .
152  *
153  * 06 17 2011 terry.wu
154  * NULL
155  * Add BoW 11N support.
156  *
157  * 06 07 2011 yuche.tsai
158  * [WCXRP00000763] [Volunteer Patch][MT6620][Driver] RX Service Discovery Frame under AP mode Issue
159  * Add compile flag for persistent group support.
160  *
161  * 06 01 2011 cm.chang
162  * [WCXRP00000756] [MT6620 Wi-Fi][Driver] 1. AIS follow channel of BOW 2. Provide legal channel function
163  * Limit AIS to fixed channel same with BOW
164  *
165  * 04 18 2011 terry.wu
166  * [WCXRP00000660] [MT6620 Wi-Fi][Driver] Remove flag CFG_WIFI_DIRECT_MOVED
167  * Remove flag CFG_WIFI_DIRECT_MOVED.
168  *
169  * 04 14 2011 cm.chang
170  * [WCXRP00000634] [MT6620 Wi-Fi][Driver][FW] 2nd BSS will not support 40MHz bandwidth for concurrency
171  * Enable RX STBC capability
172  *
173  * 04 11 2011 george.huang
174  * [WCXRP00000628] [MT6620 Wi-Fi][FW][Driver] Modify U-APSD setting to default OFF
175  * .
176  *
177  * 04 08 2011 pat.lu
178  * [WCXRP00000623] [MT6620 Wi-Fi][Driver] use ARCH define to distinguish PC Linux driver
179  * Use CONFIG_X86 instead of PC_LINUX_DRIVER_USE option to have proper compile settting for PC Linux driver
180  *
181  * 04 08 2011 cp.wu
182  * [WCXRP00000540] [MT5931][Driver] Add eHPI8/eHPI16 support to Linux Glue Layer
183  * 1. correction: RX aggregation is not limited to SDIO but for all host interface options
184  * 2. add forward declarations for DBG-only symbols
185  *
186  * 04 06 2011 cp.wu
187  * [WCXRP00000540] [MT5931][Driver] Add eHPI8/eHPI16 support to Linux Glue Layer
188  * 1. do not check for pvData inside wlanNetCreate() due to it is NULL for eHPI  port
189  * 2. update perm_addr as well for MAC address
190  * 3. not calling check_mem_region() anymore for eHPI
191  * 4. correct MSC_CS macro for 0-based notation
192  *
193  * 04 01 2011 cp.wu
194  * [WCXRP00000540] [MT5931][Driver] Add eHPI8/eHPI16 support to Linux Glue Layer
195  * 1. simplify config.h due to aggregation options could be also applied for eHPI/SPI interface
196  * 2. use spin-lock instead of semaphore for protecting eHPI access because of possible access from ISR
197  * 3. request_irq() API has some changes between linux kernel 2.6.12 and 2.6.26
198  *
199  * 03 29 2011 cp.wu
200  * [WCXRP00000598] [MT6620 Wi-Fi][Driver] Implementation of interface for communicating with user space process for RESET_START and RESET_END events
201  * implement kernel-to-userspace communication via generic netlink socket for whole-chip resetting mechanism
202  *
203  * 03 22 2011 pat.lu
204  * [WCXRP00000592] [MT6620 Wi-Fi][Driver] Support PC Linux Environment Driver Build
205  * Add a compiler option "PC_LINUX_DRIVER_USE" for building driver in PC Linux environment.
206  *
207  * 03 18 2011 wh.su
208  * [WCXRP00000530] [MT6620 Wi-Fi] [Driver] skip doing p2pRunEventAAAComplete after send assoc response Tx Done
209  * enable the Anti_piracy check at driver .
210  *
211  * 03 17 2011 tsaiyuan.hsu
212  * [WCXRP00000517] [MT6620 Wi-Fi][Driver][FW] Fine Tune Performance of Roaming
213  * enable roaming feature.
214  *
215  * 03 17 2011 chinglan.wang
216  * [WCXRP00000570] [MT6620 Wi-Fi][Driver] Add Wi-Fi Protected Setup v2.0 feature
217  * .
218  *
219  * 03 15 2011 cp.wu
220  * [WCXRP00000559] [MT6620 Wi-Fi][Driver] Combine TX/RX DMA buffers into a single one to reduce physically continuous memory consumption
221  * 1. deprecate CFG_HANDLE_IST_IN_SDIO_CALLBACK
222  * 2. Use common coalescing buffer for both TX/RX directions
223  *
224  *
225  * 03 15 2011 eddie.chen
226  * [WCXRP00000554] [MT6620 Wi-Fi][DRV] Add sw control debug counter
227  * Add sw debug counter for QM.
228  *
229  * 03 07 2011 wh.su
230  * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code
231  * rename the define to anti_pviracy.
232  *
233  * 03 06 2011 chinghwa.yu
234  * [WCXRP00000065] Update BoW design and settings
235  * Sync BOW Driver to latest person development branch version..
236  *
237  * 03 02 2011 wh.su
238  * [WCXRP00000506] [MT6620 Wi-Fi][Driver][FW] Add Security check related code
239  * Add security check code.
240  *
241  * 03 01 2011 george.huang
242  * [WCXRP00000495] [MT6620 Wi-Fi][FW] Support pattern filter for unwanted ARP frames
243  * Fix compile issue
244  *
245  * 02 25 2011 george.huang
246  * [WCXRP00000497] [MT6620 Wi-Fi][FW] Change default UAPSD AC assignment
247  * Assign all AC default to be U-APSD enabled.
248  *
249  * 02 14 2011 wh.su
250  * [WCXRP00000432] [MT6620 Wi-Fi][Driver] Add STA privacy check at hotspot mode
251  * Let the privacy check at hotspot mode default enable.
252  *
253  * 02 09 2011 wh.su
254  * [WCXRP00000432] [MT6620 Wi-Fi][Driver] Add STA privacy check at hotspot mode
255  * adding the code for check STA privacy bit at AP mode, .
256  *
257  * 02 08 2011 cp.wu
258  * [WCXRP00000427] [MT6620 Wi-Fi][Driver] Modify veresion information to match with release revision number
259  * change version number to v1.2.0.0 for preparing v1.2 software package release.
260  *
261  * 02 01 2011 yarco.yang
262  * [WCXRP00000417] [MT6620 Driver] Chnage CFG_HANDLE_IST_IN_SDIO_CALLBACK from 1 to 0 for Interoperability
263  * .
264  *
265  * 01 27 2011 tsaiyuan.hsu
266  * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support
267  * add roaming fsm
268  * 1. not support 11r, only use strength of signal to determine roaming.
269  * 2. not enable CFG_SUPPORT_ROAMING until completion of full test.
270  * 3. in 6620, adopt work-around to avoid sign extension problem of cck of hw
271  * 4. assume that change of link quality in smooth way.
272  *
273  * 01 19 2011 wh.su
274  * [WCXRP00000370] [MT6620 Wi-Fi][Driver] Disable Rx RDG for workaround pre-N ccmp issue
275  * Not announce support Rx RDG for wokaround pre-N ccmp construct AAD issue..
276  *
277  * 01 15 2011 puff.wen
278  * NULL
279  * Add Stress test
280  *
281  * 01 12 2011 cp.wu
282  * [WCXRP00000356] [MT6620 Wi-Fi][Driver] fill mac header length for security frames 'cause hardware header translation needs such information
283  * fill mac header length information for 802.1x frames.
284  *
285  * 01 11 2011 chinghwa.yu
286  * [WCXRP00000065] Update BoW design and settings
287  * Support BOW only for Linux.
288  *
289  * 01 10 2011 chinghwa.yu
290  * [WCXRP00000065] Update BoW design and settings
291  * Enable BOW and 4 physical links.
292  *
293  * 01 08 2011 yuche.tsai
294  * [WCXRP00000345] [MT6620][Volunteer Patch] P2P may issue a SSID specified scan request, but the SSID length is still invalid.
295  * Modify CFG_SLT_SUPPORT default value.
296  *
297  * 01 08 2011 yuche.tsai
298  * [WCXRP00000341] [MT6620][SLT] Create Branch for SLT SW.
299  * Update configure flag.
300  *
301  * 12 28 2010 cp.wu
302  * [WCXRP00000269] [MT6620 Wi-Fi][Driver][Firmware] Prepare for v1.1 branch release
303  * report EEPROM used flag via NIC_CAPABILITY
304  *
305  * 12 28 2010 cp.wu
306  * [WCXRP00000269] [MT6620 Wi-Fi][Driver][Firmware] Prepare for v1.1 branch release
307  * integrate with 'EEPROM used' flag for reporting correct capability to Engineer Mode/META and other tools
308  *
309  * 12 15 2010 yuche.tsai
310  * NULL
311  * Update SLT Descriptor number configure in driver.
312  *
313  * 12 13 2010 chinglan.wang
314  * NULL
315  * Add WPS 1.0 feature flag to enable the WPS 1.0 function.
316  *
317  * 11 23 2010 george.huang
318  * [WCXRP00000127] [MT6620 Wi-Fi][Driver] Add a registry to disable Beacon Timeout function for SQA test by using E1 EVB
319  * Enable PM function by default
320  *
321  * 11 15 2010 wh.su
322  * [WCXRP00000171] [MT6620 Wi-Fi][Driver] Add message check code same behavior as mt5921
323  * use config.mk WAPI config define.
324  *
325  * 11 08 2010 wh.su
326  * [WCXRP00000171] [MT6620 Wi-Fi][Driver] Add message check code same behavior as mt5921
327  * use the config.mk define.
328  *
329  * 11 01 2010 cp.wu
330  * [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
331  * 1) Query link speed (TX rate) from firmware directly with buffering mechanism to reduce overhead
332  * 2) Remove CNM CH-RECOVER event handling
333  * 3) cfg read/write API renamed with kal prefix for unified naming rules.
334  *
335  * 11 01 2010 yarco.yang
336  * [WCXRP00000149] [MT6620 WI-Fi][Driver]Fine tune performance on MT6516 platform
337  * Add code to run WlanIST in SDIO callback.
338  *
339  * 10 26 2010 cp.wu
340  * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000137] [MT6620 Wi-Fi] [FW] Support NIC capability query command
341  * 1) update NVRAM content template to ver 1.02
342  * 2) add compile option for querying NIC capability (default: off)
343  * 3) modify AIS 5GHz support to run-time option, which could be turned on by registry or NVRAM setting
344  * 4) correct auto-rate compiler error under linux (treat warning as error)
345  * 5) simplify usage of NVRAM and REG_INFO_T
346  * 6) add version checking between driver and firmware
347  *
348  * 10 25 2010 cp.wu
349  * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check
350  * add option for enable/disable TX PWR gain adjustment (default: off)
351  *
352  * 10 20 2010 wh.su
353  * [WCXRP00000067] [MT6620 Wi-Fi][Driver] Support the android+ WAPI function
354  * enable the WAPI compiling flag as default
355  *
356  * 10 19 2010 cp.wu
357  * [WCXRP00000122] [MT6620 Wi-Fi][Driver] Preparation for YuSu source tree integration
358  * remove HIF_SDIO_ONE flags because the settings could be merged for runtime detection instead of compile-time.
359  *
360  * 10 18 2010 cp.wu
361  * [WCXRP00000117] [MT6620 Wi-Fi][Driver] Add logic for suspending driver when MT6620 is not responding anymore
362  * 1. when wlanAdapterStop() failed to send POWER CTRL command to firmware, do not poll for ready bit dis-assertion
363  * 2. shorten polling count for shorter response time
364  * 3. if bad I/O operation is detected during TX resource polling, then further operation is aborted as well
365  *
366  * 10 18 2010 cp.wu
367  * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000086] [MT6620 Wi-Fi][Driver] The mac address is all zero at android
368  * complete implementation of Android NVRAM access
369  *
370  * 10 14 2010 wh.su
371  * [WCXRP00000102] [MT6620 Wi-Fi] [FW] Add a compiling flag and code for support Direct GO at Android
372  * Add a define CFG_TEST_ANDROID_DIRECT_GO compiling flag
373  *
374  * 10 08 2010 cm.chang
375  * NULL
376  * Remove unused compiling flags (TX_RDG and TX_SGI)
377  *
378  * 10 07 2010 cp.wu
379  * [WCXRP00000083] [MT5931][Driver][FW] Add necessary logic for MT5931 first connection
380  * add firmware download for MT5931.
381  *
382  * 10 05 2010 cp.wu
383  * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check
384  * load manufacture data when CFG_SUPPORT_NVRAM is set to 1
385  *
386  * 10 05 2010 cp.wu
387  * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check
388  * 1) add NVRAM access API
389  * 2) fake scanning result when NVRAM doesn't exist and/or version mismatch. (off by compiler option)
390  * 3) add OID implementation for NVRAM read/write service
391  *
392  * 10 05 2010 yarco.yang
393  * [WCXRP00000082] [MT6620 Wi-Fi][Driver]High throughput performance tuning
394  * Change CFG_IST_LOOP_COUNT from 2 to 1 to reduce unnecessary SDIO bus access
395  *
396  * 09 24 2010 cp.wu
397  * [WCXRP00000057] [MT6620 Wi-Fi][Driver] Modify online scan to a run-time switchable feature
398  * Modify online scan as a run-time adjustable option (for Windows, in registry)
399  *
400  * 09 23 2010 cp.wu
401  * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning
402  * eliminate reference of CFG_RESPONSE_MAX_PKT_SIZE
403  *
404  * 09 20 2010 cm.chang
405  * NULL
406  * Disable RX STBC by BB HEC based on MT6620E1_PHY_BUG v05.docx
407  *
408  * 09 17 2010 chinglan.wang
409  * NULL
410  * Add performance test option
411  *
412  * 09 10 2010 chinglan.wang
413  * NULL
414  * Modify for Software Migration Phase 2.10 for E2 FPGA
415  *
416  * 09 07 2010 yuche.tsai
417  * NULL
418  * Add a CFG for max common IE buffer size.
419  *
420  * 09 01 2010 cp.wu
421  * NULL
422  * restore configuration as before.
423  *
424  * 09 01 2010 cp.wu
425  * NULL
426  * HIFSYS Clock Source Workaround
427  *
428  * 08 31 2010 kevin.huang
429  * NULL
430  * Use LINK LIST operation to process SCAN result
431  *
432  * 08 30 2010 chinglan.wang
433  * NULL
434  * Enable the MT6620_FPGA_BWCS value.
435  *
436  * 08 30 2010 chinglan.wang
437  * NULL
438  * Disable the FW encryption.
439  *
440  * 08 27 2010 chinglan.wang
441  * NULL
442  * Update configuration for MT6620_E1_PRE_ALPHA_1832_0827_2010
443  *
444  * 08 26 2010 yuche.tsai
445  * NULL
446  * Add AT GO test configure mode under WinXP.
447  * Please enable 1. CFG_ENABLE_WIFI_DIRECT, 2. CFG_TEST_WIFI_DIRECT_GO, 3. CFG_SUPPORT_AAA
448  *
449  * 08 25 2010 cp.wu
450  * NULL
451  * add option for enabling AIS 5GHz scan
452  *
453  * 08 25 2010 george.huang
454  * NULL
455  * update OID/ registry control path for PM related settings
456  *
457  * 08 24 2010 cp.wu
458  * NULL
459  * 1) initialize variable for enabling short premable/short time slot.
460  * 2) add compile option for disabling online scan
461  *
462  * 08 24 2010 cm.chang
463  * NULL
464  * Support RLM initail channel of Ad-hoc, P2P and BOW
465  *
466  * 08 23 2010 cp.wu
467  * NULL
468  * revise constant definitions to be matched with implementation (original cmd-event definition is deprecated)
469  *
470  * 08 23 2010 chinghwa.yu
471  * NULL
472  * Disable BOW Test.
473  *
474  * 08 23 2010 jeffrey.chang
475  * NULL
476  * fix config.h typo
477  *
478  * 08 23 2010 chinghwa.yu
479  * NULL
480  * Update for BOW.
481  *
482  * 08 21 2010 jeffrey.chang
483  * NULL
484  * 1) add sdio two setting
485  * 2) bug fix of sdio glue
486  *
487  * 08 09 2010 wh.su
488  * NULL
489  * let the firmware download default enabled.
490  *
491  * 08 07 2010 wh.su
492  * NULL
493  * adding the privacy related code for P2P network
494  *
495  * 08 05 2010 yuche.tsai
496  * NULL
497  * Add a configure flag for P2P unitest.
498  *
499  * 07 23 2010 cp.wu
500  *
501  * 1) re-enable AIS-FSM beacon timeout handling.
502  * 2) scan done API revised
503  *
504  * 07 23 2010 cp.wu
505  *
506  * 1) enable Ad-Hoc
507  * 2) disable beacon timeout handling temporally due to unexpected beacon timeout event.
508  *
509  * 07 19 2010 wh.su
510  *
511  * update for security supporting.
512  *
513  * 07 19 2010 yuche.tsai
514  *
515  * Add for SLT support.
516  *
517  * 07 16 2010 cp.wu
518  *
519  * remove work-around in case SCN is not available.
520  *
521  * 07 14 2010 yarco.yang
522  *
523  * 1. Remove CFG_MQM_MIGRATION
524  * 2. Add CMD_UPDATE_WMM_PARMS command
525  *
526  * 07 13 2010 cp.wu
527  *
528  * 1) MMPDUs are now sent to MT6620 by CMD queue for keeping strict order of 1X/MMPDU/CMD packets
529  * 2) integrate with qmGetFrameAction() for deciding which MMPDU/1X could pass checking for sending
530  * 2) enhance CMD_INFO_T descriptor number from 10 to 32 to avoid descriptor underflow under concurrent network operation
531  *
532  * 07 09 2010 yarco.yang
533  *
534  * [MT6620 and MT5931] SW Migration: Add ADDBA support
535  *
536  * 07 08 2010 cp.wu
537  *
538  * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
539  *
540  * 07 08 2010 cp.wu
541  * [WPD00003833][MT6620 and MT5931] Driver migration
542  * take use of RLM module for parsing/generating HT IEs for 11n capability
543  *
544  * 07 07 2010 cp.wu
545  * [WPD00003833][MT6620 and MT5931] Driver migration
546  * for first connection, if connecting failed do not enter into scan state.
547  *
548  * 06 25 2010 cp.wu
549  * [WPD00003833][MT6620 and MT5931] Driver migration
550  * modify Beacon/ProbeResp to complete parsing,
551  * because host software has looser memory usage restriction
552  *
553  * 06 23 2010 cp.wu
554  * [WPD00003833][MT6620 and MT5931] Driver migration
555  * 1) add SCN compilation option.
556  * 2) when SCN is not turned on, BSSID_SCAN will generate a fake entry for 1st connection
557  *
558  * 06 22 2010 cp.wu
559  * [WPD00003833][MT6620 and MT5931] Driver migration
560  * 1) add command warpper for STA-REC/BSS-INFO sync.
561  * 2) enhance command packet sending procedure for non-oid part
562  * 3) add command packet definitions for STA-REC/BSS-INFO sync.
563  *
564  * 06 21 2010 wh.su
565  * [WPD00003840][MT6620 5931] Security migration
566  * set default compiling flag for security disable.
567  *
568  * 06 21 2010 yarco.yang
569  * [WPD00003837][MT6620]Data Path Refine
570  * Support CFG_MQM_MIGRATION flag
571  *
572  * 06 21 2010 cp.wu
573  * [WPD00003833][MT6620 and MT5931] Driver migration
574  * enable RX management frame handling.
575  *
576  * 06 21 2010 cp.wu
577  * [WPD00003833][MT6620 and MT5931] Driver migration
578  * add scan_fsm into building.
579  *
580  * 06 18 2010 cm.chang
581  * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
582  * Provide cnmMgtPktAlloc() and alloc/free function of msg/buf
583  *
584  * 06 15 2010 cp.wu
585  * [WPD00003833][MT6620 and MT5931] Driver migration
586  * add scan.c.
587  *
588  * 06 14 2010 cp.wu
589  * [WPD00003833][MT6620 and MT5931] Driver migration
590  * add management dispatching function table.
591  *
592  * 06 11 2010 cp.wu
593  * [WPD00003833][MT6620 and MT5931] Driver migration
594  * auth.c is migrated.
595  *
596  * 06 11 2010 cp.wu
597  * [WPD00003833][MT6620 and MT5931] Driver migration
598  * add bss.c.
599  *
600  * 06 11 2010 cp.wu
601  * [WPD00003833][MT6620 and MT5931] Driver migration
602  * 1) migrate assoc.c.
603  * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness
604  * 3) add configuration options for CNM_MEM and RSN modules
605  * 4) add data path for management frames
606  * 5) eliminate rPacketInfo of MSDU_INFO_T
607  *
608  * 06 10 2010 cp.wu
609  * [WPD00003833][MT6620 and MT5931] Driver migration
610  * 1) eliminate CFG_CMD_EVENT_VERSION_0_9
611  * 2) when disconnected, indicate nic directly (no event is needed)
612  *
613  * 06 07 2010 cp.wu
614  * [WPD00003833][MT6620 and MT5931] Driver migration
615  * add aa_fsm.h, ais_fsm.h, bss.h, mib.h and scan.h.
616  *
617  * 06 07 2010 cp.wu
618  * [WPD00003833][MT6620 and MT5931] Driver migration
619  * merge wlan_def.h.
620  *
621  * 06 06 2010 kevin.huang
622  * [WPD00003832][MT6620 5931] Create driver base
623  * [MT6620 5931] Create driver base
624  *
625  * 05 31 2010 cp.wu
626  * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support
627  * add config option for cfg80211.
628  *
629  * 05 26 2010 cp.wu
630  * [WPD00001943]Create WiFi test driver framework on WinXP
631  * set ATIMwindow default value to zero.
632  *
633  * 05 21 2010 cp.wu
634  * [WPD00001943]Create WiFi test driver framework on WinXP
635  * add option for FPGA_BWCS & FPGA_V5
636  *
637  * 05 20 2010 cp.wu
638  * [WPD00001943]Create WiFi test driver framework on WinXP
639  * 1) integrate OID_GEN_NETWORK_LAYER_ADDRESSES with CMD_ID_SET_IP_ADDRESS
640  * 2) buffer statistics data for 2 seconds
641  * 3) use default value for adhoc parameters instead of 0
642  *
643  * 05 17 2010 cp.wu
644  * [WPD00001943]Create WiFi test driver framework on WinXP
645  * 1) enable CMD/EVENT ver 0.9 definition.
646  * 2) abandon use of ENUM_MEDIA_STATE
647  *
648  * 05 17 2010 cp.wu
649  * [WPD00001943]Create WiFi test driver framework on WinXP
650  * add CFG_STARTUP_DEBUG for debugging starting up issue.
651  *
652  * 05 17 2010 cp.wu
653  * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support
654  * add basic handling framework for wireless extension ioctls.
655  *
656  * 05 11 2010 cp.wu
657  * [WPD00001943]Create WiFi test driver framework on WinXP
658  * change firmware name to WIFI_RAM_CODE.
659  *
660  * 05 07 2010 cp.wu
661  * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support
662  * disable bt-over-wifi configuration, turn it on after firmware finished implementation
663  *
664  * 04 27 2010 cp.wu
665  * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support
666  * add multiple physical link support
667  *
668  * 04 23 2010 cp.wu
669  * [WPD00001943]Create WiFi test driver framework on WinXP
670  * surpress compiler warning
671  *
672  * 04 22 2010 jeffrey.chang
673  * [WPD00003826]Initial import for Linux port
674  * re-enable power management
675  *
676  * 04 22 2010 jeffrey.chang
677  * [WPD00003826]Initial import for Linux port
678  *
679  * 1) modify rx path code for supporting Wi-Fi direct
680  * 2) modify config.h since Linux dont need to consider retaining packet
681  *
682  * 04 22 2010 cp.wu
683  * [WPD00001943]Create WiFi test driver framework on WinXP
684  * enable TCP/IP checksum offloading by default.
685  *
686  * 04 19 2010 cp.wu
687  * [WPD00001943]Create WiFi test driver framework on WinXP
688  * set CFG_ENABLE_FULL_PM to 1 as default to
689  * 1) acquire own before hardware access
690  * 2) set own back after hardware access
691  *
692  * 04 15 2010 jeffrey.chang
693  * [WPD00003826]Initial import for Linux port
694  * change firmware name
695  *
696  * 04 07 2010 cp.wu
697  * [WPD00003827][MT6620 Wi-Fi] Chariot fail and following ping fail, no pkt send from driver
698  * disable RX-enhanced response temporally, it seems the CQ is not resolved yet.
699  *
700  * 04 06 2010 cp.wu
701  * [WPD00003827][MT6620 Wi-Fi] Chariot fail and following ping fail, no pkt send from driver
702  * re-enable RX enhanced mode as WPD00003827 is resolved.
703  *
704  * 04 06 2010 cp.wu
705  * [WPD00001943]Create WiFi test driver framework on WinXP
706  * turn off RX_ENHANCE mode by default.
707  *
708  * 04 06 2010 cp.wu
709  * [WPD00001943]Create WiFi test driver framework on WinXP
710  * 1) eliminate unused definitions
711  *  * 2) ready bit will be polled for limited iteration
712  *
713  * 04 02 2010 jeffrey.chang
714  * [WPD00003826]Initial import for Linux port
715  * firmware download: Linux uses different firmware path
716  *
717  * 04 01 2010 cp.wu
718  * [WPD00001943]Create WiFi test driver framework on WinXP
719  * change to use WIFI_TCM_ALWAYS_ON as firmware image
720  *
721  * 03 31 2010 wh.su
722  * [WPD00003816][MT6620 Wi-Fi] Adding the security support
723  * modify the wapi related code for new driver's design.
724  *
725  * 03 26 2010 cp.wu
726  * [WPD00001943]Create WiFi test driver framework on WinXP
727  * add a temporary flag for integration with CMD/EVENT v0.9.
728  *
729  * 03 25 2010 cp.wu
730  * [WPD00001943]Create WiFi test driver framework on WinXP
731  * firmware download load adress & start address are now configured from config.h
732  *  * due to the different configurations on FPGA and ASIC
733  *
734  * 03 24 2010 cp.wu
735  * [WPD00001943]Create WiFi test driver framework on WinXP
736  * add options for full PM support.
737  *
738  * 03 24 2010 jeffrey.chang
739  * [WPD00003826]Initial import for Linux port
740  * [WPD00003826] Initial import for Linux port
741  * initial import for Linux port
742  *
743  * 03 24 2010 jeffrey.chang
744  * [WPD00003826]Initial import for Linux port
745  * [WPD00003826] Initial import for Linux port
746  * initial import for Linux port
747  *
748  * 03 24 2010 jeffrey.chang
749  * [WPD00003826]Initial import for Linux port
750  * initial import for Linux port
751  *
752  * 03 16 2010 cp.wu
753  * [WPD00001943]Create WiFi test driver framework on WinXP
754  * turn on FW-DOWNLOAD as default for release.
755  *
756  * 03 16 2010 cp.wu
757  * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support
758  * build up basic data structure and definitions to support BT-over-WiFi
759  *
760  * 03 12 2010 cp.wu
761  * [WPD00001943]Create WiFi test driver framework on WinXP
762  * add two option for ACK and ENCRYPTION for firmware download
763  *
764  * 03 11 2010 cp.wu
765  * [WPD00003821][BUG] Host driver stops processing RX packets from HIF RX0
766  * add RX starvation warning debug message controlled by CFG_HIF_RX_STARVATION_WARNING
767  *
768  * 03 10 2010 cp.wu
769  * [WPD00001943]Create WiFi test driver framework on WinXP
770  * code clean: removing unused variables and structure definitions
771  *
772  * 03 05 2010 cp.wu
773  * [WPD00003821][BUG] Host driver stops processing RX packets from HIF RX0
774  * change CFG_NUM_OF_QM_RX_PKT_NUM to 120
775  *
776  * 03 04 2010 cp.wu
777  * [WPD00003821][BUG] Host driver stops processing RX packets from HIF RX0
778  * .
779  *
780  * 03 04 2010 cp.wu
781  * [WPD00003821][BUG] Host driver stops processing RX packets from HIF RX0
782  * increase RX buffer number to avoid RX buffer starvation.
783  *
784  * 02 24 2010 tehuang.liu
785  * [WPD00001943]Create WiFi test driver framework on WinXP
786  * Changed the number of STA_RECs to 20
787  *
788  * 02 23 2010 cp.wu
789  * [WPD00001943]Create WiFi test driver framework on WinXP
790  * add checksum offloading support.
791  *
792  * 02 11 2010 cp.wu
793  * [WPD00001943]Create WiFi test driver framework on WinXP
794  * 1. add logic for firmware download
795  *  * 2. firmware image filename and start/load address are now retrieved from registry
796  *
797  * 02 08 2010 cp.wu
798  * [WPD00001943]Create WiFi test driver framework on WinXP
799  * prepare for implementing fw download logic
800  *
801  * 12 30 2009 cp.wu
802  * [WPD00001943]Create WiFi test driver framework on WinXP
803  * 1) According to CMD/EVENT documentation v0.8,
804  *  * OID_CUSTOM_TEST_RX_STATUS & OID_CUSTOM_TEST_TX_STATUS is no longer used,
805  *  * and result is retrieved by get ATInfo instead
806  *  * 2) add 4 counter for recording aggregation statistics
807 **  \main\maintrunk.MT6620WiFiDriver_Prj\25 2009-12-16 22:12:28 GMT mtk02752
808 **  enable interrupt enhanced response, TX/RX Aggregation as default
809 **  \main\maintrunk.MT6620WiFiDriver_Prj\24 2009-12-10 16:38:43 GMT mtk02752
810 **  eliminate compile options which are obsolete or for emulation purpose
811 **  \main\maintrunk.MT6620WiFiDriver_Prj\23 2009-12-09 13:56:26 GMT MTK02468
812 **  Added RX buffer reordering configurations
813 **  \main\maintrunk.MT6620WiFiDriver_Prj\22 2009-12-04 12:09:09 GMT mtk02752
814 **  once enhanced intr/rx reponse is taken, RX must be access in aggregated basis
815 **  \main\maintrunk.MT6620WiFiDriver_Prj\21 2009-11-23 17:54:50 GMT mtk02752
816 **  correct a typo
817 **  \main\maintrunk.MT6620WiFiDriver_Prj\20 2009-11-17 22:40:47 GMT mtk01084
818 **  add defines
819 **  \main\maintrunk.MT6620WiFiDriver_Prj\19 2009-11-17 17:33:37 GMT mtk02752
820 **  add coalescing buffer definition for SD1_SD3_DATAPATH_INTEGRATION
821 **  \main\maintrunk.MT6620WiFiDriver_Prj\18 2009-11-16 20:32:40 GMT mtk02752
822 **  add CFG_TX_MAX_PKT_NUM for limiting queued TX packet
823 **  \main\maintrunk.MT6620WiFiDriver_Prj\17 2009-11-16 13:34:44 GMT mtk02752
824 **  add SD1_SD3_DATAPATH_INTEGRATION define for source control
825 **  \main\maintrunk.MT6620WiFiDriver_Prj\16 2009-11-13 13:54:11 GMT mtk01084
826 **  enable INT enhance mode by default
827 **  \main\maintrunk.MT6620WiFiDriver_Prj\15 2009-10-30 18:17:14 GMT mtk01084
828 **  add new define
829 **  \main\maintrunk.MT6620WiFiDriver_Prj\14 2009-10-29 19:47:36 GMT mtk01084
830 **  not use HIF loopback mode
831 **  \main\maintrunk.MT6620WiFiDriver_Prj\13 2009-10-13 21:58:33 GMT mtk01084
832 **  update for new macro define
833 **  \main\maintrunk.MT6620WiFiDriver_Prj\12 2009-09-09 17:26:08 GMT mtk01084
834 **  add CFG_TEST_WITH_MT5921
835 **  \main\maintrunk.MT6620WiFiDriver_Prj\11 2009-05-18 21:02:30 GMT mtk01426
836 **  Update CFG_RX_COALESCING_BUFFER_SIZE
837 **  \main\maintrunk.MT6620WiFiDriver_Prj\10 2009-04-21 09:35:51 GMT mtk01461
838 **  Add CFG_TX_DBG_MGT_BUF to debug MGMT Buffer depth
839 **  \main\maintrunk.MT6620WiFiDriver_Prj\9 2009-04-14 15:52:21 GMT mtk01426
840 **  Add OOB_DATA_PRE_FIXED_LEN define
841 **  \main\maintrunk.MT6620WiFiDriver_Prj\8 2009-04-08 16:51:08 GMT mtk01084
842 **  update for FW download part
843 **  \main\maintrunk.MT6620WiFiDriver_Prj\7 2009-04-01 10:33:37 GMT mtk01461
844 **  Add SW pre test flag CFG_HIF_LOOPBACK_PRETEST
845 **  \main\maintrunk.MT6620WiFiDriver_Prj\6 2009-03-23 00:29:18 GMT mtk01461
846 **  Fix CFG_COALESCING_BUFFER_SIZE if enable the CFG_TX_FRAGMENT
847 **  \main\maintrunk.MT6620WiFiDriver_Prj\5 2009-03-18 20:58:34 GMT mtk01426
848 **  Add CFG_HIF_LOOPBACK and CFG_SDIO_RX_ENHANCE
849 **  \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-03-17 20:17:36 GMT mtk01426
850 **  Add CMD/Response related configure
851 **  \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-03-16 09:08:21 GMT mtk01461
852 **  Update TX PATH API
853 **  \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-03-10 20:11:21 GMT mtk01426
854 **  Init for develop
855 **
856 */
857
858 #ifndef _CONFIG_H
859 #define _CONFIG_H
860 /*******************************************************************************
861 *                         C O M P I L E R   F L A G S
862 ********************************************************************************
863 */
864
865 /*******************************************************************************
866 *                    E X T E R N A L   R E F E R E N C E S
867 ********************************************************************************
868 */
869
870 #ifdef MT6620
871 #undef MT6620
872 #endif
873
874 #ifdef MT5931
875 #undef MT5931
876 #endif
877
878 #ifndef MT6628
879 #define MT6628
880 #endif
881
882
883 /*******************************************************************************
884 *                              C O N S T A N T S
885 ********************************************************************************
886 */
887 //2 Flags for OS capability
888
889 #ifdef LINUX
890     #ifdef CONFIG_X86
891         #define MTK_WCN_HIF_SDIO        0
892     #else
893         #define MTK_WCN_HIF_SDIO        1
894     #endif
895 #else
896     #define MTK_WCN_HIF_SDIO            0
897 #endif
898
899 #if (CFG_SUPPORT_AEE == 1)
900     #define CFG_ENABLE_AEE_MSG          1
901 #else
902     #define CFG_ENABLE_AEE_MSG          0
903 #endif
904
905 //2 Flags for Driver Features
906 #define CFG_TX_FRAGMENT                 1 /*!< 1: Enable TX fragmentation
907                                                        0: Disable */
908 #define CFG_SUPPORT_PERFORMANCE_TEST    0  /*Only for performance Test*/
909
910 #define CFG_COUNTRY_CODE                NULL //"US"
911
912 #ifndef LINUX
913     #define CFG_FW_FILENAME             L"WIFI_RAM_CODE"
914     #define CFG_FW_FILENAME_E6          L"WIFI_RAM_CODE_E6"
915 #else
916     #define CFG_FW_FILENAME             "WIFI_RAM_CODE"
917 #endif
918
919 #define CFG_SUPPORT_802_11D             1 /*!< 1(default): Enable 802.11d
920                                                      0: Disable */
921
922 #define CFG_SUPPORT_SPEC_MGMT       0   /* Spectrum Management (802.11h): TPC and DFS */
923 #define CFG_SUPPORT_RRM             0   /* Radio Reasource Measurement (802.11k) */
924 #define CFG_SUPPORT_QUIET           0   /* Quiet (802.11h) */
925
926
927 #define CFG_SUPPORT_RX_RDG          0   /* 11n feature. RX RDG capability */
928 #define CFG_SUPPORT_MFB             0   /* 802.11n MCS Feedback responder */
929 #define CFG_SUPPORT_RX_STBC         1   /* 802.11n RX STBC (1SS) */
930 #define CFG_SUPPORT_RX_SGI          1   /* 802.11n RX short GI for both 20M and 40M BW */
931 #define CFG_SUPPORT_RX_HT_GF        1   /* 802.11n RX HT green-field capability */
932
933 /*------------------------------------------------------------------------------
934  * SLT Option
935  *------------------------------------------------------------------------------
936  */
937 #define CFG_SLT_SUPPORT                             0
938
939
940 #ifdef NDIS60_MINIPORT
941     #define CFG_NATIVE_802_11                       1
942
943     #define CFG_TX_MAX_PKT_SIZE                     2304
944     #define CFG_TCP_IP_CHKSUM_OFFLOAD_NDIS_60       0 /* !< 1: Enable TCP/IP header checksum offload
945                                                             0: Disable */
946     #define CFG_TCP_IP_CHKSUM_OFFLOAD               0
947     #define CFG_WHQL_DOT11_STATISTICS               1
948     #define CFG_WHQL_ADD_REMOVE_KEY                 1
949     #define CFG_WHQL_CUSTOM_IE                      1
950     #define CFG_WHQL_SAFE_MODE_ENABLED              1
951
952 #else
953     #define CFG_TCP_IP_CHKSUM_OFFLOAD               1 /* !< 1: Enable TCP/IP header checksum offload
954                                                             0: Disable */
955     #define CFG_TCP_IP_CHKSUM_OFFLOAD_NDIS_60       0
956     #define CFG_TX_MAX_PKT_SIZE                     1600
957     #define CFG_NATIVE_802_11                       0
958 #endif
959
960
961 //2 Flags for Driver Parameters
962 /*------------------------------------------------------------------------------
963  * Flags for EHPI Interface in Colibri Platform
964  *------------------------------------------------------------------------------
965  */
966 #define CFG_EHPI_FASTER_BUS_TIMING                  0 /*!< 1: Do workaround for faster bus timing
967                                                            0(default): Disable */
968
969 /*------------------------------------------------------------------------------
970  * Flags for HIFSYS Interface
971  *------------------------------------------------------------------------------
972  */
973 #ifdef _lint
974     #define _HIF_SDIO   1
975 #endif
976
977 #define CFG_SDIO_INTR_ENHANCE                        1 /*!< 1(default): Enable SDIO ISR & TX/RX status enhance mode
978                                                             0: Disable */
979 #define CFG_SDIO_RX_ENHANCE                          0 /*!< 1(default): Enable SDIO ISR & TX/RX status enhance mode
980                                                             0: Disable */
981 #define CFG_SDIO_TX_AGG                              1 /*!< 1: Enable SDIO TX enhance mode(Multiple frames in single BLOCK CMD)
982                                                             0(default): Disable */
983
984 #define CFG_SDIO_RX_AGG                              1 /*!< 1: Enable SDIO RX enhance mode(Multiple frames in single BLOCK CMD)
985                                                             0(default): Disable */
986
987 #if (CFG_SDIO_RX_AGG == 1) && (CFG_SDIO_INTR_ENHANCE == 0)
988     #error "CFG_SDIO_INTR_ENHANCE should be 1 once CFG_SDIO_RX_AGG equals to 1"
989 #elif (CFG_SDIO_INTR_ENHANCE == 1 || CFG_SDIO_RX_ENHANCE == 1) && (CFG_SDIO_RX_AGG == 0)
990     #error "CFG_SDIO_RX_AGG should be 1 once CFG_SDIO_INTR_ENHANCE and/or CFG_SDIO_RX_ENHANCE equals to 1"
991 #endif
992
993 #define CFG_SDIO_MAX_RX_AGG_NUM                     0 /*!< 1: Setting the maximum RX aggregation number
994                                                            0(default): no limited */
995
996 #ifdef WINDOWS_CE
997     #define CFG_SDIO_PATHRU_MODE                    1 /*!< 1: Suport pass through (PATHRU) mode
998                                                            0: Disable */
999 #else
1000     #define CFG_SDIO_PATHRU_MODE                    0 /*!< 0: Always disable if WINDOWS_CE is not defined */
1001 #endif
1002
1003 #define CFG_MAX_RX_ENHANCE_LOOP_COUNT               3
1004
1005
1006 /*------------------------------------------------------------------------------
1007  * Flags and Parameters for Integration
1008  *------------------------------------------------------------------------------
1009  */
1010 #if defined(MT6620)
1011     #define MT6620_FPGA_BWCS    0
1012     #define MT6620_FPGA_V5      0
1013
1014     #if (MT6620_FPGA_BWCS == 1) && (MT6620_FPGA_V5 == 1)
1015         #error
1016     #endif
1017
1018     #if (MTK_WCN_HIF_SDIO == 1)
1019         #define CFG_MULTI_ECOVER_SUPPORT    1
1020     #elif !defined(LINUX)
1021         #define CFG_MULTI_ECOVER_SUPPORT    1
1022     #else
1023         #define CFG_MULTI_ECOVER_SUPPORT    0
1024     #endif
1025
1026     #define CFG_ENABLE_CAL_LOG      0
1027     #define CFG_REPORT_RFBB_VERSION       0
1028 #elif defined(MT5931)
1029
1030 #define CFG_MULTI_ECOVER_SUPPORT    0
1031 #define CFG_ENABLE_CAL_LOG      0
1032 #define CFG_REPORT_RFBB_VERSION       0
1033
1034 #elif defined(MT6628)
1035
1036 #define CFG_MULTI_ECOVER_SUPPORT    0
1037
1038 #define CFG_ENABLE_CAL_LOG      1
1039 #define CFG_REPORT_RFBB_VERSION       1
1040
1041 #endif
1042
1043 #define CFG_CHIP_RESET_SUPPORT                      1
1044
1045
1046 /*------------------------------------------------------------------------------
1047  * Flags for workaround
1048  *------------------------------------------------------------------------------
1049  */
1050 #if defined(MT6620) && (MT6620_FPGA_BWCS == 0) && (MT6620_FPGA_V5 == 0)
1051     #define MT6620_E1_ASIC_HIFSYS_WORKAROUND            0
1052 #else
1053     #define MT6620_E1_ASIC_HIFSYS_WORKAROUND            0
1054 #endif
1055
1056 /*------------------------------------------------------------------------------
1057  * Flags for driver version
1058  *------------------------------------------------------------------------------
1059  */
1060 #define CFG_DRV_OWN_VERSION                     ((UINT_16)((NIC_DRIVER_MAJOR_VERSION << 8) | (NIC_DRIVER_MINOR_VERSION)))
1061 #define CFG_DRV_PEER_VERSION                    ((UINT_16)0x0000)
1062
1063
1064 /*------------------------------------------------------------------------------
1065  * Flags for TX path which are OS dependent
1066  *------------------------------------------------------------------------------
1067  */
1068 /*! NOTE(Kevin): If the Network buffer is non-scatter-gather like structure(without
1069  * NETIF_F_FRAGLIST in LINUX), then we can set CFG_TX_BUFFER_IS_SCATTER_LIST to "0"
1070  * for zero copy TX packets.
1071  * For scatter-gather like structure, we set "1", driver will do copy frame to
1072  * internal coalescing buffer before write it to FIFO.
1073  */
1074 #if defined(LINUX)
1075     #define CFG_TX_BUFFER_IS_SCATTER_LIST       1 /*!< 1: Do frame copy before write to TX FIFO.
1076                                                         Used when Network buffer is scatter-gather.
1077                                                      0(default): Do not copy frame */
1078 #else /* WINDOWS/WINCE */
1079     #define CFG_TX_BUFFER_IS_SCATTER_LIST       1
1080 #endif /* LINUX */
1081
1082
1083 #if CFG_SDIO_TX_AGG || CFG_TX_BUFFER_IS_SCATTER_LIST
1084     #define CFG_COALESCING_BUFFER_SIZE          (CFG_TX_MAX_PKT_SIZE * NIC_TX_BUFF_SUM)
1085 #else
1086     #define CFG_COALESCING_BUFFER_SIZE          (CFG_TX_MAX_PKT_SIZE)
1087 #endif /* CFG_SDIO_TX_AGG || CFG_TX_BUFFER_IS_SCATTER_LIST */
1088
1089 /*------------------------------------------------------------------------------
1090  * Flags and Parameters for TX path
1091  *------------------------------------------------------------------------------
1092  */
1093
1094 /*! Maximum number of SW TX packet queue */
1095 #define CFG_TX_MAX_PKT_NUM                      256
1096
1097 /*! Maximum number of SW TX CMD packet buffer */
1098 #define CFG_TX_MAX_CMD_PKT_NUM                  32
1099
1100 /*! Maximum number of associated STAs */
1101 #define CFG_NUM_OF_STA_RECORD                   20
1102
1103 /*------------------------------------------------------------------------------
1104  * Flags and Parameters for RX path
1105  *------------------------------------------------------------------------------
1106  */
1107
1108 /*! Max. descriptor number - sync. with firmware */
1109 #if CFG_SLT_SUPPORT
1110 #define CFG_NUM_OF_RX0_HIF_DESC                 42
1111 #else
1112 #define CFG_NUM_OF_RX0_HIF_DESC                 16
1113 #endif
1114 #define CFG_NUM_OF_RX1_HIF_DESC                 2
1115
1116 /*! Max. buffer hold by QM */
1117 #define CFG_NUM_OF_QM_RX_PKT_NUM                120
1118
1119 /*! Maximum number of SW RX packet buffer */
1120 #define CFG_RX_MAX_PKT_NUM                      ((CFG_NUM_OF_RX0_HIF_DESC + CFG_NUM_OF_RX1_HIF_DESC) * 3 \
1121                                                 + CFG_NUM_OF_QM_RX_PKT_NUM)
1122
1123 #define CFG_RX_REORDER_Q_THRESHOLD              8
1124
1125 #ifndef LINUX
1126 #define CFG_RX_RETAINED_PKT_THRESHOLD           (CFG_NUM_OF_RX0_HIF_DESC + CFG_NUM_OF_RX1_HIF_DESC + CFG_NUM_OF_QM_RX_PKT_NUM)
1127 #else
1128 #define CFG_RX_RETAINED_PKT_THRESHOLD           0
1129 #endif
1130
1131 /*! Maximum RX packet size, if exceed this value, drop incoming packet */
1132 /* 7.2.3 Maganement frames */
1133 #define CFG_RX_MAX_PKT_SIZE   ( 28 + 2312 + 12 /*HIF_RX_HEADER_T*/ )  //TODO: it should be 4096 under emulation mode
1134
1135 /*! Minimum RX packet size, if lower than this value, drop incoming packet */
1136 #define CFG_RX_MIN_PKT_SIZE                     10 /*!< 802.11 Control Frame is 10 bytes */
1137
1138 #if CFG_SDIO_RX_AGG
1139     /* extra size for CS_STATUS and enhanced response */
1140     #define CFG_RX_COALESCING_BUFFER_SIZE       ((CFG_NUM_OF_RX0_HIF_DESC  + 1) \
1141                                                 * CFG_RX_MAX_PKT_SIZE)
1142 #else
1143     #define CFG_RX_COALESCING_BUFFER_SIZE       (CFG_RX_MAX_PKT_SIZE)
1144 #endif
1145
1146 /*! RX BA capability */
1147 #define CFG_NUM_OF_RX_BA_AGREEMENTS             8
1148 #define CFG_RX_BA_MAX_WINSIZE                   16
1149 #define CFG_RX_BA_INC_SIZE                      4
1150 #define CFG_RX_MAX_BA_TID_NUM                   8
1151 #define CFG_RX_REORDERING_ENABLED               1
1152
1153 /*------------------------------------------------------------------------------
1154  * Flags and Parameters for CMD/RESPONSE
1155  *------------------------------------------------------------------------------
1156  */
1157 #define CFG_RESPONSE_POLLING_TIMEOUT            512
1158
1159
1160 /*------------------------------------------------------------------------------
1161  * Flags and Parameters for Protocol Stack
1162  *------------------------------------------------------------------------------
1163  */
1164 /*! Maximum number of BSS in the SCAN list */
1165 #define CFG_MAX_NUM_BSS_LIST                    64
1166
1167 #define CFG_MAX_COMMON_IE_BUF_LEN         (1500 * CFG_MAX_NUM_BSS_LIST) / 3
1168
1169 /*! Maximum size of IE buffer of each SCAN record */
1170 #define CFG_IE_BUFFER_SIZE                      512
1171
1172 /*! Maximum number of STA records */
1173 #define CFG_MAX_NUM_STA_RECORD                  32
1174
1175
1176
1177 /*------------------------------------------------------------------------------
1178  * Flags and Parameters for Power management
1179  *------------------------------------------------------------------------------
1180  */
1181 #define CFG_ENABLE_FULL_PM                      1
1182 #define CFG_ENABLE_WAKEUP_ON_LAN                0
1183
1184 #define CFG_INIT_POWER_SAVE_PROF                    ENUM_PSP_FAST_SWITCH
1185
1186 #define CFG_INIT_ENABLE_PATTERN_FILTER_ARP                    0
1187
1188 #define CFG_INIT_UAPSD_AC_BMP                    0//(BIT(3) | BIT(2) | BIT(1) | BIT(0))
1189
1190 //#define CFG_SUPPORT_WAPI                        0
1191 #define CFG_SUPPORT_WPS                          1
1192 #define CFG_SUPPORT_WPS2                         1
1193
1194 /*------------------------------------------------------------------------------
1195  * 802.11i RSN Pre-authentication PMKID cahce maximun number
1196  *------------------------------------------------------------------------------
1197  */
1198 #define CFG_MAX_PMKID_CACHE                     16      /*!< max number of PMKID cache
1199                                                            16(default) : The Max PMKID cache */
1200
1201 /*------------------------------------------------------------------------------
1202  * Flags and Parameters for Ad-Hoc
1203  *------------------------------------------------------------------------------
1204  */
1205 #define CFG_INIT_ADHOC_FREQ                     (2462000)
1206 #define CFG_INIT_ADHOC_MODE                     AD_HOC_MODE_MIXED_11BG
1207 #define CFG_INIT_ADHOC_BEACON_INTERVAL          (100)
1208 #define CFG_INIT_ADHOC_ATIM_WINDOW              (0)
1209
1210
1211 /*------------------------------------------------------------------------------
1212  * Flags and Parameters for Load Setup Default
1213  *------------------------------------------------------------------------------
1214  */
1215
1216 /*------------------------------------------------------------------------------
1217  * Flags for enable 802.11A Band setting
1218  *------------------------------------------------------------------------------
1219  */
1220
1221 /*------------------------------------------------------------------------------
1222  * Flags and Parameters for Interrupt Process
1223  *------------------------------------------------------------------------------
1224  */
1225 #if defined(_HIF_SDIO) && defined(WINDOWS_CE)
1226     #define CFG_IST_LOOP_COUNT                  1
1227 #else
1228     #define CFG_IST_LOOP_COUNT                  1
1229 #endif /* _HIF_SDIO */
1230
1231 #define CFG_INT_WRITE_CLEAR                     0
1232
1233 #if defined(LINUX)
1234 #define CFG_DBG_GPIO_PINS                       0 /* if 1, use MT6516 GPIO pin to log TX behavior */
1235 #endif
1236
1237 //2 Flags for Driver Debug Options
1238 /*------------------------------------------------------------------------------
1239  * Flags of TX Debug Option. NOTE(Kevin): Confirm with SA before modifying following flags.
1240  *------------------------------------------------------------------------------
1241  */
1242 #define CFG_DBG_MGT_BUF                         1 /*!< 1: Debug statistics usage of MGMT Buffer
1243                                                        0: Disable */
1244
1245 #define CFG_HIF_STATISTICS                      0
1246
1247 #define CFG_HIF_RX_STARVATION_WARNING           0
1248
1249 #define CFG_STARTUP_DEBUG                       0
1250
1251 #define CFG_RX_PKTS_DUMP                        1
1252
1253 /*------------------------------------------------------------------------------
1254  * Flags of Firmware Download Option.
1255  *------------------------------------------------------------------------------
1256  */
1257 #define CFG_ENABLE_FW_DOWNLOAD                  1
1258
1259 #define CFG_ENABLE_FW_DOWNLOAD_ACK              1
1260 #define CFG_ENABLE_FW_ENCRYPTION                1
1261
1262 #if defined(MT6620) || defined(MT6628)
1263     #define CFG_ENABLE_FW_DOWNLOAD_AGGREGATION  0
1264     #define CFG_ENABLE_FW_DIVIDED_DOWNLOAD      1
1265 #else
1266     #define CFG_ENABLE_FW_DOWNLOAD_AGGREGATION  0
1267     #define CFG_ENABLE_FW_DIVIDED_DOWNLOAD      0
1268 #endif
1269
1270
1271
1272 #if defined(MT6620)
1273     #if MT6620_FPGA_BWCS
1274         #define CFG_FW_LOAD_ADDRESS                     0x10014000
1275         #define CFG_OVERRIDE_FW_START_ADDRESS           0
1276         #define CFG_FW_START_ADDRESS                    0x10014001
1277     #elif MT6620_FPGA_V5
1278         #define CFG_FW_LOAD_ADDRESS                     0x10008000
1279         #define CFG_OVERRIDE_FW_START_ADDRESS           0
1280         #define CFG_FW_START_ADDRESS                    0x10008001
1281     #else
1282         #define CFG_FW_LOAD_ADDRESS                     0x10008000
1283         #define CFG_OVERRIDE_FW_START_ADDRESS           0
1284         #define CFG_FW_START_ADDRESS                    0x10008001
1285     #endif
1286 #elif defined(MT5931)
1287     #define CFG_FW_LOAD_ADDRESS                     0xFF900000
1288     #define CFG_FW_START_ADDRESS                    0x00000000
1289 #elif defined(MT6628)
1290     #define CFG_FW_LOAD_ADDRESS                     0x00060000
1291     #define CFG_OVERRIDE_FW_START_ADDRESS           0
1292     #define CFG_FW_START_ADDRESS                    0x00060000
1293 #endif
1294
1295
1296 /*------------------------------------------------------------------------------
1297  * Flags of Bluetooth-over-WiFi (BT 3.0 + HS) support
1298  *------------------------------------------------------------------------------
1299  */
1300
1301 #ifdef LINUX
1302     #ifdef CONFIG_X86
1303         #define CFG_ENABLE_BT_OVER_WIFI         0
1304     #else
1305         #define CFG_ENABLE_BT_OVER_WIFI         1
1306     #endif
1307 #else
1308     #define CFG_ENABLE_BT_OVER_WIFI             0
1309 #endif
1310
1311 #define CFG_BOW_SEPARATE_DATA_PATH              1
1312
1313 #define CFG_BOW_PHYSICAL_LINK_NUM               4
1314
1315 #define CFG_BOW_TEST                            0
1316
1317 #define CFG_BOW_LIMIT_AIS_CHNL                  1
1318
1319 #define CFG_BOW_SUPPORT_11N                     0
1320
1321 #define CFG_BOW_RATE_LIMITATION                 1
1322
1323 /*------------------------------------------------------------------------------
1324  * Flags of Wi-Fi Direct support
1325  *------------------------------------------------------------------------------
1326  */
1327 #ifdef LINUX
1328     #ifdef CONFIG_X86
1329         #define CFG_ENABLE_WIFI_DIRECT          0
1330         #define CFG_SUPPORT_802_11W             0
1331     #else
1332         #define CFG_ENABLE_WIFI_DIRECT          1
1333         #define CFG_SUPPORT_802_11W             0 /*!< 0(default): Disable 802.11W */
1334     #endif
1335 #else
1336     #define CFG_ENABLE_WIFI_DIRECT              0
1337     #define CFG_SUPPORT_802_11W                 0 /* Not support at WinXP */
1338 #endif
1339
1340 #define CFG_SUPPORT_PERSISTENT_GROUP     0
1341
1342 #define CFG_TEST_WIFI_DIRECT_GO                 0
1343
1344 #define CFG_TEST_ANDROID_DIRECT_GO              0
1345
1346 #define CFG_UNITEST_P2P                         0
1347
1348 /*
1349  * Enable cfg80211 option after Android 2.2(Froyo) is suggested,
1350  * cfg80211 on linux 2.6.29 is not mature yet
1351  */
1352 #define CFG_ENABLE_WIFI_DIRECT_CFG_80211        1
1353
1354 /*------------------------------------------------------------------------------
1355  * Configuration Flags (Linux Only)
1356  *------------------------------------------------------------------------------
1357  */
1358 #define CFG_SUPPORT_EXT_CONFIG                  0
1359
1360 /*------------------------------------------------------------------------------
1361  * Statistics Buffering Mechanism
1362  *------------------------------------------------------------------------------
1363  */
1364 #if CFG_SUPPORT_PERFORMANCE_TEST
1365 #define CFG_ENABLE_STATISTICS_BUFFERING         1
1366 #else
1367 #define CFG_ENABLE_STATISTICS_BUFFERING         0
1368 #endif
1369 #define CFG_STATISTICS_VALID_CYCLE              2000
1370 #define CFG_LINK_QUALITY_VALID_PERIOD           5000
1371
1372 /*------------------------------------------------------------------------------
1373  * Migration Option
1374  *------------------------------------------------------------------------------
1375  */
1376 #define CFG_SUPPORT_ADHOC                       1
1377 #define CFG_SUPPORT_AAA                         1
1378
1379
1380 #if (defined(MT5931) && defined(LINUX))
1381 #define CFG_SUPPORT_BCM                         1
1382 #define CFG_SUPPORT_BCM_BWCS                    1
1383 #define CFG_SUPPORT_BCM_BWCS_DEBUG              1
1384 #else
1385 #define CFG_SUPPORT_BCM                         0
1386 #define CFG_SUPPORT_BCM_BWCS                    0
1387 #define CFG_SUPPORT_BCM_BWCS_DEBUG              0
1388 #endif
1389
1390 #define CFG_SUPPORT_RDD_TEST_MODE       0
1391
1392 #define CFG_SUPPORT_PWR_MGT                     1
1393
1394 #define CFG_RSN_MIGRATION                       1
1395
1396 #define CFG_PRIVACY_MIGRATION                   1
1397
1398 #define CFG_ENABLE_HOTSPOT_PRIVACY_CHECK        1
1399
1400 #define CFG_MGMT_FRAME_HANDLING                 1
1401
1402 #define CFG_MGMT_HW_ACCESS_REPLACEMENT          0
1403
1404 #if CFG_SUPPORT_PERFORMANCE_TEST
1405
1406 #else
1407
1408 #endif
1409
1410 #define CFG_SUPPORT_AIS_5GHZ                    1
1411 #define CFG_SUPPORT_BEACON_CHANGE_DETECTION     0
1412
1413 /*------------------------------------------------------------------------------
1414  * Option for NVRAM and Version Checking
1415  *------------------------------------------------------------------------------
1416  */
1417 #define CFG_SUPPORT_NVRAM                       1
1418 #define CFG_NVRAM_EXISTENCE_CHECK               1
1419 #define CFG_SW_NVRAM_VERSION_CHECK              1
1420 #define CFG_SUPPORT_NIC_CAPABILITY              1
1421
1422
1423 /*------------------------------------------------------------------------------
1424  * CONFIG_TITLE : Stress Test Option
1425  * OWNER        : Puff Wen
1426  * Description  : For stress test only. DO NOT enable it while normal operation
1427  *------------------------------------------------------------------------------
1428  */
1429 #define CFG_STRESS_TEST_SUPPORT                 0
1430
1431 /*------------------------------------------------------------------------------
1432  * Flags for LINT
1433  *------------------------------------------------------------------------------
1434  */
1435 #define LINT_SAVE_AND_DISABLE                   /*lint -save -e* */
1436
1437 #define LINT_RESTORE                            /*lint -restore */
1438
1439 #define LINT_EXT_HEADER_BEGIN                   LINT_SAVE_AND_DISABLE
1440
1441 #define LINT_EXT_HEADER_END                     LINT_RESTORE
1442
1443 /*------------------------------------------------------------------------------
1444  * Flags of Features
1445  *------------------------------------------------------------------------------
1446  */
1447
1448 #define CFG_SUPPORT_QOS             1   /* Enable/disable QoS TX, AMPDU */
1449 #define CFG_SUPPORT_AMPDU_TX        1
1450 #define CFG_SUPPORT_AMPDU_RX        1
1451 #define CFG_SUPPORT_TSPEC           0   /* Enable/disable TS-related Action frames handling */
1452 #define CFG_SUPPORT_UAPSD           1
1453 #define CFG_SUPPORT_UL_PSMP         0
1454
1455 #define CFG_SUPPORT_ROAMING         1  /* Roaming System */
1456 #define CFG_SUPPORT_SWCR            1
1457
1458 #define CFG_SUPPORT_ANTI_PIRACY     1
1459
1460 #define CFG_SUPPORT_OSC_SETTING     1
1461
1462 #if defined(MT5931)
1463 #define CFG_SUPPORT_WHOLE_CHIP_RESET    1  /* for e3 chip only */
1464 #endif
1465
1466 #define CFG_SUPPORT_P2P_RSSI_QUERY        0
1467
1468 #define CFG_SHOW_MACADDR_SOURCE     1
1469
1470 #define CFG_SUPPORT_802_11V                    0  /* Support 802.11v Wireless Network Management */
1471 #define CFG_SUPPORT_802_11V_TIMING_MEASUREMENT 0
1472 #if (CFG_SUPPORT_802_11V_TIMING_MEASUREMENT == 1) && (CFG_SUPPORT_802_11V == 0)
1473     #error "CFG_SUPPORT_802_11V should be 1 once CFG_SUPPORT_802_11V_TIMING_MEASUREMENT equals to 1"
1474 #endif
1475 #if (CFG_SUPPORT_802_11V == 0)
1476 #define WNM_UNIT_TEST 0
1477 #endif
1478
1479 #define CFG_DRIVER_COMPOSE_ASSOC_REQ   1
1480
1481 #define CFG_STRICT_CHECK_CAPINFO_PRIVACY    0
1482
1483 #define CFG_SUPPORT_WFD                     1
1484
1485 #define CFG_SUPPORT_WFD_COMPOSE_IE          1
1486
1487 /*------------------------------------------------------------------------------
1488  * Flags of Packet Lifetime Profiling Mechanism
1489  *------------------------------------------------------------------------------
1490  */
1491 #define CFG_ENABLE_PKT_LIFETIME_PROFILE     1
1492
1493 #define CFG_ENABLE_PER_STA_STATISTICS       1
1494
1495 #define CFG_PRINT_RTP_PROFILE               0
1496 #define CFG_PRINT_RTP_SN_SKIP               0
1497
1498 /*------------------------------------------------------------------------------
1499  * Flags of bus error tolerance
1500  *------------------------------------------------------------------------------
1501  */
1502 #define CFG_FORCE_RESET_UNDER_BUS_ERROR     0
1503
1504 /*------------------------------------------------------------------------------
1505  * Build Date Code Integration
1506  *------------------------------------------------------------------------------
1507  */
1508 #define CFG_SUPPORT_BUILD_DATE_CODE 1
1509
1510 /*******************************************************************************
1511 *                             D A T A   T Y P E S
1512 ********************************************************************************
1513 */
1514
1515 /*******************************************************************************
1516 *                            P U B L I C   D A T A
1517 ********************************************************************************
1518 */
1519
1520 /*******************************************************************************
1521 *                           P R I V A T E   D A T A
1522 ********************************************************************************
1523 */
1524
1525 /*******************************************************************************
1526 *                                 M A C R O S
1527 ********************************************************************************
1528 */
1529
1530 /*******************************************************************************
1531 *                   F U N C T I O N   D E C L A R A T I O N S
1532 ********************************************************************************
1533 */
1534
1535 /*******************************************************************************
1536 *                              F U N C T I O N S
1537 ********************************************************************************
1538 */
1539 #endif /* _CONFIG_H */
1540
1541