Merge tag 'wireless-drivers-next-for-davem-2019-05-03' of git://git.kernel.org/pub...
[linux-2.6-microblaze.git] / drivers / net / wireless / intel / iwlwifi / iwl-dbg-tlv.c
index 08e40a8..ba66f7f 100644 (file)
@@ -129,7 +129,8 @@ void iwl_alloc_dbg_tlv(struct iwl_trans *trans, size_t len, const u8 *data,
                len -= ALIGN(tlv_len, 4);
                data += sizeof(*tlv) + ALIGN(tlv_len, 4);
 
-               if (!(tlv_type & IWL_UCODE_INI_TLV_GROUP))
+               if (tlv_type < IWL_UCODE_TLV_DEBUG_BASE ||
+                   tlv_type > IWL_UCODE_TLV_DEBUG_MAX)
                        continue;
 
                hdr = (void *)&tlv->data[0];