libertas: Byteswap cmdptr->size in lbs_cmd()
authorDavid Woodhouse <dwmw2@infradead.org>
Thu, 6 Dec 2007 12:38:31 +0000 (12:38 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:06:06 +0000 (15:06 -0800)
Bad Holger. Always test on big-endian machines, if it's little-endian
you need to be swapping to/from.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/cmd.c

index 4fc3e4b56d0e7b559fb3f9dcce5beb068277ae83..7097dcf7abc8289db6c10806f3b37360cd3f4117 100644 (file)
@@ -2072,7 +2072,7 @@ int lbs_cmd(struct lbs_private *priv,
        /* Set sequence number, clean result, move to buffer */
        adapter->seqnum++;
        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->result = 0;
        memcpy(cmdptr->cmdresp, cmd, cmd_size);