Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=426706c0791904766e10bef512d86786f2f62857
Commit:     426706c0791904766e10bef512d86786f2f62857
Parent:     69f817b654d683265118188bbfb8bc0d8978cce6
Author:     Stefano Brivio <[EMAIL PROTECTED]>
AuthorDate: Sun Dec 23 04:39:17 2007 +0100
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:00:50 2008 -0800

    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 <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/mac80211/rc80211_pid.h      |    2 +-
 net/mac80211/rc80211_pid_algo.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/rc80211_pid.h b/net/mac80211/rc80211_pid.h
index 425eb70..81aa4ea 100644
--- a/net/mac80211/rc80211_pid.h
+++ b/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/net/mac80211/rc80211_pid_algo.c b/net/mac80211/rc80211_pid_algo.c
index 631e468..b84e514 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,
        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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to