libertas: fix command timeout after firmware failure

This is a fix for OLPC ticket #6586: "SCAN command fails, timer doesn't
fire". In fact, the timer was firing; the problem was that the dnld_sent
state variable was not being updated after the timer expired, so
lbs_execute_next_command was not being called.

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Brian Cavagnolo 2008-05-13 13:54:59 +01:00 committed by John W. Linville
parent 2f561feb38
commit 02969d296e
1 changed files with 1 additions and 0 deletions

View File

@ -756,6 +756,7 @@ static int lbs_thread(void *data)
priv->nr_retries = 0; priv->nr_retries = 0;
} else { } else {
priv->cur_cmd = NULL; priv->cur_cmd = NULL;
priv->dnld_sent = DNLD_RES_RECEIVED;
lbs_pr_info("requeueing command %x due to timeout (#%d)\n", lbs_pr_info("requeueing command %x due to timeout (#%d)\n",
le16_to_cpu(cmdnode->cmdbuf->command), priv->nr_retries); le16_to_cpu(cmdnode->cmdbuf->command), priv->nr_retries);