aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-commands.h15
3 files changed, 19 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 1d22ea390c0..0efde87b459 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -1864,8 +1864,7 @@ static int iwl4965_tx_status_reply_tx(struct iwl_priv *priv,
1864 info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb[0]); 1864 info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb[0]);
1865 info->status.rates[0].count = tx_resp->failure_frame + 1; 1865 info->status.rates[0].count = tx_resp->failure_frame + 1;
1866 info->flags &= ~IEEE80211_TX_CTL_AMPDU; 1866 info->flags &= ~IEEE80211_TX_CTL_AMPDU;
1867 info->flags |= iwl_is_tx_success(status) ? 1867 info->flags |= iwl_tx_status_to_mac80211(status);
1868 IEEE80211_TX_STAT_ACK : 0;
1869 iwl_hwrate_to_tx_control(priv, rate_n_flags, info); 1868 iwl_hwrate_to_tx_control(priv, rate_n_flags, info);
1870 /* FIXME: code repetition end */ 1869 /* FIXME: code repetition end */
1871 1870
@@ -2020,8 +2019,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
2020 } 2019 }
2021 } else { 2020 } else {
2022 info->status.rates[0].count = tx_resp->failure_frame + 1; 2021 info->status.rates[0].count = tx_resp->failure_frame + 1;
2023 info->flags |= iwl_is_tx_success(status) ? 2022 info->flags |= iwl_tx_status_to_mac80211(status);
2024 IEEE80211_TX_STAT_ACK : 0;
2025 iwl_hwrate_to_tx_control(priv, 2023 iwl_hwrate_to_tx_control(priv,
2026 le32_to_cpu(tx_resp->rate_n_flags), 2024 le32_to_cpu(tx_resp->rate_n_flags),
2027 info); 2025 info);
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 48982fb4499..570eaa08531 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -993,8 +993,7 @@ static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv,
993 info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb[0]); 993 info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb[0]);
994 info->status.rates[0].count = tx_resp->failure_frame + 1; 994 info->status.rates[0].count = tx_resp->failure_frame + 1;
995 info->flags &= ~IEEE80211_TX_CTL_AMPDU; 995 info->flags &= ~IEEE80211_TX_CTL_AMPDU;
996 info->flags |= iwl_is_tx_success(status) ? 996 info->flags |= iwl_tx_status_to_mac80211(status);
997 IEEE80211_TX_STAT_ACK : 0;
998 iwl_hwrate_to_tx_control(priv, rate_n_flags, info); 997 iwl_hwrate_to_tx_control(priv, rate_n_flags, info);
999 998
1000 /* FIXME: code repetition end */ 999 /* FIXME: code repetition end */
@@ -1139,8 +1138,7 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv,
1139 BUG_ON(txq_id != txq->swq_id); 1138 BUG_ON(txq_id != txq->swq_id);
1140 1139
1141 info->status.rates[0].count = tx_resp->failure_frame + 1; 1140 info->status.rates[0].count = tx_resp->failure_frame + 1;
1142 info->flags |= iwl_is_tx_success(status) ? 1141 info->flags |= iwl_tx_status_to_mac80211(status);
1143 IEEE80211_TX_STAT_ACK : 0;
1144 iwl_hwrate_to_tx_control(priv, 1142 iwl_hwrate_to_tx_control(priv,
1145 le32_to_cpu(tx_resp->rate_n_flags), 1143 le32_to_cpu(tx_resp->rate_n_flags),
1146 info); 1144 info);
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h
index 6e23a2b5cb8..87a7f2832c5 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;