mac80211: fix a minstrel_ht off-by-one bug (patch by Christian Lamparter)
[openwrt.git] / 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;