diff options
Diffstat (limited to 'net/mac80211/rc80211_minstrel_ht.c')
-rw-r--r-- | net/mac80211/rc80211_minstrel_ht.c | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index bce14fbfc3b6..8212a8bebf06 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c | |||
@@ -598,19 +598,46 @@ minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta, | |||
598 | sample = true; | 598 | sample = true; |
599 | minstrel_ht_set_rate(mp, mi, &ar[0], sample_idx, | 599 | minstrel_ht_set_rate(mp, mi, &ar[0], sample_idx, |
600 | txrc, true, false); | 600 | txrc, true, false); |
601 | minstrel_ht_set_rate(mp, mi, &ar[1], mi->max_tp_rate, | ||
602 | txrc, false, false); | ||
603 | info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE; | 601 | info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE; |
604 | } else { | 602 | } else { |
605 | minstrel_ht_set_rate(mp, mi, &ar[0], mi->max_tp_rate, | 603 | minstrel_ht_set_rate(mp, mi, &ar[0], mi->max_tp_rate, |
606 | txrc, false, false); | 604 | txrc, false, false); |
607 | minstrel_ht_set_rate(mp, mi, &ar[1], mi->max_tp_rate2, | ||
608 | txrc, false, true); | ||
609 | } | 605 | } |
610 | minstrel_ht_set_rate(mp, mi, &ar[2], mi->max_prob_rate, txrc, false, !sample); | ||
611 | 606 | ||
612 | ar[3].count = 0; | 607 | if (mp->hw->max_rates >= 3) { |
613 | ar[3].idx = -1; | 608 | /* |
609 | * At least 3 tx rates supported, use | ||
610 | * sample_rate -> max_tp_rate -> max_prob_rate for sampling and | ||
611 | * max_tp_rate -> max_tp_rate2 -> max_prob_rate by default. | ||
612 | */ | ||
613 | if (sample_idx >= 0) | ||
614 | minstrel_ht_set_rate(mp, mi, &ar[1], mi->max_tp_rate, | ||
615 | txrc, false, false); | ||
616 | else | ||
617 | minstrel_ht_set_rate(mp, mi, &ar[1], mi->max_tp_rate2, | ||
618 | txrc, false, true); | ||
619 | |||
620 | minstrel_ht_set_rate(mp, mi, &ar[2], mi->max_prob_rate, | ||
621 | txrc, false, !sample); | ||
622 | |||
623 | ar[3].count = 0; | ||
624 | ar[3].idx = -1; | ||
625 | } else if (mp->hw->max_rates == 2) { | ||
626 | /* | ||
627 | * Only 2 tx rates supported, use | ||
628 | * sample_rate -> max_prob_rate for sampling and | ||
629 | * max_tp_rate -> max_prob_rate by default. | ||
630 | */ | ||
631 | minstrel_ht_set_rate(mp, mi, &ar[1], mi->max_prob_rate, | ||
632 | txrc, false, !sample); | ||
633 | |||
634 | ar[2].count = 0; | ||
635 | ar[2].idx = -1; | ||
636 | } else { | ||
637 | /* Not using MRR, only use the first rate */ | ||
638 | ar[1].count = 0; | ||
639 | ar[1].idx = -1; | ||
640 | } | ||
614 | 641 | ||
615 | mi->total_packets++; | 642 | mi->total_packets++; |
616 | 643 | ||