aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-tx.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-05-29 04:35:08 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-03 15:00:24 -0400
commita332f8d618a7bdb0096c7b21555120a1822cedec (patch)
tree4535d0e93f742c324d77314f961090b3cf71a24d /drivers/net/wireless/iwlwifi/iwl-tx.c
parent001caff0da8784989ef208af0f39d55ea07dfef5 (diff)
iwlwifi: move tx response common handlers to iwlcore
This pach moves common tx response handlers to the header files and iwl-tx.c. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-tx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 0b822b5ab523..885a4c11ac49 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -1060,3 +1060,33 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
1060 return ret ? ret : idx; 1060 return ret ? ret : idx;
1061} 1061}
1062 1062
1063#ifdef CONFIG_IWLWIF_DEBUG
1064#define TX_STATUS_ENTRY(x) case TX_STATUS_FAIL_ ## x: return #x
1065
1066const char *iwl_get_tx_fail_reason(u32 status)
1067{
1068 switch (status & TX_STATUS_MSK) {
1069 case TX_STATUS_SUCCESS:
1070 return "SUCCESS";
1071 TX_STATUS_ENTRY(SHORT_LIMIT);
1072 TX_STATUS_ENTRY(LONG_LIMIT);
1073 TX_STATUS_ENTRY(FIFO_UNDERRUN);
1074 TX_STATUS_ENTRY(MGMNT_ABORT);
1075 TX_STATUS_ENTRY(NEXT_FRAG);
1076 TX_STATUS_ENTRY(LIFE_EXPIRE);
1077 TX_STATUS_ENTRY(DEST_PS);
1078 TX_STATUS_ENTRY(ABORTED);
1079 TX_STATUS_ENTRY(BT_RETRY);
1080 TX_STATUS_ENTRY(STA_INVALID);
1081 TX_STATUS_ENTRY(FRAG_DROPPED);
1082 TX_STATUS_ENTRY(TID_DISABLE);
1083 TX_STATUS_ENTRY(FRAME_FLUSHED);
1084 TX_STATUS_ENTRY(INSUFFICIENT_CF_POLL);
1085 TX_STATUS_ENTRY(TX_LOCKED);
1086 TX_STATUS_ENTRY(NO_BEACON_ON_RADAR);
1087 }
1088
1089 return "UNKNOWN";
1090}
1091EXPORT_SYMBOL(iwl_get_tx_fail_reason);
1092#endif /* CONFIG_IWLWIFI_DEBUG */