diff options
author | Daniel Drake <dsd@laptop.org> | 2010-11-05 00:21:52 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-09 00:53:47 +0300 |
commit | 2e30168ba7dba95710aaadf12b2a97163df067b1 (patch) | |
tree | 96bddcad1579b3a65735621f4e92272240aad791 /drivers/net/wireless/libertas/cfg.c | |
parent | 352ffad646c0e0c5cf9ae8cea99710ee0d66ee27 (diff) | |
download | linux-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.c | 5 |
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 */ |