12 #include <linux/slab.h>
16 #define DEBUGFS_READONLY_FILE(name, buflen, fmt, value...) \
17 static ssize_t name## _read(struct file *file, char __user *userbuf, \
18 size_t count, loff_t *ppos) \
20 struct wiphy *wiphy= file->private_data; \
24 res = scnprintf(buf, buflen, fmt "\n", ##value); \
25 return simple_read_from_buffer(userbuf, count, ppos, buf, res); \
28 static const struct file_operations name## _ops = { \
29 .read = name## _read, \
30 .open = simple_open, \
31 .llseek = generic_file_llseek, \
64 char __user *user_buf,
65 size_t count, loff_t *ppos)
84 offset += ht_print_chan(&sband->
channels[i],
98 .read = ht40allow_map_read,
103 #define DEBUGFS_ADD(name) \
104 debugfs_create_file(#name, S_IRUGO, phyd, &rdev->wiphy, &name## _ops);
108 struct dentry *phyd = rdev->wiphy.debugfsdir;