From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net, thomas.huehn@evernet-eg.de
Subject: [PATCH 06/10] mac80211: minstrel: reduce MINSTREL_SCALE
Date: Wed, 14 Dec 2016 20:46:59 +0100 [thread overview]
Message-ID: <20161214194703.33429-6-nbd@nbd.name> (raw)
In-Reply-To: <20161214194703.33429-1-nbd@nbd.name>
The loss of a bit of extra precision does not hurt the calculation, 12
bits is still enough to calculate probabilities well. Reducing the scale
makes it easier to avoid overflows
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
net/mac80211/rc80211_minstrel.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac80211/rc80211_minstrel.h b/net/mac80211/rc80211_minstrel.h
index 94b89b1..03716fd 100644
--- a/net/mac80211/rc80211_minstrel.h
+++ b/net/mac80211/rc80211_minstrel.h
@@ -14,7 +14,7 @@
#define SAMPLE_COLUMNS 10 /* number of columns in sample table */
/* scaled fraction values */
-#define MINSTREL_SCALE 16
+#define MINSTREL_SCALE 12
#define MINSTREL_FRAC(val, div) (((val) << MINSTREL_SCALE) / div)
#define MINSTREL_TRUNC(val) ((val) >> MINSTREL_SCALE)
--
2.10.1
next prev parent reply other threads:[~2016-12-14 19:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-14 19:46 [PATCH 01/10] mac80211: minstrel_ht: move supported bitrate mask out of group data Felix Fietkau
2016-12-14 19:46 ` [PATCH 02/10] mac80211: minstrel_ht: move short preamble check out of get_rate Felix Fietkau
2016-12-14 19:46 ` [PATCH 03/10] mac80211: minstrel_ht: make att_hist and succ_hist u32 instead of u64 Felix Fietkau
2016-12-14 19:46 ` [PATCH 04/10] mac80211: check for MCS in ieee80211_duration before fetching chanctx Felix Fietkau
2016-12-14 19:46 ` [PATCH 05/10] mac80211: minstrel: remove cur_prob from debugfs Felix Fietkau
2016-12-14 19:46 ` Felix Fietkau [this message]
2016-12-14 19:47 ` [PATCH 07/10] mac80211: minstrel: store probability variance instead of standard deviation Felix Fietkau
2016-12-14 19:47 ` [PATCH 08/10] mac80211: minstrel: make prob_ewma u16 instead of u32 Felix Fietkau
2016-12-14 19:47 ` [PATCH 09/10] mac80211: minstrel_ht: remove obsolete #if for >= 3 streams Felix Fietkau
2016-12-14 19:47 ` [PATCH 10/10] mac80211: minstrel: avoid port control frames for sampling Felix Fietkau
2016-12-15 10:08 ` [PATCH 01/10] mac80211: minstrel_ht: move supported bitrate mask out of group data Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161214194703.33429-6-nbd@nbd.name \
--to=nbd@nbd.name \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=thomas.huehn@evernet-eg.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).