summaryrefslogtreecommitdiff
path: root/net/mac80211/rc80211_minstrel.h
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-04-24 18:54:20 +0400
committerJohn W. Linville <linville@tuxdriver.com>2013-04-24 18:54:20 +0400
commit6ed0e321a0aef14a894e26658108bf7e895c36a6 (patch)
treef49428d68ebcb1beb757296ea1559079210babbe /net/mac80211/rc80211_minstrel.h
parent3dec2246c2ff11beb24ca1950f074b2bcbc85953 (diff)
parentb006ed545cbadf1ebd4683719554742d20dbcede (diff)
downloadlinux-6ed0e321a0aef14a894e26658108bf7e895c36a6.tar.xz
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Diffstat (limited to 'net/mac80211/rc80211_minstrel.h')
-rw-r--r--net/mac80211/rc80211_minstrel.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/mac80211/rc80211_minstrel.h b/net/mac80211/rc80211_minstrel.h
index 85ebf42cb46d..f4301f4b2e41 100644
--- a/net/mac80211/rc80211_minstrel.h
+++ b/net/mac80211/rc80211_minstrel.h
@@ -9,7 +9,8 @@
#ifndef __RC_MINSTREL_H
#define __RC_MINSTREL_H
-#define EWMA_LEVEL 75 /* ewma weighting factor [%] */
+#define EWMA_LEVEL 96 /* ewma weighting factor [/EWMA_DIV] */
+#define EWMA_DIV 128
#define SAMPLE_COLUMNS 10 /* number of columns in sample table */
@@ -27,7 +28,7 @@
static inline int
minstrel_ewma(int old, int new, int weight)
{
- return (new * (100 - weight) + old * weight) / 100;
+ return (new * (EWMA_DIV - weight) + old * weight) / EWMA_DIV;
}
@@ -62,6 +63,8 @@ struct minstrel_rate {
};
struct minstrel_sta_info {
+ struct ieee80211_sta *sta;
+
unsigned long stats_update;
unsigned int sp_ack_dur;
unsigned int rate_avg;