Skip to content

Commit a385a53

Browse files
committed
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: Данилин Михаил <[email protected]> Signed-off-by: Inaky Perez-Gonzalez <[email protected]>
1 parent 3a24934 commit a385a53

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/wimax/i2400m

1 file changed

+1
-1
lines changed

drivers/net/wimax/i2400m/fw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ int i2400m_fw_hdr_check(struct i2400m *i2400m,
11921192
unsigned module_type, header_len, major_version, minor_version,
11931193
module_id, module_vendor, date, size;
11941194

1195-
module_type = bcf_hdr->module_type;
1195+
module_type = le32_to_cpu(bcf_hdr->module_type);
11961196
header_len = sizeof(u32) * le32_to_cpu(bcf_hdr->header_len);
11971197
major_version = (le32_to_cpu(bcf_hdr->header_version) & 0xffff0000)
11981198
>> 16;

0 commit comments

Comments
 (0)