/* We have our copies now, allow OS release its copies */
release_firmware(ucode_raw);
+ complete(&priv->firmware_loading_complete);
return;
try_again:
IWL_ERR(priv, "failed to allocate pci memory\n");
iwl_dealloc_ucode_pci(priv);
out_unbind:
+ complete(&priv->firmware_loading_complete);
device_release_driver(&priv->pci_dev->dev);
release_firmware(ucode_raw);
}
iwl_power_initialize(priv);
iwl_tt_initialize(priv);
+ init_completion(&priv->firmware_loading_complete);
+
err = iwl_request_firmware(priv, true);
if (err)
goto out_remove_sysfs;
if (!priv)
return;
+ wait_for_completion(&priv->firmware_loading_complete);
+
IWL_DEBUG_INFO(priv, "*** UNLOAD DRIVER ***\n");
iwl_dbgfs_unregister(priv);
struct delayed_work alive_start;
struct delayed_work scan_check;
+ struct completion firmware_loading_complete;
+
/*For 3945 only*/
struct delayed_work thermal_periodic;
struct delayed_work rfkill_poll;