aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qti.qualcomm.com>2015-01-13 04:22:14 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2015-01-15 05:33:42 -0500
commit8bdadac13f65c14d7b6df711793eb31ba9db296e (patch)
treecebd3a96f033bde25f6d62621517dfd317b9349f /drivers/net/wireless/ath
parentfbb8f1b729b82f2b48350ffc096f107d1a6ea12d (diff)
ath10k: fix duration calculation for quiet param
The duty cycle (% of quiet duration) is used to put the device in quiet mode for the given period. Currently the quiet duration is wrongly calculated which results in not enabling quiet mode. Fix the calculation as below duration = (period * duty cycle) / 100 Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath10k/thermal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/thermal.c b/drivers/net/wireless/ath/ath10k/thermal.c
index c384c79975ba..41cff50baa41 100644
--- a/drivers/net/wireless/ath/ath10k/thermal.c
+++ b/drivers/net/wireless/ath/ath10k/thermal.c
@@ -98,7 +98,7 @@ static int ath10k_thermal_set_cur_dutycycle(struct thermal_cooling_device *cdev,
98 } 98 }
99 period = max(ATH10K_QUIET_PERIOD_MIN, 99 period = max(ATH10K_QUIET_PERIOD_MIN,
100 (ATH10K_QUIET_PERIOD_DEFAULT / num_bss)); 100 (ATH10K_QUIET_PERIOD_DEFAULT / num_bss));
101 duration = period * (duty_cycle / 100); 101 duration = (period * duty_cycle) / 100;
102 enabled = duration ? 1 : 0; 102 enabled = duration ? 1 : 0;
103 103
104 ret = ath10k_wmi_pdev_set_quiet_mode(ar, period, duration, 104 ret = ath10k_wmi_pdev_set_quiet_mode(ar, period, duration,