Skip to content

Commit

Permalink
mwifiex: Add missing endian conversion.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomasz Moń authored and John W. Linville committed Jul 26, 2013
1 parent 23d412a commit 83e612f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/mwifiex/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1639,8 +1639,8 @@ static int mwifiex_sdio_host_to_card(struct mwifiex_adapter *adapter,
/* Allocate buffer and copy payload */
blk_size = MWIFIEX_SDIO_BLOCK_SIZE;
buf_block_len = (pkt_len + blk_size - 1) / blk_size;
*(u16 *) &payload[0] = (u16) pkt_len;
*(u16 *) &payload[2] = type;
*(__le16 *)&payload[0] = cpu_to_le16((u16)pkt_len);
*(__le16 *)&payload[2] = cpu_to_le16(type);

/*
* This is SDIO specific header
Expand Down

0 comments on commit 83e612f

Please sign in to comment.