ath10k: add debugfs entry to configure quiet period
Add support to configure quiet period (in milliseconds) via debugfs.
This is useful to experiment different quiet period values along with
different throttle ratio.
echo 100 > /sys/kernel/debug/ieee80211/phyX/ath10k/quiet_period
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
diff --git a/drivers/net/wireless/ath/ath10k/thermal.c b/drivers/net/wireless/ath/ath10k/thermal.c
index 747fea7..d3fd2ab 100644
--- a/drivers/net/wireless/ath/ath10k/thermal.c
+++ b/drivers/net/wireless/ath/ath10k/thermal.c
@@ -96,8 +96,7 @@
ret = -ENETDOWN;
goto out;
}
- period = max(ATH10K_QUIET_PERIOD_MIN,
- (ATH10K_QUIET_PERIOD_DEFAULT / num_bss));
+ period = ar->thermal.quiet_period;
duration = (period * duty_cycle) / 100;
enabled = duration ? 1 : 0;
@@ -207,6 +206,7 @@
}
ar->thermal.cdev = cdev;
+ ar->thermal.quiet_period = ATH10K_QUIET_PERIOD_DEFAULT;
/* Do not register hwmon device when temperature reading is not
* supported by firmware