19 #include <linux/export.h>
27 #define ATH9K_DFS_STAT(s, p) \
28 len += snprintf(buf + len, size - len, "%28s : %10u\n", s, \
29 sc->debug.stats.dfs_stats.p);
30 #define ATH9K_DFS_POOL_STAT(s, p) \
31 len += snprintf(buf + len, size - len, "%28s : %10u\n", s, \
32 global_dfs_pool_stats.p);
35 size_t count, loff_t *ppos)
40 unsigned int len = 0,
size = 8000;
47 len +=
snprintf(buf + len,
size - len,
"DFS support for "
48 "macVersion = 0x%x, macRev = 0x%x: %s\n",
51 "enabled" :
"disabled");
52 len +=
snprintf(buf + len,
size - len,
"Pulse detector statistics:\n");
62 len +=
snprintf(buf + len,
size - len,
"Radar detector statistics "
66 len +=
snprintf(buf + len,
size - len,
"Global Pool statistics:\n");
85 #define DFS_STATS_RESET_MAGIC 0x80000000
86 static ssize_t write_file_dfs(
struct file *
file,
const char __user *user_buf,
87 size_t count, loff_t *ppos)
94 len =
min(count,
sizeof(buf) - 1);
103 memset(&sc->debug.stats.dfs_stats, 0,
104 sizeof(sc->debug.stats.dfs_stats));
109 .read = read_file_dfs,
110 .write = write_file_dfs,
119 sc->debug.debugfs_phy, sc, &fops_dfs_stats);