fix madwifi compile for iop32x
[openwrt.git] / package / madwifi / patches / 110-minstrel_counters.patch
1 Index: trunk/ath_rate/minstrel/minstrel.c
2 ===================================================================
3 --- trunk/ath_rate/minstrel/minstrel.c  (revision 3065)
4 +++ trunk/ath_rate/minstrel/minstrel.c  (working copy)
5 @@ -446,7 +446,6 @@
6                 const struct ath_desc *ds = &bf->bf_desc[0];
7                 int final_rate = 0;
8                 int tries = 0;
9 -               int ndx = -1;
10                 int mrr;
11                 int final_ndx;
12                 int rate0, tries0, ndx0;
13 @@ -485,8 +484,8 @@
14                 mrr = sc->sc_mrretry && !(ic->ic_flags & IEEE80211_F_USEPROT) && ENABLE_MRR;
15  
16                 if (!mrr) {
17 -                       if ((0 <= ndx) && (ndx < sn->num_rates)) {
18 -                               sn->rs_rateattempts[ndx]++; /* only one rate was used */
19 +                       if ((0 <= final_ndx) && (final_ndx < sn->num_rates)) {
20 +                               sn->rs_rateattempts[final_ndx] += tries; /* only one rate was used */
21                         }
22                         return;
23                 }