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 c51d541fbb9ed3379cbd7a70c2b895fd4cb5a627..c1af99865e8e29711db11ffd9cd6f61e9de38ab3 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;