28 Apr, 2017
1 commit
-
Rename .tx_status_noskb to .tx_status_ext and pass a new on-stack
struct ieee80211_tx_status instead of struct ieee80211_tx_info.This struct can be used to pass extra information, e.g. for dynamic tx
power controlSigned-off-by: Felix Fietkau
Signed-off-by: Johannes Berg
15 Dec, 2016
3 commits
-
Makes connections more reliable
Signed-off-by: Thomas Huehn
Signed-off-by: Felix Fietkau
Signed-off-by: Johannes Berg -
This avoids the costly int_sqrt calls in the statistics update and moves
it to the debugfs code instead.
This also fixes an overflow in the previous standard deviation
calculation.Signed-off-by: Thomas Huehn
Signed-off-by: Felix Fietkau
Signed-off-by: Johannes Berg -
This field is redundant, because it is simply last success divided by
last attempt count. Removing it from the rate stats struct saves about
1.2 KiB per HT station.Signed-off-by: Felix Fietkau
Signed-off-by: Johannes Berg
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
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
13 Aug, 2015
1 commit
-
At the last iteration of the loop, j may equal zero and thus
tp_list[j - 1] causes an invalid read.
Change the logic of the loop so that j - 1 is always >= 0.Cc: stable@vger.kernel.org
Signed-off-by: Adrien Schildknecht
Signed-off-by: Johannes Berg
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 -
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 -
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 -
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 -
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
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
20 Dec, 2014
1 commit
-
On minstrel_ht, the size of the per-sta struct is almost 18k, making it
an order-3 allocation.
A few fields inside the per-rate statistics are bigger than they need to
be. This patch reduces the size enough to cut down the per-sta struct to
about 13k (order-2 allocation).Signed-off-by: Felix Fietkau
Signed-off-by: Johannes Berg
28 Nov, 2014
1 commit
-
Signed-off-by: Felix Fietkau
Signed-off-by: Johannes Berg
31 Oct, 2014
1 commit
-
Use codespell to find spelling errors.
Signed-off-by: Stephen Hemminger
Signed-off-by: Johannes Berg
11 Sep, 2014
1 commit
-
Minstrel and Mintrel_HT used there own structs to keep track of rate
statistics. Unify those variables in struct minstrel_rate_states and
move it to rc80211_minstrel.h for common usage. This is a clean-up
patch to prepare Minstrel and Minstrel_HT codebase for upcoming TPC.Signed-off-by: Thomas Huehn
Acked-by: Felix Fietkau
Signed-off-by: Johannes Berg
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
05 Feb, 2014
1 commit
-
Change the code to allow making all the rate control ops
const, nothing ever needs to change them. Also change all
drivers to make use of this and mark the ops const.Signed-off-by: Johannes Berg
18 Dec, 2013
1 commit
-
Fix a number of different checkpatch errors.
Signed-off-by: Weilong Chen
Signed-off-by: Johannes Berg
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
26 Sep, 2013
1 commit
-
Add the capability to use a fixed modulation rate to minstrel rate controller
Signed-off-by: Lorenzo Bianconi
Acked-by: Felix Fietkau
Signed-off-by: Johannes Berg
02 Aug, 2013
1 commit
16 Jul, 2013
3 commits
-
When priv_sta == NULL, mi->prev_sample is dereferenced too early. Move
the assignment further down, after the rate_control_send_low call.Reported-by: Krzysztof Mazur
Cc: stable@vger.kernel.org # 3.10
Signed-off-by: Felix Fietkau
Signed-off-by: Johannes Berg -
according to IEEE 802.11-2012 section 18, various timings change
when using 5 MHz and 10 MHz. Reflect this by using a "shift" when
calculating durations.Signed-off-by: Simon Wunderlich
Signed-off-by: Mathias Kretschmer
Signed-off-by: Johannes Berg -
5 and 10 MHz support needs to know the current operating channel width,
add the chandef to the rate control API.Signed-off-by: Simon Wunderlich
Signed-off-by: Mathias Kretschmer
Signed-off-by: Johannes Berg
22 Apr, 2013
1 commit
-
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
Signed-off-by: Johannes Berg
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
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 oneAcked-by: Felix Fietkau
Signed-off-by: Thomas Huehn
Signed-off-by: Johannes Berg -
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 -
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 -
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 -
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 -
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 -
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
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
11 Dec, 2012
1 commit
-
Instead of updating stats before sending a packet,
update them after processing the packet's status.
This makes minstrel in line with minstrel_ht.Signed-off-by: Johannes Berg
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_durationThis is in preparation for multi-channel operation.
Signed-off-by: Michal Kazior
Signed-off-by: John W. Linville
12 Nov, 2011
1 commit
-
Signed-off-by: Patrick Kelle
Signed-off-by: John W. Linville
02 Jun, 2011
1 commit
-
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