odm_debug.c 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. *
  19. ******************************************************************************/
  20. //============================================================
  21. // include files
  22. //============================================================
  23. #include "odm_precomp.h"
  24. VOID
  25. ODM_InitDebugSetting(
  26. IN PDM_ODM_T pDM_Odm
  27. )
  28. {
  29. pDM_Odm->DebugLevel = ODM_DBG_LOUD;
  30. pDM_Odm->DebugComponents =
  31. \
  32. #if DBG
  33. //BB Functions
  34. // ODM_COMP_DIG |
  35. // ODM_COMP_RA_MASK |
  36. // ODM_COMP_DYNAMIC_TXPWR |
  37. // ODM_COMP_FA_CNT |
  38. // ODM_COMP_RSSI_MONITOR |
  39. // ODM_COMP_CCK_PD |
  40. // ODM_COMP_ANT_DIV |
  41. // ODM_COMP_PWR_SAVE |
  42. // ODM_COMP_PWR_TRAIN |
  43. // ODM_COMP_RATE_ADAPTIVE |
  44. // ODM_COMP_PATH_DIV |
  45. // ODM_COMP_DYNAMIC_PRICCA |
  46. // ODM_COMP_RXHP |
  47. // ODM_COMP_MP |
  48. // ODM_COMP_DYNAMIC_ATC |
  49. //MAC Functions
  50. // ODM_COMP_EDCA_TURBO |
  51. // ODM_COMP_EARLY_MODE |
  52. //RF Functions
  53. // ODM_COMP_TX_PWR_TRACK |
  54. // ODM_COMP_RX_GAIN_TRACK |
  55. // ODM_COMP_CALIBRATION |
  56. //Common
  57. // ODM_COMP_COMMON |
  58. // ODM_COMP_INIT |
  59. // ODM_COMP_PSD |
  60. #endif
  61. 0;
  62. }
  63. #if 0
  64. /*------------------Declare variable-----------------------
  65. // Define debug flag array for common debug print macro. */
  66. u4Byte ODM_DBGP_Type[ODM_DBGP_TYPE_MAX];
  67. /* Define debug print header for every service module. */
  68. ODM_DBGP_HEAD_T ODM_DBGP_Head;
  69. /*-----------------------------------------------------------------------------
  70. * Function: DBGP_Flag_Init
  71. *
  72. * Overview: Refresh all debug print control flag content to zero.
  73. *
  74. * Input: NONE
  75. *
  76. * Output: NONE
  77. *
  78. * Return: NONE
  79. *
  80. * Revised History:
  81. * When Who Remark
  82. * 10/20/2006 MHC Create Version 0.
  83. *
  84. *---------------------------------------------------------------------------*/
  85. extern void ODM_DBGP_Flag_Init(void)
  86. {
  87. u1Byte i;
  88. for (i = 0; i < ODM_DBGP_TYPE_MAX; i++)
  89. {
  90. ODM_DBGP_Type[i] = 0;
  91. }
  92. #ifndef ADSL_AP_BUILD_WORKAROUND
  93. #if DBG
  94. // 2010/06/02 MH Free build driver can not out any debug message!!!
  95. // Init Debug flag enable condition
  96. ODM_DBGP_Type[FINIT] = \
  97. // INIT_EEPROM |
  98. // INIT_TxPower |
  99. // INIT_IQK |
  100. // INIT_RF |
  101. 0;
  102. ODM_DBGP_Type[FDM] = \
  103. // WA_IOT |
  104. // DM_PWDB |
  105. // DM_Monitor |
  106. // DM_DIG |
  107. // DM_EDCA_Turbo |
  108. // DM_BT30 |
  109. 0;
  110. ODM_DBGP_Type[FIOCTL] = \
  111. // IOCTL_IRP |
  112. // IOCTL_IRP_DETAIL |
  113. // IOCTL_IRP_STATISTICS |
  114. // IOCTL_IRP_HANDLE |
  115. // IOCTL_BT_HCICMD |
  116. // IOCTL_BT_HCICMD_DETAIL |
  117. // IOCTL_BT_HCICMD_EXT |
  118. // IOCTL_BT_EVENT |
  119. // IOCTL_BT_EVENT_DETAIL |
  120. // IOCTL_BT_EVENT_PERIODICAL |
  121. // IOCTL_BT_TX_ACLDATA |
  122. // IOCTL_BT_TX_ACLDATA_DETAIL |
  123. // IOCTL_BT_RX_ACLDATA |
  124. // IOCTL_BT_RX_ACLDATA_DETAIL |
  125. // IOCTL_BT_TP |
  126. // IOCTL_STATE |
  127. // IOCTL_BT_LOGO |
  128. // IOCTL_CALLBACK_FUN |
  129. // IOCTL_PARSE_BT_PKT |
  130. 0;
  131. ODM_DBGP_Type[FBT] = \
  132. // BT_TRACE |
  133. 0;
  134. ODM_DBGP_Type[FEEPROM] = \
  135. // EEPROM_W |
  136. // EFUSE_PG |
  137. // EFUSE_READ_ALL |
  138. // EFUSE_ANALYSIS |
  139. // EFUSE_PG_DETAIL |
  140. 0;
  141. ODM_DBGP_Type[FDBG_CTRL] = \
  142. // DBG_CTRL_TRACE |
  143. // DBG_CTRL_INBAND_NOISE |
  144. 0;
  145. // 2011/07/20 MH Add for short cut
  146. ODM_DBGP_Type[FSHORT_CUT] = \
  147. // SHCUT_TX |
  148. // SHCUT_RX |
  149. 0;
  150. #endif
  151. #endif
  152. /* Define debug header of every service module. */
  153. //ODM_DBGP_Head.pMANS = "\n\r[MANS] ";
  154. //ODM_DBGP_Head.pRTOS = "\n\r[RTOS] ";
  155. //ODM_DBGP_Head.pALM = "\n\r[ALM] ";
  156. //ODM_DBGP_Head.pPEM = "\n\r[PEM] ";
  157. //ODM_DBGP_Head.pCMPK = "\n\r[CMPK] ";
  158. //ODM_DBGP_Head.pRAPD = "\n\r[RAPD] ";
  159. //ODM_DBGP_Head.pTXPB = "\n\r[TXPB] ";
  160. //ODM_DBGP_Head.pQUMG = "\n\r[QUMG] ";
  161. } /* DBGP_Flag_Init */
  162. #endif
  163. #if 0
  164. u4Byte GlobalDebugLevel = DBG_LOUD;
  165. //
  166. // 2009/06/22 MH Allow Fre build to print none debug info at init time.
  167. //
  168. #if DBG
  169. u8Byte GlobalDebugComponents = \
  170. // COMP_TRACE |
  171. // COMP_DBG |
  172. // COMP_INIT |
  173. // COMP_OID_QUERY |
  174. // COMP_OID_SET |
  175. // COMP_RECV |
  176. // COMP_SEND |
  177. // COMP_IO |
  178. // COMP_POWER |
  179. // COMP_MLME |
  180. // COMP_SCAN |
  181. // COMP_SYSTEM |
  182. // COMP_SEC |
  183. // COMP_AP |
  184. // COMP_TURBO |
  185. // COMP_QOS |
  186. // COMP_AUTHENTICATOR |
  187. // COMP_BEACON |
  188. // COMP_ANTENNA |
  189. // COMP_RATE |
  190. // COMP_EVENTS |
  191. // COMP_FPGA |
  192. // COMP_RM |
  193. // COMP_MP |
  194. // COMP_RXDESC |
  195. // COMP_CKIP |
  196. // COMP_DIG |
  197. // COMP_TXAGC |
  198. // COMP_HIPWR |
  199. // COMP_HALDM |
  200. // COMP_RSNA |
  201. // COMP_INDIC |
  202. // COMP_LED |
  203. // COMP_RF |
  204. // COMP_DUALMACSWITCH |
  205. // COMP_EASY_CONCURRENT |
  206. //1!!!!!!!!!!!!!!!!!!!!!!!!!!!
  207. //1//1Attention Please!!!<11n or 8190 specific code should be put below this line>
  208. //1!!!!!!!!!!!!!!!!!!!!!!!!!!!
  209. // COMP_HT |
  210. // COMP_POWER_TRACKING |
  211. // COMP_RX_REORDER |
  212. // COMP_AMSDU |
  213. // COMP_WPS |
  214. // COMP_RATR |
  215. // COMP_RESET |
  216. // COMP_CMD |
  217. // COMP_EFUSE |
  218. // COMP_MESH_INTERWORKING |
  219. // COMP_CCX |
  220. // COMP_IOCTL |
  221. // COMP_GP |
  222. // COMP_TXAGG |
  223. // COMP_BB_POWERSAVING |
  224. // COMP_SWAS |
  225. // COMP_P2P |
  226. // COMP_MUX |
  227. // COMP_FUNC |
  228. // COMP_TDLS |
  229. // COMP_OMNIPEEK |
  230. // COMP_PSD |
  231. 0;
  232. #else
  233. u8Byte GlobalDebugComponents = 0;
  234. #endif
  235. #if (RT_PLATFORM==PLATFORM_LINUX)
  236. #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
  237. EXPORT_SYMBOL(GlobalDebugComponents);
  238. EXPORT_SYMBOL(GlobalDebugLevel);
  239. #endif
  240. #endif
  241. /*------------------Declare variable-----------------------
  242. // Define debug flag array for common debug print macro. */
  243. u4Byte DBGP_Type[DBGP_TYPE_MAX];
  244. /* Define debug print header for every service module. */
  245. DBGP_HEAD_T DBGP_Head;
  246. /*-----------------------------------------------------------------------------
  247. * Function: DBGP_Flag_Init
  248. *
  249. * Overview: Refresh all debug print control flag content to zero.
  250. *
  251. * Input: NONE
  252. *
  253. * Output: NONE
  254. *
  255. * Return: NONE
  256. *
  257. * Revised History:
  258. * When Who Remark
  259. * 10/20/2006 MHC Create Version 0.
  260. *
  261. *---------------------------------------------------------------------------*/
  262. extern void DBGP_Flag_Init(void)
  263. {
  264. u1Byte i;
  265. for (i = 0; i < DBGP_TYPE_MAX; i++)
  266. {
  267. DBGP_Type[i] = 0;
  268. }
  269. #if DBG
  270. // 2010/06/02 MH Free build driver can not out any debug message!!!
  271. // Init Debug flag enable condition
  272. DBGP_Type[FINIT] = \
  273. // INIT_EEPROM |
  274. // INIT_TxPower |
  275. // INIT_IQK |
  276. // INIT_RF |
  277. 0;
  278. DBGP_Type[FDM] = \
  279. // WA_IOT |
  280. // DM_PWDB |
  281. // DM_Monitor |
  282. // DM_DIG |
  283. // DM_EDCA_Turbo |
  284. // DM_BT30 |
  285. 0;
  286. DBGP_Type[FIOCTL] = \
  287. // IOCTL_IRP |
  288. // IOCTL_IRP_DETAIL |
  289. // IOCTL_IRP_STATISTICS |
  290. // IOCTL_IRP_HANDLE |
  291. // IOCTL_BT_HCICMD |
  292. // IOCTL_BT_HCICMD_DETAIL |
  293. // IOCTL_BT_HCICMD_EXT |
  294. // IOCTL_BT_EVENT |
  295. // IOCTL_BT_EVENT_DETAIL |
  296. // IOCTL_BT_EVENT_PERIODICAL |
  297. // IOCTL_BT_TX_ACLDATA |
  298. // IOCTL_BT_TX_ACLDATA_DETAIL |
  299. // IOCTL_BT_RX_ACLDATA |
  300. // IOCTL_BT_RX_ACLDATA_DETAIL |
  301. // IOCTL_BT_TP |
  302. // IOCTL_STATE |
  303. // IOCTL_BT_LOGO |
  304. // IOCTL_CALLBACK_FUN |
  305. // IOCTL_PARSE_BT_PKT |
  306. 0;
  307. DBGP_Type[FBT] = \
  308. // BT_TRACE |
  309. 0;
  310. DBGP_Type[FEEPROM] = \
  311. // EEPROM_W |
  312. // EFUSE_PG |
  313. // EFUSE_READ_ALL |
  314. // EFUSE_ANALYSIS |
  315. // EFUSE_PG_DETAIL |
  316. 0;
  317. DBGP_Type[FDBG_CTRL] = \
  318. // DBG_CTRL_TRACE |
  319. // DBG_CTRL_INBAND_NOISE |
  320. 0;
  321. // 2011/07/20 MH Add for short cut
  322. DBGP_Type[FSHORT_CUT] = \
  323. // SHCUT_TX |
  324. // SHCUT_RX |
  325. 0;
  326. #endif
  327. /* Define debug header of every service module. */
  328. DBGP_Head.pMANS = "\n\r[MANS] ";
  329. DBGP_Head.pRTOS = "\n\r[RTOS] ";
  330. DBGP_Head.pALM = "\n\r[ALM] ";
  331. DBGP_Head.pPEM = "\n\r[PEM] ";
  332. DBGP_Head.pCMPK = "\n\r[CMPK] ";
  333. DBGP_Head.pRAPD = "\n\r[RAPD] ";
  334. DBGP_Head.pTXPB = "\n\r[TXPB] ";
  335. DBGP_Head.pQUMG = "\n\r[QUMG] ";
  336. } /* DBGP_Flag_Init */
  337. /*-----------------------------------------------------------------------------
  338. * Function: DBG_PrintAllFlag
  339. *
  340. * Overview: Print All debug flag
  341. *
  342. * Input: NONE
  343. *
  344. * Output: NONE
  345. *
  346. * Return: NONE
  347. *
  348. * Revised History:
  349. * When Who Remark
  350. * 12/10/2008 MHC Create Version 0.
  351. *
  352. *---------------------------------------------------------------------------*/
  353. extern void DBG_PrintAllFlag(void)
  354. {
  355. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("DBGFLAG 0 FQoS\n"));
  356. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("DBGFLAG 1 FTX\n"));
  357. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("DBGFLAG 2 FRX\n"));
  358. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("DBGFLAG 3 FSEC\n"));
  359. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("DBGFLAG 4 FMGNT\n"));
  360. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("DBGFLAG 5 FMLME\n"));
  361. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("DBGFLAG 6 FRESOURCE\n"));
  362. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("DBGFLAG 7 FBEACON\n"));
  363. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("DBGFLAG 8 FISR\n"));
  364. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("DBGFLAG 9 FPHY\n"));
  365. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("DBGFLAG 11 FMP\n"));
  366. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("DBGFLAG 12 FPWR\n"));
  367. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("DBGFLAG 13 FDM\n"));
  368. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("DBGFLAG 14 FDBG_CTRL\n"));
  369. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("DBGFLAG 15 FC2H\n"));
  370. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("DBGFLAG 16 FBT\n"));
  371. } // DBG_PrintAllFlag
  372. extern void DBG_PrintAllComp(void)
  373. {
  374. u1Byte i;
  375. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("GlobalDebugComponents Definition\n"));
  376. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT0 COMP_TRACE\n"));
  377. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT1 COMP_DBG\n"));
  378. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT2 COMP_INIT\n"));
  379. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT3 COMP_OID_QUERY\n"));
  380. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT4 COMP_OID_SET\n"));
  381. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT5 COMP_RECV\n"));
  382. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT6 COMP_SEND\n"));
  383. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT7 COMP_IO\n"));
  384. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT8 COMP_POWER\n"));
  385. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT9 COMP_MLME\n"));
  386. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT10 COMP_SCAN\n"));
  387. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT11 COMP_SYSTEM\n"));
  388. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT12 COMP_SEC\n"));
  389. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT13 COMP_AP\n"));
  390. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT14 COMP_TURBO\n"));
  391. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT15 COMP_QOS\n"));
  392. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT16 COMP_AUTHENTICATOR\n"));
  393. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT17 COMP_BEACON\n"));
  394. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT18 COMP_BEACON\n"));
  395. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT19 COMP_RATE\n"));
  396. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT20 COMP_EVENTS\n"));
  397. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT21 COMP_FPGA\n"));
  398. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT22 COMP_RM\n"));
  399. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT23 COMP_MP\n"));
  400. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT24 COMP_RXDESC\n"));
  401. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT25 COMP_CKIP\n"));
  402. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT26 COMP_DIG\n"));
  403. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT27 COMP_TXAGC\n"));
  404. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT28 COMP_HIPWR\n"));
  405. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT29 COMP_HALDM\n"));
  406. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT30 COMP_RSNA\n"));
  407. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT31 COMP_INDIC\n"));
  408. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT32 COMP_LED\n"));
  409. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT33 COMP_RF\n"));
  410. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT34 COMP_HT\n"));
  411. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT35 COMP_POWER_TRACKING\n"));
  412. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT36 COMP_POWER_TRACKING\n"));
  413. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT37 COMP_AMSDU\n"));
  414. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT38 COMP_WPS\n"));
  415. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT39 COMP_RATR\n"));
  416. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT40 COMP_RESET\n"));
  417. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT41 COMP_CMD\n"));
  418. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT42 COMP_EFUSE\n"));
  419. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT43 COMP_MESH_INTERWORKING\n"));
  420. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT43 COMP_CCX\n"));
  421. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("GlobalDebugComponents = %"i64fmt"x\n", GlobalDebugComponents));
  422. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("Enable DBG COMP ="));
  423. for (i = 0; i < 64; i++)
  424. {
  425. if (GlobalDebugComponents & ((u8Byte)0x1 << i) )
  426. {
  427. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT%02d |\n", i));
  428. }
  429. }
  430. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("\n"));
  431. } // DBG_PrintAllComp
  432. /*-----------------------------------------------------------------------------
  433. * Function: DBG_PrintFlagEvent
  434. *
  435. * Overview: Print dedicated debug flag event
  436. *
  437. * Input: NONE
  438. *
  439. * Output: NONE
  440. *
  441. * Return: NONE
  442. *
  443. * Revised History:
  444. * When Who Remark
  445. * 12/10/2008 MHC Create Version 0.
  446. *
  447. *---------------------------------------------------------------------------*/
  448. extern void DBG_PrintFlagEvent(u1Byte DbgFlag)
  449. {
  450. switch(DbgFlag)
  451. {
  452. case FQoS:
  453. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 0 QoS_INIT\n"));
  454. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 1 QoS_VISTA\n"));
  455. break;
  456. case FTX:
  457. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 0 TX_DESC\n"));
  458. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 1 TX_DESC_TID\n"));
  459. break;
  460. case FRX:
  461. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 0 RX_DATA\n"));
  462. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 1 RX_PHY_STS\n"));
  463. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 2 RX_PHY_SS\n"));
  464. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 3 RX_PHY_SQ\n"));
  465. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 4 RX_PHY_ASTS\n"));
  466. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 5 RX_ERR_LEN\n"));
  467. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 6 RX_DEFRAG\n"));
  468. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 7 RX_ERR_RATE\n"));
  469. break;
  470. case FSEC:
  471. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("NA\n"));
  472. break;
  473. case FMGNT:
  474. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("NA\n"));
  475. break;
  476. case FMLME:
  477. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 0 MEDIA_STS\n"));
  478. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 1 LINK_STS\n"));
  479. break;
  480. case FRESOURCE:
  481. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 0 OS_CHK\n"));
  482. break;
  483. case FBEACON:
  484. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 0 BCN_SHOW\n"));
  485. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 1 BCN_PEER\n"));
  486. break;
  487. case FISR:
  488. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 0 ISR_CHK\n"));
  489. break;
  490. case FPHY:
  491. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 0 PHY_BBR\n"));
  492. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 1 PHY_BBW\n"));
  493. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 2 PHY_RFR\n"));
  494. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 3 PHY_RFW\n"));
  495. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 4 PHY_MACR\n"));
  496. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 5 PHY_MACW\n"));
  497. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 6 PHY_ALLR\n"));
  498. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 7 PHY_ALLW\n"));
  499. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 8 PHY_TXPWR\n"));
  500. break;
  501. case FMP:
  502. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 0 MP_RX\n"));
  503. break;
  504. case FEEPROM:
  505. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 0 EEPROM_W\n"));
  506. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 1 EFUSE_PG\n"));
  507. break;
  508. case FPWR:
  509. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 0 LPS\n"));
  510. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 1 IPS\n"));
  511. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 2 PWRSW\n"));
  512. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 3 PWRHW\n"));
  513. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 4 PWRHAL\n"));
  514. break;
  515. case FDM:
  516. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 0 WA_IOT\n"));
  517. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 1 DM_PWDB\n"));
  518. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 2 DM_Monitor\n"));
  519. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 3 DM_DIG\n"));
  520. break;
  521. case FDBG_CTRL:
  522. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 0 DBG_CTRL_TRACE\n"));
  523. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 1 DBG_CTRL_INBAND_NOISE\n"));
  524. break;
  525. case FC2H:
  526. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 0 C2H_Summary\n"));
  527. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 1 C2H_PacketData\n"));
  528. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 2 C2H_ContentData\n"));
  529. break;
  530. case FBT:
  531. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 0 BT_TRACE\n"));
  532. ODM_RT_TRACE(pDM_Odm,COMP_CMD, DBG_LOUD, ("BIT 1 BT_RFPoll\n"));
  533. break;
  534. default:
  535. break;
  536. }
  537. } // DBG_PrintFlagEvent
  538. extern void DBG_DumpMem(const u1Byte DbgComp,
  539. const u1Byte DbgLevel,
  540. pu1Byte pMem,
  541. u2Byte Len)
  542. {
  543. u2Byte i;
  544. for (i=0;i<((Len>>3) + 1);i++)
  545. {
  546. ODM_RT_TRACE(pDM_Odm,DbgComp, DbgLevel, ("%02X %02X %02X %02X %02X %02X %02X %02X\n",
  547. *(pMem+(i*8)), *(pMem+(i*8+1)), *(pMem+(i*8+2)), *(pMem+(i*8+3)),
  548. *(pMem+(i*8+4)), *(pMem+(i*8+5)), *(pMem+(i*8+6)), *(pMem+(i*8+7))));
  549. }
  550. }
  551. #endif