diff options
author | Ben Greear <greearb@candelatech.com> | 2014-08-25 01:37:32 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2014-08-25 04:23:24 -0400 |
commit | 384914b2e5566dfce25f3f38d992708a9ef6f51b (patch) | |
tree | ea8a24b4201fb97cf562fd2c6f9e8e87d5ab9ba0 /drivers/net/wireless/ath/ath10k/debug.h | |
parent | 3d29a3e04298e3883625c677f62f7f1e634eec10 (diff) |
ath10k: provide firmware crash info via debugfs
Store the firmware registers and other relevant data to a firmware crash dump
file and provide it to user-space via debugfs. Should help with figuring out
why the firmware crashed.
kvalo: remove dbglog support, rework and refactor the code to avoid ifdefs and
otherwise simplify it as well
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/debug.h')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/debug.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h index a5824990bd2a..416c62bbbb26 100644 --- a/drivers/net/wireless/ath/ath10k/debug.h +++ b/drivers/net/wireless/ath/ath10k/debug.h | |||
@@ -53,6 +53,10 @@ void ath10k_debug_read_service_map(struct ath10k *ar, | |||
53 | size_t map_size); | 53 | size_t map_size); |
54 | void ath10k_debug_read_target_stats(struct ath10k *ar, | 54 | void ath10k_debug_read_target_stats(struct ath10k *ar, |
55 | struct wmi_stats_event *ev); | 55 | struct wmi_stats_event *ev); |
56 | struct ath10k_fw_crash_data * | ||
57 | ath10k_debug_get_new_fw_crash_data(struct ath10k *ar); | ||
58 | |||
59 | void ath10k_debug_dbglog_add(struct ath10k *ar, u8 *buffer, int len); | ||
56 | 60 | ||
57 | #define ATH10K_DFS_STAT_INC(ar, c) (ar->debug.dfs_stats.c++) | 61 | #define ATH10K_DFS_STAT_INC(ar, c) (ar->debug.dfs_stats.c++) |
58 | 62 | ||
@@ -86,6 +90,17 @@ static inline void ath10k_debug_read_target_stats(struct ath10k *ar, | |||
86 | { | 90 | { |
87 | } | 91 | } |
88 | 92 | ||
93 | static inline void ath10k_debug_dbglog_add(struct ath10k *ar, u8 *buffer, | ||
94 | int len) | ||
95 | { | ||
96 | } | ||
97 | |||
98 | static inline struct ath10k_fw_crash_data * | ||
99 | ath10k_debug_get_new_fw_crash_data(struct ath10k *ar) | ||
100 | { | ||
101 | return NULL; | ||
102 | } | ||
103 | |||
89 | #define ATH10K_DFS_STAT_INC(ar, c) do { } while (0) | 104 | #define ATH10K_DFS_STAT_INC(ar, c) do { } while (0) |
90 | 105 | ||
91 | #endif /* CONFIG_ATH10K_DEBUGFS */ | 106 | #endif /* CONFIG_ATH10K_DEBUGFS */ |