Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061 #ifndef _ATH5K_DEBUG_H
00062 #define _ATH5K_DEBUG_H
00063
00064 #define CONFIG_ATH5K_DEBUG
00065
00066 struct ath5k_softc;
00067 struct ath5k_hw;
00068 struct sk_buff;
00069 struct ath5k_buf;
00070
00071 #ifdef CONFIG_ATH5K_DEBUG
00072
00073 #define ATH5K_TRACE(_sc) do { \
00074 if ((_sc)->debug_level & ATH5K_DEBUG_TRACE) \
00075 printk("ath5k trace %s:%d\n", __func__, __LINE__); \
00076 } while (0)
00077
00078 #define ATH5K_DBG(_sc, _m, _fmt, ...) do { \
00079 if ((_sc)->debug_level & (_m)) \
00080 printk("ath5k dbg:" _fmt, ##__VA_ARGS__); \
00081 } while (0)
00082
00083 #define ATH5K_DBG_UNLIMIT(_sc, _m, _fmt, ...) ATH5K_DBG(_sc, _m, _fmt, ##__VA_ARGS__)
00084
00085 void
00086 ath5k_set_debug_level(struct ath5k_softc *sc);
00087
00088 void
00089 ath5k_debug_init(void);
00090
00091 void
00092 ath5k_debug_init_device(struct ath5k_softc *sc);
00093
00094 void
00095 ath5k_debug_finish(void);
00096
00097 void
00098 ath5k_debug_finish_device(struct ath5k_softc *sc);
00099
00100 void
00101 ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah);
00102
00103 void
00104 ath5k_debug_dump_bands(struct ath5k_softc *sc);
00105
00106 void
00107 ath5k_debug_dump_skb(struct ath5k_softc *sc,
00108 struct sk_buff *skb, const char *prefix, int tx);
00109
00110 void
00111 ath5k_debug_printtxbuf(struct ath5k_softc *sc, struct ath5k_buf *bf);
00112
00113 #else
00114
00115 #include <linux/compiler.h>
00116
00117 #define ATH5K_TRACE(_sc) typecheck(struct ath5k_softc *, (_sc))
00118
00119 static inline void
00120 ath5k_set_debug_level(struct ath5k_softc *sc) {}
00121
00122 static inline void __attribute__ ((format (printf, 3, 4)))
00123 ATH5K_DBG(struct ath5k_softc *sc, unsigned int m, const char *fmt, ...) {}
00124
00125 static inline void __attribute__ ((format (printf, 3, 4)))
00126 ATH5K_DBG_UNLIMIT(struct ath5k_softc *sc, unsigned int m, const char *fmt, ...)
00127 {}
00128
00129 static inline void
00130 ath5k_debug_init(void) {}
00131
00132 static inline void
00133 ath5k_debug_init_device(struct ath5k_softc *sc) {}
00134
00135 static inline void
00136 ath5k_debug_finish(void) {}
00137
00138 static inline void
00139 ath5k_debug_finish_device(struct ath5k_softc *sc) {}
00140
00141 static inline void
00142 ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah) {}
00143
00144 static inline void
00145 ath5k_debug_dump_bands(struct ath5k_softc *sc) {}
00146
00147 static inline void
00148 ath5k_debug_dump_skb(struct ath5k_softc *sc,
00149 struct sk_buff *skb, const char *prefix, int tx) {}
00150
00151 static inline void
00152 ath5k_debug_printtxbuf(struct ath5k_softc *sc, struct ath5k_buf *bf) {}
00153
00154 #endif
00155
00156 #endif