summaryrefslogtreecommitdiffstats
path: root/net/mac80211/rc80211_minstrel.h
Commit message (Collapse)AuthorAgeFilesLines
* mac80211/minstrel: use the new rate control APIFelix Fietkau2013-04-221-0/+2
| | | | | | | | | Pass the rate selection table to mac80211 from minstrel_update_stats. Only rates for sample attempts are set in info->control.rates, with deferred sampling, only the second slot gets changed. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: optimize minstrel_ewmaKarl Beldan2013-04-171-2/+3
| | | | | | | | | | | | | | Use powers of two in ewma of minstrel. This changes : - EWMA_DIV from 100 to 2^7 - EWMA_LEVEL from 75 (/EWMA_DIV=100) to 2^6 + 2^5 (/EWMA_DIV=128) Note that this changes EWMA_DIV - EWMA_LEVEL from 25 to 2^5 and keeps EWMA_LEVEL / EWMA_DIV == 0.75. Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: improve minstrels rate sorting by means of throughput & probabilityThomas Huehn2013-03-061-3/+5
| | | | | | | | | | | | | | | | | | | | | 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>
* mac80211: add lowest rate into minstrel's random rate sampling tableThomas Huehn2013-03-061-1/+3
| | | | | | | | | | | | | | | | | | | | | While minstrel bootstraps and fills the success probabilities of each rate the lowest rate has typically a very high success probability (often 100% in our tests). Its statistics are never updated but considered to setup the mrr chain. In our tests we see that especially the 3rd mrr stage (which is that rate providing highest success probability) is filled with the lowest rate because its initial high sucess probability is never updated. By design the 4th mrr stage is filled with the lowest rate so often 3rd and 4th mrr stage are equal. This patch follows minstrels general approach of assuming as little as possible about rate dependencies. Consequently we include the lowest rate into the random sampling table to get balanced up-to-date statistics of all rates and therefore balanced decisions. 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>
* mac80211: extend minstrel's rate sampling to avoid unsampled ratesThomas Huehn2013-03-061-0/+1
| | | | | | | | | | | | | | | | | | | Minstrel's decision which rate should be directly sampled within the 1st mrr stage is limited to such rates faster than the current max throughput rate. All rates below the current max. throughput rate are indirectly sampled via the 2nd mrr stage. This approach leads to deprecated per rate statistics and therfore a deprecated mrr chain setup. This patch uses the sampling approach from minstrel_ht. A counter is added to sum all indirect sample attempts per rate. After 20 indirect sampling attempts the rate is directly sampled within the 1st mrr stage. Therefore more up-to-date statistics for all rates are maintained and used to setup the mrr chain. 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>
* mac80211: add documentation and verbose variable names inThomas Huehn2013-03-061-1/+1
| | | | | | | | | | Add documentation and more verbose variable names to minstrel's multi-rate-retry setup within function minstrel_get_rate() to increase the readability of the algorithm. 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>
* mac80211: merge value scaling macros of minstrel_ht and minstrelThomas Huehn2013-03-061-0/+5
| | | | | | | | | | Both minstrel versions use individual ways to scale up integer values to perform calculations. Merge minstrel_ht's scaling macros into minstrels header file and use them in both minstrel versions. 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>
* mac80211: merge EWMA calculation of minstrel_ht and minstrelThomas Huehn2013-03-061-1/+12
| | | | | | | | | | | | Both rate control algorithms (minstrel and minstrel_ht) calculate averages based on EWMA. Shift function minstrel_ewma() into rc80211_minstrel.h and make use of it in both minstrel version. Also shift the default EWMA level (75%) definition to the header file and clean up variable usage. 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>
* mac80211/minstrel_ht: add support for using CCK ratesFelix Fietkau2013-02-131-0/+2
| | | | | | | | | | | | When MCS rates start to get bad in 2.4 GHz because of long range or strong interference, CCK rates can be a lot more robust. This patch adds a pseudo MCS group containing CCK rates (long preamble in the lower 4 slots, short preamble in the upper slots). Signed-off-by: Felix Fietkau <nbd@openwrt.org> [make minstrel_ht_get_stats static] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* minstrel_ht: fixed rate mode through debugfsZefir Kurtisi2011-06-011-0/+12
| | | | | | | | | Found several threads about fixed rate mode in minstrel_ht for test environments, but no patches for it. This patch provides such a mode through debugfs. Signed-off-by: John W. Linville <linville@tuxdriver.com>
* minstrel: make the rate control ops reusable from another rc implementationFelix Fietkau2010-03-101-0/+6
| | | | | | | | | | This patch makes it possible to reuse the minstrel rate control ops from another rate control module. This is useful in preparing for the new 802.11n implementation of minstrel, which will reuse the old code for legacy stations. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* minstrel: simplify and fix debugfs codeFelix Fietkau2010-03-101-0/+5
| | | | | | | | | This patch cleans up the debugfs read function for the statistics by using simple_read_from_buffer instead of its own semi-broken hack. Also removes a useless member of the minstrel debugfs info struct. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: Remove unnused throughput field from minstrel_rate.Arnd Hannemann2009-08-281-1/+0
| | | | | | | | I noticed that the throughput field of the minstrel_rate struct is never used, so remove it. Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* minstrel: improve performance for non-MRR driversFelix Fietkau2008-10-311-0/+2
| | | | | | | | | | This patch enhances minstrel's performance for non-MRR setups, by preventing it from sampling slower rates with >95% success probability and by putting at least 1 non-sample frame between several sample frames. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: add the 'minstrel' rate control algorithmFelix Fietkau2008-10-061-0/+85
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud