Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0ca796c authored by Felix Fietkau's avatar Felix Fietkau Committed by Johannes Berg
Browse files

mac80211/minstrel_ht: do not sample actively used rates



max_tp_rate2 and max_prob_rate tend to get used occasionally during
retransmission, which is more useful for the statistics than probing
with individual probe packets.

Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent bc96f242
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -648,10 +648,13 @@ minstrel_get_sample_rate(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)
	/*
	 * Sampling might add some overhead (RTS, no aggregation)
	 * to the frame. Hence, don't use sampling for the currently
	 * used max TP rate.
	 * used rates.
	 */
	if (sample_idx == mi->max_tp_rate)
	if (sample_idx == mi->max_tp_rate ||
	    sample_idx == mi->max_tp_rate2 ||
	    sample_idx == mi->max_prob_rate)
		return -1;

	/*
	 * Do not sample if the probability is already higher than 95%
	 * to avoid wasting airtime.