diff options
author | Tomasz Moń <desowin@gmail.com> | 2013-07-23 01:42:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-07-26 16:59:01 -0400 |
commit | 83e612f632c3897be29ef02e0472f6d63e258378 (patch) | |
tree | 340711f2d9d07c6562f6d3c95b9a5605c51df1d2 | |
parent | 23d412a2e94f55b84dbf9d5e64f381677bc90575 (diff) |
mwifiex: Add missing endian conversion.
Both type and pkt_len variables are in host endian and these should be in
Little Endian in the payload.
Signed-off-by: Tomasz Moń <desowin@gmail.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/mwifiex/sdio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c index 5ef49f2e375a..09185c963248 100644 --- a/drivers/net/wireless/mwifiex/sdio.c +++ b/drivers/net/wireless/mwifiex/sdio.c | |||
@@ -1639,8 +1639,8 @@ static int mwifiex_sdio_host_to_card(struct mwifiex_adapter *adapter, | |||
1639 | /* Allocate buffer and copy payload */ | 1639 | /* Allocate buffer and copy payload */ |
1640 | blk_size = MWIFIEX_SDIO_BLOCK_SIZE; | 1640 | blk_size = MWIFIEX_SDIO_BLOCK_SIZE; |
1641 | buf_block_len = (pkt_len + blk_size - 1) / blk_size; | 1641 | buf_block_len = (pkt_len + blk_size - 1) / blk_size; |
1642 | *(u16 *) &payload[0] = (u16) pkt_len; | 1642 | *(__le16 *)&payload[0] = cpu_to_le16((u16)pkt_len); |
1643 | *(u16 *) &payload[2] = type; | 1643 | *(__le16 *)&payload[2] = cpu_to_le16(type); |
1644 | 1644 | ||
1645 | /* | 1645 | /* |
1646 | * This is SDIO specific header | 1646 | * This is SDIO specific header |