Linux wireless drivers development
 help / color / mirror / Atom feed
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>,
	Wey-Yi Guy <wey-yi.w.guy@intel.com>
Subject: [PATCH 04/12] iwlagn: update rate scaling with BA notifications
Date: Thu, 22 Sep 2011 15:14:52 -0700	[thread overview]
Message-ID: <1316729700-1770-5-git-send-email-wey-yi.w.guy@intel.com> (raw)
In-Reply-To: <1316729700-1770-1-git-send-email-wey-yi.w.guy@intel.com>

From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

In the current code, the rate scaling isn't fed with
statistics from the BA notifications.

This is since my patch:

	iwlagn: reclaim the packets in transport layer

Fix that.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn-tx.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 12a9808..0e5d649 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -342,6 +342,8 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 
 	iwl_update_stats(priv, true, fc, len);
 
+	memset(&info->status, 0, sizeof(info->status));
+
 	info->driver_data[0] = ctx;
 	info->driver_data[1] = dev_cmd;
 
@@ -580,6 +582,9 @@ static void iwl_rx_reply_tx_agg(struct iwl_priv *priv,
 		IWL_DEBUG_COEX(priv, "receive reply tx w/ bt_kill\n");
 	}
 
+	if (tx_resp->frame_count == 1)
+		return;
+
 	/* Construct bit-map of pending frames within Tx window */
 	for (i = 0; i < tx_resp->frame_count; i++) {
 		u16 fstatus = le16_to_cpu(frame_status[i].status);
@@ -938,7 +943,10 @@ int iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv,
 		else
 			WARN_ON_ONCE(1);
 
-		if (freed == 0) {
+		info = IEEE80211_SKB_CB(skb);
+		kmem_cache_free(priv->tx_cmd_pool, (info->driver_data[1]));
+
+		if (freed == 1) {
 			/* this is the first skb we deliver in this batch */
 			/* put the rate scaling data there */
 			info = IEEE80211_SKB_CB(skb);
@@ -951,9 +959,6 @@ int iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv,
 						    info);
 		}
 
-		info = IEEE80211_SKB_CB(skb);
-		kmem_cache_free(priv->tx_cmd_pool, (info->driver_data[1]));
-
 		ieee80211_tx_status_irqsafe(priv->hw, skb);
 	}
 
-- 
1.7.0.4


  parent reply	other threads:[~2011-09-22 23:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-22 22:14 [PATCH 00/12] update for 3.2 Wey-Yi Guy
2011-09-22 22:14 ` [PATCH 01/12] MAINTAINERS: update iwlwifi Wey-Yi Guy
2011-09-22 22:14 ` [PATCH 02/12] iwlagn: set the sequence control from the transport layer Wey-Yi Guy
2011-09-22 22:14 ` [PATCH 03/12] iwlagn: add debugging to show probe related info in scan notification Wey-Yi Guy
2011-09-22 22:14 ` Wey-Yi Guy [this message]
2011-09-22 22:14 ` [PATCH 05/12] iwlagn: use kcalloc when possible for array allocation Wey-Yi Guy
2011-09-22 22:14 ` [PATCH 06/12] iwlagn: fix dangling scan request Wey-Yi Guy
2011-09-22 22:14 ` [PATCH 07/12] iwlagn: fix slot programming Wey-Yi Guy
2011-09-22 22:14 ` [PATCH 08/12] iwlagn: remove Kelvin support Wey-Yi Guy
2011-09-22 22:14 ` [PATCH 09/12] iwlagn: make iwl_scan_cancel_timeout void Wey-Yi Guy
2011-09-22 22:14 ` [PATCH 10/12] iwlagn: refactor scan complete Wey-Yi Guy
2011-09-22 22:14 ` [PATCH 11/12] iwlagn: move iwl_process_scan_complete up Wey-Yi Guy
2011-09-22 22:15 ` [PATCH 12/12] iwlagn: fix scan complete processing Wey-Yi Guy

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=1316729700-1770-5-git-send-email-wey-yi.w.guy@intel.com \
    --to=wey-yi.w.guy@intel.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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