diff options
author | Shahar S Matityahu <shahar.s.matityahu@intel.com> | 2019-01-16 17:05:19 +0100 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2019-03-22 11:59:42 +0100 |
commit | fe63f21b20df1adaab90c1839d36ee7c6e4b6ac0 (patch) | |
tree | acfd39203f87e15735299f79ecc654472e1e09d5 /drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | |
parent | iwlwifi: remove unnecessary goto out in iwl_parse_nvm_mcc_info() (diff) | |
download | linux-fe63f21b20df1adaab90c1839d36ee7c6e4b6ac0.tar.xz linux-fe63f21b20df1adaab90c1839d36ee7c6e4b6ac0.zip |
iwlwifi: dbg_ini: align to FW api version 1
align to ini debug struct version 1 and enforce version checking.
Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c index 5798f434f68f..9107302cc444 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c @@ -5,7 +5,7 @@ * * GPL LICENSE SUMMARY * - * Copyright (C) 2018 Intel Corporation + * Copyright (C) 2018 - 2019 Intel Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as @@ -28,7 +28,7 @@ * * BSD LICENSE * - * Copyright (C) 2018 Intel Corporation + * Copyright (C) 2018 - 2019 Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -73,6 +73,9 @@ void iwl_fw_dbg_copy_tlv(struct iwl_trans *trans, struct iwl_ucode_tlv *tlv, int copy_size = le32_to_cpu(tlv->length) + sizeof(*tlv); int offset_size = copy_size; + if (le32_to_cpu(header->tlv_version) != 1) + return; + if (WARN_ONCE(apply_point >= IWL_FW_INI_APPLY_NUM, "Invalid apply point id %d\n", apply_point)) return; @@ -132,6 +135,9 @@ void iwl_alloc_dbg_tlv(struct iwl_trans *trans, size_t len, const u8 *data, hdr = (void *)&tlv->data[0]; apply = le32_to_cpu(hdr->apply_point); + if (le32_to_cpu(hdr->tlv_version) != 1) + continue; + IWL_DEBUG_FW(trans, "Read TLV %x, apply point %d\n", le32_to_cpu(tlv->type), apply); |