aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-09-05 13:49:45 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-09-17 16:18:17 -0400
commit95b49ed013c9a8856ce768d8d4a62acfc410f73d (patch)
tree996a44eb0c397e22405d2b0ff0c87f9e14285cb9
parent814665fef7562b31d32e515c4d91b06c8b956560 (diff)
iwlagn: adding aggregated frame failure status to debugfs
Addition to standard tx frame failure report, adding aggregated frame failure report to debugfs Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c51
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.h5
2 files changed, 54 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
index de68dde4feee..52e98691ddfd 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
@@ -25,7 +25,7 @@
25* Intel Linux Wireless <ilw@linux.intel.com> 25* Intel Linux Wireless <ilw@linux.intel.com>
26* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 26* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
27*****************************************************************************/ 27*****************************************************************************/
28 28#include "iwl-agn.h"
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) 31static int iwl_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz)
@@ -1019,7 +1019,8 @@ ssize_t iwl_reply_tx_error_read(struct file *file,
1019 struct iwl_priv *priv = (struct iwl_priv *)file->private_data; 1019 struct iwl_priv *priv = (struct iwl_priv *)file->private_data;
1020 int pos = 0; 1020 int pos = 0;
1021 char *buf; 1021 char *buf;
1022 int bufsz = (sizeof(struct reply_tx_error_statistics) * 24) + 200; 1022 int bufsz = (sizeof(struct reply_tx_error_statistics) * 24) +
1023 (sizeof(struct reply_agg_tx_error_statistics) * 24) + 200;
1023 ssize_t ret; 1024 ssize_t ret;
1024 1025
1025 if (!iwl_is_alive(priv)) 1026 if (!iwl_is_alive(priv))
@@ -1104,6 +1105,52 @@ ssize_t iwl_reply_tx_error_read(struct file *file,
1104 pos += scnprintf(buf + pos, bufsz - pos, "UNKNOWN:\t\t\t%u\n", 1105 pos += scnprintf(buf + pos, bufsz - pos, "UNKNOWN:\t\t\t%u\n",
1105 priv->_agn.reply_tx_stats.unknown); 1106 priv->_agn.reply_tx_stats.unknown);
1106 1107
1108 pos += scnprintf(buf + pos, bufsz - pos,
1109 "\nStatistics_Agg_TX_Error:\n");
1110
1111 pos += scnprintf(buf + pos, bufsz - pos, "%s:\t\t\t%u\n",
1112 iwl_get_agg_tx_fail_reason(AGG_TX_STATE_UNDERRUN_MSK),
1113 priv->_agn.reply_agg_tx_stats.underrun);
1114 pos += scnprintf(buf + pos, bufsz - pos, "%s:\t\t\t%u\n",
1115 iwl_get_agg_tx_fail_reason(AGG_TX_STATE_BT_PRIO_MSK),
1116 priv->_agn.reply_agg_tx_stats.bt_prio);
1117 pos += scnprintf(buf + pos, bufsz - pos, "%s:\t\t\t%u\n",
1118 iwl_get_agg_tx_fail_reason(AGG_TX_STATE_FEW_BYTES_MSK),
1119 priv->_agn.reply_agg_tx_stats.few_bytes);
1120 pos += scnprintf(buf + pos, bufsz - pos, "%s:\t\t\t%u\n",
1121 iwl_get_agg_tx_fail_reason(AGG_TX_STATE_ABORT_MSK),
1122 priv->_agn.reply_agg_tx_stats.abort);
1123 pos += scnprintf(buf + pos, bufsz - pos, "%s:\t\t%u\n",
1124 iwl_get_agg_tx_fail_reason(
1125 AGG_TX_STATE_LAST_SENT_TTL_MSK),
1126 priv->_agn.reply_agg_tx_stats.last_sent_ttl);
1127 pos += scnprintf(buf + pos, bufsz - pos, "%s:\t\t%u\n",
1128 iwl_get_agg_tx_fail_reason(
1129 AGG_TX_STATE_LAST_SENT_TRY_CNT_MSK),
1130 priv->_agn.reply_agg_tx_stats.last_sent_try);
1131 pos += scnprintf(buf + pos, bufsz - pos, "%s:\t\t%u\n",
1132 iwl_get_agg_tx_fail_reason(
1133 AGG_TX_STATE_LAST_SENT_BT_KILL_MSK),
1134 priv->_agn.reply_agg_tx_stats.last_sent_bt_kill);
1135 pos += scnprintf(buf + pos, bufsz - pos, "%s:\t\t\t%u\n",
1136 iwl_get_agg_tx_fail_reason(AGG_TX_STATE_SCD_QUERY_MSK),
1137 priv->_agn.reply_agg_tx_stats.scd_query);
1138 pos += scnprintf(buf + pos, bufsz - pos, "%s:\t\t%u\n",
1139 iwl_get_agg_tx_fail_reason(
1140 AGG_TX_STATE_TEST_BAD_CRC32_MSK),
1141 priv->_agn.reply_agg_tx_stats.bad_crc32);
1142 pos += scnprintf(buf + pos, bufsz - pos, "%s:\t\t\t%u\n",
1143 iwl_get_agg_tx_fail_reason(AGG_TX_STATE_RESPONSE_MSK),
1144 priv->_agn.reply_agg_tx_stats.response);
1145 pos += scnprintf(buf + pos, bufsz - pos, "%s:\t\t\t%u\n",
1146 iwl_get_agg_tx_fail_reason(AGG_TX_STATE_DUMP_TX_MSK),
1147 priv->_agn.reply_agg_tx_stats.dump_tx);
1148 pos += scnprintf(buf + pos, bufsz - pos, "%s:\t\t\t%u\n",
1149 iwl_get_agg_tx_fail_reason(AGG_TX_STATE_DELAY_TX_MSK),
1150 priv->_agn.reply_agg_tx_stats.delay_tx);
1151 pos += scnprintf(buf + pos, bufsz - pos, "UNKNOWN:\t\t\t%u\n",
1152 priv->_agn.reply_agg_tx_stats.unknown);
1153
1107 ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); 1154 ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
1108 kfree(buf); 1155 kfree(buf);
1109 return ret; 1156 return ret;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h
index e1f85ae9da59..a372184ac210 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.h
@@ -238,4 +238,9 @@ void iwlagn_bt_rx_handler_setup(struct iwl_priv *priv);
238void iwlagn_bt_setup_deferred_work(struct iwl_priv *priv); 238void iwlagn_bt_setup_deferred_work(struct iwl_priv *priv);
239void iwlagn_bt_cancel_deferred_work(struct iwl_priv *priv); 239void iwlagn_bt_cancel_deferred_work(struct iwl_priv *priv);
240 240
241#ifdef CONFIG_IWLWIFI_DEBUG
242const char *iwl_get_agg_tx_fail_reason(u16 status);
243#else
244static inline const char *iwl_get_agg_tx_fail_reason(u16 status) { return ""; }
245#endif
241#endif /* __iwl_agn_h__ */ 246#endif /* __iwl_agn_h__ */