Skip to content

Commit

Permalink
ath10k: fix duration calculation for quiet param
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rajkumar Manoharan authored and Kalle Valo committed Jan 15, 2015
1 parent fbb8f1b commit 8bdadac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath10k/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static int ath10k_thermal_set_cur_dutycycle(struct thermal_cooling_device *cdev,
}
period = max(ATH10K_QUIET_PERIOD_MIN,
(ATH10K_QUIET_PERIOD_DEFAULT / num_bss));
duration = period * (duty_cycle / 100);
duration = (period * duty_cycle) / 100;
enabled = duration ? 1 : 0;

ret = ath10k_wmi_pdev_set_quiet_mode(ar, period, duration,
Expand Down

0 comments on commit 8bdadac

Please sign in to comment.