diff options
Diffstat (limited to 'net/mac80211/rc80211_minstrel.h')
-rw-r--r-- | net/mac80211/rc80211_minstrel.h | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/net/mac80211/rc80211_minstrel.h b/net/mac80211/rc80211_minstrel.h index 046d1bd598a8..97eca86a4af0 100644 --- a/net/mac80211/rc80211_minstrel.h +++ b/net/mac80211/rc80211_minstrel.h | |||
@@ -31,6 +31,27 @@ minstrel_ewma(int old, int new, int weight) | |||
31 | return (new * (EWMA_DIV - weight) + old * weight) / EWMA_DIV; | 31 | return (new * (EWMA_DIV - weight) + old * weight) / EWMA_DIV; |
32 | } | 32 | } |
33 | 33 | ||
34 | struct minstrel_rate_stats { | ||
35 | /* current / last sampling period attempts/success counters */ | ||
36 | unsigned int attempts, last_attempts; | ||
37 | unsigned int success, last_success; | ||
38 | |||
39 | /* total attempts/success counters */ | ||
40 | u64 att_hist, succ_hist; | ||
41 | |||
42 | /* current throughput */ | ||
43 | unsigned int cur_tp; | ||
44 | |||
45 | /* packet delivery probabilities */ | ||
46 | unsigned int cur_prob, probability; | ||
47 | |||
48 | /* maximum retry counts */ | ||
49 | unsigned int retry_count; | ||
50 | unsigned int retry_count_rtscts; | ||
51 | |||
52 | u8 sample_skipped; | ||
53 | bool retry_updated; | ||
54 | }; | ||
34 | 55 | ||
35 | struct minstrel_rate { | 56 | struct minstrel_rate { |
36 | int bitrate; | 57 | int bitrate; |
@@ -40,26 +61,10 @@ struct minstrel_rate { | |||
40 | unsigned int ack_time; | 61 | unsigned int ack_time; |
41 | 62 | ||
42 | int sample_limit; | 63 | int sample_limit; |
43 | unsigned int retry_count; | ||
44 | unsigned int retry_count_cts; | 64 | unsigned int retry_count_cts; |
45 | unsigned int retry_count_rtscts; | ||
46 | unsigned int adjusted_retry_count; | 65 | unsigned int adjusted_retry_count; |
47 | 66 | ||
48 | u32 success; | 67 | struct minstrel_rate_stats stats; |
49 | u32 attempts; | ||
50 | u32 last_attempts; | ||
51 | u32 last_success; | ||
52 | u8 sample_skipped; | ||
53 | |||
54 | /* parts per thousand */ | ||
55 | u32 cur_prob; | ||
56 | u32 probability; | ||
57 | |||
58 | /* per-rate throughput */ | ||
59 | u32 cur_tp; | ||
60 | |||
61 | u64 succ_hist; | ||
62 | u64 att_hist; | ||
63 | }; | 68 | }; |
64 | 69 | ||
65 | struct minstrel_sta_info { | 70 | struct minstrel_sta_info { |
@@ -73,8 +78,8 @@ struct minstrel_sta_info { | |||
73 | 78 | ||
74 | u8 max_tp_rate[MAX_THR_RATES]; | 79 | u8 max_tp_rate[MAX_THR_RATES]; |
75 | u8 max_prob_rate; | 80 | u8 max_prob_rate; |
76 | unsigned int packet_count; | 81 | unsigned int total_packets; |
77 | unsigned int sample_count; | 82 | unsigned int sample_packets; |
78 | int sample_deferred; | 83 | int sample_deferred; |
79 | 84 | ||
80 | unsigned int sample_row; | 85 | unsigned int sample_row; |