diff options
Diffstat (limited to 'net/mac80211/rc80211_minstrel.h')
-rw-r--r-- | net/mac80211/rc80211_minstrel.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/net/mac80211/rc80211_minstrel.h b/net/mac80211/rc80211_minstrel.h index 5ecf757817f2..98db93f96add 100644 --- a/net/mac80211/rc80211_minstrel.h +++ b/net/mac80211/rc80211_minstrel.h | |||
@@ -9,6 +9,18 @@ | |||
9 | #ifndef __RC_MINSTREL_H | 9 | #ifndef __RC_MINSTREL_H |
10 | #define __RC_MINSTREL_H | 10 | #define __RC_MINSTREL_H |
11 | 11 | ||
12 | #define EWMA_LEVEL 75 /* ewma weighting factor [%] */ | ||
13 | |||
14 | /* | ||
15 | * Perform EWMA (Exponentially Weighted Moving Average) calculation | ||
16 | */ | ||
17 | static inline int | ||
18 | minstrel_ewma(int old, int new, int weight) | ||
19 | { | ||
20 | return (new * (100 - weight) + old * weight) / 100; | ||
21 | } | ||
22 | |||
23 | |||
12 | struct minstrel_rate { | 24 | struct minstrel_rate { |
13 | int bitrate; | 25 | int bitrate; |
14 | int rix; | 26 | int rix; |
@@ -73,7 +85,6 @@ struct minstrel_priv { | |||
73 | unsigned int cw_min; | 85 | unsigned int cw_min; |
74 | unsigned int cw_max; | 86 | unsigned int cw_max; |
75 | unsigned int max_retry; | 87 | unsigned int max_retry; |
76 | unsigned int ewma_level; | ||
77 | unsigned int segment_size; | 88 | unsigned int segment_size; |
78 | unsigned int update_interval; | 89 | unsigned int update_interval; |
79 | unsigned int lookaround_rate; | 90 | unsigned int lookaround_rate; |