0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _BRCMS_DEBUG_H_
0018 #define _BRCMS_DEBUG_H_
0019
0020 #include <linux/device.h>
0021 #include <linux/bcma/bcma.h>
0022 #include <net/cfg80211.h>
0023 #include <net/mac80211.h>
0024 #include "main.h"
0025 #include "mac80211_if.h"
0026
0027 __printf(2, 3)
0028 void __brcms_info(struct device *dev, const char *fmt, ...);
0029 __printf(2, 3)
0030 void __brcms_warn(struct device *dev, const char *fmt, ...);
0031 __printf(2, 3)
0032 void __brcms_err(struct device *dev, const char *fmt, ...);
0033 __printf(2, 3)
0034 void __brcms_crit(struct device *dev, const char *fmt, ...);
0035
0036 #if defined(CONFIG_BRCMDBG) || defined(CONFIG_BRCM_TRACING)
0037 __printf(4, 5)
0038 void __brcms_dbg(struct device *dev, u32 level, const char *func,
0039 const char *fmt, ...);
0040 #else
0041 static inline __printf(4, 5)
0042 void __brcms_dbg(struct device *dev, u32 level, const char *func,
0043 const char *fmt, ...)
0044 {
0045 }
0046 #endif
0047
0048
0049
0050
0051
0052
0053
0054 #define brcms_dbg(core, l, f, a...) __brcms_dbg(&(core)->dev, l, __func__, f, ##a)
0055 #define brcms_info(core, f, a...) __brcms_info(&(core)->dev, f, ##a)
0056 #define brcms_warn(core, f, a...) __brcms_warn(&(core)->dev, f, ##a)
0057 #define brcms_err(core, f, a...) __brcms_err(&(core)->dev, f, ##a)
0058 #define brcms_crit(core, f, a...) __brcms_crit(&(core)->dev, f, ##a)
0059
0060 #define brcms_dbg_info(core, f, a...) brcms_dbg(core, BRCM_DL_INFO, f, ##a)
0061 #define brcms_dbg_mac80211(core, f, a...) brcms_dbg(core, BRCM_DL_MAC80211, f, ##a)
0062 #define brcms_dbg_rx(core, f, a...) brcms_dbg(core, BRCM_DL_RX, f, ##a)
0063 #define brcms_dbg_tx(core, f, a...) brcms_dbg(core, BRCM_DL_TX, f, ##a)
0064 #define brcms_dbg_int(core, f, a...) brcms_dbg(core, BRCM_DL_INT, f, ##a)
0065 #define brcms_dbg_dma(core, f, a...) brcms_dbg(core, BRCM_DL_DMA, f, ##a)
0066 #define brcms_dbg_ht(core, f, a...) brcms_dbg(core, BRCM_DL_HT, f, ##a)
0067
0068 struct brcms_pub;
0069 void brcms_debugfs_init(void);
0070 void brcms_debugfs_exit(void);
0071 void brcms_debugfs_attach(struct brcms_pub *drvr);
0072 void brcms_debugfs_detach(struct brcms_pub *drvr);
0073 struct dentry *brcms_debugfs_get_devdir(struct brcms_pub *drvr);
0074 void brcms_debugfs_create_files(struct brcms_pub *drvr);
0075
0076 #endif