linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhu Yi <yi.zhu@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
	Tomas Winkler <tomas.winkler@intel.com>,
	Zhu Yi <yi.zhu@intel.com>
Subject: [PATCH 3/4] iwlwifi: TX aggregation fix
Date: Thu,  2 Aug 2007 10:16:04 +0800	[thread overview]
Message-ID: <11860209712781-git-send-email-yi.zhu@intel.com> (raw)
In-Reply-To: <1186020969666-git-send-email-yi.zhu@intel.com>

From: Tomas Winkler <tomas.winkler@intel.com>

This patch fixes driver crash in case when one of aggregated
packets was aborted.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
 drivers/net/wireless/iwl-base.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwl-base.c b/drivers/net/wireless/iwl-base.c
index 44fc2cb..0209219 100644
--- a/drivers/net/wireless/iwl-base.c
+++ b/drivers/net/wireless/iwl-base.c
@@ -3595,8 +3595,14 @@ int iwl4965_tx_status_reply_tx(struct iwl_priv *priv,
 			idx = SEQ_TO_INDEX(seq);
 			txq_id = SEQ_TO_QUEUE(seq);
 
+			if (status &
+				(AGG_TX_STATE_FEW_BYTES_MSK|
+				 AGG_TX_STATE_ABORT_MSK))
+				continue;
+
 			IWL_DEBUG_TX_REPLY("FrameCnt = %d, txq_id=%d idx=%d\n",
 					   agg->frame_count, txq_id, idx);
+
 			hdr = iwl_tx_queue_get_hdr(priv, txq_id, idx);
 
 			if (idx != (SEQ_TO_SN(hdr->seq_ctrl) & 0xff)) {
@@ -3611,7 +3617,6 @@ int iwl4965_tx_status_reply_tx(struct iwl_priv *priv,
 			IWL_DEBUG_TX_REPLY("AGG Frame i=%d idx %d seq=%d\n",
 					   i, idx, SEQ_TO_SN(hdr->seq_ctrl));
 
-
 			sh = idx - start;
 			if (sh > 64 ) {
 				sh = (start - idx) + 0xff;
@@ -3640,7 +3645,8 @@ int iwl4965_tx_status_reply_tx(struct iwl_priv *priv,
 				agg->start_idx,
 				agg->bitmap0);
 
-		agg->wait_for_ba = 1;
+		if (bitmap)
+			agg->wait_for_ba = 1;
 	}
 	return 0;
 }
-- 
1.5.2

  reply	other threads:[~2007-08-02  2:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1186020965807-git-send-email-yi.zhu@intel.com>
2007-08-02  2:16 ` [PATCH 1/4] iwlwifi: Endianity fix for iwl4965_handle_data_packet function Zhu Yi
2007-08-02  2:16   ` [PATCH 2/4] iwlwifi: Endianity fix in iwl4965_calc_rssi function Zhu Yi
2007-08-02  2:16     ` Zhu Yi [this message]
2007-08-02  2:16       ` [PATCH 4/4] iwlwifi: Update version iwl-base.c stamp to 0.1.8 Zhu Yi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11860209712781-git-send-email-yi.zhu@intel.com \
    --to=yi.zhu@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=tomas.winkler@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).