diff options
Diffstat (limited to 'net/mac80211/debugfs.c')
-rw-r--r-- | net/mac80211/debugfs.c | 58 |
1 files changed, 1 insertions, 57 deletions
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index 1cccbfd781f6..ee509f1109e2 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c | |||
@@ -70,16 +70,6 @@ DEBUGFS_READONLY_FILE(rate_ctrl_alg, 100, "%s", | |||
70 | 70 | ||
71 | /* statistics stuff */ | 71 | /* statistics stuff */ |
72 | 72 | ||
73 | static inline int rtnl_lock_local(struct ieee80211_local *local) | ||
74 | { | ||
75 | rtnl_lock(); | ||
76 | if (unlikely(local->reg_state != IEEE80211_DEV_REGISTERED)) { | ||
77 | rtnl_unlock(); | ||
78 | return -ENODEV; | ||
79 | } | ||
80 | return 0; | ||
81 | } | ||
82 | |||
83 | #define DEBUGFS_STATS_FILE(name, buflen, fmt, value...) \ | 73 | #define DEBUGFS_STATS_FILE(name, buflen, fmt, value...) \ |
84 | DEBUGFS_READONLY_FILE(stats_ ##name, buflen, fmt, ##value) | 74 | DEBUGFS_READONLY_FILE(stats_ ##name, buflen, fmt, ##value) |
85 | 75 | ||
@@ -96,10 +86,7 @@ static ssize_t format_devstat_counter(struct ieee80211_local *local, | |||
96 | if (!local->ops->get_stats) | 86 | if (!local->ops->get_stats) |
97 | return -EOPNOTSUPP; | 87 | return -EOPNOTSUPP; |
98 | 88 | ||
99 | res = rtnl_lock_local(local); | 89 | rtnl_lock(); |
100 | if (res) | ||
101 | return res; | ||
102 | |||
103 | res = local->ops->get_stats(local_to_hw(local), &stats); | 90 | res = local->ops->get_stats(local_to_hw(local), &stats); |
104 | rtnl_unlock(); | 91 | rtnl_unlock(); |
105 | if (!res) | 92 | if (!res) |
@@ -197,45 +184,6 @@ DEBUGFS_STATS_FILE(rx_handlers_fragments, 20, "%u", | |||
197 | DEBUGFS_STATS_FILE(tx_status_drop, 20, "%u", | 184 | DEBUGFS_STATS_FILE(tx_status_drop, 20, "%u", |
198 | local->tx_status_drop); | 185 | local->tx_status_drop); |
199 | 186 | ||
200 | static ssize_t stats_wme_rx_queue_read(struct file *file, | ||
201 | char __user *userbuf, | ||
202 | size_t count, loff_t *ppos) | ||
203 | { | ||
204 | struct ieee80211_local *local = file->private_data; | ||
205 | char buf[NUM_RX_DATA_QUEUES*15], *p = buf; | ||
206 | int i; | ||
207 | |||
208 | for (i = 0; i < NUM_RX_DATA_QUEUES; i++) | ||
209 | p += scnprintf(p, sizeof(buf)+buf-p, | ||
210 | "%u\n", local->wme_rx_queue[i]); | ||
211 | |||
212 | return simple_read_from_buffer(userbuf, count, ppos, buf, p-buf); | ||
213 | } | ||
214 | |||
215 | static const struct file_operations stats_wme_rx_queue_ops = { | ||
216 | .read = stats_wme_rx_queue_read, | ||
217 | .open = mac80211_open_file_generic, | ||
218 | }; | ||
219 | |||
220 | static ssize_t stats_wme_tx_queue_read(struct file *file, | ||
221 | char __user *userbuf, | ||
222 | size_t count, loff_t *ppos) | ||
223 | { | ||
224 | struct ieee80211_local *local = file->private_data; | ||
225 | char buf[NUM_TX_DATA_QUEUES*15], *p = buf; | ||
226 | int i; | ||
227 | |||
228 | for (i = 0; i < NUM_TX_DATA_QUEUES; i++) | ||
229 | p += scnprintf(p, sizeof(buf)+buf-p, | ||
230 | "%u\n", local->wme_tx_queue[i]); | ||
231 | |||
232 | return simple_read_from_buffer(userbuf, count, ppos, buf, p-buf); | ||
233 | } | ||
234 | |||
235 | static const struct file_operations stats_wme_tx_queue_ops = { | ||
236 | .read = stats_wme_tx_queue_read, | ||
237 | .open = mac80211_open_file_generic, | ||
238 | }; | ||
239 | #endif | 187 | #endif |
240 | 188 | ||
241 | DEBUGFS_DEVSTATS_FILE(dot11ACKFailureCount); | 189 | DEBUGFS_DEVSTATS_FILE(dot11ACKFailureCount); |
@@ -303,8 +251,6 @@ void debugfs_hw_add(struct ieee80211_local *local) | |||
303 | DEBUGFS_STATS_ADD(rx_expand_skb_head2); | 251 | DEBUGFS_STATS_ADD(rx_expand_skb_head2); |
304 | DEBUGFS_STATS_ADD(rx_handlers_fragments); | 252 | DEBUGFS_STATS_ADD(rx_handlers_fragments); |
305 | DEBUGFS_STATS_ADD(tx_status_drop); | 253 | DEBUGFS_STATS_ADD(tx_status_drop); |
306 | DEBUGFS_STATS_ADD(wme_tx_queue); | ||
307 | DEBUGFS_STATS_ADD(wme_rx_queue); | ||
308 | #endif | 254 | #endif |
309 | DEBUGFS_STATS_ADD(dot11ACKFailureCount); | 255 | DEBUGFS_STATS_ADD(dot11ACKFailureCount); |
310 | DEBUGFS_STATS_ADD(dot11RTSFailureCount); | 256 | DEBUGFS_STATS_ADD(dot11RTSFailureCount); |
@@ -356,8 +302,6 @@ void debugfs_hw_del(struct ieee80211_local *local) | |||
356 | DEBUGFS_STATS_DEL(rx_expand_skb_head2); | 302 | DEBUGFS_STATS_DEL(rx_expand_skb_head2); |
357 | DEBUGFS_STATS_DEL(rx_handlers_fragments); | 303 | DEBUGFS_STATS_DEL(rx_handlers_fragments); |
358 | DEBUGFS_STATS_DEL(tx_status_drop); | 304 | DEBUGFS_STATS_DEL(tx_status_drop); |
359 | DEBUGFS_STATS_DEL(wme_tx_queue); | ||
360 | DEBUGFS_STATS_DEL(wme_rx_queue); | ||
361 | #endif | 305 | #endif |
362 | DEBUGFS_STATS_DEL(dot11ACKFailureCount); | 306 | DEBUGFS_STATS_DEL(dot11ACKFailureCount); |
363 | DEBUGFS_STATS_DEL(dot11RTSFailureCount); | 307 | DEBUGFS_STATS_DEL(dot11RTSFailureCount); |