ath9k: fix rate control fallback rate selection
commitf58a7b783d3642807ba44af27315b83a7d8ae525
authorFelix Fietkau <nbd@openwrt.org>
Fri, 19 Feb 2010 00:46:36 +0000 (19 01:46 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Mar 2010 15:49:59 +0000 (15 08:49 -0700)
treec629d20e08c07a0808c24244589e4b6761f04878
parent9ba155b84391989fb97ddb210c741d6abc44a613
ath9k: fix rate control fallback rate selection

commit 5c0ba62fd4b2dce08055a89600f1d834f9f0fe9e upstream.

When selecting the tx fallback rate, rc.c used a separate variable
'nrix' for storing the next rate index, however it did not use that as
reference for further rate index lowering. Because of that, it ended up
reusing the same rate for multiple multi-rate retry stages, thus
decreasing delivery probability under changing link conditions.

This patch removes the separate (unnecessary) variable and fixes
fallback the way it was intended to work.
This should result in increased throughput and better link stability.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/ath/ath9k/rc.c