28 Apr, 2017

1 commit


15 Dec, 2016

3 commits


12 Apr, 2016

1 commit

  • This enum is already perfectly aliased to enum nl80211_band, and
    the only reason for it is that we get IEEE80211_NUM_BANDS out of
    it. There's no really good reason to not declare the number of
    bands in nl80211 though, so do that and remove the cfg80211 one.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

02 Feb, 2016

1 commit

  • The change from cur_tp to the function
    minstrel_get_tp_avg/minstrel_ht_get_tp_avg changed the unit used for the
    current throughput. For example in minstrel_ht the correct
    conversion between them would be:

    mrs->cur_tp / 10 == minstrel_ht_get_tp_avg(..).

    This factor 10 must also be included in the calculation of
    minstrel_get_expected_throughput and minstrel_ht_get_expected_throughput to
    return values with the unit [Kbps] instead of [10Kbps]. Otherwise routing
    algorithms like B.A.T.M.A.N. V will make incorrect decision based on these
    values. Its kernel based implementation expects expected_throughput always
    to have the unit [Kbps] and not sometimes [10Kbps] and sometimes [Kbps].

    The same requirement has iw or olsrdv2's nl80211 based statistics module
    which retrieve the same data via NL80211_STA_INFO_TX_BITRATE.

    Cc: stable@vger.kernel.org
    Fixes: 6a27b2c40b48 ("mac80211: restructure per-rate throughput calculation into function")
    Signed-off-by: Sven Eckelmann
    Signed-off-by: Johannes Berg

    Sven Eckelmann
     

13 Aug, 2015

1 commit


02 Apr, 2015

5 commits

  • This patch adds the statistical descriptor "standard deviation"
    to better describe the current properties of Minstrel and
    Minstrel-HTs success probability distribution. The standard
    deviation (SD) is calculated as exponential weighted moving
    standard deviation (EWMSD) and its current value is added as
    new column in all rc_stats (in debugfs).

    Signed-off-by: Thomas Huehn
    Acked-by: Felix Fietkau
    Signed-off-by: Johannes Berg

    Thomas Huehn
     
  • This patch adds the new statistic "maximum possible lossless
    throughput" to Minstrels and Minstrel-HTs rc_stats (in debugfs). This
    enables comprehensive comparison between current per-rate throughput
    and max. achievable per-rate throughput.

    Signed-off-by: Thomas Huehn
    Acked-by: Felix Fietkau
    Signed-off-by: Johannes Berg

    Thomas Huehn
     
  • This patch moves Minstrels and Minstrel-HTs per-rate throughput
    calculation (EWMA(thr)) into a dedicated function to be called.
    Therefore the variable "unsigned int cur_tp" within struct
    "minstrel_rate_stats" becomes obsolete. and is removed to free
    up its space.

    Signed-off-by: Thomas Huehn
    Acked-by: Felix Fietkau
    Signed-off-by: Johannes Berg

    Thomas Huehn
     
  • This patch ensures a consistent usage of variable names for type
    "minstrel_rate_stats" to be used as "mrs" and from type minstrel_rate
    as "mr" across both Minstrel & Minstrel-HT. In addition some
    variable and function names got changed to more meaningful ones.

    Signed-off-by: Thomas Huehn
    Acked-by: Felix Fietkau
    Signed-off-by: Johannes Berg

    Thomas Huehn
     
  • This patch unifies the calculation of Minstrels and Minstrel-HTs
    per-rate statistic. The new common function minstrel_calc_rate_stats()
    is called when a statistic update is performed.

    Signed-off-by: Thomas Huehn
    Acked-by: Felix Fietkau
    Signed-off-by: Johannes Berg

    Thomas Huehn
     

25 Feb, 2015

1 commit

  • Commit 06d961a8e210 ("mac80211/minstrel: use the new rate control API")
    inverted the condition 'if (msr->sample_limit != 0)' to
    'if (!msr->sample_limit != 0)'. But it is confusing both to people and
    compilers (gcc5):
    net/mac80211/rc80211_minstrel.c: In function 'minstrel_get_rate':
    net/mac80211/rc80211_minstrel.c:376:26: warning: logical not is only applied to the left hand side of comparison
    if (!msr->sample_limit != 0)
    ^

    Let there be only 'if (!msr->sample_limit)'.

    Fixes: 06d961a8e210 ("mac80211/minstrel: use the new rate control API")
    Signed-off-by: Jiri Slaby
    Signed-off-by: Johannes Berg

    Jiri Slaby
     

