|
@@ -28,6 +28,27 @@
|
|
|
|
|
|
#include "iwl-agn-debugfs.h"
|
|
|
|
|
|
+static int iwl_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz)
|
|
|
+{
|
|
|
+ int p = 0;
|
|
|
+
|
|
|
+ p += scnprintf(buf + p, bufsz - p, "Statistics Flag(0x%X):\n",
|
|
|
+ le32_to_cpu(priv->_agn.statistics.flag));
|
|
|
+ if (le32_to_cpu(priv->_agn.statistics.flag) &
|
|
|
+ UCODE_STATISTICS_CLEAR_MSK)
|
|
|
+ p += scnprintf(buf + p, bufsz - p,
|
|
|
+ "\tStatistics have been cleared\n");
|
|
|
+ p += scnprintf(buf + p, bufsz - p, "\tOperational Frequency: %s\n",
|
|
|
+ (le32_to_cpu(priv->_agn.statistics.flag) &
|
|
|
+ UCODE_STATISTICS_FREQUENCY_MSK)
|
|
|
+ ? "2.4 GHz" : "5.2 GHz");
|
|
|
+ p += scnprintf(buf + p, bufsz - p, "\tTGj Narrow Band: %s\n",
|
|
|
+ (le32_to_cpu(priv->_agn.statistics.flag) &
|
|
|
+ UCODE_STATISTICS_NARROW_BAND_MSK)
|
|
|
+ ? "enabled" : "disabled");
|
|
|
+ return p;
|
|
|
+}
|
|
|
+
|
|
|
ssize_t iwl_ucode_rx_stats_read(struct file *file, char __user *user_buf,
|
|
|
size_t count, loff_t *ppos)
|
|
|
{
|
|
@@ -75,7 +96,7 @@ ssize_t iwl_ucode_rx_stats_read(struct file *file, char __user *user_buf,
|
|
|
max_general = &priv->_agn.max_delta.rx.general;
|
|
|
max_ht = &priv->_agn.max_delta.rx.ofdm_ht;
|
|
|
|
|
|
- pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz);
|
|
|
+ pos += iwl_statistics_flag(priv, buf, bufsz);
|
|
|
pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
|
|
|
"acumulative delta max\n",
|
|
|
"Statistics_Rx - OFDM:");
|
|
@@ -543,7 +564,7 @@ ssize_t iwl_ucode_tx_stats_read(struct file *file,
|
|
|
accum_tx = &priv->_agn.accum_statistics.tx;
|
|
|
delta_tx = &priv->_agn.delta_statistics.tx;
|
|
|
max_tx = &priv->_agn.max_delta.tx;
|
|
|
- pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz);
|
|
|
+ pos += iwl_statistics_flag(priv, buf, bufsz);
|
|
|
pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
|
|
|
"acumulative delta max\n",
|
|
|
"Statistics_Tx:");
|
|
@@ -768,7 +789,7 @@ ssize_t iwl_ucode_general_stats_read(struct file *file, char __user *user_buf,
|
|
|
accum_div = &priv->_agn.accum_statistics.general.div;
|
|
|
delta_div = &priv->_agn.delta_statistics.general.div;
|
|
|
max_div = &priv->_agn.max_delta.general.div;
|
|
|
- pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz);
|
|
|
+ pos += iwl_statistics_flag(priv, buf, bufsz);
|
|
|
pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
|
|
|
"acumulative delta max\n",
|
|
|
"Statistics_General:");
|