1
0

900-ath11k-control-thermal-support-via-symbol.patch 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. From 703d6551f71e7290619d6effe2a25a64e10538b7 Mon Sep 17 00:00:00 2001
  2. From: Robert Marko <robimarko@gmail.com>
  3. Date: Thu, 15 Dec 2022 12:20:52 +0100
  4. Subject: [PATCH] ath11k: control thermal support via symbol
  5. Currently, thermal support will get built if CONFIG_THERMAL is reachable,
  6. however this is not suitable for libreCMC as with ALL_KMODS being set to y
  7. ATH11K_THERMAL wont get selected and so hwmon and thermal kmods wont get
  8. pulled in resulting in a build-failure.
  9. So, to avoid that, lets do what is already done for ath10k and add a
  10. config symbol into backports for enabling thermal support.
  11. Signed-off-by: Robert Marko <robimarko@gmail.com>
  12. ---
  13. drivers/net/wireless/ath/ath11k/Kconfig | 7 +++++++
  14. drivers/net/wireless/ath/ath11k/Makefile | 2 +-
  15. drivers/net/wireless/ath/ath11k/thermal.h | 2 +-
  16. local-symbols | 1 +
  17. 4 files changed, 10 insertions(+), 2 deletions(-)
  18. --- a/drivers/net/wireless/ath/ath11k/Kconfig
  19. +++ b/drivers/net/wireless/ath/ath11k/Kconfig
  20. @@ -61,3 +61,10 @@ config ATH11K_SPECTRAL
  21. Enable ath11k spectral scan support
  22. Say Y to enable access to the FFT/spectral data via debugfs.
  23. +
  24. +config ATH11K_THERMAL
  25. + bool "ath11k thermal sensors and throttling support"
  26. + depends on ATH11K
  27. + depends on THERMAL
  28. + help
  29. + Enable ath11k thermal sensors and throttling support.
  30. --- a/drivers/net/wireless/ath/ath11k/Makefile
  31. +++ b/drivers/net/wireless/ath/ath11k/Makefile
  32. @@ -22,7 +22,7 @@ ath11k-y += core.o \
  33. ath11k-$(CPTCFG_ATH11K_DEBUGFS) += debugfs.o debugfs_htt_stats.o debugfs_sta.o
  34. ath11k-$(CPTCFG_NL80211_TESTMODE) += testmode.o
  35. ath11k-$(CPTCFG_ATH11K_TRACING) += trace.o
  36. -ath11k-$(CONFIG_THERMAL) += thermal.o
  37. +ath11k-$(CPTCFG_ATH11K_THERMAL) += thermal.o
  38. ath11k-$(CPTCFG_ATH11K_SPECTRAL) += spectral.o
  39. ath11k-$(CONFIG_PM) += wow.o
  40. --- a/drivers/net/wireless/ath/ath11k/thermal.h
  41. +++ b/drivers/net/wireless/ath/ath11k/thermal.h
  42. @@ -25,7 +25,7 @@ struct ath11k_thermal {
  43. int temperature;
  44. };
  45. -#if IS_REACHABLE(CONFIG_THERMAL)
  46. +#if IS_REACHABLE(CPTCFG_ATH11K_THERMAL)
  47. int ath11k_thermal_register(struct ath11k_base *sc);
  48. void ath11k_thermal_unregister(struct ath11k_base *sc);
  49. int ath11k_thermal_set_throttling(struct ath11k *ar, u32 throttle_state);
  50. --- a/local-symbols
  51. +++ b/local-symbols
  52. @@ -174,6 +174,7 @@ ATH11K_DEBUG=
  53. ATH11K_DEBUGFS=
  54. ATH11K_TRACING=
  55. ATH11K_SPECTRAL=
  56. +ATH11K_THERMAL=
  57. WLAN_VENDOR_ATMEL=
  58. ATMEL=
  59. PCI_ATMEL=