浏览代码

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>
Rajkumar Manoharan 11 年之前
父节点
当前提交
8bdadac13f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/wireless/ath/ath10k/thermal.c

+ 1 - 1
drivers/net/wireless/ath/ath10k/thermal.c

@@ -98,7 +98,7 @@ static int ath10k_thermal_set_cur_dutycycle(struct thermal_cooling_device *cdev,
 	}
 	}
 	period = max(ATH10K_QUIET_PERIOD_MIN,
 	period = max(ATH10K_QUIET_PERIOD_MIN,
 		     (ATH10K_QUIET_PERIOD_DEFAULT / num_bss));
 		     (ATH10K_QUIET_PERIOD_DEFAULT / num_bss));
-	duration = period * (duty_cycle / 100);
+	duration = (period * duty_cycle) / 100;
 	enabled = duration ? 1 : 0;
 	enabled = duration ? 1 : 0;
 
 
 	ret = ath10k_wmi_pdev_set_quiet_mode(ar, period, duration,
 	ret = ath10k_wmi_pdev_set_quiet_mode(ar, period, duration,