diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/debug.h')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/debug.h | 49 |
1 files changed, 41 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/debug.h b/drivers/net/wireless/ath/ath6kl/debug.h index 66b399962f01..9288a3ce1e39 100644 --- a/drivers/net/wireless/ath/ath6kl/debug.h +++ b/drivers/net/wireless/ath/ath6kl/debug.h | |||
@@ -34,8 +34,12 @@ enum ATH6K_DEBUG_MASK { | |||
34 | ATH6KL_DBG_TRC = BIT(11), /* generic func tracing */ | 34 | ATH6KL_DBG_TRC = BIT(11), /* generic func tracing */ |
35 | ATH6KL_DBG_SCATTER = BIT(12), /* hif scatter tracing */ | 35 | ATH6KL_DBG_SCATTER = BIT(12), /* hif scatter tracing */ |
36 | ATH6KL_DBG_WLAN_CFG = BIT(13), /* cfg80211 i/f file tracing */ | 36 | ATH6KL_DBG_WLAN_CFG = BIT(13), /* cfg80211 i/f file tracing */ |
37 | ATH6KL_DBG_RAW_BYTES = BIT(14), /* dump tx/rx and wmi frames */ | 37 | ATH6KL_DBG_RAW_BYTES = BIT(14), /* dump tx/rx frames */ |
38 | ATH6KL_DBG_AGGR = BIT(15), /* aggregation */ | 38 | ATH6KL_DBG_AGGR = BIT(15), /* aggregation */ |
39 | ATH6KL_DBG_SDIO = BIT(16), | ||
40 | ATH6KL_DBG_SDIO_DUMP = BIT(17), | ||
41 | ATH6KL_DBG_BOOT = BIT(18), /* driver init and fw boot */ | ||
42 | ATH6KL_DBG_WMI_DUMP = BIT(19), | ||
39 | ATH6KL_DBG_ANY = 0xffffffff /* enable all logs */ | 43 | ATH6KL_DBG_ANY = 0xffffffff /* enable all logs */ |
40 | }; | 44 | }; |
41 | 45 | ||
@@ -52,6 +56,10 @@ extern int ath6kl_printk(const char *level, const char *fmt, ...) | |||
52 | 56 | ||
53 | #define AR_DBG_LVL_CHECK(mask) (debug_mask & mask) | 57 | #define AR_DBG_LVL_CHECK(mask) (debug_mask & mask) |
54 | 58 | ||
59 | enum ath6kl_war { | ||
60 | ATH6KL_WAR_INVALID_RATE, | ||
61 | }; | ||
62 | |||
55 | #ifdef CONFIG_ATH6KL_DEBUG | 63 | #ifdef CONFIG_ATH6KL_DEBUG |
56 | #define ath6kl_dbg(mask, fmt, ...) \ | 64 | #define ath6kl_dbg(mask, fmt, ...) \ |
57 | ({ \ | 65 | ({ \ |
@@ -65,12 +73,14 @@ extern int ath6kl_printk(const char *level, const char *fmt, ...) | |||
65 | }) | 73 | }) |
66 | 74 | ||
67 | static inline void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask, | 75 | static inline void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask, |
68 | const char *msg, const void *buf, | 76 | const char *msg, const char *prefix, |
69 | size_t len) | 77 | const void *buf, size_t len) |
70 | { | 78 | { |
71 | if (debug_mask & mask) { | 79 | if (debug_mask & mask) { |
72 | ath6kl_dbg(mask, "%s\n", msg); | 80 | if (msg) |
73 | print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, buf, len); | 81 | ath6kl_dbg(mask, "%s\n", msg); |
82 | |||
83 | print_hex_dump_bytes(prefix, DUMP_PREFIX_OFFSET, buf, len); | ||
74 | } | 84 | } |
75 | } | 85 | } |
76 | 86 | ||
@@ -78,6 +88,11 @@ void ath6kl_dump_registers(struct ath6kl_device *dev, | |||
78 | struct ath6kl_irq_proc_registers *irq_proc_reg, | 88 | struct ath6kl_irq_proc_registers *irq_proc_reg, |
79 | struct ath6kl_irq_enable_reg *irq_en_reg); | 89 | struct ath6kl_irq_enable_reg *irq_en_reg); |
80 | void dump_cred_dist_stats(struct htc_target *target); | 90 | void dump_cred_dist_stats(struct htc_target *target); |
91 | void ath6kl_debug_fwlog_event(struct ath6kl *ar, const void *buf, size_t len); | ||
92 | void ath6kl_debug_war(struct ath6kl *ar, enum ath6kl_war war); | ||
93 | int ath6kl_debug_init(struct ath6kl *ar); | ||
94 | void ath6kl_debug_cleanup(struct ath6kl *ar); | ||
95 | |||
81 | #else | 96 | #else |
82 | static inline int ath6kl_dbg(enum ATH6K_DEBUG_MASK dbg_mask, | 97 | static inline int ath6kl_dbg(enum ATH6K_DEBUG_MASK dbg_mask, |
83 | const char *fmt, ...) | 98 | const char *fmt, ...) |
@@ -86,8 +101,8 @@ static inline int ath6kl_dbg(enum ATH6K_DEBUG_MASK dbg_mask, | |||
86 | } | 101 | } |
87 | 102 | ||
88 | static inline void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask, | 103 | static inline void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask, |
89 | const char *msg, const void *buf, | 104 | const char *msg, const char *prefix, |
90 | size_t len) | 105 | const void *buf, size_t len) |
91 | { | 106 | { |
92 | } | 107 | } |
93 | 108 | ||
@@ -100,6 +115,24 @@ static inline void ath6kl_dump_registers(struct ath6kl_device *dev, | |||
100 | static inline void dump_cred_dist_stats(struct htc_target *target) | 115 | static inline void dump_cred_dist_stats(struct htc_target *target) |
101 | { | 116 | { |
102 | } | 117 | } |
103 | #endif | ||
104 | 118 | ||
119 | static inline void ath6kl_debug_fwlog_event(struct ath6kl *ar, | ||
120 | const void *buf, size_t len) | ||
121 | { | ||
122 | } | ||
123 | |||
124 | static inline void ath6kl_debug_war(struct ath6kl *ar, enum ath6kl_war war) | ||
125 | { | ||
126 | } | ||
127 | |||
128 | static inline int ath6kl_debug_init(struct ath6kl *ar) | ||
129 | { | ||
130 | return 0; | ||
131 | } | ||
132 | |||
133 | static inline void ath6kl_debug_cleanup(struct ath6kl *ar) | ||
134 | { | ||
135 | } | ||
136 | |||
137 | #endif | ||
105 | #endif | 138 | #endif |