summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas/cfg.c
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2010-11-05 00:21:52 +0300
committerJohn W. Linville <linville@tuxdriver.com>2010-11-09 00:53:47 +0300
commit2e30168ba7dba95710aaadf12b2a97163df067b1 (patch)
tree96bddcad1579b3a65735621f4e92272240aad791 /drivers/net/wireless/libertas/cfg.c
parent352ffad646c0e0c5cf9ae8cea99710ee0d66ee27 (diff)
downloadlinux-2e30168ba7dba95710aaadf12b2a97163df067b1.tar.xz
libertas: terminate scan when stopping interface
There are currently no provisions in place to ensure that the scanning task has been stopped when the interface is stopped or removed. This can result in a WARNING at net/wireless/core.c:643 and other badness when you remove the module while a scan is happening. Terminate the scanning task during interface stop. Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cfg.c')
-rw-r--r--drivers/net/wireless/libertas/cfg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index 5046a0005034..373930afc26b 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -700,8 +700,9 @@ static void lbs_scan_worker(struct work_struct *work)
if (priv->scan_channel < priv->scan_req->n_channels) {
cancel_delayed_work(&priv->scan_work);
- queue_delayed_work(priv->work_thread, &priv->scan_work,
- msecs_to_jiffies(300));
+ if (!priv->stopping)
+ queue_delayed_work(priv->work_thread, &priv->scan_work,
+ msecs_to_jiffies(300));
}
/* This is the final data we are about to send */