Josh Boyer 82e26b
From ae023b2795d36f0f077e157428eb7eafa29ee412 Mon Sep 17 00:00:00 2001
Josh Boyer 82e26b
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Josh Boyer 82e26b
Date: Mon, 21 Jan 2013 13:12:57 +0200
Josh Boyer 82e26b
Subject: [PATCH] Revert "iwlwifi: fix the reclaimed packet tracking upon
Josh Boyer 82e26b
 flush queue"
Josh Boyer 82e26b
Josh Boyer 82e26b
This reverts commit f590dcec944552f9a4a61155810f3abd17d6465d
Josh Boyer 82e26b
which has been reported to cause issues.
Josh Boyer 82e26b
Josh Boyer 82e26b
See https://lkml.org/lkml/2013/1/20/4 for further details.
Josh Boyer 82e26b
Josh Boyer 82e26b
Cc: stable@vger.kernel.org [3.7]
Josh Boyer 82e26b
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Josh Boyer 82e26b
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Josh Boyer 82e26b
---
Josh Boyer 82e26b
 drivers/net/wireless/iwlwifi/dvm/tx.c |   24 +++++++-----------------
Josh Boyer 82e26b
 1 files changed, 7 insertions(+), 17 deletions(-)
Josh Boyer 82e26b
Josh Boyer 82e26b
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c
Josh Boyer 82e26b
index 31534f7..2797964 100644
Josh Boyer 82e26b
--- a/drivers/net/wireless/iwlwifi/dvm/tx.c
Josh Boyer 82e26b
+++ b/drivers/net/wireless/iwlwifi/dvm/tx.c
Josh Boyer 82e26b
@@ -1153,6 +1153,13 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb,
Josh Boyer 82e26b
 			next_reclaimed = ssn;
Josh Boyer 82e26b
 		}
Josh Boyer 82e26b
 
Josh Boyer 82e26b
+		if (tid != IWL_TID_NON_QOS) {
Josh Boyer 82e26b
+			priv->tid_data[sta_id][tid].next_reclaimed =
Josh Boyer 82e26b
+				next_reclaimed;
Josh Boyer 82e26b
+			IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n",
Josh Boyer 82e26b
+						  next_reclaimed);
Josh Boyer 82e26b
+		}
Josh Boyer 82e26b
+
Josh Boyer 82e26b
 		iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs);
Josh Boyer 82e26b
 
Josh Boyer 82e26b
 		iwlagn_check_ratid_empty(priv, sta_id, tid);
Josh Boyer 82e26b
@@ -1203,28 +1210,11 @@ int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb,
Josh Boyer 82e26b
 			if (!is_agg)
Josh Boyer 82e26b
 				iwlagn_non_agg_tx_status(priv, ctx, hdr->addr1);
Josh Boyer 82e26b
 
Josh Boyer 82e26b
-			/*
Josh Boyer 82e26b
-			 * W/A for FW bug - the seq_ctl isn't updated when the
Josh Boyer 82e26b
-			 * queues are flushed. Fetch it from the packet itself
Josh Boyer 82e26b
-			 */
Josh Boyer 82e26b
-			if (!is_agg && status == TX_STATUS_FAIL_FIFO_FLUSHED) {
Josh Boyer 82e26b
-				next_reclaimed = le16_to_cpu(hdr->seq_ctrl);
Josh Boyer 82e26b
-				next_reclaimed =
Josh Boyer 82e26b
-					SEQ_TO_SN(next_reclaimed + 0x10);
Josh Boyer 82e26b
-			}
Josh Boyer 82e26b
-
Josh Boyer 82e26b
 			is_offchannel_skb =
Josh Boyer 82e26b
 				(info->flags & IEEE80211_TX_CTL_TX_OFFCHAN);
Josh Boyer 82e26b
 			freed++;
Josh Boyer 82e26b
 		}
Josh Boyer 82e26b
 
Josh Boyer 82e26b
-		if (tid != IWL_TID_NON_QOS) {
Josh Boyer 82e26b
-			priv->tid_data[sta_id][tid].next_reclaimed =
Josh Boyer 82e26b
-				next_reclaimed;
Josh Boyer 82e26b
-			IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n",
Josh Boyer 82e26b
-					   next_reclaimed);
Josh Boyer 82e26b
-		}
Josh Boyer 82e26b
-
Josh Boyer 82e26b
 		WARN_ON(!is_agg && freed != 1);
Josh Boyer 82e26b
 
Josh Boyer 82e26b
 		/*
Josh Boyer 82e26b
-- 
Josh Boyer 82e26b
1.7.6.5
Josh Boyer 82e26b