a3ed91a522fbfaffd80fa26cc3bef1f33b621a5e
[librecmc/librecmc.git] / package / madwifi / patches / 110-minstrel_counters.patch
1 diff --exclude '*~' -uNr madwifi-dfs-r3053.orig/ath_rate/minstrel/minstrel.c madwifi-dfs-r3053/ath_rate/minstrel/minstrel.c
2 --- madwifi-dfs-r3053.orig/ath_rate/minstrel/minstrel.c 2007-12-21 13:34:23.000000000 +0000
3 +++ madwifi-dfs-r3053/ath_rate/minstrel/minstrel.c      2007-12-21 14:29:07.000000000 +0000
4 @@ -449,7 +449,6 @@
5                 const struct ath_desc *ds = &bf->bf_desc[0];
6                 int final_rate = 0;
7                 int tries = 0;
8 -               int ndx = -1;
9                 int mrr;
10                 int final_ndx;
11                 int rate0, tries0, ndx0;
12 @@ -488,8 +487,8 @@
13                 mrr = sc->sc_mrretry && !(ic->ic_flags & IEEE80211_F_USEPROT) && ENABLE_MRR;
14  
15                 if (!mrr) {
16 -                       if ((0 <= ndx) && (ndx < sn->num_rates)) {
17 -                               sn->rs_rateattempts[ndx]++; /* only one rate was used */
18 +                       if ((0 <= final_ndx) && (final_ndx < sn->num_rates)) {
19 +                               sn->rs_rateattempts[final_ndx]++; /* only one rate was used */
20                         }
21                         return;
22                 }