libertas: Zero 'pdata_size' field in cmd_ctrl_node reliably.
authorDavid Woodhouse <dwmw2@infradead.org>
Thu, 6 Dec 2007 12:37:31 +0000 (12:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:06:06 +0000 (15:06 -0800)
Otherwise, lbs_process_rx_command() will take the new path for
lbs_cmd() responses, when it shouldn't.

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

index 9064513aea0d22a1bc94e84e41bf6b95a11ee412..4fc3e4b56d0e7b559fb3f9dcce5beb068277ae83 100644 (file)
@@ -1674,6 +1674,7 @@ static void cleanup_cmdnode(struct cmd_ctrl_node *ptempnode)
        wake_up_interruptible(&ptempnode->cmdwait_q);
        ptempnode->wait_option = 0;
        ptempnode->pdata_buf = NULL;
+       ptempnode->pdata_size = 0;
 
        if (ptempnode->bufvirtualaddr != NULL)
                memset(ptempnode->bufvirtualaddr, 0, MRVDRV_SIZE_OF_CMD_BUFFER);
@@ -1701,6 +1702,7 @@ void lbs_set_cmd_ctrl_node(struct lbs_private *priv,
 
        ptempnode->wait_option = wait_option;
        ptempnode->pdata_buf = pdata_buf;
+       ptempnode->pdata_size = 0;
 
        lbs_deb_leave(LBS_DEB_HOST);
 }