diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2010-05-11 00:08:11 +0200 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-05-11 00:08:11 +0200 |
commit | a15707d80ee9a0e0812c5f1a1ed8e41e0a6e52f3 (patch) | |
tree | b1774dad1d72b70d88ab6c51ff4b87697dfca57a /drivers/net/wireless/iwlwifi | |
parent | wireless: depends on NET (diff) | |
parent | iwlagn: wait for asynchronous firmware loading (diff) | |
download | linux-a15707d80ee9a0e0812c5f1a1ed8e41e0a6e52f3.tar.xz linux-a15707d80ee9a0e0812c5f1a1ed8e41e0a6e52f3.zip |
Merge branch 'wireless-2.6' into wireless-next-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl-dev.h
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index d18c61223ac5..dc283769780e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -1776,6 +1776,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context) /* We have our copies now, allow OS release its copies */ release_firmware(ucode_raw); + complete(&priv->_agn.firmware_loading_complete); return; try_again: @@ -1789,6 +1790,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context) IWL_ERR(priv, "failed to allocate pci memory\n"); iwl_dealloc_ucode_pci(priv); out_unbind: + complete(&priv->_agn.firmware_loading_complete); device_release_driver(&priv->pci_dev->dev); release_firmware(ucode_raw); } @@ -3586,6 +3588,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) iwl_power_initialize(priv); iwl_tt_initialize(priv); + init_completion(&priv->_agn.firmware_loading_complete); + err = iwl_request_firmware(priv, true); if (err) goto out_remove_sysfs; @@ -3626,6 +3630,8 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev) if (!priv) return; + wait_for_completion(&priv->_agn.firmware_loading_complete); + IWL_DEBUG_INFO(priv, "*** UNLOAD DRIVER ***\n"); iwl_dbgfs_unregister(priv); diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 58c69a5798d4..cd3b932ae808 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h @@ -1242,6 +1242,8 @@ struct iwl_priv { struct iwl_rx_phy_res last_phy_res; bool last_phy_res_valid; + + struct completion firmware_loading_complete; } _agn; #endif }; |