aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/debugfs.c')
-rw-r--r--net/mac80211/debugfs.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index a694c593ff6a..18260aa99c56 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -36,6 +36,7 @@ static ssize_t name## _read(struct file *file, char __user *userbuf, \
36static const struct file_operations name## _ops = { \ 36static const struct file_operations name## _ops = { \
37 .read = name## _read, \ 37 .read = name## _read, \
38 .open = mac80211_open_file_generic, \ 38 .open = mac80211_open_file_generic, \
39 .llseek = generic_file_llseek, \
39}; 40};
40 41
41#define DEBUGFS_ADD(name) \ 42#define DEBUGFS_ADD(name) \
@@ -85,13 +86,15 @@ static ssize_t tsf_write(struct file *file,
85 if (strncmp(buf, "reset", 5) == 0) { 86 if (strncmp(buf, "reset", 5) == 0) {
86 if (local->ops->reset_tsf) { 87 if (local->ops->reset_tsf) {
87 drv_reset_tsf(local); 88 drv_reset_tsf(local);
88 printk(KERN_INFO "%s: debugfs reset TSF\n", wiphy_name(local->hw.wiphy)); 89 wiphy_info(local->hw.wiphy, "debugfs reset TSF\n");
89 } 90 }
90 } else { 91 } else {
91 tsf = simple_strtoul(buf, NULL, 0); 92 tsf = simple_strtoul(buf, NULL, 0);
92 if (local->ops->set_tsf) { 93 if (local->ops->set_tsf) {
93 drv_set_tsf(local, tsf); 94 drv_set_tsf(local, tsf);
94 printk(KERN_INFO "%s: debugfs set TSF to %#018llx\n", wiphy_name(local->hw.wiphy), tsf); 95 wiphy_info(local->hw.wiphy,
96 "debugfs set TSF to %#018llx\n", tsf);
97
95 } 98 }
96 } 99 }
97 100
@@ -101,7 +104,8 @@ static ssize_t tsf_write(struct file *file,
101static const struct file_operations tsf_ops = { 104static const struct file_operations tsf_ops = {
102 .read = tsf_read, 105 .read = tsf_read,
103 .write = tsf_write, 106 .write = tsf_write,
104 .open = mac80211_open_file_generic 107 .open = mac80211_open_file_generic,
108 .llseek = default_llseek,
105}; 109};
106 110
107static ssize_t reset_write(struct file *file, const char __user *user_buf, 111static ssize_t reset_write(struct file *file, const char __user *user_buf,
@@ -120,6 +124,7 @@ static ssize_t reset_write(struct file *file, const char __user *user_buf,
120static const struct file_operations reset_ops = { 124static const struct file_operations reset_ops = {
121 .write = reset_write, 125 .write = reset_write,
122 .open = mac80211_open_file_generic, 126 .open = mac80211_open_file_generic,
127 .llseek = noop_llseek,
123}; 128};
124 129
125static ssize_t noack_read(struct file *file, char __user *user_buf, 130static ssize_t noack_read(struct file *file, char __user *user_buf,
@@ -155,7 +160,8 @@ static ssize_t noack_write(struct file *file,
155static const struct file_operations noack_ops = { 160static const struct file_operations noack_ops = {
156 .read = noack_read, 161 .read = noack_read,
157 .write = noack_write, 162 .write = noack_write,
158 .open = mac80211_open_file_generic 163 .open = mac80211_open_file_generic,
164 .llseek = default_llseek,
159}; 165};
160 166
161static ssize_t uapsd_queues_read(struct file *file, char __user *user_buf, 167static ssize_t uapsd_queues_read(struct file *file, char __user *user_buf,
@@ -201,7 +207,8 @@ static ssize_t uapsd_queues_write(struct file *file,
201static const struct file_operations uapsd_queues_ops = { 207static const struct file_operations uapsd_queues_ops = {
202 .read = uapsd_queues_read, 208 .read = uapsd_queues_read,
203 .write = uapsd_queues_write, 209 .write = uapsd_queues_write,
204 .open = mac80211_open_file_generic 210 .open = mac80211_open_file_generic,
211 .llseek = default_llseek,
205}; 212};
206 213
207static ssize_t uapsd_max_sp_len_read(struct file *file, char __user *user_buf, 214static ssize_t uapsd_max_sp_len_read(struct file *file, char __user *user_buf,
@@ -247,7 +254,8 @@ static ssize_t uapsd_max_sp_len_write(struct file *file,
247static const struct file_operations uapsd_max_sp_len_ops = { 254static const struct file_operations uapsd_max_sp_len_ops = {
248 .read = uapsd_max_sp_len_read, 255 .read = uapsd_max_sp_len_read,
249 .write = uapsd_max_sp_len_write, 256 .write = uapsd_max_sp_len_write,
250 .open = mac80211_open_file_generic 257 .open = mac80211_open_file_generic,
258 .llseek = default_llseek,
251}; 259};
252 260
253static ssize_t channel_type_read(struct file *file, char __user *user_buf, 261static ssize_t channel_type_read(struct file *file, char __user *user_buf,
@@ -279,7 +287,8 @@ static ssize_t channel_type_read(struct file *file, char __user *user_buf,
279 287
280static const struct file_operations channel_type_ops = { 288static const struct file_operations channel_type_ops = {
281 .read = channel_type_read, 289 .read = channel_type_read,
282 .open = mac80211_open_file_generic 290 .open = mac80211_open_file_generic,
291 .llseek = default_llseek,
283}; 292};
284 293
285static ssize_t queues_read(struct file *file, char __user *user_buf, 294static ssize_t queues_read(struct file *file, char __user *user_buf,
@@ -302,7 +311,8 @@ static ssize_t queues_read(struct file *file, char __user *user_buf,
302 311
303static const struct file_operations queues_ops = { 312static const struct file_operations queues_ops = {
304 .read = queues_read, 313 .read = queues_read,
305 .open = mac80211_open_file_generic 314 .open = mac80211_open_file_generic,
315 .llseek = default_llseek,
306}; 316};
307 317
308/* statistics stuff */ 318/* statistics stuff */
@@ -346,6 +356,7 @@ static ssize_t stats_ ##name## _read(struct file *file, \
346static const struct file_operations stats_ ##name## _ops = { \ 356static const struct file_operations stats_ ##name## _ops = { \
347 .read = stats_ ##name## _read, \ 357 .read = stats_ ##name## _read, \
348 .open = mac80211_open_file_generic, \ 358 .open = mac80211_open_file_generic, \
359 .llseek = generic_file_llseek, \
349}; 360};
350 361
351#define DEBUGFS_STATS_ADD(name, field) \ 362#define DEBUGFS_STATS_ADD(name, field) \
@@ -366,7 +377,6 @@ void debugfs_hw_add(struct ieee80211_local *local)
366 if (!phyd) 377 if (!phyd)
367 return; 378 return;
368 379
369 local->debugfs.stations = debugfs_create_dir("stations", phyd);
370 local->debugfs.keys = debugfs_create_dir("keys", phyd); 380 local->debugfs.keys = debugfs_create_dir("keys", phyd);
371 381
372 DEBUGFS_ADD(frequency); 382 DEBUGFS_ADD(frequency);