Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / net / mac80211 / rc80211_minstrel.h
blob38bf4168fc3ae1fe8b5d113218f5016066d34c09
1 /*
2 * Copyright (C) 2008 Felix Fietkau <nbd@openwrt.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
9 #ifndef __RC_MINSTREL_H
10 #define __RC_MINSTREL_H
12 struct minstrel_rate {
13 int bitrate;
14 int rix;
16 unsigned int perfect_tx_time;
17 unsigned int ack_time;
19 int sample_limit;
20 unsigned int retry_count;
21 unsigned int retry_count_cts;
22 unsigned int retry_count_rtscts;
23 unsigned int adjusted_retry_count;
25 u32 success;
26 u32 attempts;
27 u32 last_attempts;
28 u32 last_success;
30 /* parts per thousand */
31 u32 cur_prob;
32 u32 probability;
34 /* per-rate throughput */
35 u32 cur_tp;
37 u64 succ_hist;
38 u64 att_hist;
41 struct minstrel_sta_info {
42 unsigned long stats_update;
43 unsigned int sp_ack_dur;
44 unsigned int rate_avg;
46 unsigned int lowest_rix;
48 unsigned int max_tp_rate;
49 unsigned int max_tp_rate2;
50 unsigned int max_prob_rate;
51 unsigned int packet_count;
52 unsigned int sample_count;
53 int sample_deferred;
55 unsigned int sample_idx;
56 unsigned int sample_column;
58 int n_rates;
59 struct minstrel_rate *r;
60 bool prev_sample;
62 /* sampling table */
63 u8 *sample_table;
65 #ifdef CONFIG_MAC80211_DEBUGFS
66 struct dentry *dbg_stats;
67 #endif
70 struct minstrel_priv {
71 struct ieee80211_hw *hw;
72 bool has_mrr;
73 unsigned int cw_min;
74 unsigned int cw_max;
75 unsigned int max_retry;
76 unsigned int ewma_level;
77 unsigned int segment_size;
78 unsigned int update_interval;
79 unsigned int lookaround_rate;
80 unsigned int lookaround_rate_mrr;
83 void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir);
84 void minstrel_remove_sta_debugfs(void *priv, void *priv_sta);
86 #endif