summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
diff options
context:
space:
mode:
authorMordechay Goodstein <mordechay.goodstein@intel.com>2020-12-09 23:16:49 +0200
committerLuca Coelho <luciano.coelho@intel.com>2020-12-10 00:16:07 +0200
commitc0f46dca0019397560de2c0afc65ae31bc8a16ad (patch)
treecc6bb28182fedf4affaa71b1dd9d39b167a388c6 /drivers/net/wireless/intel/iwlwifi/mvm/rx.c
parent27eeb03784b3cfbf38716ef314bf9a0dc09bd1fe (diff)
iwlwifi: mvm: check that statistics TLV version match struct version
FW now puts in the struct version, the TLV version so we also check it to make sure it matches. Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20201209231352.bc1dfb56ffbd.I99d8085cccc8687805781ccc43e189dbcef0e63b@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/rx.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/rx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
index 79d1778e6bc0..b562e07a5f22 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
@@ -707,7 +707,8 @@ iwl_mvm_handle_rx_statistics_tlv(struct iwl_mvm *mvm,
stats = (void *)&pkt->data;
if (WARN_ONCE(stats->hdr.type != FW_STATISTICS_OPERATIONAL ||
- stats->hdr.version != 1,
+ stats->hdr.version !=
+ iwl_fw_lookup_notif_ver(mvm->fw, LONG_GROUP, STATISTICS_CMD, 0),
"received unsupported hdr type %d, version %d\n",
stats->hdr.type, stats->hdr.version))
return;