Inform the rate control code if a single frame AMPDU transmission succeeds
authoradrian <adrian@FreeBSD.org>
Thu, 28 Aug 2014 07:44:59 +0000 (07:44 +0000)
committeradrian <adrian@FreeBSD.org>
Thu, 28 Aug 2014 07:44:59 +0000 (07:44 +0000)
commita3bb3db4bfc2cbf2451d297879c706700876f778
tree8cd1da9817651908be0a6c028da11fd15046e05d
parentc96a03670809c3475989e0c44baeda3424533696
Inform the rate control code if a single frame AMPDU transmission succeeds
but has some retries.

Without this, single frame transmission in AMPDU will always look like
it succeeded fine, and thus AMRR will think it's totally fine to just
keep upping the rate upwards.

Now, this is still not quite right!  For multi-frame aggregates the
completion happens in two parts - the TX done and the BA received.
The driver is currently double accounting those a little - there's no
way to say to the rate control code "I completed X frames, Y worked fine,
there were Z retries." And it's a bit odd with iwn, as the firmware
retransmits frames for us so we don't get to see how many retransmits
happened; only that it took longer than normal.  I may have to extend
the rate control API to properly track that.

So this may keep the rate lower than it should be, but that's better
than keeping it higher than it should be.

Tested:

* 5100, STA mode
sys/dev/iwn/if_iwn.c