diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-09-22 12:02:02 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-10-07 18:50:48 -0400 |
commit | 69fdb710b29d096bc50123f7c97891e31ffe45f9 (patch) | |
tree | 8c8575274e648498ad3a16e2a66d1fa27f71f684 /drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |
parent | a30e3112a8bcb5bc1caa48547e597de3992e1b21 (diff) |
iwlwifi: move tx fail code to agn
The code to print out TX failure reasons is
AGN specific, so it can be in the AGN module.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-tx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index 77753b72f236..db57aea629d9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |||
@@ -1391,3 +1391,43 @@ void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv, | |||
1391 | 1391 | ||
1392 | spin_unlock_irqrestore(&priv->sta_lock, flags); | 1392 | spin_unlock_irqrestore(&priv->sta_lock, flags); |
1393 | } | 1393 | } |
1394 | |||
1395 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
1396 | const char *iwl_get_tx_fail_reason(u32 status) | ||
1397 | { | ||
1398 | #define TX_STATUS_FAIL(x) case TX_STATUS_FAIL_ ## x: return #x | ||
1399 | #define TX_STATUS_POSTPONE(x) case TX_STATUS_POSTPONE_ ## x: return #x | ||
1400 | |||
1401 | switch (status & TX_STATUS_MSK) { | ||
1402 | case TX_STATUS_SUCCESS: | ||
1403 | return "SUCCESS"; | ||
1404 | TX_STATUS_POSTPONE(DELAY); | ||
1405 | TX_STATUS_POSTPONE(FEW_BYTES); | ||
1406 | TX_STATUS_POSTPONE(BT_PRIO); | ||
1407 | TX_STATUS_POSTPONE(QUIET_PERIOD); | ||
1408 | TX_STATUS_POSTPONE(CALC_TTAK); | ||
1409 | TX_STATUS_FAIL(INTERNAL_CROSSED_RETRY); | ||
1410 | TX_STATUS_FAIL(SHORT_LIMIT); | ||
1411 | TX_STATUS_FAIL(LONG_LIMIT); | ||
1412 | TX_STATUS_FAIL(FIFO_UNDERRUN); | ||
1413 | TX_STATUS_FAIL(DRAIN_FLOW); | ||
1414 | TX_STATUS_FAIL(RFKILL_FLUSH); | ||
1415 | TX_STATUS_FAIL(LIFE_EXPIRE); | ||
1416 | TX_STATUS_FAIL(DEST_PS); | ||
1417 | TX_STATUS_FAIL(HOST_ABORTED); | ||
1418 | TX_STATUS_FAIL(BT_RETRY); | ||
1419 | TX_STATUS_FAIL(STA_INVALID); | ||
1420 | TX_STATUS_FAIL(FRAG_DROPPED); | ||
1421 | TX_STATUS_FAIL(TID_DISABLE); | ||
1422 | TX_STATUS_FAIL(FIFO_FLUSHED); | ||
1423 | TX_STATUS_FAIL(INSUFFICIENT_CF_POLL); | ||
1424 | TX_STATUS_FAIL(PASSIVE_NO_RX); | ||
1425 | TX_STATUS_FAIL(NO_BEACON_ON_RADAR); | ||
1426 | } | ||
1427 | |||
1428 | return "UNKNOWN"; | ||
1429 | |||
1430 | #undef TX_STATUS_FAIL | ||
1431 | #undef TX_STATUS_POSTPONE | ||
1432 | } | ||
1433 | #endif /* CONFIG_IWLWIFI_DEBUG */ | ||