iwlwifi: mvm: rs: consider a missing BA as a single tx failure
authorEyal Shapira <eyal@wizery.com>
Wed, 12 Nov 2014 11:30:20 +0000 (13:30 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 23 Nov 2014 18:05:32 +0000 (20:05 +0200)
The fw now indicates missing BA with ampdu_ack_len=0.

This will make the whole aggregation being marked
as failed, although it's most likely not the case (and
only the BA itself was failed).

Consider this case as a single tx failure.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/rs.c

index c05f5a509a5d042e33a66b21ed5bf3304e89b3da..30ceb67ed7a7a22a86c376f9713a4af9d8e84125 100644 (file)
@@ -1204,6 +1204,13 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
         * first index into rate scale table.
         */
        if (info->flags & IEEE80211_TX_STAT_AMPDU) {
+               /* ampdu_ack_len = 0 marks no BA was received. In this case
+                * treat it as a single frame loss as we don't want the success
+                * ratio to dip too quickly because a BA wasn't received
+                */
+               if (info->status.ampdu_ack_len == 0)
+                       info->status.ampdu_len = 1;
+
                ucode_rate = le32_to_cpu(table->rs_table[0]);
                rs_rate_from_ucode_rate(ucode_rate, info->band, &rate);
                rs_collect_tx_data(lq_sta, curr_tbl, rate.index,