Commit 71e9378b authored by Luca Coelho's avatar Luca Coelho

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: default avatarLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200424194456.0dc957a264ff.I43cfd72d539c1287ccaaa454e95c673dac38214f@changeid
parent 2abe24f9
...@@ -787,13 +787,12 @@ int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b) ...@@ -787,13 +787,12 @@ int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b)
union { union {
struct iwl_dev_tx_power_cmd v5; struct iwl_dev_tx_power_cmd v5;
struct iwl_dev_tx_power_cmd_v4 v4; 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; int ret;
u16 len = 0; 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, if (fw_has_api(&mvm->fw->ucode_capa,
IWL_UCODE_TLV_API_REDUCE_TX_POWER)) IWL_UCODE_TLV_API_REDUCE_TX_POWER))
len = sizeof(cmd.v5); len = sizeof(cmd.v5);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment