rtllib_debug.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /******************************************************************************
  2. * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
  3. *
  4. * Based on the r8180 driver, which is:
  5. * Copyright 2004-2005 Andrea Merello <andrea.merello@gmail.com>, et al.
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of version 2 of the GNU General Public License as
  8. * published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. * more details.
  14. *
  15. * The full GNU General Public License is included in this distribution in the
  16. * file called LICENSE.
  17. *
  18. * Contact Information:
  19. * wlanfae <wlanfae@realtek.com>
  20. ******************************************************************************/
  21. #ifndef _RTL_DEBUG_H
  22. #define _RTL_DEBUG_H
  23. /* Allow files to override DRV_NAME */
  24. #ifndef DRV_NAME
  25. #define DRV_NAME "rtllib_92e"
  26. #endif
  27. extern u32 rt_global_debug_component;
  28. /* These are the defines for rt_global_debug_component */
  29. enum RTL_DEBUG {
  30. COMP_TRACE = (1 << 0),
  31. COMP_DBG = (1 << 1),
  32. COMP_INIT = (1 << 2),
  33. COMP_RECV = (1 << 3),
  34. COMP_POWER = (1 << 6),
  35. COMP_SWBW = (1 << 8),
  36. COMP_SEC = (1 << 9),
  37. COMP_LPS = (1 << 10),
  38. COMP_QOS = (1 << 11),
  39. COMP_RATE = (1 << 12),
  40. COMP_RXDESC = (1 << 13),
  41. COMP_PHY = (1 << 14),
  42. COMP_DIG = (1 << 15),
  43. COMP_TXAGC = (1 << 16),
  44. COMP_HALDM = (1 << 17),
  45. COMP_POWER_TRACKING = (1 << 18),
  46. COMP_CH = (1 << 19),
  47. COMP_RF = (1 << 20),
  48. COMP_FIRMWARE = (1 << 21),
  49. COMP_RESET = (1 << 23),
  50. COMP_CMDPKT = (1 << 24),
  51. COMP_SCAN = (1 << 25),
  52. COMP_PS = (1 << 26),
  53. COMP_DOWN = (1 << 27),
  54. COMP_INTR = (1 << 28),
  55. COMP_ERR = (1 << 31)
  56. };
  57. #define RT_TRACE(component, x, args...) \
  58. do { \
  59. if (rt_global_debug_component & component) \
  60. printk(KERN_DEBUG DRV_NAME ":" x "\n", ##args);\
  61. } while (0)
  62. #endif