aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-09-05 13:49:44 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-09-17 16:18:02 -0400
commit814665fef7562b31d32e515c4d91b06c8b956560 (patch)
treea286ad2b5eb4cc618fceebd54594411bf61e8495
parente1b3fa0c22625d985cc7f82b7f3aa90a6fc75c2f (diff)
iwlagn: keep track of aggregated tx frames failure counter
When uCode completed the aggregated frames transmission attempt, it will send tx command response with aggregated frame status. Keep track of the failure counter which help indicate any transmission error condition. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-lib.c50
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h18
2 files changed, 68 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index a8494d0e285a..c42cb18de833 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -123,6 +123,53 @@ static void iwlagn_count_tx_err_status(struct iwl_priv *priv, u16 status)
123 } 123 }
124} 124}
125 125
126static void iwlagn_count_agg_tx_err_status(struct iwl_priv *priv, u16 status)
127{
128 status &= AGG_TX_STATUS_MSK;
129
130 switch (status) {
131 case AGG_TX_STATE_UNDERRUN_MSK:
132 priv->_agn.reply_agg_tx_stats.underrun++;
133 break;
134 case AGG_TX_STATE_BT_PRIO_MSK:
135 priv->_agn.reply_agg_tx_stats.bt_prio++;
136 break;
137 case AGG_TX_STATE_FEW_BYTES_MSK:
138 priv->_agn.reply_agg_tx_stats.few_bytes++;
139 break;
140 case AGG_TX_STATE_ABORT_MSK:
141 priv->_agn.reply_agg_tx_stats.abort++;
142 break;
143 case AGG_TX_STATE_LAST_SENT_TTL_MSK:
144 priv->_agn.reply_agg_tx_stats.last_sent_ttl++;
145 break;
146 case AGG_TX_STATE_LAST_SENT_TRY_CNT_MSK:
147 priv->_agn.reply_agg_tx_stats.last_sent_try++;
148 break;
149 case AGG_TX_STATE_LAST_SENT_BT_KILL_MSK:
150 priv->_agn.reply_agg_tx_stats.last_sent_bt_kill++;
151 break;
152 case AGG_TX_STATE_SCD_QUERY_MSK:
153 priv->_agn.reply_agg_tx_stats.scd_query++;
154 break;
155 case AGG_TX_STATE_TEST_BAD_CRC32_MSK:
156 priv->_agn.reply_agg_tx_stats.bad_crc32++;
157 break;
158 case AGG_TX_STATE_RESPONSE_MSK:
159 priv->_agn.reply_agg_tx_stats.response++;
160 break;
161 case AGG_TX_STATE_DUMP_TX_MSK:
162 priv->_agn.reply_agg_tx_stats.dump_tx++;
163 break;
164 case AGG_TX_STATE_DELAY_TX_MSK:
165 priv->_agn.reply_agg_tx_stats.delay_tx++;
166 break;
167 default:
168 priv->_agn.reply_agg_tx_stats.unknown++;
169 break;
170 }
171}
172
126static void iwlagn_set_tx_status(struct iwl_priv *priv, 173static void iwlagn_set_tx_status(struct iwl_priv *priv,
127 struct ieee80211_tx_info *info, 174 struct ieee80211_tx_info *info,
128 struct iwl5000_tx_resp *tx_resp, 175 struct iwl5000_tx_resp *tx_resp,
@@ -224,6 +271,9 @@ static int iwlagn_tx_status_reply_tx(struct iwl_priv *priv,
224 idx = SEQ_TO_INDEX(seq); 271 idx = SEQ_TO_INDEX(seq);
225 txq_id = SEQ_TO_QUEUE(seq); 272 txq_id = SEQ_TO_QUEUE(seq);
226 273
274 if (status & AGG_TX_STATUS_MSK)
275 iwlagn_count_agg_tx_err_status(priv, status);
276
227 if (status & (AGG_TX_STATE_FEW_BYTES_MSK | 277 if (status & (AGG_TX_STATE_FEW_BYTES_MSK |
228 AGG_TX_STATE_ABORT_MSK)) 278 AGG_TX_STATE_ABORT_MSK))
229 continue; 279 continue;
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index bfa4864ec6d3..74d25bcbfcb2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -984,6 +984,23 @@ struct reply_tx_error_statistics {
984 u32 unknown; 984 u32 unknown;
985}; 985};
986 986
987/* reply_agg_tx_statistics (for _agn devices) */
988struct reply_agg_tx_error_statistics {
989 u32 underrun;
990 u32 bt_prio;
991 u32 few_bytes;
992 u32 abort;
993 u32 last_sent_ttl;
994 u32 last_sent_try;
995 u32 last_sent_bt_kill;
996 u32 scd_query;
997 u32 bad_crc32;
998 u32 response;
999 u32 dump_tx;
1000 u32 delay_tx;
1001 u32 unknown;
1002};
1003
987#ifdef CONFIG_IWLWIFI_DEBUGFS 1004#ifdef CONFIG_IWLWIFI_DEBUGFS
988/* management statistics */ 1005/* management statistics */
989enum iwl_mgmt_stats { 1006enum iwl_mgmt_stats {
@@ -1444,6 +1461,7 @@ struct iwl_priv {
1444 struct iwl_bt_notif_statistics statistics_bt; 1461 struct iwl_bt_notif_statistics statistics_bt;
1445 /* counts reply_tx error */ 1462 /* counts reply_tx error */
1446 struct reply_tx_error_statistics reply_tx_stats; 1463 struct reply_tx_error_statistics reply_tx_stats;
1464 struct reply_agg_tx_error_statistics reply_agg_tx_stats;
1447#ifdef CONFIG_IWLWIFI_DEBUGFS 1465#ifdef CONFIG_IWLWIFI_DEBUGFS
1448 struct iwl_notif_statistics accum_statistics; 1466 struct iwl_notif_statistics accum_statistics;
1449 struct iwl_notif_statistics delta_statistics; 1467 struct iwl_notif_statistics delta_statistics;