summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-commands.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-11-13 11:56:35 -0800
committerJohn W. Linville <linville@tuxdriver.com>2009-11-18 17:09:07 -0500
commitc397bf15a6067ecf39f8a771907f4721a64fd61f (patch)
treeef9e1d748335602699b94ec69b436894494bfac8 /drivers/net/wireless/iwlwifi/iwl-commands.h
parentf513dfff9622ac72c461770e1fa01d291ba6ba5a (diff)
downloadblackbird-op-linux-c397bf15a6067ecf39f8a771907f4721a64fd61f.tar.gz
blackbird-op-linux-c397bf15a6067ecf39f8a771907f4721a64fd61f.zip
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.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 {
TX_ABORT_REQUIRED_MSK = 0x80000000, /* bits 31:31 */
};
+static inline u32 iwl_tx_status_to_mac80211(u32 status)
+{
+ status &= TX_STATUS_MSK;
+
+ switch (status) {
+ case TX_STATUS_SUCCESS:
+ case TX_STATUS_DIRECT_DONE:
+ return IEEE80211_TX_STAT_ACK;
+ case TX_STATUS_FAIL_DEST_PS:
+ return IEEE80211_TX_STAT_TX_FILTERED;
+ default:
+ return 0;
+ }
+}
+
static inline bool iwl_is_tx_success(u32 status)
{
status &= TX_STATUS_MSK;
OpenPOWER on IntegriCloud