aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-08-02 13:19:04 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:50:14 -0400
commit2afc0c5d71a3dec6d35f3a234ed986d635ef41ad (patch)
treee13af671f3386f8a823d3a8745c3831208c7be41 /drivers/net/wireless/libertas/main.c
parentb031ac10264fa9b805d84b4a440407ac950390cf (diff)
[PATCH] libertas: push WEXT scan requests to a work queue
Push WEXT scan requests to a workqueue and have each partial scan queue the next part, then only report results when the complete scan has finished. Full scans don't go through the work queue. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-rw-r--r--drivers/net/wireless/libertas/main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 9a46339ce47e..bcd845060d4a 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -1269,9 +1269,10 @@ int libertas_activate_card(wlan_private *priv)
1269 goto done; 1269 goto done;
1270 } 1270 }
1271 1271
1272 priv->assoc_thread = 1272 priv->work_thread = create_singlethread_workqueue("libertas_worker");
1273 create_singlethread_workqueue("libertas_assoc");
1274 INIT_DELAYED_WORK(&priv->assoc_work, libertas_association_worker); 1273 INIT_DELAYED_WORK(&priv->assoc_work, libertas_association_worker);
1274 INIT_DELAYED_WORK(&priv->scan_work, libertas_scan_worker);
1275
1275 INIT_WORK(&priv->sync_channel, libertas_sync_channel); 1276 INIT_WORK(&priv->sync_channel, libertas_sync_channel);
1276 1277
1277 /* 1278 /*
@@ -1305,7 +1306,7 @@ int libertas_activate_card(wlan_private *priv)
1305err_init_fw: 1306err_init_fw:
1306 priv->hw_unregister_dev(priv); 1307 priv->hw_unregister_dev(priv);
1307err_registerdev: 1308err_registerdev:
1308 destroy_workqueue(priv->assoc_thread); 1309 destroy_workqueue(priv->work_thread);
1309 /* Stop the thread servicing the interrupts */ 1310 /* Stop the thread servicing the interrupts */
1310 wake_up_interruptible(&priv->waitq); 1311 wake_up_interruptible(&priv->waitq);
1311 kthread_stop(priv->main_thread); 1312 kthread_stop(priv->main_thread);
@@ -1426,8 +1427,9 @@ int libertas_remove_card(wlan_private *priv)
1426 1427
1427 unregister_netdev(dev); 1428 unregister_netdev(dev);
1428 1429
1430 cancel_delayed_work(&priv->scan_work);
1429 cancel_delayed_work(&priv->assoc_work); 1431 cancel_delayed_work(&priv->assoc_work);
1430 destroy_workqueue(priv->assoc_thread); 1432 destroy_workqueue(priv->work_thread);
1431 1433
1432 if (adapter->psmode == WLAN802_11POWERMODEMAX_PSP) { 1434 if (adapter->psmode == WLAN802_11POWERMODEMAX_PSP) {
1433 adapter->psmode = WLAN802_11POWERMODECAM; 1435 adapter->psmode = WLAN802_11POWERMODECAM;