Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277634
b: refs/heads/master
c: 81d2e2d
h: refs/heads/master
v: v3
  • Loading branch information
Arend van Spriel authored and John W. Linville committed Nov 8, 2011
1 parent 05c89fe commit baab979
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1525662ac280e61feb1af7778881241b542dc075
refs/heads/master: 81d2e2d148c2263f29a971d027f04c6e2c87e0d2
10 changes: 5 additions & 5 deletions trunk/drivers/net/wireless/brcm80211/brcmsmac/srom.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,14 +617,14 @@ static uint mask_width(u16 mask)
return 0;
}

static inline void ltoh16_buf(u16 *buf, unsigned int size)
static inline void le16_to_cpu_buf(u16 *buf, unsigned int size)
{
size /= 2;
while (size--)
*(buf + size) = le16_to_cpu(*(__le16 *)(buf + size));
}

static inline void htol16_buf(u16 *buf, unsigned int size)
static inline void cpu_to_le16_buf(u16 *buf, unsigned int size)
{
size /= 2;
while (size--)
Expand Down Expand Up @@ -807,7 +807,7 @@ sprom_read_pci(struct si_pub *sih, u8 __iomem *sprom, uint wordoff,
err = -EIO;
else
/* now correct the endianness of the byte array */
ltoh16_buf(buf, nbytes);
le16_to_cpu_buf(buf, nbytes);

return err;
}
Expand Down Expand Up @@ -837,13 +837,13 @@ static int otp_read_pci(struct si_pub *sih, u16 *buf, uint bufsz)
return -ENODATA;

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

/* now correct the endianness of the byte array */
ltoh16_buf(buf, bufsz);
le16_to_cpu_buf(buf, bufsz);

return err;
}
Expand Down

0 comments on commit baab979

Please sign in to comment.