mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 01:59:02 +00:00
4270847a2c
Some ath10k firmware versions allow to access the chip internal a temperature sensor and allow to reduce the amount of the time when the card is allowed to send. The latter is required on devices which tend to overheat. An userspace service has to read /sys/class/ieee80211/phy*/device/hwmon/hwmon*/temp1_input regularly and then decide how much the device has to be throttled. This can be done by writing to /sys/class/ieee80211/phy*/device/cooling_device/cur_state. By default it is not throttled (0) but it can be throttled up to 100(%). Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
48 lines
1.5 KiB
Diff
48 lines
1.5 KiB
Diff
--- a/drivers/net/wireless/ath/ath10k/Kconfig
|
|
+++ b/drivers/net/wireless/ath/ath10k/Kconfig
|
|
@@ -65,6 +65,12 @@ config ATH10K_TRACING
|
|
---help---
|
|
Select this to ath10k use tracing infrastructure.
|
|
|
|
+config ATH10K_THERMAL
|
|
+ bool "Atheros ath10k thermal monitoring support"
|
|
+ depends on THERMAL
|
|
+ ---help---
|
|
+ Select this to ath10k use hwmon for thermal measurement.
|
|
+
|
|
config ATH10K_DFS_CERTIFIED
|
|
bool "Atheros DFS support for certified platforms"
|
|
depends on ATH10K && CFG80211_CERTIFICATION_ONUS
|
|
--- a/drivers/net/wireless/ath/ath10k/Makefile
|
|
+++ b/drivers/net/wireless/ath/ath10k/Makefile
|
|
@@ -17,7 +17,7 @@ ath10k_core-y += mac.o \
|
|
ath10k_core-$(CPTCFG_ATH10K_DEBUGFS) += spectral.o
|
|
ath10k_core-$(CPTCFG_NL80211_TESTMODE) += testmode.o
|
|
ath10k_core-$(CPTCFG_ATH10K_TRACING) += trace.o
|
|
-ath10k_core-$(CONFIG_THERMAL) += thermal.o
|
|
+ath10k_core-$(CPTCFG_ATH10K_THERMAL) += thermal.o
|
|
ath10k_core-$(CPTCFG_MAC80211_DEBUGFS) += debugfs_sta.o
|
|
ath10k_core-$(CONFIG_PM) += wow.o
|
|
|
|
--- a/drivers/net/wireless/ath/ath10k/thermal.h
|
|
+++ b/drivers/net/wireless/ath/ath10k/thermal.h
|
|
@@ -36,7 +36,7 @@ struct ath10k_thermal {
|
|
int temperature;
|
|
};
|
|
|
|
-#if IS_REACHABLE(CONFIG_THERMAL)
|
|
+#if IS_REACHABLE(CPTCFG_ATH10K_THERMAL)
|
|
int ath10k_thermal_register(struct ath10k *ar);
|
|
void ath10k_thermal_unregister(struct ath10k *ar);
|
|
void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature);
|
|
--- a/local-symbols
|
|
+++ b/local-symbols
|
|
@@ -139,6 +139,7 @@ ATH10K_SDIO=
|
|
ATH10K_USB=
|
|
ATH10K_DEBUG=
|
|
ATH10K_DEBUGFS=
|
|
+ATH10K_THERMAL=
|
|
ATH10K_TRACING=
|
|
ATH10K_DFS_CERTIFIED=
|
|
WCN36XX=
|