Skip to content

Commit

Permalink
libertas: Zero 'pdata_size' field in cmd_ctrl_node reliably.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Woodhouse authored and David S. Miller committed Jan 28, 2008
1 parent 2c94404 commit ad9de29
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wireless/libertas/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit ad9de29

Please sign in to comment.