diff options
author | Thomas Huehn <thomas@net.t-labs.tu-berlin.de> | 2013-03-04 23:30:07 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-03-06 16:36:10 +0100 |
commit | 2ff2b690c56588efc063288f71a9d1cea33772cb (patch) | |
tree | d4079a56194ea0abc45ecfaf713bb53aed61827b /net/mac80211/rc80211_minstrel.h | |
parent | db8c5ee6924cda3823fac83ee8c4115d1a8248c8 (diff) |
mac80211: improve minstrels rate sorting by means of throughput & probability
This patch improves the way minstrel sorts rates according to throughput
and success probability. 3 FOR-loops across the entire rate set in function
minstrel_update_stats() which where used to determine the fastest, second
fastest and most robust rate are reduced to 1 FOR-loop.
The sorted list of rates according throughput is extended to the best four
rates as we need them in upcoming joint rate and power control. The sorting
is done via the new function minstrel_sort_best_tp_rates().
The most robust rate selection is aligned with minstrel_ht's approach.
Once any success probability is above 95% the one with the highest
throughput is chosen as most robust rate. If success probabilities of all
rates are below 95%, the rate with the highest succ. prob. is elected as
most robust one
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rc80211_minstrel.h')
-rw-r--r-- | net/mac80211/rc80211_minstrel.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/mac80211/rc80211_minstrel.h b/net/mac80211/rc80211_minstrel.h index a0ccc5779910..85ebf42cb46d 100644 --- a/net/mac80211/rc80211_minstrel.h +++ b/net/mac80211/rc80211_minstrel.h @@ -18,6 +18,9 @@ #define MINSTREL_FRAC(val, div) (((val) << MINSTREL_SCALE) / div) #define MINSTREL_TRUNC(val) ((val) >> MINSTREL_SCALE) +/* number of highest throughput rates to consider*/ +#define MAX_THR_RATES 4 + /* * Perform EWMA (Exponentially Weighted Moving Average) calculation */ @@ -65,9 +68,8 @@ struct minstrel_sta_info { unsigned int lowest_rix; - unsigned int max_tp_rate; - unsigned int max_tp_rate2; - unsigned int max_prob_rate; + u8 max_tp_rate[MAX_THR_RATES]; + u8 max_prob_rate; unsigned int packet_count; unsigned int sample_count; int sample_deferred; |