aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-commands.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-commands.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-commands.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h
index 6e23a2b5cb8a..87a7f2832c53 100644
--- a/drivers/net/wireless/iwlwifi/iwl-commands.h
+++ b/drivers/net/wireless/iwlwifi/iwl-commands.h
@@ -1690,6 +1690,21 @@ enum {
1690 TX_ABORT_REQUIRED_MSK = 0x80000000, /* bits 31:31 */ 1690 TX_ABORT_REQUIRED_MSK = 0x80000000, /* bits 31:31 */
1691}; 1691};
1692 1692
1693static inline u32 iwl_tx_status_to_mac80211(u32 status)
1694{
1695 status &= TX_STATUS_MSK;
1696
1697 switch (status) {
1698 case TX_STATUS_SUCCESS:
1699 case TX_STATUS_DIRECT_DONE:
1700 return IEEE80211_TX_STAT_ACK;
1701 case TX_STATUS_FAIL_DEST_PS:
1702 return IEEE80211_TX_STAT_TX_FILTERED;
1703 default:
1704 return 0;
1705 }
1706}
1707
1693static inline bool iwl_is_tx_success(u32 status) 1708static inline bool iwl_is_tx_success(u32 status)
1694{ 1709{
1695 status &= TX_STATUS_MSK; 1710 status &= TX_STATUS_MSK;