mac80211: add a missing check to the last minstrel fix
authorFelix Fietkau <nbd@nbd.name>
Thu, 1 Mar 2018 13:43:56 +0000 (14:43 +0100)
committerFelix Fietkau <nbd@nbd.name>
Thu, 1 Mar 2018 13:45:11 +0000 (14:45 +0100)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/kernel/mac80211/patches/337-mac80211-minstrel-fix-sampling-reporting-of-CCK-rate.patch

index ff2f3450b2fcbf573bf4d0d0d1a0015dc4428840..e0049c36eb60205e08b7a6b56b3baf45019e6ca6 100644 (file)
@@ -29,13 +29,14 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                        idx += 4;
        }
        return &mi->groups[group].rates[idx];
-@@ -1080,18 +1081,22 @@ minstrel_ht_get_rate(void *priv, struct
+@@ -1080,18 +1081,23 @@ minstrel_ht_get_rate(void *priv, struct
                return;
  
        sample_group = &minstrel_mcs_groups[sample_idx / MCS_GROUP_RATES];
 +      sample_idx %= MCS_GROUP_RATES;
 +
-+      if ((sample_idx >= 4) != txrc->short_preamble)
++      if (sample_group == &minstrel_mcs_groups[MINSTREL_CCK_GROUP] &&
++          (sample_idx >= 4) != txrc->short_preamble)
 +              return;
 +
        info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;