Skip to content
Snippets Groups Projects
Commit a385a53e authored by Inaky Perez-Gonzalez's avatar Inaky Perez-Gonzalez
Browse files

wimax/i2400m: fix missing endian correction read in fw loader


i2400m_fw_hdr_check() was accessing hardware field
bcf_hdr->module_type (little endian 32) without converting to host
byte sex.

Reported-by: default avatarДанилин Михаил <mdanilin@nsg.net.ru>

Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
parent 3a24934f
Branches
Tags
No related merge requests found
...@@ -1192,7 +1192,7 @@ int i2400m_fw_hdr_check(struct i2400m *i2400m, ...@@ -1192,7 +1192,7 @@ int i2400m_fw_hdr_check(struct i2400m *i2400m,
unsigned module_type, header_len, major_version, minor_version, unsigned module_type, header_len, major_version, minor_version,
module_id, module_vendor, date, size; module_id, module_vendor, date, size;
module_type = bcf_hdr->module_type; module_type = le32_to_cpu(bcf_hdr->module_type);
header_len = sizeof(u32) * le32_to_cpu(bcf_hdr->header_len); header_len = sizeof(u32) * le32_to_cpu(bcf_hdr->header_len);
major_version = (le32_to_cpu(bcf_hdr->header_version) & 0xffff0000) major_version = (le32_to_cpu(bcf_hdr->header_version) & 0xffff0000)
>> 16; >> 16;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment