summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlegacy/4965.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2011-08-30 13:58:27 +0200
committerStanislaw Gruszka <sgruszka@redhat.com>2011-11-15 12:59:02 +0100
commitaf038f404ffb851dcefa0c56c5c81cacd06f0903 (patch)
tree5384b91ec6a3298ac90ff9943d029b4af400f639 /drivers/net/wireless/iwlegacy/4965.c
parent8f29b456f8b2c560819f698b82ef2efc09ac47c5 (diff)
iwlegacy: move iwl-4965-{,hw,debugfs,calib}.h to 4965.h
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy/4965.c')
-rw-r--r--drivers/net/wireless/iwlegacy/4965.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlegacy/4965.c b/drivers/net/wireless/iwlegacy/4965.c
index 752564d36c98..8199e635d537 100644
--- a/drivers/net/wireless/iwlegacy/4965.c
+++ b/drivers/net/wireless/iwlegacy/4965.c
@@ -42,10 +42,8 @@
#include "iwl-core.h"
#include "iwl-io.h"
#include "iwl-helpers.h"
-#include "iwl-4965-calib.h"
#include "iwl-sta.h"
-#include "iwl-4965.h"
-#include "iwl-4965-debugfs.h"
+#include "4965.h"
#define IL_AC_UNSET -1
@@ -1829,6 +1827,28 @@ static inline u32 il4965_get_scd_ssn(struct il4965_tx_resp *tx_resp)
return le32_to_cpup(&tx_resp->u.status + tx_resp->frame_count) & MAX_SN;
}
+static inline u32 il4965_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 il4965_is_tx_success(u32 status)
+{
+ status &= TX_STATUS_MSK;
+ return (status == TX_STATUS_SUCCESS ||
+ status == TX_STATUS_DIRECT_DONE);
+}
+
/**
* il4965_tx_status_reply_tx - Handle Tx response for frames in aggregation queue
*/