diff options
| -rw-r--r-- | net/mac80211/rc80211_minstrel_ht.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index ad5da9a71da0..c5868a1de306 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c | |||
| @@ -486,7 +486,7 @@ minstrel_ht_assign_best_tp_rates(struct minstrel_ht_sta *mi, | |||
| 486 | tmp_prob = mi->groups[tmp_group].rates[tmp_idx].prob_ewma; | 486 | tmp_prob = mi->groups[tmp_group].rates[tmp_idx].prob_ewma; |
| 487 | tmp_mcs_tp = minstrel_ht_get_tp_avg(mi, tmp_group, tmp_idx, tmp_prob); | 487 | tmp_mcs_tp = minstrel_ht_get_tp_avg(mi, tmp_group, tmp_idx, tmp_prob); |
| 488 | 488 | ||
| 489 | if (tmp_cck_tp > tmp_mcs_tp) { | 489 | if (tmp_cck_tp_rate && tmp_cck_tp > tmp_mcs_tp) { |
| 490 | for(i = 0; i < MAX_THR_RATES; i++) { | 490 | for(i = 0; i < MAX_THR_RATES; i++) { |
| 491 | minstrel_ht_sort_best_tp_rates(mi, tmp_cck_tp_rate[i], | 491 | minstrel_ht_sort_best_tp_rates(mi, tmp_cck_tp_rate[i], |
| 492 | tmp_mcs_tp_rate); | 492 | tmp_mcs_tp_rate); |
| @@ -558,11 +558,19 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi) | |||
| 558 | mi->sample_slow = 0; | 558 | mi->sample_slow = 0; |
| 559 | mi->sample_count = 0; | 559 | mi->sample_count = 0; |
| 560 | 560 | ||
| 561 | /* Initialize global rate indexes */ | 561 | memset(tmp_mcs_tp_rate, 0, sizeof(tmp_mcs_tp_rate)); |
| 562 | for(j = 0; j < MAX_THR_RATES; j++){ | 562 | memset(tmp_cck_tp_rate, 0, sizeof(tmp_cck_tp_rate)); |
| 563 | tmp_mcs_tp_rate[j] = 0; | 563 | if (mi->supported[MINSTREL_CCK_GROUP]) |
| 564 | tmp_cck_tp_rate[j] = 0; | 564 | for (j = 0; j < ARRAY_SIZE(tmp_cck_tp_rate); j++) |
| 565 | } | 565 | tmp_cck_tp_rate[j] = MINSTREL_CCK_GROUP * MCS_GROUP_RATES; |
| 566 | |||
| 567 | if (mi->supported[MINSTREL_VHT_GROUP_0]) | ||
| 568 | index = MINSTREL_VHT_GROUP_0 * MCS_GROUP_RATES; | ||
| 569 | else | ||
| 570 | index = MINSTREL_HT_GROUP_0 * MCS_GROUP_RATES; | ||
| 571 | |||
| 572 | for (j = 0; j < ARRAY_SIZE(tmp_mcs_tp_rate); j++) | ||
| 573 | tmp_mcs_tp_rate[j] = index; | ||
| 566 | 574 | ||
| 567 | /* Find best rate sets within all MCS groups*/ | 575 | /* Find best rate sets within all MCS groups*/ |
| 568 | for (group = 0; group < ARRAY_SIZE(minstrel_mcs_groups); group++) { | 576 | for (group = 0; group < ARRAY_SIZE(minstrel_mcs_groups); group++) { |
