Skip to contentSkip to conversation

wifi: iwlwifi: fix cmd length when sending WOWLAN_TSC_RSC_PARAM

PATCH In review Antonio Quartulli 2 participants 3 messages Jul 16, 2025 – Jul 21, 2025 Intel wireless wifi link (iwlwifi)

lore
Share & tools
lore
#0 lore raw

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.

Fixes 631ee5120285 ("iwlwifi: mvm: d3: refactor TSC/RSC configuration")

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
index ef9bab042902..b8754d7e51c5 100644
@@ -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
#1 lore raw
Quoted 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 sending WOWLAN_TSC_RSC_PARAM

Quoted 7 lines

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 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")

#2 lore raw
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 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.

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 of iwl_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