aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-09-05 13:49:43 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-09-17 16:17:50 -0400
commite1b3fa0c22625d985cc7f82b7f3aa90a6fc75c2f (patch)
tree7d61efd1cebdd8a690402becd4c582eaf3bd4d70 /drivers/net/wireless/iwlwifi/iwl-agn-lib.c
parent54a9aa65f749673f851ef86481940394185c1b0e (diff)
iwlagn: log aggregation tx command status
For aggregated frames with block ack, different status flag will be used as part of tx command response. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-lib.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-lib.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 68a2ab399e3e..a8494d0e285a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -147,6 +147,33 @@ static void iwlagn_set_tx_status(struct iwl_priv *priv,
147 tx_resp->failure_frame); 147 tx_resp->failure_frame);
148} 148}
149 149
150#ifdef CONFIG_IWLWIFI_DEBUG
151#define AGG_TX_STATE_FAIL(x) case AGG_TX_STATE_ ## x: return #x
152
153const char *iwl_get_agg_tx_fail_reason(u16 status)
154{
155 status &= AGG_TX_STATUS_MSK;
156 switch (status) {
157 case AGG_TX_STATE_TRANSMITTED:
158 return "SUCCESS";
159 AGG_TX_STATE_FAIL(UNDERRUN_MSK);
160 AGG_TX_STATE_FAIL(BT_PRIO_MSK);
161 AGG_TX_STATE_FAIL(FEW_BYTES_MSK);
162 AGG_TX_STATE_FAIL(ABORT_MSK);
163 AGG_TX_STATE_FAIL(LAST_SENT_TTL_MSK);
164 AGG_TX_STATE_FAIL(LAST_SENT_TRY_CNT_MSK);
165 AGG_TX_STATE_FAIL(LAST_SENT_BT_KILL_MSK);
166 AGG_TX_STATE_FAIL(SCD_QUERY_MSK);
167 AGG_TX_STATE_FAIL(TEST_BAD_CRC32_MSK);
168 AGG_TX_STATE_FAIL(RESPONSE_MSK);
169 AGG_TX_STATE_FAIL(DUMP_TX_MSK);
170 AGG_TX_STATE_FAIL(DELAY_TX_MSK);
171 }
172
173 return "UNKNOWN";
174}
175#endif /* CONFIG_IWLWIFI_DEBUG */
176
150static int iwlagn_tx_status_reply_tx(struct iwl_priv *priv, 177static int iwlagn_tx_status_reply_tx(struct iwl_priv *priv,
151 struct iwl_ht_agg *agg, 178 struct iwl_ht_agg *agg,
152 struct iwl5000_tx_resp *tx_resp, 179 struct iwl5000_tx_resp *tx_resp,
@@ -203,6 +230,11 @@ static int iwlagn_tx_status_reply_tx(struct iwl_priv *priv,
203 230
204 IWL_DEBUG_TX_REPLY(priv, "FrameCnt = %d, txq_id=%d idx=%d\n", 231 IWL_DEBUG_TX_REPLY(priv, "FrameCnt = %d, txq_id=%d idx=%d\n",
205 agg->frame_count, txq_id, idx); 232 agg->frame_count, txq_id, idx);
233 IWL_DEBUG_TX_REPLY(priv, "status %s (0x%08x), "
234 "try-count (0x%08x)\n",
235 iwl_get_agg_tx_fail_reason(status),
236 status & AGG_TX_STATUS_MSK,
237 status & AGG_TX_TRY_MSK);
206 238
207 hdr = iwl_tx_queue_get_hdr(priv, txq_id, idx); 239 hdr = iwl_tx_queue_get_hdr(priv, txq_id, idx);
208 if (!hdr) { 240 if (!hdr) {