aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-03-26 13:29:40 -0400
committerIngo Molnar <mingo@elte.hu>2009-03-26 13:29:40 -0400
commit5a54bd1307471c1cd0521402fe65e2057edcab2f (patch)
tree25fb6a543db4ccc11b6d5662ed2e7facfce39ae7 /drivers/net/wireless/iwlwifi/iwl-agn.c
parentf9f35677d81adb0feedcd6e0e661784805c8facd (diff)
parent8e0ee43bc2c3e19db56a4adaa9a9b04ce885cd84 (diff)
Merge commit 'v2.6.29' into core/header-fixes
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 0dc8eed16404..129e2d330abb 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1719,6 +1719,10 @@ static int iwl_read_ucode(struct iwl_priv *priv)
1719 priv->ucode_data_backup.len = data_size; 1719 priv->ucode_data_backup.len = data_size;
1720 iwl_alloc_fw_desc(priv->pci_dev, &priv->ucode_data_backup); 1720 iwl_alloc_fw_desc(priv->pci_dev, &priv->ucode_data_backup);
1721 1721
1722 if (!priv->ucode_code.v_addr || !priv->ucode_data.v_addr ||
1723 !priv->ucode_data_backup.v_addr)
1724 goto err_pci_alloc;
1725
1722 /* Initialization instructions and data */ 1726 /* Initialization instructions and data */
1723 if (init_size && init_data_size) { 1727 if (init_size && init_data_size) {
1724 priv->ucode_init.len = init_size; 1728 priv->ucode_init.len = init_size;
@@ -3864,7 +3868,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
3864 } 3868 }
3865 err = iwl_eeprom_check_version(priv); 3869 err = iwl_eeprom_check_version(priv);
3866 if (err) 3870 if (err)
3867 goto out_iounmap; 3871 goto out_free_eeprom;
3868 3872
3869 /* extract MAC Address */ 3873 /* extract MAC Address */
3870 iwl_eeprom_get_mac(priv, priv->mac_addr); 3874 iwl_eeprom_get_mac(priv, priv->mac_addr);
@@ -3941,6 +3945,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
3941 return 0; 3945 return 0;
3942 3946
3943 out_remove_sysfs: 3947 out_remove_sysfs:
3948 destroy_workqueue(priv->workqueue);
3949 priv->workqueue = NULL;
3944 sysfs_remove_group(&pdev->dev.kobj, &iwl_attribute_group); 3950 sysfs_remove_group(&pdev->dev.kobj, &iwl_attribute_group);
3945 out_uninit_drv: 3951 out_uninit_drv:
3946 iwl_uninit_drv(priv); 3952 iwl_uninit_drv(priv);
@@ -3949,8 +3955,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
3949 out_iounmap: 3955 out_iounmap:
3950 pci_iounmap(pdev, priv->hw_base); 3956 pci_iounmap(pdev, priv->hw_base);
3951 out_pci_release_regions: 3957 out_pci_release_regions:
3952 pci_release_regions(pdev);
3953 pci_set_drvdata(pdev, NULL); 3958 pci_set_drvdata(pdev, NULL);
3959 pci_release_regions(pdev);
3954 out_pci_disable_device: 3960 out_pci_disable_device:
3955 pci_disable_device(pdev); 3961 pci_disable_device(pdev);
3956 out_ieee80211_free_hw: 3962 out_ieee80211_free_hw:
@@ -4038,6 +4044,19 @@ static int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state)
4038 priv->is_open = 1; 4044 priv->is_open = 1;
4039 } 4045 }
4040 4046
4047 /* pci driver assumes state will be saved in this function.
4048 * pci state is saved and device disabled when interface is
4049 * stopped, so at this time pci device will always be disabled -
4050 * whether interface was started or not. saving pci state now will
4051 * cause saved state be that of a disabled device, which will cause
4052 * problems during resume in that we will end up with a disabled device.
4053 *
4054 * indicate that the current saved state (from when interface was
4055 * stopped) is valid. if interface was never up at time of suspend
4056 * then the saved state will still be valid as it was saved during
4057 * .probe. */
4058 pdev->state_saved = true;
4059
4041 pci_set_power_state(pdev, PCI_D3hot); 4060 pci_set_power_state(pdev, PCI_D3hot);
4042 4061
4043 return 0; 4062 return 0;