On Wed, Nov 13, 2013 at 10:20:49PM +0100, Felix Fietkau wrote: > On 2013-11-13 18:41, Karl Beldan wrote: > > From: Karl Beldan <karl.beldan@xxxxxxxxxxxxxxxx> > > > > When initializing rates selections starting indexes upon stats update, > > the minstrel_sta->max_* rates should be 'group * MCS_GROUP_RATES + i' > > not 'i'. This affects settings where one of the peers does not support > > any of the rates of the group 0 (i.e. when ht_cap.mcs.rx_mask[0] == 0). > > > > Signed-off-by: Karl Beldan <karl.beldan@xxxxxxxxxxxxxxxx> > > --- > > net/mac80211/rc80211_minstrel_ht.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c > > index 88c932e..6c173a2 100644 > > --- a/net/mac80211/rc80211_minstrel_ht.c > > +++ b/net/mac80211/rc80211_minstrel_ht.c > > @@ -390,7 +390,8 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi) > > mg->max_prob_rate = i; > > if (!mi_rates_valid) { > > mi->max_tp_rate = mi->max_tp_rate2 = > > - mi->max_prob_rate = i; > > + mi->max_prob_rate = > > + group * MCS_GROUP_RATES + i; > How about moving the 'index = ...' line further up and using that > instead of duplicating it? > D'ohf course. Karl -- 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