precomp.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389
  1. /*
  2. ** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/precomp.h#2
  3. */
  4. /*! \file precomp.h
  5. \brief Collection of most compiler flags are described here.
  6. In this file we collect all compiler flags and detail the driver behavior if
  7. enable/disable such switch or adjust numeric parameters.
  8. */
  9. /*
  10. ** Log: precomp.h
  11. *
  12. * 07 17 2012 yuche.tsai
  13. * NULL
  14. * Compile no error before trial run.
  15. *
  16. * 01 05 2012 tsaiyuan.hsu
  17. * [WCXRP00001157] [MT6620 Wi-Fi][FW][DRV] add timing measurement support for 802.11v
  18. * add timing measurement support for 802.11v.
  19. *
  20. * 08 15 2011 cp.wu
  21. * [WCXRP00000851] [MT6628 Wi-Fi][Driver] Add HIFSYS related definition to driver source tree
  22. * add MT6628-specific definitions.
  23. *
  24. * 04 18 2011 terry.wu
  25. * [WCXRP00000660] [MT6620 Wi-Fi][Driver] Remove flag CFG_WIFI_DIRECT_MOVED
  26. * Remove flag CFG_WIFI_DIRECT_MOVED.
  27. *
  28. * 03 15 2011 eddie.chen
  29. * [WCXRP00000554] [MT6620 Wi-Fi][DRV] Add sw control debug counter
  30. * Add sw debug counter for QM.
  31. *
  32. * 01 27 2011 tsaiyuan.hsu
  33. * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support
  34. * add roaming fsm
  35. * 1. not support 11r, only use strength of signal to determine roaming.
  36. * 2. not enable CFG_SUPPORT_ROAMING until completion of full test.
  37. * 3. in 6620, adopt work-around to avoid sign extension problem of cck of hw
  38. * 4. assume that change of link quality in smooth way.
  39. *
  40. * 12 13 2010 cp.wu
  41. * [WCXRP00000260] [MT6620 Wi-Fi][Driver][Firmware] Create V1.1 branch for both firmware and driver
  42. * create branch for Wi-Fi driver v1.1
  43. *
  44. * 10 07 2010 cp.wu
  45. * [WCXRP00000083] [MT5931][Driver][FW] Add necessary logic for MT5931 first connection
  46. * add firmware download for MT5931.
  47. *
  48. * 10 05 2010 cp.wu
  49. * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check
  50. * 1) add NVRAM access API
  51. * 2) fake scanning result when NVRAM doesn't exist and/or version mismatch. (off by compiler option)
  52. * 3) add OID implementation for NVRAM read/write service
  53. *
  54. * 09 21 2010 kevin.huang
  55. * [WCXRP00000052] [MT6620 Wi-Fi][Driver] Eliminate Linux Compile Warning
  56. * Isolate P2P related function for Hardware Software Bundle
  57. *
  58. * 09 14 2010 chinghwa.yu
  59. * NULL
  60. * Fix BOW_FSM_INFO_T dependence.
  61. *
  62. * 09 03 2010 kevin.huang
  63. * NULL
  64. * Refine #include sequence and solve recursive/nested #include issue
  65. *
  66. * 07 20 2010 wh.su
  67. *
  68. * adding the wapi code.
  69. *
  70. * 07 08 2010 cp.wu
  71. *
  72. * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
  73. *
  74. * 07 08 2010 cm.chang
  75. * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
  76. * Check draft RLM code for HT cap
  77. *
  78. * 07 01 2010 cm.chang
  79. * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
  80. * Modify CNM message handler for new flow
  81. *
  82. * 06 28 2010 cm.chang
  83. * [WPD00003841][LITE Driver] Migrate RLM/CNM to host driver
  84. * 1st draft code for RLM module
  85. *
  86. * 06 19 2010 wh.su
  87. * [WPD00003840][MT6620 5931] Security migration
  88. * consdier the concurrent network setting.
  89. *
  90. * 06 18 2010 wh.su
  91. * [WPD00003840][MT6620 5931] Security migration
  92. * migration the security related function from firmware.
  93. *
  94. * 06 18 2010 wh.su
  95. * [WPD00003840][MT6620 5931] Security migration
  96. * migration from MT6620 firmware.
  97. *
  98. * 06 08 2010 cp.wu
  99. * [WPD00003833][MT6620 and MT5931] Driver migration
  100. * add hem_mbox.c and cnm_mem.h (but disabled some feature) for further migration
  101. *
  102. * 06 07 2010 cp.wu
  103. * [WPD00003833][MT6620 and MT5931] Driver migration
  104. * merge cnm_scan.h and hem_mbox.h
  105. *
  106. * 06 07 2010 cp.wu
  107. * [WPD00003833][MT6620 and MT5931] Driver migration
  108. * merge wifi_var.h, precomp.h, cnm_timer.h (data type only)
  109. *
  110. * 06 06 2010 kevin.huang
  111. * [WPD00003832][MT6620 5931] Create driver base
  112. * [MT6620 5931] Create driver base
  113. *
  114. * 05 17 2010 cp.wu
  115. * [WPD00003831][MT6620 Wi-Fi] Add framework for Wi-Fi Direct support
  116. * 1) add timeout handler mechanism for pending command packets
  117. * 2) add p2p add/removal key
  118. *
  119. * 04 13 2010 cp.wu
  120. * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support
  121. * add framework for BT-over-Wi-Fi support.
  122. * * * * * * * * * * * 1) prPendingCmdInfo is replaced by queue for multiple handler capability
  123. * * * * * * * * * * * 2) command sequence number is now increased atomically
  124. * * * * * * * * * * * 3) private data could be hold and taken use for other purpose
  125. *
  126. * 03 16 2010 cp.wu
  127. * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support
  128. * build up basic data structure and definitions to support BT-over-WiFi
  129. *
  130. * 02 08 2010 cp.wu
  131. * [WPD00001943]Create WiFi test driver framework on WinXP
  132. * prepare for implementing fw download logic
  133. *
  134. * 01 27 2010 wh.su
  135. * [WPD00003816][MT6620 Wi-Fi] Adding the security support
  136. * .
  137. ** \main\maintrunk.MT6620WiFiDriver_Prj\9 2009-12-08 11:30:58 GMT mtk02752
  138. ** add rftest.h for implementing RF test mode in driver land
  139. ** \main\maintrunk.MT6620WiFiDriver_Prj\8 2009-11-23 22:02:00 GMT mtk02468
  140. ** Added que_mgt.h
  141. ** \main\maintrunk.MT6620WiFiDriver_Prj\7 2009-10-13 21:58:36 GMT mtk01084
  142. ** update for new macro define
  143. ** \main\maintrunk.MT6620WiFiDriver_Prj\6 2009-04-21 09:40:11 GMT mtk01461
  144. ** Add nic_cmd_event.h
  145. ** \main\maintrunk.MT6620WiFiDriver_Prj\5 2009-04-17 20:00:26 GMT mtk01461
  146. ** Add cmd_buf.h
  147. ** \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-03-19 18:32:44 GMT mtk01084
  148. ** update for basic power management functions
  149. ** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-03-16 09:08:25 GMT mtk01461
  150. ** Update TX PATH API
  151. ** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-03-10 20:11:38 GMT mtk01426
  152. ** Init for develop
  153. **
  154. */
  155. #ifndef _PRECOMP_H
  156. #define _PRECOMP_H
  157. /*******************************************************************************
  158. * C O M P I L E R F L A G S
  159. ********************************************************************************
  160. */
  161. /*******************************************************************************
  162. * E X T E R N A L R E F E R E N C E S
  163. ********************************************************************************
  164. */
  165. #include "gl_os.h" /* Include "config.h" */
  166. #if CFG_ENABLE_WIFI_DIRECT
  167. #include "gl_p2p_os.h"
  168. #endif
  169. #include "debug.h"
  170. #include "link.h"
  171. #include "queue.h"
  172. /*------------------------------------------------------------------------------
  173. * .\include\mgmt
  174. *------------------------------------------------------------------------------
  175. */
  176. #include "wlan_typedef.h"
  177. #include "mac.h"
  178. /* Dependency: mac.h (MAC_ADDR_LEN) */
  179. #include "wlan_def.h"
  180. #if CFG_SUPPORT_SWCR
  181. #include "swcr.h"
  182. #endif
  183. /*------------------------------------------------------------------------------
  184. * .\include\nic
  185. *------------------------------------------------------------------------------
  186. */
  187. /* Dependency: wlan_def.h (ENUM_NETWORK_TYPE_T) */
  188. #include "cmd_buf.h"
  189. /* Dependency: mac.h (MAC_ADDR_LEN) */
  190. #include "nic_cmd_event.h"
  191. /* Dependency: nic_cmd_event.h (P_EVENT_CONNECTION_STATUS) */
  192. #include "nic.h"
  193. #include "nic_init_cmd_event.h"
  194. #include "hif_rx.h"
  195. #include "hif_tx.h"
  196. #include "nic_tx.h"
  197. /* Dependency: hif_rx.h (P_HIF_RX_HEADER_T) */
  198. #include "nic_rx.h"
  199. #if CFG_ENABLE_WIFI_DIRECT
  200. #include "p2p_typedef.h"
  201. #include "p2p_cmd_buf.h"
  202. #include "p2p_nic_cmd_event.h"
  203. #include "p2p_mac.h"
  204. #include "p2p_nic.h"
  205. #endif
  206. /*------------------------------------------------------------------------------
  207. * .\include\mgmt
  208. *------------------------------------------------------------------------------
  209. */
  210. #include "hem_mbox.h"
  211. #include "scan.h"
  212. #include "bss.h"
  213. #include "wlan_lib.h"
  214. #include "wlan_oid.h"
  215. #include "wlan_bow.h"
  216. #if CFG_ENABLE_WIFI_DIRECT
  217. #include "wlan_p2p.h"
  218. #endif
  219. #include "hal.h"
  220. #if defined(MT6620)
  221. #include "mt6620_reg.h"
  222. #elif defined(MT6628)
  223. /* #include "mt6628_reg.h" */
  224. #include "mtreg.h"
  225. #endif
  226. #include "rlm.h"
  227. #include "rlm_domain.h"
  228. #include "rlm_protection.h"
  229. #include "rlm_obss.h"
  230. #include "rate.h"
  231. #if CFG_SUPPORT_802_11V
  232. #include "wnm.h"
  233. #endif
  234. #include "aa_fsm.h"
  235. #include "cnm_timer.h"
  236. #include "que_mgt.h"
  237. #if CFG_ENABLE_BT_OVER_WIFI
  238. #include "bow.h"
  239. #include "bow_fsm.h"
  240. #endif
  241. #include "pwr_mgt.h"
  242. #if (CFG_SUPPORT_STATISTICS == 1)
  243. #include "stats.h"
  244. #endif /* CFG_SUPPORT_STATISTICS */
  245. #include "cnm.h"
  246. /* Dependency: aa_fsm.h (ENUM_AA_STATE_T), p2p_fsm.h (WPS_ATTRI_MAX_LEN_DEVICE_NAME) */
  247. #include "cnm_mem.h"
  248. #include "cnm_scan.h"
  249. #if CFG_ENABLE_WIFI_DIRECT
  250. #include "p2p_rlm_obss.h"
  251. #include "p2p_bss.h"
  252. #include "p2p.h"
  253. #include "p2p_fsm.h"
  254. #include "p2p_scan.h"
  255. #include "p2p_state.h"
  256. #include "p2p_func.h"
  257. #include "p2p_rlm.h"
  258. #include "p2p_assoc.h"
  259. #include "p2p_ie.h"
  260. #endif
  261. #include "privacy.h"
  262. #include "mib.h"
  263. #include "auth.h"
  264. #include "assoc.h"
  265. #if CFG_SUPPORT_ROAMING
  266. #include "roaming_fsm.h"
  267. #endif /* CFG_SUPPORT_ROAMING */
  268. #include "ais_fsm.h"
  269. #include "adapter.h"
  270. #include "que_mgt.h"
  271. #include "rftest.h"
  272. #if CFG_RSN_MIGRATION
  273. #include "rsn.h"
  274. #include "sec_fsm.h"
  275. #endif
  276. #if CFG_SUPPORT_WAPI
  277. #include "wapi.h"
  278. #endif
  279. /*------------------------------------------------------------------------------
  280. * NVRAM structure
  281. *------------------------------------------------------------------------------
  282. */
  283. #include "CFG_Wifi_File.h"
  284. #if CFG_ENABLE_WIFI_DIRECT
  285. #include "gl_p2p_kal.h"
  286. #endif
  287. typedef int (*set_p2p_mode) (struct net_device *netdev, PARAM_CUSTOM_P2P_SET_STRUCT_T p2pmode);
  288. typedef void (*set_dbg_level) (unsigned char modules[DBG_MODULE_NUM]);
  289. extern void wlanRegisterNotifier(void);
  290. extern void wlanUnregisterNotifier(void);
  291. extern void register_set_p2p_mode_handler(set_p2p_mode handler);
  292. extern void register_set_dbg_level_handler(set_dbg_level handler);
  293. #if CFG_TC1_FEATURE
  294. #define NIC_INF_NAME_IN_AP_MODE "legacy%d"
  295. extern volatile int wlan_if_changed;
  296. #endif
  297. extern BOOLEAN fgIsResetting;
  298. extern UINT_8 g_aucBufIpAddr[32];
  299. extern UINT_8 aucDebugModule[];
  300. /*******************************************************************************
  301. * C O N S T A N T S
  302. ********************************************************************************
  303. */
  304. /*******************************************************************************
  305. * D A T A T Y P E S
  306. ********************************************************************************
  307. */
  308. /*******************************************************************************
  309. * P U B L I C D A T A
  310. ********************************************************************************
  311. */
  312. /*******************************************************************************
  313. * P R I V A T E D A T A
  314. ********************************************************************************
  315. */
  316. /*******************************************************************************
  317. * M A C R O S
  318. ********************************************************************************
  319. */
  320. /*******************************************************************************
  321. * F U N C T I O N D E C L A R A T I O N S
  322. ********************************************************************************
  323. */
  324. /*******************************************************************************
  325. * F U N C T I O N S
  326. ********************************************************************************
  327. */
  328. #endif /* _PRECOMP_H */