mac80211: fix a minstrel_ht off-by-one bug (patch by Christian Lamparter)
authorFelix Fietkau <nbd@openwrt.org>
Fri, 16 Apr 2010 21:55:37 +0000 (21:55 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 16 Apr 2010 21:55:37 +0000 (21:55 +0000)
SVN-Revision: 20950

package/mac80211/patches/530-minstrel_ht.patch

index c51d541..c1af998 100644 (file)
 +              if (!mg->supported)
 +                      continue;
 +
-+              if (++mg->index > MCS_GROUP_RATES) {
++              if (++mg->index >= MCS_GROUP_RATES) {
 +                      mg->index = 0;
-+                      if (++mg->column > ARRAY_SIZE(sample_table))
++                      if (++mg->column >= ARRAY_SIZE(sample_table))
 +                              mg->column = 0;
 +              }
 +              break;