diff mbox

[3.5.y.z,extended,stable] Patch "iwlwifi: fix the reclaimed packet tracking upon flush queue" has been added to staging queue

Message ID 1358916059-21420-1-git-send-email-herton.krzesinski@canonical.com
State New
Headers show

Commit Message

Herton Ronaldo Krzesinski Jan. 23, 2013, 4:40 a.m. UTC
This is a note to let you know that I have just added a patch titled

    iwlwifi: fix the reclaimed packet tracking upon flush queue

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Herton

------

From 4e1e360b8885ee90a892fc31b33b55c9ba79dafb Mon Sep 17 00:00:00 2001
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Date: Mon, 31 Dec 2012 09:26:10 +0200
Subject: [PATCH] iwlwifi: fix the reclaimed packet tracking upon flush queue

commit f590dcec944552f9a4a61155810f3abd17d6465d upstream.

There's a bug in the currently released firmware version,
the sequence control in the Tx response isn't updated in
all cases. Take it from the packet as a workaround.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
[ herton: iwlwifi/dvm/tx.c -> iwlwifi/iwl-agn-tx.c, adjust context ]
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-tx.c |   24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

--
1.7.9.5

Comments

Grumbach, Emmanuel Jan. 23, 2013, 7:54 a.m. UTC | #1
> 
> This is a note to let you know that I have just added a patch titled
> 
>     iwlwifi: fix the reclaimed packet tracking upon flush queue
> 
> to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree which can be
> found at:
> 
> 
> http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-
> 3.5.y-queue
> 
> If you, or anyone else, feels it should not be added to this tree, please reply to
> this email.
> 
I do - please don't queue this patch. People complained. I am reverting it in 3.7.
Look at https://lkml.org/lkml/2013/1/20/6 for more data.

---------------------------------------------------------------------
A member of the Intel Corporation group of companies

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
Herton Ronaldo Krzesinski Jan. 23, 2013, 1:09 p.m. UTC | #2
On Wed, Jan 23, 2013 at 07:54:04AM +0000, Grumbach, Emmanuel wrote:
> > 
> > This is a note to let you know that I have just added a patch titled
> > 
> >     iwlwifi: fix the reclaimed packet tracking upon flush queue
> > 
> > to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree which can be
> > found at:
> > 
> > 
> > http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-
> > 3.5.y-queue
> > 
> > If you, or anyone else, feels it should not be added to this tree, please reply to
> > this email.
> > 
> I do - please don't queue this patch. People complained. I am reverting it in 3.7.
> Look at https://lkml.org/lkml/2013/1/20/6 for more data.

I dropped it from the queue, thanks.

> 
> ---------------------------------------------------------------------
> A member of the Intel Corporation group of companies
> 
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
diff mbox

Patch

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index ca0e7c7..9f2fed0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -1145,13 +1145,6 @@  int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb,
 			next_reclaimed = ssn;
 		}

-		if (tid != IWL_TID_NON_QOS) {
-			priv->tid_data[sta_id][tid].next_reclaimed =
-				next_reclaimed;
-			IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n",
-						  next_reclaimed);
-		}
-
 		iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs);

 		iwlagn_check_ratid_empty(priv, sta_id, tid);
@@ -1202,9 +1195,26 @@  int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb,
 			if (!is_agg)
 				iwlagn_non_agg_tx_status(priv, ctx, hdr->addr1);

+			/*
+			 * W/A for FW bug - the seq_ctl isn't updated when the
+			 * queues are flushed. Fetch it from the packet itself
+			 */
+			if (!is_agg && status == TX_STATUS_FAIL_FIFO_FLUSHED) {
+				next_reclaimed = le16_to_cpu(hdr->seq_ctrl);
+				next_reclaimed =
+					SEQ_TO_SN(next_reclaimed + 0x10);
+			}
+
 			freed++;
 		}

+		if (tid != IWL_TID_NON_QOS) {
+			priv->tid_data[sta_id][tid].next_reclaimed =
+				next_reclaimed;
+			IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n",
+					   next_reclaimed);
+		}
+
 		WARN_ON(!is_agg && freed != 1);
 	}