Skip to content

Commit

Permalink
libertas: don't run thread while firmware not yet ready
Browse files Browse the repository at this point in the history
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 4f82f5c commit b15152a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/wireless/libertas/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit b15152a

Please sign in to comment.