Skip to content

Commit

Permalink
mac80211: Don't sample max throughput rate in minstrel_ht
Browse files Browse the repository at this point in the history
The current max throughput rate is known to be good as otherwise it
wouldn't be the max throughput rate. Since rate sampling can introduce
some overhead (by adding RTS for example or due to not aggregating the
frame) don't sample the max throughput rate.

Signed-off-by: Helmut Schaa <[email protected]>
Acked-by: Felix Fietkau <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
helmut-jacob authored and linvjw committed Mar 15, 2012
1 parent 0d9be8a commit ba6fa29
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions net/mac80211/rc80211_minstrel_ht.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,13 @@ minstrel_get_sample_rate(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)
sample_idx += mi->sample_group * MCS_GROUP_RATES;
minstrel_next_sample_idx(mi);

/*
* Sampling might add some overhead (RTS, no aggregation)
* to the frame. Hence, don't use sampling for the currently
* used max TP rate.
*/
if (sample_idx == mi->max_tp_rate)
return -1;
/*
* When not using MRR, do not sample if the probability is already
* higher than 95% to avoid wasting airtime
Expand Down

0 comments on commit ba6fa29

Please sign in to comment.