summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00/rt2x00queue.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2012-04-02 15:21:06 +0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-12 00:24:01 +0400
commite66a8ddff72e85605f2212a0ebc666c7e9116641 (patch)
tree3e7771b8eecf67db45fe8c71691f8abe5258e71f /drivers/net/wireless/rt2x00/rt2x00queue.c
parentcefa5fd29756c608cd9ad67a358324972f7fbc25 (diff)
downloadlinux-e66a8ddff72e85605f2212a0ebc666c7e9116641.tar.xz
rt2x00: do not generate seqno in h/w if QOS is disabled
This is workaround H/W or F/W bug, see in code comments. Without the fix ping can receive duplicated ICMP frames while associated with legacy AP. Reported-by: Walter Goldens <goldenstranger@yahoo.com> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00queue.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index acd013353cc7..8ecf409476cd 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -213,8 +213,19 @@ static void rt2x00queue_create_tx_descriptor_seq(struct rt2x00_dev *rt2x00dev,
__set_bit(ENTRY_TXD_GENERATE_SEQ, &txdesc->flags);
- if (!test_bit(REQUIRE_SW_SEQNO, &rt2x00dev->cap_flags))
- return;
+ if (!test_bit(REQUIRE_SW_SEQNO, &rt2x00dev->cap_flags)) {
+ /*
+ * rt2800 has a H/W (or F/W) bug, device incorrectly increase
+ * seqno on retransmited data (non-QOS) frames. To workaround
+ * the problem let's generate seqno in software if QOS is
+ * disabled.
+ */
+ if (test_bit(CONFIG_QOS_DISABLED, &rt2x00dev->flags))
+ __clear_bit(ENTRY_TXD_GENERATE_SEQ, &txdesc->flags);
+ else
+ /* H/W will generate sequence number */
+ return;
+ }
/*
* The hardware is not able to insert a sequence number. Assign a