diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2012-04-02 07:21:06 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-11 16:24:01 -0400 |
commit | e66a8ddff72e85605f2212a0ebc666c7e9116641 (patch) | |
tree | 3e7771b8eecf67db45fe8c71691f8abe5258e71f /drivers/net/wireless/rt2x00 | |
parent | cefa5fd29756c608cd9ad67a358324972f7fbc25 (diff) |
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')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 15 |
3 files changed, 24 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 8de9bfc4e51a..5583214721e0 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -693,6 +693,7 @@ enum rt2x00_state_flags { | |||
693 | CONFIG_CHANNEL_HT40, | 693 | CONFIG_CHANNEL_HT40, |
694 | CONFIG_POWERSAVING, | 694 | CONFIG_POWERSAVING, |
695 | CONFIG_HT_DISABLED, | 695 | CONFIG_HT_DISABLED, |
696 | CONFIG_QOS_DISABLED, | ||
696 | 697 | ||
697 | /* | 698 | /* |
698 | * Mark we currently are sequentially reading TX_STA_FIFO register | 699 | * Mark we currently are sequentially reading TX_STA_FIFO register |
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 2df2eb6d3e06..b49773ef72f2 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -709,9 +709,19 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw, | |||
709 | rt2x00dev->intf_associated--; | 709 | rt2x00dev->intf_associated--; |
710 | 710 | ||
711 | rt2x00leds_led_assoc(rt2x00dev, !!rt2x00dev->intf_associated); | 711 | rt2x00leds_led_assoc(rt2x00dev, !!rt2x00dev->intf_associated); |
712 | |||
713 | clear_bit(CONFIG_QOS_DISABLED, &rt2x00dev->flags); | ||
712 | } | 714 | } |
713 | 715 | ||
714 | /* | 716 | /* |
717 | * Check for access point which do not support 802.11e . We have to | ||
718 | * generate data frames sequence number in S/W for such AP, because | ||
719 | * of H/W bug. | ||
720 | */ | ||
721 | if (changes & BSS_CHANGED_QOS && !bss_conf->qos) | ||
722 | set_bit(CONFIG_QOS_DISABLED, &rt2x00dev->flags); | ||
723 | |||
724 | /* | ||
715 | * When the erp information has changed, we should perform | 725 | * When the erp information has changed, we should perform |
716 | * additional configuration steps. For all other changes we are done. | 726 | * additional configuration steps. For all other changes we are done. |
717 | */ | 727 | */ |
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, | |||
213 | 213 | ||
214 | __set_bit(ENTRY_TXD_GENERATE_SEQ, &txdesc->flags); | 214 | __set_bit(ENTRY_TXD_GENERATE_SEQ, &txdesc->flags); |
215 | 215 | ||
216 | if (!test_bit(REQUIRE_SW_SEQNO, &rt2x00dev->cap_flags)) | 216 | if (!test_bit(REQUIRE_SW_SEQNO, &rt2x00dev->cap_flags)) { |
217 | return; | 217 | /* |
218 | * rt2800 has a H/W (or F/W) bug, device incorrectly increase | ||
219 | * seqno on retransmited data (non-QOS) frames. To workaround | ||
220 | * the problem let's generate seqno in software if QOS is | ||
221 | * disabled. | ||
222 | */ | ||
223 | if (test_bit(CONFIG_QOS_DISABLED, &rt2x00dev->flags)) | ||
224 | __clear_bit(ENTRY_TXD_GENERATE_SEQ, &txdesc->flags); | ||
225 | else | ||
226 | /* H/W will generate sequence number */ | ||
227 | return; | ||
228 | } | ||
218 | 229 | ||
219 | /* | 230 | /* |
220 | * The hardware is not able to insert a sequence number. Assign a | 231 | * The hardware is not able to insert a sequence number. Assign a |