20 Dec, 2014

1 commit


28 Nov, 2014

1 commit


31 Oct, 2014

1 commit


11 Sep, 2014

1 commit


21 May, 2014

1 commit

  • Add get_expected_throughput() API to mac80211 so that each
    driver can implement its own version based on the RC
    algorithm they are using (might be using an HW RC algo).
    The API returns a value expressed in Kbps.

    Also, add the new get_expected_throughput() member
    to the rate_control_ops structure in order to be
    able to query the RC algorithm (this patch provides an
    implementation of this API for both minstrel and
    minstrel_ht).

    The related member in the station_info object is now
    filled accordingly when dumping a station.

    Cc: Felix Fietkau
    Signed-off-by: Antonio Quartulli
    Signed-off-by: Johannes Berg

    Antonio Quartulli
     

05 Feb, 2014

1 commit


18 Dec, 2013

1 commit


26 Nov, 2013

1 commit

  • ATM, only the first array value returned by get_random_bytes is used.
    This change moves the call to get_random_bytes from the nested loop it
    is in to its parent.
    While at it, replace get_random_bytes with prandom_bytes since PRNs are
    way enough for the selection process.
    After this, minstrel_ht reclaims 80 PR-bytes instead of 640 R-bytes.

    minstrels use sample tables to probe different rates in a randomized
    manner.
    minstrel_ht inits one single sample table upon registration (during
    subsys_initcalls) and minstrel uses one per STA addition in minstrel.

    Signed-off-by: Karl Beldan
    Signed-off-by: Johannes Berg

    Karl Beldan
     

26 Sep, 2013

1 commit


02 Aug, 2013

1 commit


16 Jul, 2013

3 commits


22 Apr, 2013

1 commit


17 Apr, 2013

1 commit

  • The rates[0] CTS and RTS flags are only set after rate control has been
    called, so minstrel cannot use them to for setting the number of
    retries. This patch adds two new flags to explicitly indicate RTS/CTS use.

    Signed-off-by: Felix Fietkau
    Signed-off-by: Johannes Berg

    Felix Fietkau
     

06 Mar, 2013

7 commits

  • 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
    Signed-off-by: Thomas Huehn
    Signed-off-by: Johannes Berg

    Thomas Huehn
     
  • Based on minstrel_ht this patch treats success probabilities below 10% as
    implausible values for throughput calculation in minstrel's statistics.
    Current throughput per rate with such a low success probability is reset
    to 0 MBit/s.

    Acked-by: Felix Fietkau
    Signed-off-by: Thomas Huehn
    Signed-off-by: Johannes Berg

    Thomas Huehn
     
  • 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
    Signed-off-by: Thomas Huehn
    Signed-off-by: Johannes Berg

    Thomas Huehn
     
  • 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
    Signed-off-by: Thomas Huehn
    Signed-off-by: Johannes Berg

    Thomas Huehn
     
  • 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
    Signed-off-by: Thomas Huehn
    Signed-off-by: Johannes Berg

    Thomas Huehn
     
  • 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
    Signed-off-by: Thomas Huehn
    Signed-off-by: Johannes Berg

    Thomas Huehn
     
  • 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
    Signed-off-by: Thomas Huehn
    Signed-off-by: Johannes Berg

    Thomas Huehn
     

13 Feb, 2013

1 commit

  • 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
    [make minstrel_ht_get_stats static]
    Signed-off-by: Johannes Berg

    Felix Fietkau
     

11 Dec, 2012

1 commit


14 Apr, 2012

1 commit

  • Removes hw.conf.channel usage from the following functions:
    * ieee80211_mandatory_rates
    * ieee80211_sta_get_rates
    * ieee80211_frame_duration
    * ieee80211_rts_duration
    * ieee80211_ctstoself_duration

    This is in preparation for multi-channel operation.

    Signed-off-by: Michal Kazior
    Signed-off-by: John W. Linville

    Michal Kazior
     

12 Nov, 2011

1 commit


02 Jun, 2011

1 commit