Commit c8611331 authored by Johannes Berg's avatar Johannes Berg Committed by Luca Coelho

iwlwifi: mvm: fw: clean up hcmd struct creation

This is valid, but pretty uncommon in the driver, clean up
the code here a bit to use an initializer.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20220128153014.1717817392df.I75add2a50a69d28eaebfd67e5a0524bf43119a81@changeidSigned-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent f0c86427
...@@ -814,7 +814,11 @@ int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm) ...@@ -814,7 +814,11 @@ int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm)
struct iwl_geo_tx_power_profiles_resp *resp; struct iwl_geo_tx_power_profiles_resp *resp;
u16 len; u16 len;
int ret; int ret;
struct iwl_host_cmd cmd; struct iwl_host_cmd cmd = {
.id = WIDE_ID(PHY_OPS_GROUP, PER_CHAIN_LIMIT_OFFSET_CMD),
.flags = CMD_WANT_SKB,
.data = { &geo_tx_cmd },
};
u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, PHY_OPS_GROUP, u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, PHY_OPS_GROUP,
PER_CHAIN_LIMIT_OFFSET_CMD, PER_CHAIN_LIMIT_OFFSET_CMD,
IWL_FW_CMD_VER_UNKNOWN); IWL_FW_CMD_VER_UNKNOWN);
...@@ -838,12 +842,7 @@ int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm) ...@@ -838,12 +842,7 @@ int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm)
if (!iwl_sar_geo_support(&mvm->fwrt)) if (!iwl_sar_geo_support(&mvm->fwrt))
return -EOPNOTSUPP; return -EOPNOTSUPP;
cmd = (struct iwl_host_cmd){ cmd.len[0] = len;
.id = WIDE_ID(PHY_OPS_GROUP, PER_CHAIN_LIMIT_OFFSET_CMD),
.len = { len, },
.flags = CMD_WANT_SKB,
.data = { &geo_tx_cmd },
};
ret = iwl_mvm_send_cmd(mvm, &cmd); ret = iwl_mvm_send_cmd(mvm, &cmd);
if (ret) { if (ret) {
......
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