linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH v5.5 01/10] iwlwifi: don't send PPAG command if disabled
Date: Fri, 20 Dec 2019 13:56:29 +0200	[thread overview]
Message-ID: <20191220115638.1299888-2-luca@coelho.fi> (raw)
In-Reply-To: <20191220115638.1299888-1-luca@coelho.fi>

From: Gil Adam <gil.adam@intel.com>

we should not send the PPAG (Per-Platform Antenna Gain)
command to FW unless the platform has this ACPI table and it was
read and validated during the init flow. also no need to send the
command if the feature is disabled, so check if enabled before
sending, as if there is no valid table the feature is disabled.

Signed-off-by: Gil Adam <gil.adam@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index dd685f7eb410..c09624d8d7ee 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -841,9 +841,13 @@ int iwl_mvm_ppag_send_cmd(struct iwl_mvm *mvm)
 		return 0;
 	}
 
+	if (!mvm->fwrt.ppag_table.enabled) {
+		IWL_DEBUG_RADIO(mvm,
+				"PPAG not enabled, command not sent.\n");
+		return 0;
+	}
+
 	IWL_DEBUG_RADIO(mvm, "Sending PER_PLATFORM_ANT_GAIN_CMD\n");
-	IWL_DEBUG_RADIO(mvm, "PPAG is %s\n",
-			mvm->fwrt.ppag_table.enabled ? "enabled" : "disabled");
 
 	for (i = 0; i < ACPI_PPAG_NUM_CHAINS; i++) {
 		for (j = 0; j < ACPI_PPAG_NUM_SUB_BANDS; j++) {
-- 
2.24.0


  reply	other threads:[~2019-12-20 11:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20 11:56 [PATCH v5.5 00/10] iwlwifi: fixes intended for 5.5 2019-12-20 Luca Coelho
2019-12-20 11:56 ` Luca Coelho [this message]
2019-12-20 11:56 ` [PATCH v5.5 02/10] iwlwifi: pcie: move page tracking into get_page_hdr() Luca Coelho
2019-12-20 11:56 ` [PATCH v5.5 03/10] iwlwifi: pcie: work around DMA hardware bug Luca Coelho
2019-12-23  9:32   ` [PATCH v2 " Luca Coelho
2019-12-28 20:26     ` Justin Capella
2020-01-02  9:21       ` Johannes Berg
2019-12-20 11:56 ` [PATCH v5.5 04/10] iwlwifi: pcie: detect the DMA bug and warn if it happens Luca Coelho
2019-12-20 11:56 ` [PATCH v5.5 05/10] iwlwifi: pcie: allocate smaller dev_cmd for TX headers Luca Coelho
2019-12-20 11:56 ` [PATCH v5.5 06/10] iwlwifi: fix TLV fragment allocation loop Luca Coelho
2019-12-20 11:56 ` [PATCH v5.5 07/10] iwlwifi: mvm: fix NVM check for 3168 devices Luca Coelho
2019-12-20 11:56 ` [PATCH v5.5 08/10] iwlwifi: mvm: report TX rate to mac80211 directly for RS offload Luca Coelho
2019-12-20 11:56 ` [PATCH v5.5 09/10] iwlwifi: Don't ignore the cap field upon mcc update Luca Coelho
2019-12-20 11:56 ` [PATCH v5.5 10/10] iwlwifi: pcie: extend hardware workaround to context-info 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=20191220115638.1299888-2-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;
as well as URLs for NNTP newsgroup(s).