aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/bat_debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv/bat_debugfs.c')
-rw-r--r--net/batman-adv/bat_debugfs.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/net/batman-adv/bat_debugfs.c b/net/batman-adv/bat_debugfs.c
index ca6aee4bf941..ce84a616fddf 100644
--- a/net/batman-adv/bat_debugfs.c
+++ b/net/batman-adv/bat_debugfs.c
@@ -35,14 +35,14 @@
35static struct dentry *batadv_debugfs; 35static struct dentry *batadv_debugfs;
36 36
37#ifdef CONFIG_BATMAN_ADV_DEBUG 37#ifdef CONFIG_BATMAN_ADV_DEBUG
38#define LOG_BUFF_MASK (batadv_log_buff_len - 1) 38#define BATADV_LOG_BUFF_MASK (batadv_log_buff_len - 1)
39#define LOG_BUFF(idx) (debug_log->log_buff[(idx) & LOG_BUFF_MASK]) 39#define BATADV_LOG_BUFF(idx) (debug_log->log_buff[(idx) & BATADV_LOG_BUFF_MASK])
40 40
41static int batadv_log_buff_len = LOG_BUF_LEN; 41static int batadv_log_buff_len = LOG_BUF_LEN;
42 42
43static void batadv_emit_log_char(struct debug_log *debug_log, char c) 43static void batadv_emit_log_char(struct debug_log *debug_log, char c)
44{ 44{
45 LOG_BUFF(debug_log->log_end) = c; 45 BATADV_LOG_BUFF(debug_log->log_end) = c;
46 debug_log->log_end++; 46 debug_log->log_end++;
47 47
48 if (debug_log->log_end - debug_log->log_start > batadv_log_buff_len) 48 if (debug_log->log_end - debug_log->log_start > batadv_log_buff_len)
@@ -133,7 +133,7 @@ static ssize_t batadv_log_read(struct file *file, char __user *buf,
133 133
134 while ((!error) && (i < count) && 134 while ((!error) && (i < count) &&
135 (debug_log->log_start != debug_log->log_end)) { 135 (debug_log->log_start != debug_log->log_end)) {
136 c = LOG_BUFF(debug_log->log_start); 136 c = BATADV_LOG_BUFF(debug_log->log_start);
137 137
138 debug_log->log_start++; 138 debug_log->log_start++;
139 139
@@ -270,7 +270,7 @@ struct bat_debuginfo {
270 const struct file_operations fops; 270 const struct file_operations fops;
271}; 271};
272 272
273#define BAT_DEBUGINFO(_name, _mode, _open) \ 273#define BATADV_DEBUGINFO(_name, _mode, _open) \
274struct bat_debuginfo batadv_debuginfo_##_name = { \ 274struct bat_debuginfo batadv_debuginfo_##_name = { \
275 .attr = { .name = __stringify(_name), \ 275 .attr = { .name = __stringify(_name), \
276 .mode = _mode, }, \ 276 .mode = _mode, }, \
@@ -282,15 +282,17 @@ struct bat_debuginfo batadv_debuginfo_##_name = { \
282 } \ 282 } \
283}; 283};
284 284
285static BAT_DEBUGINFO(routing_algos, S_IRUGO, batadv_algorithms_open); 285static BATADV_DEBUGINFO(routing_algos, S_IRUGO, batadv_algorithms_open);
286static BAT_DEBUGINFO(originators, S_IRUGO, batadv_originators_open); 286static BATADV_DEBUGINFO(originators, S_IRUGO, batadv_originators_open);
287static BAT_DEBUGINFO(gateways, S_IRUGO, batadv_gateways_open); 287static BATADV_DEBUGINFO(gateways, S_IRUGO, batadv_gateways_open);
288static BAT_DEBUGINFO(transtable_global, S_IRUGO, batadv_transtable_global_open); 288static BATADV_DEBUGINFO(transtable_global, S_IRUGO,
289 batadv_transtable_global_open);
289#ifdef CONFIG_BATMAN_ADV_BLA 290#ifdef CONFIG_BATMAN_ADV_BLA
290static BAT_DEBUGINFO(bla_claim_table, S_IRUGO, batadv_bla_claim_table_open); 291static BATADV_DEBUGINFO(bla_claim_table, S_IRUGO, batadv_bla_claim_table_open);
291#endif 292#endif
292static BAT_DEBUGINFO(transtable_local, S_IRUGO, batadv_transtable_local_open); 293static BATADV_DEBUGINFO(transtable_local, S_IRUGO,
293static BAT_DEBUGINFO(vis_data, S_IRUGO, batadv_vis_data_open); 294 batadv_transtable_local_open);
295static BATADV_DEBUGINFO(vis_data, S_IRUGO, batadv_vis_data_open);
294 296
295static struct bat_debuginfo *batadv_mesh_debuginfos[] = { 297static struct bat_debuginfo *batadv_mesh_debuginfos[] = {
296 &batadv_debuginfo_originators, 298 &batadv_debuginfo_originators,