wifi: iwlwifi: fix cmd length when sending WOWLAN_TSC_RSC_PARAM
PATCH 1/1 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.
Address-Coverity-ID: 1647627 ("Incorrect expression (SIZEOF_MISMATCH)")
--- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/mvm/d3.c +1 -1
@@ -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 ;
Signature · 1 line
2.49.1
Korenblit, Miriam Rachel
maintainerQuoted 12 lines
-----Original Message-----
From: Antonio Quartulli <[email protected]>
Sent: Wednesday, 16 July 2025 23:19
To: [email protected]
Cc: Antonio Quartulli <[email protected]>; Korenblit, Miriam Rachel <[email protected]>; Berg, Johannes <[email protected]>; Grumbach, Emmanuel <[email protected]>; Coelho, Luciano <[email protected]>
Subject: [PATCH] wifi: iwlwifi: fix cmd length when sendingWOWLAN_TSC_RSC_PARAM
Quoted 7 lines
In
iwl_mvm_wowlan_config_rsc_tsc()when callingiwl_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 631ee5120285 ("iwlwifi: mvm: d3: refactor TSC/RSC configuration")
Is it the right one? I think it should be:493681d9f95b ("wifi: iwlwifi: remove support of version 4 of iwl_wowlan_rsc_tsc_params_cmd")
Quoted 16 lines · Miriam Rachel
Quoted 16 lines
-----Original Message-----
From: Antonio Quartulli <[email protected]>
Sent: Wednesday, 16 July 2025 23:19
To: [email protected]
Cc: Antonio Quartulli <[email protected]>; Korenblit, Miriam Rachel <[email protected]>; Berg, Johannes <[email protected]>; Grumbach, Emmanuel <[email protected]>; Coelho, Luciano <[email protected]>
Subject: [PATCH] wifi: iwlwifi: fix cmd length when sendingWOWLAN_TSC_RSC_PARAMIn
iwl_mvm_wowlan_config_rsc_tsc()when callingiwl_mvm_send_cmd_pdu()we are accidentally passing the size of a pointer rather than the size of the object pointed by it.
Quoted 6 lines
Quoted 3 lines
Fix the expression in order to pass the approriate object length.
Fixes 631ee5120285 ("iwlwifi: mvm: d3: refactor TSC/RSC configuration")Is it the right one? I think it should be:
493681d9f95b("wifi: iwlwifi: remove support of version 4 ofiwl_wowlan_rsc_tsc_params_cmd")
Hi Miriam,
you're right - I got it wrong.
493681d9f95b is the real offending commit.
Can you fix it on the fly when applying the patch?
Thanks.
Regards,
Signature · 5 lines
Antonio Quartulli CEO and Co-Founder Mandelbit Srl https://www.mandelbit.com