diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index b54fe5e6d529..6cd57c220631 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -6601,8 +6601,6 @@ static void __iwl_down(struct iwl_priv *priv) | |||
6601 | /* Unblock any waiting calls */ | 6601 | /* Unblock any waiting calls */ |
6602 | wake_up_interruptible_all(&priv->wait_command_queue); | 6602 | wake_up_interruptible_all(&priv->wait_command_queue); |
6603 | 6603 | ||
6604 | iwl_cancel_deferred_work(priv); | ||
6605 | |||
6606 | /* Wipe out the EXIT_PENDING status bit if we are not actually | 6604 | /* Wipe out the EXIT_PENDING status bit if we are not actually |
6607 | * exiting the module */ | 6605 | * exiting the module */ |
6608 | if (!exit_pending) | 6606 | if (!exit_pending) |
@@ -6677,6 +6675,8 @@ static void iwl_down(struct iwl_priv *priv) | |||
6677 | mutex_lock(&priv->mutex); | 6675 | mutex_lock(&priv->mutex); |
6678 | __iwl_down(priv); | 6676 | __iwl_down(priv); |
6679 | mutex_unlock(&priv->mutex); | 6677 | mutex_unlock(&priv->mutex); |
6678 | |||
6679 | iwl_cancel_deferred_work(priv); | ||
6680 | } | 6680 | } |
6681 | 6681 | ||
6682 | #define MAX_HW_RESTARTS 5 | 6682 | #define MAX_HW_RESTARTS 5 |
@@ -9174,10 +9174,9 @@ static void iwl_pci_remove(struct pci_dev *pdev) | |||
9174 | 9174 | ||
9175 | IWL_DEBUG_INFO("*** UNLOAD DRIVER ***\n"); | 9175 | IWL_DEBUG_INFO("*** UNLOAD DRIVER ***\n"); |
9176 | 9176 | ||
9177 | mutex_lock(&priv->mutex); | ||
9178 | set_bit(STATUS_EXIT_PENDING, &priv->status); | 9177 | set_bit(STATUS_EXIT_PENDING, &priv->status); |
9179 | __iwl_down(priv); | 9178 | |
9180 | mutex_unlock(&priv->mutex); | 9179 | iwl_down(priv); |
9181 | 9180 | ||
9182 | /* Free MAC hash list for ADHOC */ | 9181 | /* Free MAC hash list for ADHOC */ |
9183 | for (i = 0; i < IWL_IBSS_MAC_HASH_SIZE; i++) { | 9182 | for (i = 0; i < IWL_IBSS_MAC_HASH_SIZE; i++) { |
@@ -9236,12 +9235,10 @@ static int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
9236 | { | 9235 | { |
9237 | struct iwl_priv *priv = pci_get_drvdata(pdev); | 9236 | struct iwl_priv *priv = pci_get_drvdata(pdev); |
9238 | 9237 | ||
9239 | mutex_lock(&priv->mutex); | ||
9240 | |||
9241 | set_bit(STATUS_IN_SUSPEND, &priv->status); | 9238 | set_bit(STATUS_IN_SUSPEND, &priv->status); |
9242 | 9239 | ||
9243 | /* Take down the device; powers it off, etc. */ | 9240 | /* Take down the device; powers it off, etc. */ |
9244 | __iwl_down(priv); | 9241 | iwl_down(priv); |
9245 | 9242 | ||
9246 | if (priv->mac80211_registered) | 9243 | if (priv->mac80211_registered) |
9247 | ieee80211_stop_queues(priv->hw); | 9244 | ieee80211_stop_queues(priv->hw); |
@@ -9250,8 +9247,6 @@ static int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
9250 | pci_disable_device(pdev); | 9247 | pci_disable_device(pdev); |
9251 | pci_set_power_state(pdev, PCI_D3hot); | 9248 | pci_set_power_state(pdev, PCI_D3hot); |
9252 | 9249 | ||
9253 | mutex_unlock(&priv->mutex); | ||
9254 | |||
9255 | return 0; | 9250 | return 0; |
9256 | } | 9251 | } |
9257 | 9252 | ||
@@ -9309,8 +9304,6 @@ static int iwl_pci_resume(struct pci_dev *pdev) | |||
9309 | 9304 | ||
9310 | printk(KERN_INFO "Coming out of suspend...\n"); | 9305 | printk(KERN_INFO "Coming out of suspend...\n"); |
9311 | 9306 | ||
9312 | mutex_lock(&priv->mutex); | ||
9313 | |||
9314 | pci_set_power_state(pdev, PCI_D0); | 9307 | pci_set_power_state(pdev, PCI_D0); |
9315 | err = pci_enable_device(pdev); | 9308 | err = pci_enable_device(pdev); |
9316 | pci_restore_state(pdev); | 9309 | pci_restore_state(pdev); |
@@ -9324,7 +9317,6 @@ static int iwl_pci_resume(struct pci_dev *pdev) | |||
9324 | pci_write_config_byte(pdev, 0x41, 0x00); | 9317 | pci_write_config_byte(pdev, 0x41, 0x00); |
9325 | 9318 | ||
9326 | iwl_resume(priv); | 9319 | iwl_resume(priv); |
9327 | mutex_unlock(&priv->mutex); | ||
9328 | 9320 | ||
9329 | return 0; | 9321 | return 0; |
9330 | } | 9322 | } |