Commit 6228c0ae authored by David Woodhouse's avatar David Woodhouse Committed by David S. Miller

libertas: Byteswap cmdptr->size in lbs_cmd()

Bad Holger. Always test on big-endian machines, if it's little-endian
you need to be swapping to/from.
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ad9de291
...@@ -2072,7 +2072,7 @@ int lbs_cmd(struct lbs_private *priv, ...@@ -2072,7 +2072,7 @@ int lbs_cmd(struct lbs_private *priv,
/* Set sequence number, clean result, move to buffer */ /* Set sequence number, clean result, move to buffer */
adapter->seqnum++; adapter->seqnum++;
cmdptr->command = cpu_to_le16(command); cmdptr->command = cpu_to_le16(command);
cmdptr->size = cmd_size + S_DS_GEN; cmdptr->size = cpu_to_le16(cmd_size + S_DS_GEN);
cmdptr->seqnum = cpu_to_le16(adapter->seqnum); cmdptr->seqnum = cpu_to_le16(adapter->seqnum);
cmdptr->result = 0; cmdptr->result = 0;
memcpy(cmdptr->cmdresp, cmd, cmd_size); memcpy(cmdptr->cmdresp, cmd, cmd_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment