diff options
author | Daniel Drake <dsd@laptop.org> | 2012-04-16 18:53:26 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-04-17 14:57:14 -0400 |
commit | 534111c78c59a8db89c570fd07489243dc366a05 (patch) | |
tree | 27b68e1c69f6f872b62ecfce026591d57904605a /drivers/net/wireless/libertas/main.c | |
parent | 0beecac8abb3af890d470df541142d55343382d6 (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.c | 3 |
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) | |||
878 | priv->is_host_sleep_configured = 0; | 878 | priv->is_host_sleep_configured = 0; |
879 | priv->is_host_sleep_activated = 0; | 879 | priv->is_host_sleep_activated = 0; |
880 | init_waitqueue_head(&priv->host_sleep_q); | 880 | init_waitqueue_head(&priv->host_sleep_q); |
881 | init_waitqueue_head(&priv->fw_waitq); | ||
881 | mutex_init(&priv->lock); | 882 | mutex_init(&priv->lock); |
882 | 883 | ||
883 | setup_timer(&priv->command_timer, lbs_cmd_timeout_handler, | 884 | setup_timer(&priv->command_timer, lbs_cmd_timeout_handler, |
@@ -1037,6 +1038,8 @@ void lbs_remove_card(struct lbs_private *priv) | |||
1037 | if (priv->wiphy_registered) | 1038 | if (priv->wiphy_registered) |
1038 | lbs_scan_deinit(priv); | 1039 | lbs_scan_deinit(priv); |
1039 | 1040 | ||
1041 | lbs_wait_for_firmware_load(priv); | ||
1042 | |||
1040 | /* worker thread destruction blocks on the in-flight command which | 1043 | /* worker thread destruction blocks on the in-flight command which |
1041 | * should have been cleared already in lbs_stop_card(). | 1044 | * should have been cleared already in lbs_stop_card(). |
1042 | */ | 1045 | */ |