linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: linux-wireless@vger.kernel.org
Cc: Helmut Schaa <helmut.schaa@googlemail.com>,
	Stanislaw Gruszka <sgruszka@redhat.com>
Subject: [PATCH 02/11] rt2800: don't set ht parameters for non-aggregated frames
Date: Mon, 19 Dec 2016 11:52:48 +0100	[thread overview]
Message-ID: <1482144777-16760-3-git-send-email-sgruszka@redhat.com> (raw)
In-Reply-To: <1482144777-16760-1-git-send-email-sgruszka@redhat.com>

Do not set ampdu_density and ba_size for frames without AMPDU bit i.e.
frames that will not be aggregated to AMPDU.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/ralink/rt2x00/rt2x00queue.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
index 68b620b..b2364d3 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
@@ -306,13 +306,12 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 	struct ieee80211_tx_rate *txrate = &tx_info->control.rates[0];
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct rt2x00_sta *sta_priv = NULL;
+	u8 density = 0;
 
 	if (sta) {
-		txdesc->u.ht.mpdu_density =
-		    sta->ht_cap.ampdu_density;
-
 		sta_priv = sta_to_rt2x00_sta(sta);
 		txdesc->u.ht.wcid = sta_priv->wcid;
+		density = sta->ht_cap.ampdu_density;
 	}
 
 	/*
@@ -345,8 +344,6 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 		return;
 	}
 
-	txdesc->u.ht.ba_size = 7;	/* FIXME: What value is needed? */
-
 	/*
 	 * Only one STBC stream is supported for now.
 	 */
@@ -358,8 +355,11 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 	 * frames that are intended to probe a specific tx rate.
 	 */
 	if (tx_info->flags & IEEE80211_TX_CTL_AMPDU &&
-	    !(tx_info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE))
+	    !(tx_info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE)) {
 		__set_bit(ENTRY_TXD_HT_AMPDU, &txdesc->flags);
+		txdesc->u.ht.mpdu_density = density;
+		txdesc->u.ht.ba_size = 7; /* FIXME: What value is needed? */
+	}
 
 	/*
 	 * Set 40Mhz mode if necessary (for legacy rates this will
-- 
1.7.1

  parent reply	other threads:[~2016-12-19 10:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-19 10:52 [PATCH 00/11] rt2800 patches 19.12.2016 Stanislaw Gruszka
2016-12-19 10:52 ` [PATCH 01/11] rt2800: make rx ampdu_factor depend on number of rx chains Stanislaw Gruszka
2016-12-30 12:08   ` Kalle Valo
2016-12-19 10:52 ` Stanislaw Gruszka [this message]
2016-12-19 10:52 ` [PATCH 03/11] rt2800: set minimum MPDU and PSDU lengths to sane values Stanislaw Gruszka
2016-12-19 10:52 ` [PATCH 04/11] rt2800: set MAX_PSDU len according to remote STAs capabilities Stanislaw Gruszka
2016-12-19 10:52 ` [PATCH 05/11] rt2800: rename adjust_freq_offset function Stanislaw Gruszka
2016-12-19 10:52 ` [PATCH 06/11] rt2800: warn if doing VCO recalibration for unknow RF chip Stanislaw Gruszka
2016-12-19 10:52 ` [PATCH 07/11] rt2800: perform VCO recalibration for RF5592 chip Stanislaw Gruszka
2016-12-19 10:52 ` [PATCH 08/11] rt2x00: merge agc and vco works with link tuner Stanislaw Gruszka
2016-12-19 10:52 ` [PATCH 09/11] rt2800: replace mdelay by usleep on vco calibration Stanislaw Gruszka
2016-12-19 10:52 ` [PATCH 10/11] rt2800: replace msleep() with usleep_range() on channel switch Stanislaw Gruszka
2016-12-19 10:52 ` [PATCH 11/11] rt2x00: add mutex to synchronize config and link tuner Stanislaw Gruszka
2016-12-30 12:04   ` [11/11] " Kalle Valo

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=1482144777-16760-3-git-send-email-sgruszka@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=helmut.schaa@googlemail.com \
    --cc=linux-wireless@vger.kernel.org \
    /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).