From: Felix Fietkau Date: Sun, 3 Mar 2013 11:49:52 +0000 (+0100) Subject: mac80211/minstrel_ht: fix spacing between sample attempts X-Git-Tag: v3.12-rc1~804^2~21^2^2~117^2~79 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=098b8afbf23502041c091463aea10a91b735c4cf;p=kernel%2Fkernel-generic.git mac80211/minstrel_ht: fix spacing between sample attempts A sample attempt should only count in mi->sample_tries if the sample attempt wasn't skipped based on slower rate criteria. This patch increases the sampling frequency for potentially desirable rates and thus enables faster recovery from interference or collisions. Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 1b69924..da4ec73 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -640,7 +640,6 @@ minstrel_get_sample_rate(struct minstrel_priv *mp, struct minstrel_ht_sta *mi) if (!mi->sample_tries) return -1; - mi->sample_tries--; mg = &mi->groups[mi->sample_group]; sample_idx = sample_table[mg->column][mg->index]; mr = &mg->rates[sample_idx]; @@ -677,6 +676,7 @@ minstrel_get_sample_rate(struct minstrel_priv *mp, struct minstrel_ht_sta *mi) if (mi->sample_slow++ > 2) return -1; } + mi->sample_tries--; return sample_idx; }