aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/debug.c
diff options
context:
space:
mode:
authorKalle Valo <kvalo@qca.qualcomm.com>2013-03-18 07:42:22 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2013-03-18 07:44:43 -0400
commitaa8705fc65a395d79bdc8bb82a89bcf9abe9f3a4 (patch)
tree10c04c1ec1163fab10281e88c1ca63e8d7e00d0a /drivers/net/wireless/ath/ath6kl/debug.c
parentda01d53cfb8a7e23121572004336723d64d3ace6 (diff)
ath6kl: add tracing support to debug message macros
Now all log messages are sent through the tracing infrastruture as well. Tracing point doesn't follow debug_mask module parameter, instead it sends all debug messages, so once you enable ath6kl_log_dbg tracing point you will get a lot of messages. Needs to be discussed if this is sensible or not. The overhead should be small enough and we anyway include debug level as well so it's easy to filter in user space. I wasn't really sure what to do with ath6kl_dbg_dump() and for now decided that it also sends the buffer to user space. But most likely in the future ath6kl_dbg_dump() should go away in favor of using proper tracing points, but we will see. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/debug.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/debug.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index 80f23e398acd..42a887d06ba2 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -117,15 +117,15 @@ void ath6kl_dbg(enum ATH6K_DEBUG_MASK mask, const char *fmt, ...)
117 struct va_format vaf; 117 struct va_format vaf;
118 va_list args; 118 va_list args;
119 119
120 if (!(debug_mask & mask))
121 return;
122
123 va_start(args, fmt); 120 va_start(args, fmt);
124 121
125 vaf.fmt = fmt; 122 vaf.fmt = fmt;
126 vaf.va = &args; 123 vaf.va = &args;
127 124
128 ath6kl_printk(KERN_DEBUG, "%pV", &vaf); 125 if (debug_mask & mask)
126 ath6kl_printk(KERN_DEBUG, "%pV", &vaf);
127
128 trace_ath6kl_log_dbg(mask, &vaf);
129 129
130 va_end(args); 130 va_end(args);
131} 131}
@@ -141,6 +141,10 @@ void ath6kl_dbg_dump(enum ATH6K_DEBUG_MASK mask,
141 141
142 print_hex_dump_bytes(prefix, DUMP_PREFIX_OFFSET, buf, len); 142 print_hex_dump_bytes(prefix, DUMP_PREFIX_OFFSET, buf, len);
143 } 143 }
144
145 /* tracing code doesn't like null strings :/ */
146 trace_ath6kl_log_dbg_dump(msg ? msg : "", prefix ? prefix : "",
147 buf, len);
144} 148}
145EXPORT_SYMBOL(ath6kl_dbg_dump); 149EXPORT_SYMBOL(ath6kl_dbg_dump);
146 150