diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index c01ea48da5fe..36bafeb353ce 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -4042,7 +4042,19 @@ static int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
4042 | priv->is_open = 1; | 4042 | priv->is_open = 1; |
4043 | } | 4043 | } |
4044 | 4044 | ||
4045 | pci_save_state(pdev); | 4045 | /* pci driver assumes state will be saved in this function. |
4046 | * pci state is saved and device disabled when interface is | ||
4047 | * stopped, so at this time pci device will always be disabled - | ||
4048 | * whether interface was started or not. saving pci state now will | ||
4049 | * cause saved state be that of a disabled device, which will cause | ||
4050 | * problems during resume in that we will end up with a disabled device. | ||
4051 | * | ||
4052 | * indicate that the current saved state (from when interface was | ||
4053 | * stopped) is valid. if interface was never up at time of suspend | ||
4054 | * then the saved state will still be valid as it was saved during | ||
4055 | * .probe. */ | ||
4056 | pdev->state_saved = true; | ||
4057 | |||
4046 | pci_set_power_state(pdev, PCI_D3hot); | 4058 | pci_set_power_state(pdev, PCI_D3hot); |
4047 | 4059 | ||
4048 | return 0; | 4060 | return 0; |
@@ -4053,7 +4065,6 @@ static int iwl_pci_resume(struct pci_dev *pdev) | |||
4053 | struct iwl_priv *priv = pci_get_drvdata(pdev); | 4065 | struct iwl_priv *priv = pci_get_drvdata(pdev); |
4054 | 4066 | ||
4055 | pci_set_power_state(pdev, PCI_D0); | 4067 | pci_set_power_state(pdev, PCI_D0); |
4056 | pci_restore_state(pdev); | ||
4057 | 4068 | ||
4058 | if (priv->is_open) | 4069 | if (priv->is_open) |
4059 | iwl_mac_start(priv->hw); | 4070 | iwl_mac_start(priv->hw); |