Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH 6.1] wifi: iwlwifi: assume known PNVM power table size
@ 2025-01-29 10:31 Dmitry Antipov
  2025-01-29 10:38 ` kernel test robot
  2025-01-29 10:48 ` Johannes Berg
  0 siblings, 2 replies; 5+ messages in thread
From: Dmitry Antipov @ 2025-01-29 10:31 UTC (permalink / raw)
  To: stable, Greg Kroah-Hartman
  Cc: Johannes Berg, linux-wireless, lvc-project, Dmitry Antipov

In 'iwl_pnvm_load()', assume that the power table size is always
equal to IWL_HARDCODED_REDUCE_POWER_SIZE. Compile tested only.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
I would gently ask Johannes to review this before taking any other
actions. This is intended for stable linux-6.1.y only in attempt to
avoid possible use of an uninitialized 'len' without backporting
https://lore.kernel.org/linux-wireless/20230606074310.889520-1-gregory.greenman@intel.com.
---
 drivers/net/wireless/intel/iwlwifi/fw/pnvm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c b/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c
index b6d3ac6ed440..ddf7acd67e94 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c
@@ -332,6 +332,9 @@ int iwl_pnvm_load(struct iwl_trans *trans,
 
 			goto skip_reduce_power;
 		}
+	} else {
+		/* see iwl_uefi_get_reduced_power() to check why */
+		len = IWL_HARDCODED_REDUCE_POWER_SIZE;
 	}
 
 	ret = iwl_trans_set_reduce_power(trans, data, len);
-- 
2.48.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-01-29 11:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-29 10:31 [PATCH 6.1] wifi: iwlwifi: assume known PNVM power table size Dmitry Antipov
2025-01-29 10:38 ` kernel test robot
2025-01-29 10:48 ` Johannes Berg
2025-01-29 11:50   ` Dmitry Antipov
2025-01-29 11:52     ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox