summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2020-12-10 00:16:37 +0300
committerLuca Coelho <luciano.coelho@intel.com>2020-12-10 01:14:21 +0300
commit58a1c9f9a9b6b9092ae10b84f6b571a06596e296 (patch)
tree50ce411d224345374bfc657e3d4d6d91991180e4
parent152fdc0f698896708f9d7889a4ba4da6944b74f7 (diff)
downloadlinux-58a1c9f9a9b6b9092ae10b84f6b571a06596e296.tar.xz
iwlwifi: dbg-tlv: fix old length in is_trig_data_contained()
There's a bug in the lengths - the 'old length' needs to be calculated using the 'old' pointer, of course, likely a copy/paste mistake. Fix this. Reported-by: Daniel Gabay <daniel.gabay@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Fixes: cf29c5b66b9f ("iwlwifi: dbg_ini: implement time point handling") Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20201209231352.c0105ddffa74.I1ddb243053ff763c91b663748b6a593ecc3b5634@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
index 51ce93d21ffe..8fa1c22fd96d 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
@@ -808,7 +808,7 @@ static bool is_trig_data_contained(struct iwl_ucode_tlv *new,
struct iwl_fw_ini_trigger_tlv *old_trig = (void *)old->data;
__le32 *new_data = new_trig->data, *old_data = old_trig->data;
u32 new_dwords_num = iwl_tlv_array_len(new, new_trig, data);
- u32 old_dwords_num = iwl_tlv_array_len(new, new_trig, data);
+ u32 old_dwords_num = iwl_tlv_array_len(old, old_trig, data);
int i, j;
for (i = 0; i < new_dwords_num; i++) {