iwlwifi: fix building without CONFIG_THERMAL
Subsystems (3)
PATCH 1/1 iwlwifi: fix building without CONFIG_THERMAL
The iwl_mvm_send_temp_report_ths_cmd() function is now called without CONFIG_THERMAL, but not defined:
ERROR: "iwl_mvm_send_temp_report_ths_cmd" [drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko] undefined!
Move that function out of the #ifdef as well and change it so that empty data gets sent even if no thermal device was registered.
---
No idea if this does what was intended in the commit that introduced the link failure, please see for youself.
--- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +2 -2
@@ -542,7 +542,6 @@ struct iwl_mvm_tt_mgmt {bool throttle; }; -#ifdef CONFIG_THERMAL /** *struct iwl_mvm_thermal_device - thermal zone related data * @temp_trips: temperature thresholds for report
@@ -555,6 +554,7 @@ struct iwl_mvm_thermal_device {struct thermal_zone_device *tzone; }; +#ifdef CONFIG_THERMAL /* * struct iwl_mvm_cooling_device * @cur_state: current state
@@ -1034,8 +1034,8 @@ struct iwl_mvm {/* Thermal Throttling and CTkill */ struct iwl_mvm_tt_mgmt thermal_throttle; -#ifdef CONFIG_THERMAL struct iwl_mvm_thermal_device tz_device; +#ifdef CONFIG_THERMAL struct iwl_mvm_cooling_device cooling_dev;#endif
drivers/net/wireless/intel/iwlwifi/mvm/tt.c +2 -2
@@ -549,7 +549,6 @@ int iwl_mvm_ctdp_command(struct iwl_mvm *mvm, u32 op, u32 state)return 0 ; } -#ifdef CONFIG_THERMAL static int compare_temps (const void *a,const void *b) { return ((s16)le16_to_cpu(*(__le16 *)a) -
@@ -564,7 +563,7 @@ int iwl_mvm_send_temp_report_ths_cmd(struct iwl_mvm *mvm)lockdep_assert_held (&mvm->mutex);if (!mvm->tz_device.tzone) -return -EINVAL ; + goto send;/* The driver holds array of temperature trips that are unsorted * and uncompressed, the FW should get it compressed and sorted
@@ -607,6 +606,7 @@ int iwl_mvm_send_temp_report_ths_cmd(struct iwl_mvm *mvm)return ret; } +#ifdef CONFIG_THERMAL static int iwl_mvm_tzone_get_temp (struct thermal_zone_device *device,int *temperature) {
Signature · 1 line
2.20.0
Quoted 9 lines · Arnd Bergmann
The
iwl_mvm_send_temp_report_ths_cmd()function is now called withoutCONFIG_THERMAL, but not defined:ERROR: "
iwl_mvm_send_temp_report_ths_cmd" [drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko] undefined!Move that function out of the #ifdef as well and change it so that empty data gets sent even if no thermal device was registered.
Quoted 5 lines
Fixes 242d9c8b9a93 ("iwlwifi: mvm: use FW thermal monitoring regardless of CONFIG_THERMAL")Signed-off-by Arnd Bergmann <[email protected]>---
No idea if this does what was intended in the commit that introduced the link failure, please see for youself.
Thanks for the fix, Arnd! We already sent a fix for this though[1] and Kalle has already queued it for v5.3.
[1] https://patchwork.kernel.org/patch/11150431/
--
Cheers,
Luca.