diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2012-08-10 07:16:31 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-08-10 15:27:11 -0400 |
commit | 6e1e3743227119e66162f701d73314d0a26dfafe (patch) | |
tree | 8a582cb5b3c7944bc31649077986fbaa7cde57ac /drivers | |
parent | fc8d023834f6462e1675a28a15da251b3cb28b9a (diff) |
ath9k: Change rateset calculation
Commit "ath9k: Change rate control to use legacy rate as last MRR"
resulted in the mixing of HT/legacy rates in a single rateset,
which is undesirable. Revert this behavior.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/rc.c | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index 2e517c0edccd..e8f8e3d73574 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
@@ -582,8 +582,7 @@ static u8 ath_rc_setvalid_htrates(struct ath_rate_priv *ath_rc_priv) | |||
582 | } | 582 | } |
583 | 583 | ||
584 | static u8 ath_rc_get_highest_rix(struct ath_rate_priv *ath_rc_priv, | 584 | static u8 ath_rc_get_highest_rix(struct ath_rate_priv *ath_rc_priv, |
585 | int *is_probing, | 585 | int *is_probing) |
586 | bool legacy) | ||
587 | { | 586 | { |
588 | const struct ath_rate_table *rate_table = ath_rc_priv->rate_table; | 587 | const struct ath_rate_table *rate_table = ath_rc_priv->rate_table; |
589 | u32 best_thruput, this_thruput, now_msec; | 588 | u32 best_thruput, this_thruput, now_msec; |
@@ -605,8 +604,6 @@ static u8 ath_rc_get_highest_rix(struct ath_rate_priv *ath_rc_priv, | |||
605 | u8 per_thres; | 604 | u8 per_thres; |
606 | 605 | ||
607 | rate = ath_rc_priv->valid_rate_index[index]; | 606 | rate = ath_rc_priv->valid_rate_index[index]; |
608 | if (legacy && !(rate_table->info[rate].rate_flags & RC_LEGACY)) | ||
609 | continue; | ||
610 | if (rate > ath_rc_priv->rate_max_phy) | 607 | if (rate > ath_rc_priv->rate_max_phy) |
611 | continue; | 608 | continue; |
612 | 609 | ||
@@ -770,7 +767,7 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta, | |||
770 | try_per_rate = 4; | 767 | try_per_rate = 4; |
771 | 768 | ||
772 | rate_table = ath_rc_priv->rate_table; | 769 | rate_table = ath_rc_priv->rate_table; |
773 | rix = ath_rc_get_highest_rix(ath_rc_priv, &is_probe, false); | 770 | rix = ath_rc_get_highest_rix(ath_rc_priv, &is_probe); |
774 | 771 | ||
775 | if (conf_is_ht(&sc->hw->conf) && | 772 | if (conf_is_ht(&sc->hw->conf) && |
776 | (sta->ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING)) | 773 | (sta->ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING)) |
@@ -804,7 +801,13 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta, | |||
804 | try_per_rate, rix, 0); | 801 | try_per_rate, rix, 0); |
805 | } | 802 | } |
806 | 803 | ||
807 | for ( ; i < 3; i++) { | 804 | for ( ; i < 4; i++) { |
805 | /* | ||
806 | * Use twice the number of tries for the last MRR segment. | ||
807 | */ | ||
808 | if (i + 1 == 4) | ||
809 | try_per_rate = 8; | ||
810 | |||
808 | ath_rc_get_lower_rix(ath_rc_priv, rix, &rix); | 811 | ath_rc_get_lower_rix(ath_rc_priv, rix, &rix); |
809 | 812 | ||
810 | /* | 813 | /* |
@@ -815,26 +818,6 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta, | |||
815 | } | 818 | } |
816 | 819 | ||
817 | /* | 820 | /* |
818 | * Use twice the number of tries for the last MRR segment. | ||
819 | */ | ||
820 | try_per_rate = 8; | ||
821 | |||
822 | /* | ||
823 | * If the last rate in the rate series is MCS and has | ||
824 | * more than 80% of per thresh, then use a legacy rate | ||
825 | * as last retry to ensure that the frame is tried in both | ||
826 | * MCS and legacy rate. | ||
827 | */ | ||
828 | ath_rc_get_lower_rix(ath_rc_priv, rix, &rix); | ||
829 | |||
830 | if (WLAN_RC_PHY_HT(rate_table->info[rix].phy) && | ||
831 | (ath_rc_priv->per[rix] > 45)) | ||
832 | rix = ath_rc_get_highest_rix(ath_rc_priv, &is_probe, true); | ||
833 | |||
834 | /* All other rates in the series have RTS enabled */ | ||
835 | ath_rc_rate_set_series(rate_table, &rates[i], txrc, | ||
836 | try_per_rate, rix, 1); | ||
837 | /* | ||
838 | * NB:Change rate series to enable aggregation when operating | 821 | * NB:Change rate series to enable aggregation when operating |
839 | * at lower MCS rates. When first rate in series is MCS2 | 822 | * at lower MCS rates. When first rate in series is MCS2 |
840 | * in HT40 @ 2.4GHz, series should look like: | 823 | * in HT40 @ 2.4GHz, series should look like: |