aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Halperin <dhalperi@cs.washington.edu>2010-04-18 12:27:58 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-04-30 18:34:31 -0400
commite3a3cd8789e1daf1b5af70d3252cab50cd3824c9 (patch)
treef5b24a2371d59c9b3930504b5a80774a61566a5c
parent17f36fc6ef3d1ab15f9d2160a9daa107db0887ca (diff)
iwlwifi: set AMPDU status variables correctly
The TX status code is currently abusing the ampdu_ack_map field (a bitmap) to count the number of successfully received frames. The comments in mac80211.h show there are actually three different, relevant variables, of which we are currently using two, both incorrectly. Fix this by making - ampdu_ack_len -> the number of ACKed frames (i.e. successes) - ampdu_ack_map -> the bitmap - ampdu_len -> the total number of frames sent (i.e., attempts) to match the header file (and verified with ath9k's usage) and updating Intel's RS code to match. Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c10
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c5
2 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 8f8d5e3e688d..f01f242659c3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -867,14 +867,14 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
867 rs_get_tbl_info_from_mcs(tx_rate, priv->band, &tbl_type, 867 rs_get_tbl_info_from_mcs(tx_rate, priv->band, &tbl_type,
868 &rs_index); 868 &rs_index);
869 rs_collect_tx_data(curr_tbl, rs_index, 869 rs_collect_tx_data(curr_tbl, rs_index,
870 info->status.ampdu_ack_len, 870 info->status.ampdu_len,
871 info->status.ampdu_ack_map); 871 info->status.ampdu_ack_len);
872 872
873 /* Update success/fail counts if not searching for new mode */ 873 /* Update success/fail counts if not searching for new mode */
874 if (lq_sta->stay_in_tbl) { 874 if (lq_sta->stay_in_tbl) {
875 lq_sta->total_success += info->status.ampdu_ack_map; 875 lq_sta->total_success += info->status.ampdu_ack_len;
876 lq_sta->total_failed += (info->status.ampdu_ack_len - 876 lq_sta->total_failed += (info->status.ampdu_len -
877 info->status.ampdu_ack_map); 877 info->status.ampdu_ack_len);
878 } 878 }
879 } else { 879 } else {
880 /* 880 /*
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 95e263f1d117..c2a5c85542bf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -1233,8 +1233,9 @@ static int iwlagn_tx_status_reply_compressed_ba(struct iwl_priv *priv,
1233 memset(&info->status, 0, sizeof(info->status)); 1233 memset(&info->status, 0, sizeof(info->status));
1234 info->flags |= IEEE80211_TX_STAT_ACK; 1234 info->flags |= IEEE80211_TX_STAT_ACK;
1235 info->flags |= IEEE80211_TX_STAT_AMPDU; 1235 info->flags |= IEEE80211_TX_STAT_AMPDU;
1236 info->status.ampdu_ack_map = successes; 1236 info->status.ampdu_ack_len = successes;
1237 info->status.ampdu_ack_len = agg->frame_count; 1237 info->status.ampdu_ack_map = bitmap;
1238 info->status.ampdu_len = agg->frame_count;
1238 iwlagn_hwrate_to_tx_control(priv, agg->rate_n_flags, info); 1239 iwlagn_hwrate_to_tx_control(priv, agg->rate_n_flags, info);
1239 1240
1240 IWL_DEBUG_TX_REPLY(priv, "Bitmap %llx\n", (unsigned long long)bitmap); 1241 IWL_DEBUG_TX_REPLY(priv, "Bitmap %llx\n", (unsigned long long)bitmap);