From 60ef46013e2d5622205bd1a4ec97f7888258cb29 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Sun, 23 Dec 2007 04:39:17 +0100 Subject: [PATCH] --- yaml --- r: 78691 b: refs/heads/master c: 426706c0791904766e10bef512d86786f2f62857 h: refs/heads/master i: 78689: 0619727825ad6727ed1708d918f453aa5a934193 78687: 1407184d7016ddd983769654256cf6e2918f69f3 v: v3 --- [refs] | 2 +- trunk/net/mac80211/rc80211_pid.h | 2 +- trunk/net/mac80211/rc80211_pid_algo.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index db354ac1ee39..3e8c3a785828 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 69f817b654d683265118188bbfb8bc0d8978cce6 +refs/heads/master: 426706c0791904766e10bef512d86786f2f62857 diff --git a/trunk/net/mac80211/rc80211_pid.h b/trunk/net/mac80211/rc80211_pid.h index 425eb708182a..81aa4ea19958 100644 --- a/trunk/net/mac80211/rc80211_pid.h +++ b/trunk/net/mac80211/rc80211_pid.h @@ -38,7 +38,7 @@ * link quality is good, the controller will fail to adjust failed frames * percentage to the target. This is intentional. */ -#define RC_PID_TARGET_PF (11 << RC_PID_ARITH_SHIFT) +#define RC_PID_TARGET_PF 11 /* Rate behaviour normalization quantity over time. */ #define RC_PID_NORM_OFFSET 3 diff --git a/trunk/net/mac80211/rc80211_pid_algo.c b/trunk/net/mac80211/rc80211_pid_algo.c index 631e46888267..b84e51480c84 100644 --- a/trunk/net/mac80211/rc80211_pid_algo.c +++ b/trunk/net/mac80211/rc80211_pid_algo.c @@ -210,7 +210,7 @@ static void rate_control_pid_sample(struct rc_pid_info *pinfo, rate_control_pid_normalize(pinfo, mode->num_rates); /* Compute the proportional, integral and derivative errors. */ - err_prop = pinfo->target - pf; + err_prop = (pinfo->target << RC_PID_ARITH_SHIFT) - pf; err_avg = spinfo->err_avg_sc >> pinfo->smoothing_shift; spinfo->err_avg_sc = spinfo->err_avg_sc - err_avg + err_prop;