diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-06 07:37:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:06:06 -0500 |
commit | ad9de29130599d4be3467932643797da3b9869f6 (patch) | |
tree | 0f5770e0df6cd992743d7e16e28daa1d0af77644 | |
parent | 2c94404c30008a10ccd3c7e31645626eb90a8a06 (diff) |
libertas: Zero 'pdata_size' field in cmd_ctrl_node reliably.
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>
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 9064513aea0d..4fc3e4b56d0e 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -1674,6 +1674,7 @@ static void cleanup_cmdnode(struct cmd_ctrl_node *ptempnode) | |||
1674 | wake_up_interruptible(&ptempnode->cmdwait_q); | 1674 | wake_up_interruptible(&ptempnode->cmdwait_q); |
1675 | ptempnode->wait_option = 0; | 1675 | ptempnode->wait_option = 0; |
1676 | ptempnode->pdata_buf = NULL; | 1676 | ptempnode->pdata_buf = NULL; |
1677 | ptempnode->pdata_size = 0; | ||
1677 | 1678 | ||
1678 | if (ptempnode->bufvirtualaddr != NULL) | 1679 | if (ptempnode->bufvirtualaddr != NULL) |
1679 | memset(ptempnode->bufvirtualaddr, 0, MRVDRV_SIZE_OF_CMD_BUFFER); | 1680 | memset(ptempnode->bufvirtualaddr, 0, MRVDRV_SIZE_OF_CMD_BUFFER); |
@@ -1701,6 +1702,7 @@ void lbs_set_cmd_ctrl_node(struct lbs_private *priv, | |||
1701 | 1702 | ||
1702 | ptempnode->wait_option = wait_option; | 1703 | ptempnode->wait_option = wait_option; |
1703 | ptempnode->pdata_buf = pdata_buf; | 1704 | ptempnode->pdata_buf = pdata_buf; |
1705 | ptempnode->pdata_size = 0; | ||
1704 | 1706 | ||
1705 | lbs_deb_leave(LBS_DEB_HOST); | 1707 | lbs_deb_leave(LBS_DEB_HOST); |
1706 | } | 1708 | } |