Minstrel_ht: use lowest rate last as in minstrel. It should improve robustness in environments with non-stationary noise. Signed-off-by: Dmitry Ivanov <dima@xxxxxxxx> --- net/mac80211/rc80211_minstrel_ht.c | 8 +++++++- net/mac80211/rc80211_minstrel_ht.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 3928dbd..8abbdcc 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -906,7 +906,12 @@ minstrel_ht_update_rates(struct minstrel_priv *mp, struct minstrel_ht_sta *mi) minstrel_ht_set_rate(mp, mi, rates, i++, mi->max_prob_rate); } - rates->rate[i].idx = -1; + /* Use lowest rate last */ + rates->rate[i].idx = mi->lowest_rix; + rates->rate[i].count = mp->max_retry; + rates->rate[i].count_cts = mp->max_retry; + rates->rate[i].count_rts = mp->max_retry; + rate_control_set_rates(mp->hw, mi->sta, rates); } @@ -1127,6 +1132,7 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband, memset(mi, 0, sizeof(*mi)); mi->sta = sta; + mi->lowest_rix = rate_lowest_index(sband, sta); mi->last_stats_update = jiffies; ack_dur = ieee80211_frame_duration(sband->band, 10, 60, 1, 1, 0); diff --git a/net/mac80211/rc80211_minstrel_ht.h b/net/mac80211/rc80211_minstrel_ht.h index e8b52a9..90b8e39 100644 --- a/net/mac80211/rc80211_minstrel_ht.h +++ b/net/mac80211/rc80211_minstrel_ht.h @@ -73,6 +73,8 @@ struct minstrel_ht_sta { /* ampdu length (EWMA) */ unsigned int avg_ampdu_len; + unsigned int lowest_rix; + /* overall sorted rate set */ u16 max_tp_rate[MAX_THR_RATES]; u16 max_prob_rate; -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html