提交 b15152a4 编写于 作者: D David Woodhouse 提交者: David S. Miller

libertas: don't run thread while firmware not yet ready

Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 4f82f5c8
......@@ -671,6 +671,8 @@ static int lbs_thread(void *data)
shouldsleep = 1; /* Sleep mode. Nothing we can do till it wakes */
else if (priv->intcounter)
shouldsleep = 0; /* Interrupt pending. Deal with it now */
else if (!priv->fw_ready)
shouldsleep = 1; /* Firmware not ready. We're waiting for it */
else if (priv->dnld_sent)
shouldsleep = 1; /* Something is en route to the device already */
else if (priv->tx_pending_len > 0)
......@@ -753,6 +755,9 @@ static int lbs_thread(void *data)
} else
spin_unlock_irq(&priv->driver_lock);
if (!priv->fw_ready)
continue;
/* Check if we need to confirm Sleep Request received previously */
if (priv->psstate == PS_STATE_PRE_SLEEP &&
!priv->dnld_sent && !priv->cur_cmd) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册