From 6cef2b96e68836c10f1cf3c439854d985ca8c15b Mon Sep 17 00:00:00 2001 From: nbd Date: Sat, 22 Dec 2007 16:14:21 +0000 Subject: [PATCH] The attached trivial patch attempts to correct a problem whereby minstrel does not increment rs_rateattempts for successfully sent packets, and therefore the rate adaptation does not take place. Signed-off-by: Brian Candler git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3070 0192ed92-7a03-0410-a25b-9323aeb14dbd --- ath_rate/minstrel/minstrel.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ath_rate/minstrel/minstrel.c b/ath_rate/minstrel/minstrel.c index f52e1df..3cb508e 100644 --- a/ath_rate/minstrel/minstrel.c +++ b/ath_rate/minstrel/minstrel.c @@ -446,7 +446,6 @@ ath_rate_tx_complete(struct ath_softc *sc, const struct ath_desc *ds = &bf->bf_desc[0]; int final_rate = 0; int tries = 0; - int ndx = -1; int mrr; int final_ndx; int rate0, tries0, ndx0; @@ -485,8 +484,8 @@ ath_rate_tx_complete(struct ath_softc *sc, mrr = sc->sc_mrretry && !(ic->ic_flags & IEEE80211_F_USEPROT) && ENABLE_MRR; if (!mrr) { - if ((0 <= ndx) && (ndx < sn->num_rates)) { - sn->rs_rateattempts[ndx]++; /* only one rate was used */ + if ((0 <= final_ndx) && (final_ndx < sn->num_rates)) { + sn->rs_rateattempts[final_ndx] += tries; /* only one rate was used */ } return; } -- 2.35.1