]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/mac80211/debugfs.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
[karo-tx-linux.git] / net / mac80211 / debugfs.c
index e7682fe1c590fb68fa6d4e7a265848d3e747ca56..6c439cd5ccea8b88e08f2bda65254b0170ba1004 100644 (file)
@@ -52,14 +52,6 @@ static const struct file_operations name## _ops = {                  \
 
 DEBUGFS_READONLY_FILE(frequency, 20, "%d",
                      local->hw.conf.channel->center_freq);
-DEBUGFS_READONLY_FILE(rts_threshold, 20, "%d",
-                     local->hw.wiphy->rts_threshold);
-DEBUGFS_READONLY_FILE(fragmentation_threshold, 20, "%d",
-                     local->hw.wiphy->frag_threshold);
-DEBUGFS_READONLY_FILE(short_retry_limit, 20, "%d",
-                     local->hw.wiphy->retry_short);
-DEBUGFS_READONLY_FILE(long_retry_limit, 20, "%d",
-                     local->hw.wiphy->retry_long);
 DEBUGFS_READONLY_FILE(total_ps_buffered, 20, "%d",
                      local->total_ps_buffered);
 DEBUGFS_READONLY_FILE(wep_iv, 20, "%#08x",
@@ -171,6 +163,29 @@ static const struct file_operations noack_ops = {
        .open = mac80211_open_file_generic
 };
 
+static ssize_t queues_read(struct file *file, char __user *user_buf,
+                          size_t count, loff_t *ppos)
+{
+       struct ieee80211_local *local = file->private_data;
+       unsigned long flags;
+       char buf[IEEE80211_MAX_QUEUES * 20];
+       int q, res = 0;
+
+       spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
+       for (q = 0; q < local->hw.queues; q++)
+               res += sprintf(buf + res, "%02d: %#.8lx/%d\n", q,
+                               local->queue_stop_reasons[q],
+                               __netif_subqueue_stopped(local->mdev, q));
+       spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
+
+       return simple_read_from_buffer(user_buf, count, ppos, buf, res);
+}
+
+static const struct file_operations queues_ops = {
+       .read = queues_read,
+       .open = mac80211_open_file_generic
+};
+
 /* statistics stuff */
 
 #define DEBUGFS_STATS_FILE(name, buflen, fmt, value...)                        \
@@ -303,13 +318,10 @@ void debugfs_hw_add(struct ieee80211_local *local)
        local->debugfs.keys = debugfs_create_dir("keys", phyd);
 
        DEBUGFS_ADD(frequency);
-       DEBUGFS_ADD(rts_threshold);
-       DEBUGFS_ADD(fragmentation_threshold);
-       DEBUGFS_ADD(short_retry_limit);
-       DEBUGFS_ADD(long_retry_limit);
        DEBUGFS_ADD(total_ps_buffered);
        DEBUGFS_ADD(wep_iv);
        DEBUGFS_ADD(tsf);
+       DEBUGFS_ADD(queues);
        DEBUGFS_ADD_MODE(reset, 0200);
        DEBUGFS_ADD(noack);
 
@@ -359,13 +371,10 @@ void debugfs_hw_add(struct ieee80211_local *local)
 void debugfs_hw_del(struct ieee80211_local *local)
 {
        DEBUGFS_DEL(frequency);
-       DEBUGFS_DEL(rts_threshold);
-       DEBUGFS_DEL(fragmentation_threshold);
-       DEBUGFS_DEL(short_retry_limit);
-       DEBUGFS_DEL(long_retry_limit);
        DEBUGFS_DEL(total_ps_buffered);
        DEBUGFS_DEL(wep_iv);
        DEBUGFS_DEL(tsf);
+       DEBUGFS_DEL(queues);
        DEBUGFS_DEL(reset);
        DEBUGFS_DEL(noack);