diff options
Diffstat (limited to 'drivers/net/wireless/st/cw1200/cw1200_spi.c')
-rw-r--r-- | drivers/net/wireless/st/cw1200/cw1200_spi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/st/cw1200/cw1200_spi.c b/drivers/net/wireless/st/cw1200/cw1200_spi.c index fb3aafcafe18..4f346fb977a9 100644 --- a/drivers/net/wireless/st/cw1200/cw1200_spi.c +++ b/drivers/net/wireless/st/cw1200/cw1200_spi.c @@ -81,6 +81,9 @@ static int cw1200_spi_memcpy_fromio(struct hwbus_priv *self, pr_info("READ : %04d from 0x%02x (%04x)\n", count, addr, regaddr); #endif + /* Header is LE16 */ + regaddr = (__force u16)cpu_to_le16(regaddr); + /* We have to byteswap if the SPI bus is limited to 8b operation or we are running on a Big Endian system */ @@ -143,6 +146,9 @@ static int cw1200_spi_memcpy_toio(struct hwbus_priv *self, pr_info("WRITE: %04d to 0x%02x (%04x)\n", count, addr, regaddr); #endif + /* Header is LE16 */ + regaddr = (__force u16)cpu_to_le16(regaddr); + /* We have to byteswap if the SPI bus is limited to 8b operation or we are running on a Big Endian system */ |