diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-11-13 14:56:35 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-18 17:09:07 -0500 |
commit | c397bf15a6067ecf39f8a771907f4721a64fd61f (patch) | |
tree | ef9e1d748335602699b94ec69b436894494bfac8 /drivers/net/wireless/iwlwifi/iwl-commands.h | |
parent | f513dfff9622ac72c461770e1fa01d291ba6ba5a (diff) |
iwlwifi: report PS filtered status
When a frame is sent to a sleeping station, the
microcode reports TX_STATUS_FAIL_DEST_PS as its
status -- we need to translate that to the flag
that mac80211 expects.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-commands.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-commands.h | 15 |
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 | ||
1693 | static 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 | |||
1693 | static inline bool iwl_is_tx_success(u32 status) | 1708 | static inline bool iwl_is_tx_success(u32 status) |
1694 | { | 1709 | { |
1695 | status &= TX_STATUS_MSK; | 1710 | status &= TX_STATUS_MSK; |