mac80211: minstrel_ht A-MPDU fix
commit1edba29490abe9bd1c6fc8a08cd1f7a85732dd52
authorBjörn Smedman <bjorn.smedman@venatech.se>
Sun, 10 Oct 2010 20:14:25 +0000 (10 22:14 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:32:07 +0000 (9 13:32 -0800)
tree7636d506f76660bb689e573ae4d689910f13e8d4
parenta685013fb4eb415a3244697e15fbcf6cf31d8689
mac80211: minstrel_ht A-MPDU fix

commit 15d46f38df87f89242e470f5797120fa384c1fc3 upstream.

This patch fixes two problems with the minstrel_ht rate control
algorithms handling of A-MPDU frames:

1. The ampdu_len field of the tx status is not always initialized for
non-HT frames (and it would probably be unreasonable to require all
drivers to do so). This could cause rate control statistics to be
corrupted. We now trust the ampdu_len and ampdu_ack_len fields only when
the frame is marked with the IEEE80211_TX_STAT_AMPDU flag.

2. Successful transmission attempts where only recognized when the A-MPDU
subframe carrying the rate control status information was marked with the
IEEE80211_TX_STAT_ACK flag. If this information happed to be carried on a
frame that failed to be ACKed then the other subframes (which may have
succeeded) where not correctly registered. We now update rate control
statistics regardless of whether the subframe carrying the information was
ACKed or not.

Signed-off-by: Björn Smedman <bjorn.smedman@venatech.se>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/mac80211/rc80211_minstrel_ht.c