Commit f16d2db7 authored by Helmut Schaa's avatar Helmut Schaa Committed by John W. Linville
Browse files

rt2x00: Fix tx aggregation problems with some clients



Some clients seem to rely upon the reception of BlockAckReqs to flush
their rx reorder buffer. In order to fix aggregation for these clients
rt2x00 should send a BlockAckReq if the transmission of an AMPDU
subframe fails.

Introduce a new flag TXDONE_AMPDU to indicate that this is an AMPDU
subframe and pass IEEE80211_TX_STAT_AMPDU_NO_BACK to mac80211 if an
AMPDU subframe failed during transmission.

This fixes aggregation problems with Intel 5100 Windows STAs (and maybe
others as well).
Signed-off-by: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b35e77cf
...@@ -687,6 +687,9 @@ void rt2800_txdone_entry(struct queue_entry *entry, u32 status) ...@@ -687,6 +687,9 @@ void rt2800_txdone_entry(struct queue_entry *entry, u32 status)
mcs = real_mcs; mcs = real_mcs;
} }
if (aggr == 1 || ampdu == 1)
__set_bit(TXDONE_AMPDU, &txdesc.flags);
/* /*
* Ralink has a retry mechanism using a global fallback * Ralink has a retry mechanism using a global fallback
* table. We setup this fallback table to try the immediate * table. We setup this fallback table to try the immediate
......
...@@ -353,10 +353,14 @@ void rt2x00lib_txdone(struct queue_entry *entry, ...@@ -353,10 +353,14 @@ void rt2x00lib_txdone(struct queue_entry *entry,
* which would allow the rc algorithm to better decide on * which would allow the rc algorithm to better decide on
* which rates are suitable. * which rates are suitable.
*/ */
if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { if (test_bit(TXDONE_AMPDU, &txdesc->flags) ||
tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
tx_info->flags |= IEEE80211_TX_STAT_AMPDU; tx_info->flags |= IEEE80211_TX_STAT_AMPDU;
tx_info->status.ampdu_len = 1; tx_info->status.ampdu_len = 1;
tx_info->status.ampdu_ack_len = success ? 1 : 0; tx_info->status.ampdu_ack_len = success ? 1 : 0;
if (!success)
tx_info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK;
} }
if (rate_flags & IEEE80211_TX_RC_USE_RTS_CTS) { if (rate_flags & IEEE80211_TX_RC_USE_RTS_CTS) {
......
...@@ -217,6 +217,7 @@ enum txdone_entry_desc_flags { ...@@ -217,6 +217,7 @@ enum txdone_entry_desc_flags {
TXDONE_FALLBACK, TXDONE_FALLBACK,
TXDONE_FAILURE, TXDONE_FAILURE,
TXDONE_EXCESSIVE_RETRY, TXDONE_EXCESSIVE_RETRY,
TXDONE_AMPDU,
}; };
/** /**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment