module_type = bcf->module_type;
header_len = sizeof(u32) * le32_to_cpu(bcf->header_len);
- major_version = le32_to_cpu(bcf->header_version) & 0xffff0000 >> 16;
+ major_version = (le32_to_cpu(bcf->header_version) & 0xffff0000) >> 16;
minor_version = le32_to_cpu(bcf->header_version) & 0x0000ffff;
module_id = le32_to_cpu(bcf->module_id);
module_vendor = le32_to_cpu(bcf->module_vendor);
goto error;
}
+ if (major_version != 1) {
+ dev_err(dev, "%s: major header version v%u.%u not supported\n",
+ i2400m->fw_name, major_version, minor_version);
+ goto error;
+ }
+
/* Check soft-er errors */
result = 0;
if (module_vendor != 0x8086)