diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/debug.h')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/debug.h | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h index a5824990bd2a..56746539bea2 100644 --- a/drivers/net/wireless/ath/ath10k/debug.h +++ b/drivers/net/wireless/ath/ath10k/debug.h | |||
@@ -39,9 +39,10 @@ enum ath10k_debug_mask { | |||
39 | 39 | ||
40 | extern unsigned int ath10k_debug_mask; | 40 | extern unsigned int ath10k_debug_mask; |
41 | 41 | ||
42 | __printf(1, 2) int ath10k_info(const char *fmt, ...); | 42 | __printf(2, 3) int ath10k_info(struct ath10k *ar, const char *fmt, ...); |
43 | __printf(1, 2) int ath10k_err(const char *fmt, ...); | 43 | __printf(2, 3) int ath10k_err(struct ath10k *ar, const char *fmt, ...); |
44 | __printf(1, 2) int ath10k_warn(const char *fmt, ...); | 44 | __printf(2, 3) int ath10k_warn(struct ath10k *ar, const char *fmt, ...); |
45 | void ath10k_print_driver_info(struct ath10k *ar); | ||
45 | 46 | ||
46 | #ifdef CONFIG_ATH10K_DEBUGFS | 47 | #ifdef CONFIG_ATH10K_DEBUGFS |
47 | int ath10k_debug_start(struct ath10k *ar); | 48 | int ath10k_debug_start(struct ath10k *ar); |
@@ -53,6 +54,10 @@ void ath10k_debug_read_service_map(struct ath10k *ar, | |||
53 | size_t map_size); | 54 | size_t map_size); |
54 | void ath10k_debug_read_target_stats(struct ath10k *ar, | 55 | void ath10k_debug_read_target_stats(struct ath10k *ar, |
55 | struct wmi_stats_event *ev); | 56 | struct wmi_stats_event *ev); |
57 | struct ath10k_fw_crash_data * | ||
58 | ath10k_debug_get_new_fw_crash_data(struct ath10k *ar); | ||
59 | |||
60 | void ath10k_debug_dbglog_add(struct ath10k *ar, u8 *buffer, int len); | ||
56 | 61 | ||
57 | #define ATH10K_DFS_STAT_INC(ar, c) (ar->debug.dfs_stats.c++) | 62 | #define ATH10K_DFS_STAT_INC(ar, c) (ar->debug.dfs_stats.c++) |
58 | 63 | ||
@@ -86,25 +91,40 @@ static inline void ath10k_debug_read_target_stats(struct ath10k *ar, | |||
86 | { | 91 | { |
87 | } | 92 | } |
88 | 93 | ||
94 | static inline void ath10k_debug_dbglog_add(struct ath10k *ar, u8 *buffer, | ||
95 | int len) | ||
96 | { | ||
97 | } | ||
98 | |||
99 | static inline struct ath10k_fw_crash_data * | ||
100 | ath10k_debug_get_new_fw_crash_data(struct ath10k *ar) | ||
101 | { | ||
102 | return NULL; | ||
103 | } | ||
104 | |||
89 | #define ATH10K_DFS_STAT_INC(ar, c) do { } while (0) | 105 | #define ATH10K_DFS_STAT_INC(ar, c) do { } while (0) |
90 | 106 | ||
91 | #endif /* CONFIG_ATH10K_DEBUGFS */ | 107 | #endif /* CONFIG_ATH10K_DEBUGFS */ |
92 | 108 | ||
93 | #ifdef CONFIG_ATH10K_DEBUG | 109 | #ifdef CONFIG_ATH10K_DEBUG |
94 | __printf(2, 3) void ath10k_dbg(enum ath10k_debug_mask mask, | 110 | __printf(3, 4) void ath10k_dbg(struct ath10k *ar, |
111 | enum ath10k_debug_mask mask, | ||
95 | const char *fmt, ...); | 112 | const char *fmt, ...); |
96 | void ath10k_dbg_dump(enum ath10k_debug_mask mask, | 113 | void ath10k_dbg_dump(struct ath10k *ar, |
114 | enum ath10k_debug_mask mask, | ||
97 | const char *msg, const char *prefix, | 115 | const char *msg, const char *prefix, |
98 | const void *buf, size_t len); | 116 | const void *buf, size_t len); |
99 | #else /* CONFIG_ATH10K_DEBUG */ | 117 | #else /* CONFIG_ATH10K_DEBUG */ |
100 | 118 | ||
101 | static inline int ath10k_dbg(enum ath10k_debug_mask dbg_mask, | 119 | static inline int ath10k_dbg(struct ath10k *ar, |
120 | enum ath10k_debug_mask dbg_mask, | ||
102 | const char *fmt, ...) | 121 | const char *fmt, ...) |
103 | { | 122 | { |
104 | return 0; | 123 | return 0; |
105 | } | 124 | } |
106 | 125 | ||
107 | static inline void ath10k_dbg_dump(enum ath10k_debug_mask mask, | 126 | static inline void ath10k_dbg_dump(struct ath10k *ar, |
127 | enum ath10k_debug_mask mask, | ||
108 | const char *msg, const char *prefix, | 128 | const char *msg, const char *prefix, |
109 | const void *buf, size_t len) | 129 | const void *buf, size_t len) |
110 | { | 130 | { |