aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c91
1 files changed, 56 insertions, 35 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
index 48c023b4ca36..75d6bfcbc607 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
@@ -28,6 +28,27 @@
28 28
29#include "iwl-agn-debugfs.h" 29#include "iwl-agn-debugfs.h"
30 30
31static int iwl_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz)
32{
33 int p = 0;
34
35 p += scnprintf(buf + p, bufsz - p, "Statistics Flag(0x%X):\n",
36 le32_to_cpu(priv->_agn.statistics.flag));
37 if (le32_to_cpu(priv->_agn.statistics.flag) &
38 UCODE_STATISTICS_CLEAR_MSK)
39 p += scnprintf(buf + p, bufsz - p,
40 "\tStatistics have been cleared\n");
41 p += scnprintf(buf + p, bufsz - p, "\tOperational Frequency: %s\n",
42 (le32_to_cpu(priv->_agn.statistics.flag) &
43 UCODE_STATISTICS_FREQUENCY_MSK)
44 ? "2.4 GHz" : "5.2 GHz");
45 p += scnprintf(buf + p, bufsz - p, "\tTGj Narrow Band: %s\n",
46 (le32_to_cpu(priv->_agn.statistics.flag) &
47 UCODE_STATISTICS_NARROW_BAND_MSK)
48 ? "enabled" : "disabled");
49 return p;
50}
51
31ssize_t iwl_ucode_rx_stats_read(struct file *file, char __user *user_buf, 52ssize_t iwl_ucode_rx_stats_read(struct file *file, char __user *user_buf,
32 size_t count, loff_t *ppos) 53 size_t count, loff_t *ppos)
33 { 54 {
@@ -58,24 +79,24 @@ ssize_t iwl_ucode_rx_stats_read(struct file *file, char __user *user_buf,
58 * the last statistics notification from uCode 79 * the last statistics notification from uCode
59 * might not reflect the current uCode activity 80 * might not reflect the current uCode activity
60 */ 81 */
61 ofdm = &priv->statistics.rx.ofdm; 82 ofdm = &priv->_agn.statistics.rx.ofdm;
62 cck = &priv->statistics.rx.cck; 83 cck = &priv->_agn.statistics.rx.cck;
63 general = &priv->statistics.rx.general; 84 general = &priv->_agn.statistics.rx.general;
64 ht = &priv->statistics.rx.ofdm_ht; 85 ht = &priv->_agn.statistics.rx.ofdm_ht;
65 accum_ofdm = &priv->accum_statistics.rx.ofdm; 86 accum_ofdm = &priv->_agn.accum_statistics.rx.ofdm;
66 accum_cck = &priv->accum_statistics.rx.cck; 87 accum_cck = &priv->_agn.accum_statistics.rx.cck;
67 accum_general = &priv->accum_statistics.rx.general; 88 accum_general = &priv->_agn.accum_statistics.rx.general;
68 accum_ht = &priv->accum_statistics.rx.ofdm_ht; 89 accum_ht = &priv->_agn.accum_statistics.rx.ofdm_ht;
69 delta_ofdm = &priv->delta_statistics.rx.ofdm; 90 delta_ofdm = &priv->_agn.delta_statistics.rx.ofdm;
70 delta_cck = &priv->delta_statistics.rx.cck; 91 delta_cck = &priv->_agn.delta_statistics.rx.cck;
71 delta_general = &priv->delta_statistics.rx.general; 92 delta_general = &priv->_agn.delta_statistics.rx.general;
72 delta_ht = &priv->delta_statistics.rx.ofdm_ht; 93 delta_ht = &priv->_agn.delta_statistics.rx.ofdm_ht;
73 max_ofdm = &priv->max_delta.rx.ofdm; 94 max_ofdm = &priv->_agn.max_delta.rx.ofdm;
74 max_cck = &priv->max_delta.rx.cck; 95 max_cck = &priv->_agn.max_delta.rx.cck;
75 max_general = &priv->max_delta.rx.general; 96 max_general = &priv->_agn.max_delta.rx.general;
76 max_ht = &priv->max_delta.rx.ofdm_ht; 97 max_ht = &priv->_agn.max_delta.rx.ofdm_ht;
77 98
78 pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz); 99 pos += iwl_statistics_flag(priv, buf, bufsz);
79 pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" 100 pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
80 "acumulative delta max\n", 101 "acumulative delta max\n",
81 "Statistics_Rx - OFDM:"); 102 "Statistics_Rx - OFDM:");
@@ -539,11 +560,11 @@ ssize_t iwl_ucode_tx_stats_read(struct file *file,
539 * the last statistics notification from uCode 560 * the last statistics notification from uCode
540 * might not reflect the current uCode activity 561 * might not reflect the current uCode activity
541 */ 562 */
542 tx = &priv->statistics.tx; 563 tx = &priv->_agn.statistics.tx;
543 accum_tx = &priv->accum_statistics.tx; 564 accum_tx = &priv->_agn.accum_statistics.tx;
544 delta_tx = &priv->delta_statistics.tx; 565 delta_tx = &priv->_agn.delta_statistics.tx;
545 max_tx = &priv->max_delta.tx; 566 max_tx = &priv->_agn.max_delta.tx;
546 pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz); 567 pos += iwl_statistics_flag(priv, buf, bufsz);
547 pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" 568 pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
548 "acumulative delta max\n", 569 "acumulative delta max\n",
549 "Statistics_Tx:"); 570 "Statistics_Tx:");
@@ -756,19 +777,19 @@ ssize_t iwl_ucode_general_stats_read(struct file *file, char __user *user_buf,
756 * the last statistics notification from uCode 777 * the last statistics notification from uCode
757 * might not reflect the current uCode activity 778 * might not reflect the current uCode activity
758 */ 779 */
759 general = &priv->statistics.general; 780 general = &priv->_agn.statistics.general;
760 dbg = &priv->statistics.general.dbg; 781 dbg = &priv->_agn.statistics.general.dbg;
761 div = &priv->statistics.general.div; 782 div = &priv->_agn.statistics.general.div;
762 accum_general = &priv->accum_statistics.general; 783 accum_general = &priv->_agn.accum_statistics.general;
763 delta_general = &priv->delta_statistics.general; 784 delta_general = &priv->_agn.delta_statistics.general;
764 max_general = &priv->max_delta.general; 785 max_general = &priv->_agn.max_delta.general;
765 accum_dbg = &priv->accum_statistics.general.dbg; 786 accum_dbg = &priv->_agn.accum_statistics.general.dbg;
766 delta_dbg = &priv->delta_statistics.general.dbg; 787 delta_dbg = &priv->_agn.delta_statistics.general.dbg;
767 max_dbg = &priv->max_delta.general.dbg; 788 max_dbg = &priv->_agn.max_delta.general.dbg;
768 accum_div = &priv->accum_statistics.general.div; 789 accum_div = &priv->_agn.accum_statistics.general.div;
769 delta_div = &priv->delta_statistics.general.div; 790 delta_div = &priv->_agn.delta_statistics.general.div;
770 max_div = &priv->max_delta.general.div; 791 max_div = &priv->_agn.max_delta.general.div;
771 pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz); 792 pos += iwl_statistics_flag(priv, buf, bufsz);
772 pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" 793 pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
773 "acumulative delta max\n", 794 "acumulative delta max\n",
774 "Statistics_General:"); 795 "Statistics_General:");