Skip to content

Commit

Permalink
brcm80211: smac: fix endianess issue for OTP memory access
Browse files Browse the repository at this point in the history
This fixes issue when using OTP memory. It was introduced by
following commit:

commit 028f78d
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: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Arend van Spriel authored and John W. Linville committed Nov 11, 2011
1 parent 97b52cf commit 9752915
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wireless/brcm80211/brcmsmac/srom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9752915

Please sign in to comment.