Minstrel_ht: use lowest rate last as in minstrel.
It should improve robustness in environments with non-stationary noise.
Signed-off-by: Dmitry Ivanov <[email protected]>
---
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
On 2015-10-26 10:42, Dmitry Ivanov wrote:
> Minstrel_ht: use lowest rate last as in minstrel.
> It should improve robustness in environments with non-stationary noise.
>
> Signed-off-by: Dmitry Ivanov <[email protected]>
Not using the lowest rate is intentional. Using the lowest rate severely
limits aggregation. In many cases, dropping a packet is preferrable, as
trying too hard to retry individual packets can cause extra bufferbloat
and severely increased latencies.
NACK from me on this patch. If anything, I think we should probably
change minstrel to behave in the same way as minstrel_ht.
- Felix