All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 02/11] iwlwifi: mvm: initialize iwl_dev_tx_power_cmd to zero
Date: Fri, 24 Apr 2020 19:46:58 +0300	[thread overview]
Message-ID: <iwlwifi.20200424194456.0dc957a264ff.I43cfd72d539c1287ccaaa454e95c673dac38214f@changeid> (raw)
In-Reply-To: <20200424164707.2715869-1-luca@coelho.fi>

From: Luca Coelho <luciano.coelho@intel.com>

If the REDUCE_TX_POWER_CMD version is v4 or v5, we are not
initializing some values before sending to the FW, which causes SAR
not to work properly.  Solve this by initializing the struct in the
declaration.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index d6598339c55c..c987d14597a6 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -787,12 +787,11 @@ int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b)
 	union {
 		struct iwl_dev_tx_power_cmd v5;
 		struct iwl_dev_tx_power_cmd_v4 v4;
-	} cmd;
-
+	} cmd = {
+		.v5.v3.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_CHAINS),
+	};
 	u16 len = 0;
 
-	cmd.v5.v3.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_CHAINS);
-
 	if (fw_has_api(&mvm->fw->ucode_capa,
 		       IWL_UCODE_TLV_API_REDUCE_TX_POWER))
 		len = sizeof(cmd.v5);
-- 
2.26.2


  parent reply	other threads:[~2020-04-24 16:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24 16:46 [PATCH 00/11] iwlwifi: updates intended for v5.8 2020-04-24-2 Luca Coelho
2020-04-24 16:46 ` [PATCH 01/11] iwlwifi: dbg: set debug descriptor to NULL outside of iwl_fw_free_dump_desc Luca Coelho
2020-04-24 16:46 ` Luca Coelho [this message]
2020-04-24 16:46 ` [PATCH 03/11] iwlwifi: yoyo: remove magic number Luca Coelho
2020-04-24 16:47 ` [PATCH 04/11] iwlwifi: move iwl_set_soc_latency to iwl-drv to be used by other op_modes Luca Coelho
2020-04-24 16:47 ` [PATCH 05/11] iwlwifi: mvm: add IML/ROM information to the assertion dumps Luca Coelho
2020-04-24 16:47 ` [PATCH 06/11] iwlwifi: pcie: remove outdated comment about PCI RTPM reference Luca Coelho
2020-04-24 16:47 ` [PATCH 07/11] iwlwifi: pcie: remove mangling for iwl_ax101_cfg_qu_hr Luca Coelho
2020-04-24 16:47 ` [PATCH 08/11] iwlwifi: pcie: convert QnJ with Hr to the device table Luca Coelho
2020-04-24 16:47 ` [PATCH 09/11] iwlwifi: pcie: remove occurrences of 22000 in the FW name defines Luca Coelho
2020-04-24 16:47 ` [PATCH 10/11] iwlwifi: pcie: convert all AX101 devices to the device tables Luca Coelho
2020-04-24 16:47 ` [PATCH 11/11] iwlwifi: dump api version in yaml format 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=iwlwifi.20200424194456.0dc957a264ff.I43cfd72d539c1287ccaaa454e95c673dac38214f@changeid \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.