aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorStefano Brivio <stefano.brivio@polimi.it>2007-12-22 22:39:17 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:00:50 -0500
commit426706c0791904766e10bef512d86786f2f62857 (patch)
tree2aef58cafd1dd3b1c9d686038db8a409a729fe53 /net/mac80211
parent69f817b654d683265118188bbfb8bc0d8978cce6 (diff)
rc80211-pid: export human-readable target_pf value to debugfs
Export the non-shifted target_pf value to debugfs, so that it's human-readable. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/rc80211_pid.h2
-rw-r--r--net/mac80211/rc80211_pid_algo.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/rc80211_pid.h b/net/mac80211/rc80211_pid.h
index 425eb708182a..81aa4ea19958 100644
--- a/net/mac80211/rc80211_pid.h
+++ b/net/mac80211/rc80211_pid.h
@@ -38,7 +38,7 @@
38 * link quality is good, the controller will fail to adjust failed frames 38 * link quality is good, the controller will fail to adjust failed frames
39 * percentage to the target. This is intentional. 39 * percentage to the target. This is intentional.
40 */ 40 */
41#define RC_PID_TARGET_PF (11 << RC_PID_ARITH_SHIFT) 41#define RC_PID_TARGET_PF 11
42 42
43/* Rate behaviour normalization quantity over time. */ 43/* Rate behaviour normalization quantity over time. */
44#define RC_PID_NORM_OFFSET 3 44#define RC_PID_NORM_OFFSET 3
diff --git a/net/mac80211/rc80211_pid_algo.c b/net/mac80211/rc80211_pid_algo.c
index 631e46888267..b84e51480c84 100644
--- a/net/mac80211/rc80211_pid_algo.c
+++ b/net/mac80211/rc80211_pid_algo.c
@@ -210,7 +210,7 @@ static void rate_control_pid_sample(struct rc_pid_info *pinfo,
210 rate_control_pid_normalize(pinfo, mode->num_rates); 210 rate_control_pid_normalize(pinfo, mode->num_rates);
211 211
212 /* Compute the proportional, integral and derivative errors. */ 212 /* Compute the proportional, integral and derivative errors. */
213 err_prop = pinfo->target - pf; 213 err_prop = (pinfo->target << RC_PID_ARITH_SHIFT) - pf;
214 214
215 err_avg = spinfo->err_avg_sc >> pinfo->smoothing_shift; 215 err_avg = spinfo->err_avg_sc >> pinfo->smoothing_shift;
216 spinfo->err_avg_sc = spinfo->err_avg_sc - err_avg + err_prop; 216 spinfo->err_avg_sc = spinfo->err_avg_sc - err_avg + err_prop;