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>
This commit is contained in:

committed by
John W. Linville

parent
352ffad646
commit
2e30168ba7
@@ -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 */
|
||||
|
Reference in New Issue
Block a user