diff options
Diffstat (limited to 'net/mac80211/debugfs.c')
-rw-r--r-- | net/mac80211/debugfs.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index 11c72311f35..6c439cd5cce 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c | |||
@@ -163,6 +163,29 @@ static const struct file_operations noack_ops = { | |||
163 | .open = mac80211_open_file_generic | 163 | .open = mac80211_open_file_generic |
164 | }; | 164 | }; |
165 | 165 | ||
166 | static ssize_t queues_read(struct file *file, char __user *user_buf, | ||
167 | size_t count, loff_t *ppos) | ||
168 | { | ||
169 | struct ieee80211_local *local = file->private_data; | ||
170 | unsigned long flags; | ||
171 | char buf[IEEE80211_MAX_QUEUES * 20]; | ||
172 | int q, res = 0; | ||
173 | |||
174 | spin_lock_irqsave(&local->queue_stop_reason_lock, flags); | ||
175 | for (q = 0; q < local->hw.queues; q++) | ||
176 | res += sprintf(buf + res, "%02d: %#.8lx/%d\n", q, | ||
177 | local->queue_stop_reasons[q], | ||
178 | __netif_subqueue_stopped(local->mdev, q)); | ||
179 | spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); | ||
180 | |||
181 | return simple_read_from_buffer(user_buf, count, ppos, buf, res); | ||
182 | } | ||
183 | |||
184 | static const struct file_operations queues_ops = { | ||
185 | .read = queues_read, | ||
186 | .open = mac80211_open_file_generic | ||
187 | }; | ||
188 | |||
166 | /* statistics stuff */ | 189 | /* statistics stuff */ |
167 | 190 | ||
168 | #define DEBUGFS_STATS_FILE(name, buflen, fmt, value...) \ | 191 | #define DEBUGFS_STATS_FILE(name, buflen, fmt, value...) \ |
@@ -298,6 +321,7 @@ void debugfs_hw_add(struct ieee80211_local *local) | |||
298 | DEBUGFS_ADD(total_ps_buffered); | 321 | DEBUGFS_ADD(total_ps_buffered); |
299 | DEBUGFS_ADD(wep_iv); | 322 | DEBUGFS_ADD(wep_iv); |
300 | DEBUGFS_ADD(tsf); | 323 | DEBUGFS_ADD(tsf); |
324 | DEBUGFS_ADD(queues); | ||
301 | DEBUGFS_ADD_MODE(reset, 0200); | 325 | DEBUGFS_ADD_MODE(reset, 0200); |
302 | DEBUGFS_ADD(noack); | 326 | DEBUGFS_ADD(noack); |
303 | 327 | ||
@@ -350,6 +374,7 @@ void debugfs_hw_del(struct ieee80211_local *local) | |||
350 | DEBUGFS_DEL(total_ps_buffered); | 374 | DEBUGFS_DEL(total_ps_buffered); |
351 | DEBUGFS_DEL(wep_iv); | 375 | DEBUGFS_DEL(wep_iv); |
352 | DEBUGFS_DEL(tsf); | 376 | DEBUGFS_DEL(tsf); |
377 | DEBUGFS_DEL(queues); | ||
353 | DEBUGFS_DEL(reset); | 378 | DEBUGFS_DEL(reset); |
354 | DEBUGFS_DEL(noack); | 379 | DEBUGFS_DEL(noack); |
355 | 380 | ||