summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2012-04-16 23:53:26 +0100
committerJohn W. Linville <linville@tuxdriver.com>2012-04-17 14:57:14 -0400
commit534111c78c59a8db89c570fd07489243dc366a05 (patch)
tree27b68e1c69f6f872b62ecfce026591d57904605a /drivers/net/wireless/libertas/main.c
parent0beecac8abb3af890d470df541142d55343382d6 (diff)
libertas: add asynchronous firmware loading capability
As described at http://article.gmane.org/gmane.linux.kernel.wireless.general/86084 libertas is taking a long time to load because it loads firmware during module loading. Add a new API for interface drivers to load their firmware asynchronously. The same semantics of the firmware table are followed like before. Interface drivers will be converted in follow-up patches, then we can remove the old, synchronous firmware loading function. 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/main.c')
-rw-r--r--drivers/net/wireless/libertas/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 7eaf992775ae..e96ee0aa8439 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -878,6 +878,7 @@ static int lbs_init_adapter(struct lbs_private *priv)
priv->is_host_sleep_configured = 0;
priv->is_host_sleep_activated = 0;
init_waitqueue_head(&priv->host_sleep_q);
+ init_waitqueue_head(&priv->fw_waitq);
mutex_init(&priv->lock);
setup_timer(&priv->command_timer, lbs_cmd_timeout_handler,
@@ -1037,6 +1038,8 @@ void lbs_remove_card(struct lbs_private *priv)
if (priv->wiphy_registered)
lbs_scan_deinit(priv);
+ lbs_wait_for_firmware_load(priv);
+
/* worker thread destruction blocks on the in-flight command which
* should have been cleared already in lbs_stop_card().
*/