Commit 659473ce authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Greg Kroah-Hartman

Staging: rt3070: kill TimerQThr thread first in RT28xxThreadTerminate()

* kill TimerQThr thread first in RT28xxThreadTerminate()
* remove the debugging printk() while at it

This makes rt3070 driver match rt2870 driver's behavior.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 382280ae
......@@ -1063,6 +1063,26 @@ VOID RT28xxThreadTerminate(
}
#endif
#ifdef RT30xx
if (pid_nr(pObj->TimerQThr_pid) > 0)
{
POS_COOKIE pObj = (POS_COOKIE)pAd->OS_Cookie;
printk("Terminate the TimerQThr_pid=%d!\n", pid_nr(pObj->TimerQThr_pid));
mb();
pAd->TimerFunc_kill = 1;
mb();
ret = kill_pid(pObj->TimerQThr_pid, SIGTERM, 1);
if (ret)
{
printk(KERN_WARNING "%s: unable to stop TimerQThread, pid=%d, ret=%d!\n",
pAd->net_dev->name, pid_nr(pObj->TimerQThr_pid), ret);
}
else
{
wait_for_completion(&pAd->TimerQComplete);
pObj->TimerQThr_pid = NULL;
}
}
if (pid_nr(pObj->MLMEThr_pid) > 0)
{
printk("Terminate the MLMEThr_pid=%d!\n", pid_nr(pObj->MLMEThr_pid));
......@@ -1106,26 +1126,6 @@ VOID RT28xxThreadTerminate(
pObj->RTUSBCmdThr_pid = NULL;
}
}
if (pid_nr(pObj->TimerQThr_pid) > 0)
{
POS_COOKIE pObj = (POS_COOKIE)pAd->OS_Cookie;
printk("Terminate the TimerQThr_pid=%d!\n", pid_nr(pObj->TimerQThr_pid));
mb();
pAd->TimerFunc_kill = 1;
mb();
ret = kill_pid(pObj->TimerQThr_pid, SIGTERM, 1);
if (ret)
{
printk(KERN_WARNING "%s: unable to stop TimerQThread, pid=%d, ret=%d!\n",
pAd->net_dev->name, pid_nr(pObj->TimerQThr_pid), ret);
}
else
{
printk("wait_for_completion TimerQThr\n");
wait_for_completion(&pAd->TimerQComplete);
pObj->TimerQThr_pid = NULL;
}
}
#endif
// Kill tasklets
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment