diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 3d1da0759b97..1a6b0e0edf6f 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -6246,8 +6246,6 @@ static void __iwl_down(struct iwl_priv *priv) | |||
6246 | /* Unblock any waiting calls */ | 6246 | /* Unblock any waiting calls */ |
6247 | wake_up_interruptible_all(&priv->wait_command_queue); | 6247 | wake_up_interruptible_all(&priv->wait_command_queue); |
6248 | 6248 | ||
6249 | iwl_cancel_deferred_work(priv); | ||
6250 | |||
6251 | /* Wipe out the EXIT_PENDING status bit if we are not actually | 6249 | /* Wipe out the EXIT_PENDING status bit if we are not actually |
6252 | * exiting the module */ | 6250 | * exiting the module */ |
6253 | if (!exit_pending) | 6251 | if (!exit_pending) |
@@ -6322,6 +6320,8 @@ static void iwl_down(struct iwl_priv *priv) | |||
6322 | mutex_lock(&priv->mutex); | 6320 | mutex_lock(&priv->mutex); |
6323 | __iwl_down(priv); | 6321 | __iwl_down(priv); |
6324 | mutex_unlock(&priv->mutex); | 6322 | mutex_unlock(&priv->mutex); |
6323 | |||
6324 | iwl_cancel_deferred_work(priv); | ||
6325 | } | 6325 | } |
6326 | 6326 | ||
6327 | #define MAX_HW_RESTARTS 5 | 6327 | #define MAX_HW_RESTARTS 5 |
@@ -8580,10 +8580,9 @@ static void iwl_pci_remove(struct pci_dev *pdev) | |||
8580 | 8580 | ||
8581 | IWL_DEBUG_INFO("*** UNLOAD DRIVER ***\n"); | 8581 | IWL_DEBUG_INFO("*** UNLOAD DRIVER ***\n"); |
8582 | 8582 | ||
8583 | mutex_lock(&priv->mutex); | ||
8584 | set_bit(STATUS_EXIT_PENDING, &priv->status); | 8583 | set_bit(STATUS_EXIT_PENDING, &priv->status); |
8585 | __iwl_down(priv); | 8584 | |
8586 | mutex_unlock(&priv->mutex); | 8585 | iwl_down(priv); |
8587 | 8586 | ||
8588 | /* Free MAC hash list for ADHOC */ | 8587 | /* Free MAC hash list for ADHOC */ |
8589 | for (i = 0; i < IWL_IBSS_MAC_HASH_SIZE; i++) { | 8588 | for (i = 0; i < IWL_IBSS_MAC_HASH_SIZE; i++) { |
@@ -8642,12 +8641,10 @@ static int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
8642 | { | 8641 | { |
8643 | struct iwl_priv *priv = pci_get_drvdata(pdev); | 8642 | struct iwl_priv *priv = pci_get_drvdata(pdev); |
8644 | 8643 | ||
8645 | mutex_lock(&priv->mutex); | ||
8646 | |||
8647 | set_bit(STATUS_IN_SUSPEND, &priv->status); | 8644 | set_bit(STATUS_IN_SUSPEND, &priv->status); |
8648 | 8645 | ||
8649 | /* Take down the device; powers it off, etc. */ | 8646 | /* Take down the device; powers it off, etc. */ |
8650 | __iwl_down(priv); | 8647 | iwl_down(priv); |
8651 | 8648 | ||
8652 | if (priv->mac80211_registered) | 8649 | if (priv->mac80211_registered) |
8653 | ieee80211_stop_queues(priv->hw); | 8650 | ieee80211_stop_queues(priv->hw); |
@@ -8656,8 +8653,6 @@ static int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
8656 | pci_disable_device(pdev); | 8653 | pci_disable_device(pdev); |
8657 | pci_set_power_state(pdev, PCI_D3hot); | 8654 | pci_set_power_state(pdev, PCI_D3hot); |
8658 | 8655 | ||
8659 | mutex_unlock(&priv->mutex); | ||
8660 | |||
8661 | return 0; | 8656 | return 0; |
8662 | } | 8657 | } |
8663 | 8658 | ||
@@ -8715,8 +8710,6 @@ static int iwl_pci_resume(struct pci_dev *pdev) | |||
8715 | 8710 | ||
8716 | printk(KERN_INFO "Coming out of suspend...\n"); | 8711 | printk(KERN_INFO "Coming out of suspend...\n"); |
8717 | 8712 | ||
8718 | mutex_lock(&priv->mutex); | ||
8719 | |||
8720 | pci_set_power_state(pdev, PCI_D0); | 8713 | pci_set_power_state(pdev, PCI_D0); |
8721 | err = pci_enable_device(pdev); | 8714 | err = pci_enable_device(pdev); |
8722 | pci_restore_state(pdev); | 8715 | pci_restore_state(pdev); |
@@ -8730,7 +8723,6 @@ static int iwl_pci_resume(struct pci_dev *pdev) | |||
8730 | pci_write_config_byte(pdev, 0x41, 0x00); | 8723 | pci_write_config_byte(pdev, 0x41, 0x00); |
8731 | 8724 | ||
8732 | iwl_resume(priv); | 8725 | iwl_resume(priv); |
8733 | mutex_unlock(&priv->mutex); | ||
8734 | 8726 | ||
8735 | return 0; | 8727 | return 0; |
8736 | } | 8728 | } |