-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 341523 b: refs/heads/master c: 269de12 h: refs/heads/master i: 341521: 4bb9470 341519: d5cb21d v: v3
- Loading branch information
Seth Forshee
authored and
John W. Linville
committed
Nov 20, 2012
1 parent
c4c92f5
commit 5de4d5a
Showing
5 changed files
with
152 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: b03417443c4dd3f65a070fe95cea1f2682eb0aa8 | ||
refs/heads/master: 269de12bf10d2398bc6263ab4970bdcde7535787 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#include <linux/net.h> | ||
#include "types.h" | ||
#include "debug.h" | ||
#include "brcms_trace_events.h" | ||
|
||
#define __brcms_fn(fn) \ | ||
void __brcms_ ##fn(struct device *dev, const char *fmt, ...) \ | ||
{ \ | ||
struct va_format vaf = { \ | ||
.fmt = fmt, \ | ||
}; \ | ||
va_list args; \ | ||
\ | ||
va_start(args, fmt); \ | ||
vaf.va = &args; \ | ||
dev_ ##fn(dev, "%pV", &vaf); \ | ||
trace_brcms_ ##fn(&vaf); \ | ||
va_end(args); \ | ||
} | ||
|
||
__brcms_fn(info) | ||
__brcms_fn(warn) | ||
__brcms_fn(err) | ||
__brcms_fn(crit) | ||
|
||
#if defined(CONFIG_BRCMDBG) || defined(CONFIG_BRCM_TRACING) | ||
void __brcms_dbg(struct device *dev, u32 level, const char *func, | ||
const char *fmt, ...) | ||
{ | ||
struct va_format vaf = { | ||
.fmt = fmt, | ||
}; | ||
va_list args; | ||
|
||
va_start(args, fmt); | ||
vaf.va = &args; | ||
#ifdef CONFIG_BRCMDBG | ||
if ((brcm_msg_level & level) && net_ratelimit()) | ||
dev_err(dev, "%s %pV", func, &vaf); | ||
#endif | ||
trace_brcms_dbg(level, func, &vaf); | ||
va_end(args); | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#ifndef _BRCMS_DEBUG_H_ | ||
#define _BRCMS_DEBUG_H_ | ||
|
||
#include <linux/device.h> | ||
#include <linux/bcma/bcma.h> | ||
#include <net/cfg80211.h> | ||
#include <net/mac80211.h> | ||
#include "main.h" | ||
#include "mac80211_if.h" | ||
|
||
void __brcms_info(struct device *dev, const char *fmt, ...); | ||
void __brcms_warn(struct device *dev, const char *fmt, ...); | ||
void __brcms_err(struct device *dev, const char *fmt, ...); | ||
void __brcms_crit(struct device *dev, const char *fmt, ...); | ||
|
||
#if defined(CONFIG_BRCMDBG) || defined(CONFIG_BRCM_TRACING) | ||
void __brcms_dbg(struct device *dev, u32 level, const char *func, | ||
const char *fmt, ...); | ||
#else | ||
static inline void __brcms_dbg(struct device *dev, u32 level, | ||
const char *func, const char *fmt, ...) | ||
{ | ||
} | ||
#endif | ||
|
||
/* | ||
* Debug macros cannot be used when wlc is uninitialized. Generally | ||
* this means any code that could run before brcms_c_attach() has | ||
* returned successfully probably shouldn't use the following macros. | ||
*/ | ||
|
||
#define brcms_dbg(core, l, f, a...) __brcms_dbg(&(core)->dev, l, __func__, f, ##a) | ||
#define brcms_info(core, f, a...) __brcms_info(&(core)->dev, f, ##a) | ||
#define brcms_warn(core, f, a...) __brcms_warn(&(core)->dev, f, ##a) | ||
#define brcms_err(core, f, a...) __brcms_err(&(core)->dev, f, ##a) | ||
#define brcms_crit(core, f, a...) __brcms_crit(&(core)->dev, f, ##a) | ||
|
||
#define brcms_dbg_info(core, f, a...) brcms_dbg(core, BRCM_DL_INFO, f, ##a) | ||
|
||
#endif /* _BRCMS_DEBUG_H_ */ |