From: Antonio Quartulli Date: Wed, 16 Jul 2025 20:19:11 +0000 (+0200) Subject: wifi: iwlwifi: fix cmd length when sending WOWLAN_TSC_RSC_PARAM X-Git-Tag: io_uring-6.17-20250815~128^2~34^2~2^2~16 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=7b87c542c0115726f67461a6360d2cece1d11896;p=linux-block.git wifi: iwlwifi: fix cmd length when sending WOWLAN_TSC_RSC_PARAM In iwl_mvm_wowlan_config_rsc_tsc() when calling iwl_mvm_send_cmd_pdu() we are accidentally passing the size of a pointer rather than the size of the object pointed by it. Fix the expression in order to pass the approriate object length. Fixes: 493681d9f95b ("wifi: iwlwifi: remove support of version 4 of iwl_wowlan_rsc_tsc_params_cmd") Address-Coverity-ID: 1647627 ("Incorrect expression (SIZEOF_MISMATCH)") Signed-off-by: Antonio Quartulli Link: https://patch.msgid.link/20250716201911.700-1-antonio@mandelbit.com Signed-off-by: Miri Korenblit --- diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index ef9bab042902..b8754d7e51c5 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -494,7 +494,7 @@ static int iwl_mvm_wowlan_config_rsc_tsc(struct iwl_mvm *mvm, if (data.have_rsc_tsc) ret = iwl_mvm_send_cmd_pdu(mvm, WOWLAN_TSC_RSC_PARAM, CMD_ASYNC, - sizeof(data.rsc_tsc), + sizeof(*data.rsc_tsc), data.rsc_tsc); else ret = 0;