From: Ivo van Doorn <ivdoorn@gmail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com
Subject: [PATCH 6/7] rt2x00: Forbid aggregation for STAs not programmed into the hw
Date: Thu, 8 Sep 2011 14:38:36 +0200 [thread overview]
Message-ID: <201109081438.37130.IvDoorn@gmail.com> (raw)
In-Reply-To: <201109081438.02330.IvDoorn@gmail.com>
From: Helmut Schaa <helmut.schaa@googlemail.com>
If a STA is not known by the hw (i.e. has no WCID assigned) don't allow
aggregation since this might mess up tx status reports and we won't be
able to distinguish the reports of multiple WCID-less STAs.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
drivers/net/wireless/rt2x00/rt2800lib.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 7edd487..2f4d51a 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -4489,8 +4489,19 @@ int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta, u16 tid, u16 *ssn,
u8 buf_size)
{
+ struct rt2x00_sta *sta_priv = (struct rt2x00_sta *)sta->drv_priv;
int ret = 0;
+ /*
+ * Don't allow aggregation for stations the hardware isn't aware
+ * of because tx status reports for frames to an unknown station
+ * always contain wcid=255 and thus we can't distinguish between
+ * multiple stations which leads to unwanted situations when the
+ * hw reorders frames due to aggregation.
+ */
+ if (sta_priv->wcid < 0)
+ return 1;
+
switch (action) {
case IEEE80211_AMPDU_RX_START:
case IEEE80211_AMPDU_RX_STOP:
--
1.7.3.4
next prev parent reply other threads:[~2011-09-08 12:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-08 12:34 [PATCH 1/7] rt2x00: Move bssidx calculation into its own function Ivo van Doorn
2011-09-08 12:36 ` [PATCH 2/7] rt2x00: Introduce sta_add/remove callbacks Ivo van Doorn
2011-09-08 12:36 ` [PATCH 3/7] rt2x00: Add WCID to crypto struct Ivo van Doorn
2011-09-08 12:37 ` [PATCH 4/7] rt2x00: Add WCID to HT TX descriptor Ivo van Doorn
2011-09-08 12:38 ` [PATCH 5/7] rt2x00: Make use of sta_add/remove callbacks in rt2800 Ivo van Doorn
2011-09-08 12:38 ` Ivo van Doorn [this message]
2011-09-08 12:39 ` [PATCH 7/7] rt2x00: Use the available helper functions to initialize the WCID table Ivo van Doorn
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=201109081438.37130.IvDoorn@gmail.com \
--to=ivdoorn@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=users@rt2x00.serialmonkey.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).