Commit 426706c0 authored by Stefano Brivio's avatar Stefano Brivio Committed by David S. Miller

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: default avatarStefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 69f817b6
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
* link quality is good, the controller will fail to adjust failed frames * link quality is good, the controller will fail to adjust failed frames
* percentage to the target. This is intentional. * 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. */ /* Rate behaviour normalization quantity over time. */
#define RC_PID_NORM_OFFSET 3 #define RC_PID_NORM_OFFSET 3
......
...@@ -210,7 +210,7 @@ static void rate_control_pid_sample(struct rc_pid_info *pinfo, ...@@ -210,7 +210,7 @@ static void rate_control_pid_sample(struct rc_pid_info *pinfo,
rate_control_pid_normalize(pinfo, mode->num_rates); rate_control_pid_normalize(pinfo, mode->num_rates);
/* Compute the proportional, integral and derivative errors. */ /* 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; err_avg = spinfo->err_avg_sc >> pinfo->smoothing_shift;
spinfo->err_avg_sc = spinfo->err_avg_sc - err_avg + err_prop; spinfo->err_avg_sc = spinfo->err_avg_sc - err_avg + err_prop;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment