Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79220
b: refs/heads/master
c: d9f8870
h: refs/heads/master
v: v3
  • Loading branch information
David Woodhouse authored and David S. Miller committed Jan 28, 2008
1 parent f36a423 commit e9d0a1b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4ad36d780caf34630d1a4cc39f9bc11017f5b81d
refs/heads/master: d9f88705a7ce2f9ef13d6656ee715493a663edfc
13 changes: 9 additions & 4 deletions trunk/drivers/net/wireless/libertas/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,10 @@ static int lbs_thread(void *data)
set_current_state(TASK_INTERRUPTIBLE);
spin_lock_irq(&priv->driver_lock);

if (priv->surpriseremoved)
if (kthread_should_stop())
shouldsleep = 0; /* Bye */
else if (priv->surpriseremoved)
shouldsleep = 1; /* We need to wait until we're _told_ to die */
else if (priv->psstate == PS_STATE_SLEEP)
shouldsleep = 1; /* Sleep mode. Nothing we can do till it wakes */
else if (priv->intcounter)
Expand Down Expand Up @@ -699,12 +701,15 @@ static int lbs_thread(void *data)
lbs_deb_thread("main-thread 333: intcounter=%d currenttxskb=%p dnld_sent=%d\n",
priv->intcounter, priv->currenttxskb, priv->dnld_sent);

if (kthread_should_stop() || priv->surpriseremoved) {
lbs_deb_thread("main-thread: break from main thread: surpriseremoved=0x%x\n",
priv->surpriseremoved);
if (kthread_should_stop()) {
lbs_deb_thread("main-thread: break from main thread\n");
break;
}

if (priv->surpriseremoved) {
lbs_deb_thread("adapter removed; waiting to die...\n");
continue;
}

spin_lock_irq(&priv->driver_lock);

Expand Down

0 comments on commit e9d0a1b

Please sign in to comment.