mac80211: fix cck rate sampling in minstrel_ht
authorFelix Fietkau <nbd@openwrt.org>
Fri, 28 Jun 2013 19:14:54 +0000 (19:14 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 28 Jun 2013 19:14:54 +0000 (19:14 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 37078

package/kernel/mac80211/patches/300-pending_work.patch

index 11be868..824d939 100644 (file)
                        chip_reset = true;
  
                mutex_unlock(&priv->htc_pm_lock);
+--- a/net/mac80211/rc80211_minstrel_ht.c
++++ b/net/mac80211/rc80211_minstrel_ht.c
+@@ -804,10 +804,18 @@ minstrel_ht_get_rate(void *priv, struct 
+       sample_group = &minstrel_mcs_groups[sample_idx / MCS_GROUP_RATES];
+       info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;
++      rate->count = 1;
++
++      if (sample_idx / MCS_GROUP_RATES == MINSTREL_CCK_GROUP) {
++              int idx = sample_idx % ARRAY_SIZE(mp->cck_rates);
++              rate->idx = mp->cck_rates[idx];
++              rate->flags = 0;
++              return;
++      }
++
+       rate->idx = sample_idx % MCS_GROUP_RATES +
+                   (sample_group->streams - 1) * MCS_GROUP_RATES;
+       rate->flags = IEEE80211_TX_RC_MCS | sample_group->flags;
+-      rate->count = 1;
+ }
+ static void