Linux wireless drivers development
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH v2 04/18] iwlwifi: mvm: use FW thermal monitoring regardless of CONFIG_THERMAL
Date: Thu,  5 Sep 2019 16:12:27 +0300	[thread overview]
Message-ID: <20190905131241.23487-5-luca@coelho.fi> (raw)
In-Reply-To: <20190905131241.23487-1-luca@coelho.fi>

From: Johannes Berg <johannes.berg@intel.com>

It doesn't make sense to use the FW thermal monitoring only if we
have CONFIG_THERMAL, because then we use the default thresholds
etc. which may be different from what the firmware implements, as
we don't maintain them in the driver now. Only the CTDP code needs
to actually be under CONFIG_THERMAL.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c  | 5 +----
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 4 ----
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index bb2aec9c6738..411a79e15333 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -1273,7 +1273,6 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
 			goto error;
 	}
 
-#ifdef CONFIG_THERMAL
 	if (iwl_mvm_is_tt_in_fw(mvm)) {
 		/* in order to give the responsibility of ct-kill and
 		 * TX backoff to FW we need to send empty temperature reporting
@@ -1285,6 +1284,7 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
 		iwl_mvm_tt_tx_backoff(mvm, 0);
 	}
 
+#ifdef CONFIG_THERMAL
 	/* TODO: read the budget from BIOS / Platform NVM */
 
 	/*
@@ -1297,9 +1297,6 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
 		if (ret)
 			goto error;
 	}
-#else
-	/* Initialize tx backoffs to the minimal possible */
-	iwl_mvm_tt_tx_backoff(mvm, 0);
 #endif
 
 	if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_SET_LTR_GEN2))
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index 2aa9bfc5e113..3efcc3a939b8 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -1422,7 +1422,6 @@ iwl_mvm_get_agg_status(struct iwl_mvm *mvm, void *tx_resp)
 
 static inline bool iwl_mvm_is_tt_in_fw(struct iwl_mvm *mvm)
 {
-#ifdef CONFIG_THERMAL
 	/* these two TLV are redundant since the responsibility to CT-kill by
 	 * FW happens only after we send at least one command of
 	 * temperature THs report.
@@ -1431,9 +1430,6 @@ static inline bool iwl_mvm_is_tt_in_fw(struct iwl_mvm *mvm)
 			   IWL_UCODE_TLV_CAPA_CT_KILL_BY_FW) &&
 	       fw_has_capa(&mvm->fw->ucode_capa,
 			   IWL_UCODE_TLV_CAPA_TEMP_THS_REPORT_SUPPORT);
-#else /* CONFIG_THERMAL */
-	return false;
-#endif /* CONFIG_THERMAL */
 }
 
 static inline bool iwl_mvm_is_ctdp_supported(struct iwl_mvm *mvm)
-- 
2.23.0.rc1


  parent reply	other threads:[~2019-09-05 13:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 13:12 [PATCH v2 00/18] iwlwifi: updates intended for v5.4 2019-08-21-2 Luca Coelho
2019-09-05 13:12 ` [PATCH v2 01/18] iwlwifi: LTR updates Luca Coelho
2019-09-05 13:12 ` [PATCH v2 02/18] iwlwifi: scan: add support for new scan request command version Luca Coelho
2019-09-05 13:12 ` [PATCH v2 03/18] iwlwifi: mvm: name magic numbers with enum Luca Coelho
2019-09-05 13:12 ` Luca Coelho [this message]
2019-09-05 13:12 ` [PATCH v2 05/18] iwlwifi: Set w-pointer upon resume according to SN Luca Coelho
2019-09-05 13:12 ` [PATCH v2 06/18] iwlwifi: remove runtime_pm_mode Luca Coelho
2019-09-05 13:12 ` [PATCH v2 07/18] iwlwifi: remove the opmode's d0i3 handlers Luca Coelho
2019-09-05 13:12 ` [PATCH v2 08/18] iwlwifi: pcie: remove the refs / unrefs from the transport Luca Coelho
2019-09-05 13:12 ` [PATCH v2 09/18] iwlwifi: pcie: remove some more d0i3 code " Luca Coelho
2019-09-05 13:12 ` [PATCH v2 10/18] iwlwifi: remove the d0i3 related module parameters Luca Coelho
2019-09-05 13:12 ` [PATCH v2 11/18] iwlwifi: remove pm_runtime completely Luca Coelho
2019-09-05 13:12 ` [PATCH v2 12/18] iwlwifi: scan: don't pass large argument by value Luca Coelho
2019-09-05 13:12 ` [PATCH v2 13/18] iwlwifi: dbg_ini: align dbg tlv functions names to a single format Luca Coelho
2019-09-05 13:12 ` [PATCH v2 14/18] iwlwifi: remove unused regdb_ptrs allocation Luca Coelho
2019-09-05 13:12 ` [PATCH v2 15/18] iwlwifi: dbg: add debug periphery registers to 9000 device family Luca Coelho
2019-09-05 13:12 ` [PATCH v2 16/18] iwlwifi: dbg_ini: maintain buffer allocations from trans instead of TLVs buffer Luca Coelho
2019-09-05 13:12 ` [PATCH v2 17/18] iwlwifi: dbg_ini: use linked list to store debug TLVs Luca Coelho
2019-09-05 13:12 ` [PATCH v2 18/18] iwlwifi: dbg_ini: remove periphery phy and aux regions handling Luca Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190905131241.23487-5-luca@coelho.fi \
    --to=luca@coelho.fi \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox