Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9752915e authored by Arend van Spriel's avatar Arend van Spriel Committed by John W. Linville
Browse files

brcm80211: smac: fix endianess issue for OTP memory access



This fixes issue when using OTP memory. It was introduced by
following commit:

commit 028f78d4
Author: Arend van Spriel <arend@broadcom.com>
Date:   Fri Oct 21 16:16:35 2011 +0200

    brcm80211: smac: change buffer endianess convert function interface

Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 97b52cfd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -835,6 +835,8 @@ static int otp_read_pci(struct si_pub *sih, u16 *buf, uint nwords)
		 */
		return -ENODATA;

	/* fixup the endianness so crc8 will pass */
	cpu_to_le16_buf(buf, sz);
	if (crc8(brcms_srom_crc8_table, (u8 *) buf, sz * 2,
		 CRC8_INIT_VALUE) != CRC8_GOOD_VALUE(brcms_srom_crc8_table))
		err = -EIO;