summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c
diff options
context:
space:
mode:
authorAlon Giladi <alon.giladi@intel.com>2023-06-06 10:43:05 +0300
committerJohannes Berg <johannes.berg@intel.com>2023-06-06 13:44:40 +0200
commitea3571f48953df2cf77a9c4200a7363236736673 (patch)
tree4487a422efda4f7450ed3244b62533a98338d395 /drivers/net/wireless/intel/iwlwifi/fw/pnvm.c
parentc738fb6163b213dd9565ba1951d4f130975db10f (diff)
wifi: iwlwifi: Use iwl_pnvm_image in reduce power tables flow
Generalize the parsing, loading, and setting of the power-reduce tables, in order to support allocation of several DRAM payloads in the future. Signed-off-by: Alon Giladi <alon.giladi@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230606103519.564f1eead99b.Iaba653b21dc09aafc72b9bbb3928abddce0db50a@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/pnvm.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/pnvm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c b/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c
index bb6300469f4a..42d994240b31 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c
@@ -320,8 +320,9 @@ int iwl_pnvm_load(struct iwl_trans *trans,
reduce_tables:
/* now try to get the reduce power table, if not loaded yet */
if (!trans->reduce_power_loaded) {
- data = iwl_uefi_get_reduced_power(trans, &length);
- if (IS_ERR_OR_NULL(data)) {
+ memset(&pnvm_data, 0, sizeof(pnvm_data));
+ ret = iwl_uefi_get_reduced_power(trans, &pnvm_data);
+ if (ret) {
/*
* Pretend we've loaded it - at least we've tried and
* couldn't load it at all, so there's no point in
@@ -329,7 +330,7 @@ reduce_tables:
*/
trans->reduce_power_loaded = true;
} else {
- ret = iwl_trans_load_reduce_power(trans, data, length);
+ ret = iwl_trans_load_reduce_power(trans, &pnvm_data);
if (ret) {
IWL_DEBUG_FW(trans,
"Failed to load reduce power table %d\n",