summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel
diff options
context:
space:
mode:
authorLuca Coelho <luciano.coelho@intel.com>2020-04-24 18:46:58 +0200
committerLuca Coelho <luciano.coelho@intel.com>2020-05-08 08:51:38 +0200
commit71e9378bcfd2e9dd96c2bfbef23f3562946d30b3 (patch)
tree25b95db41ad3ebbb2179ffa22591b675b8158e66 /drivers/net/wireless/intel
parentiwlwifi: dbg: set debug descriptor to NULL outside of iwl_fw_free_dump_desc (diff)
downloadlinux-71e9378bcfd2e9dd96c2bfbef23f3562946d30b3.tar.xz
linux-71e9378bcfd2e9dd96c2bfbef23f3562946d30b3.zip
iwlwifi: mvm: initialize iwl_dev_tx_power_cmd to zero
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> Link: https://lore.kernel.org/r/iwlwifi.20200424194456.0dc957a264ff.I43cfd72d539c1287ccaaa454e95c673dac38214f@changeid
Diffstat (limited to 'drivers/net/wireless/intel')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/fw.c7
1 files 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 164fc9e98c86..60246a8eed50 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -787,13 +787,12 @@ 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),
+ };
int ret;
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);