From 6228c0aea544f5292977e6b27cd231a4ea137a62 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 6 Dec 2007 12:38:31 +0000 Subject: [PATCH] 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: David Woodhouse Signed-off-by: John W. Linville --- drivers/net/wireless/libertas/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 4fc3e4b56d..7097dcf7ab 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c @@ -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); -- 2.39.5