aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmd.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-16 23:26:54 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:07:40 -0500
commit38bfab1a01c66cb1a5001dc702b0856b2f942fd5 (patch)
tree22ed117ba98a7a26fe4ed91ba3e04115853957e8 /drivers/net/wireless/libertas/cmd.c
parentc6ad3738c689c2e64af2b74c1f407c9323ba40dd (diff)
libertas: fix buffer handling of PS_MODE commands and responses
Commit 5b8845345e7385d2eb37fac22ba9ab6905988be5 (or, in case the git workflow is broken and patches get recommitted, the commit entitled 'libertas: rename and re-type bufvirtualaddr to cmdbuf' by dcbw), introduced a number of bugs where we once had a pointer to a command _payload_, but now we use the pointer to the command header instead. The fix isn't wonderfully pretty for now, but it'll get better when we finish converting all commands so the structures include the header. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmd.c')
-rw-r--r--drivers/net/wireless/libertas/cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 7682b9d27de3..2765b9c20851 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -1175,7 +1175,7 @@ static void lbs_queue_cmd(struct lbs_private *priv,
1175 1175
1176 /* Exit_PS command needs to be queued in the header always. */ 1176 /* Exit_PS command needs to be queued in the header always. */
1177 if (le16_to_cpu(cmdnode->cmdbuf->command) == CMD_802_11_PS_MODE) { 1177 if (le16_to_cpu(cmdnode->cmdbuf->command) == CMD_802_11_PS_MODE) {
1178 struct cmd_ds_802_11_ps_mode *psm = (void *) cmdnode->cmdbuf; 1178 struct cmd_ds_802_11_ps_mode *psm = (void *) &cmdnode->cmdbuf[1];
1179 1179
1180 if (psm->action == cpu_to_le16(CMD_SUBCMD_EXIT_PS)) { 1180 if (psm->action == cpu_to_le16(CMD_SUBCMD_EXIT_PS)) {
1181 if (priv->psstate != PS_STATE_FULL_POWER) 1181 if (priv->psstate != PS_STATE_FULL_POWER)
@@ -1889,7 +1889,7 @@ int lbs_execute_next_command(struct lbs_private *priv)
1889 * PS command. Ignore it if it is not Exit_PS. 1889 * PS command. Ignore it if it is not Exit_PS.
1890 * otherwise send it down immediately. 1890 * otherwise send it down immediately.
1891 */ 1891 */
1892 struct cmd_ds_802_11_ps_mode *psm = (void *)cmd; 1892 struct cmd_ds_802_11_ps_mode *psm = (void *)&cmd[1];
1893 1893
1894 lbs_deb_host( 1894 lbs_deb_host(
1895 "EXEC_NEXT_CMD: PS cmd, action 0x%02x\n", 1895 "EXEC_NEXT_CMD: PS cmd, action 0x%02x\n",