|
@@ -2996,7 +2996,7 @@ static void __iwl3945_down(struct iwl_priv *priv)
|
|
|
ieee80211_stop_queues(priv->hw);
|
|
|
|
|
|
/* If we have not previously called iwl3945_init() then
|
|
|
- * clear all bits but the RF Kill and SUSPEND bits and return */
|
|
|
+ * clear all bits but the RF Kill bits and return */
|
|
|
if (!iwl_is_init(priv)) {
|
|
|
priv->status = test_bit(STATUS_RF_KILL_HW, &priv->status) <<
|
|
|
STATUS_RF_KILL_HW |
|
|
@@ -3004,23 +3004,19 @@ static void __iwl3945_down(struct iwl_priv *priv)
|
|
|
STATUS_RF_KILL_SW |
|
|
|
test_bit(STATUS_GEO_CONFIGURED, &priv->status) <<
|
|
|
STATUS_GEO_CONFIGURED |
|
|
|
- test_bit(STATUS_IN_SUSPEND, &priv->status) <<
|
|
|
- STATUS_IN_SUSPEND |
|
|
|
test_bit(STATUS_EXIT_PENDING, &priv->status) <<
|
|
|
STATUS_EXIT_PENDING;
|
|
|
goto exit;
|
|
|
}
|
|
|
|
|
|
- /* ...otherwise clear out all the status bits but the RF Kill and
|
|
|
- * SUSPEND bits and continue taking the NIC down. */
|
|
|
+ /* ...otherwise clear out all the status bits but the RF Kill
|
|
|
+ * bits and continue taking the NIC down. */
|
|
|
priv->status &= test_bit(STATUS_RF_KILL_HW, &priv->status) <<
|
|
|
STATUS_RF_KILL_HW |
|
|
|
test_bit(STATUS_RF_KILL_SW, &priv->status) <<
|
|
|
STATUS_RF_KILL_SW |
|
|
|
test_bit(STATUS_GEO_CONFIGURED, &priv->status) <<
|
|
|
STATUS_GEO_CONFIGURED |
|
|
|
- test_bit(STATUS_IN_SUSPEND, &priv->status) <<
|
|
|
- STATUS_IN_SUSPEND |
|
|
|
test_bit(STATUS_FW_ERROR, &priv->status) <<
|
|
|
STATUS_FW_ERROR |
|
|
|
test_bit(STATUS_EXIT_PENDING, &priv->status) <<
|
|
@@ -3044,7 +3040,7 @@ static void __iwl3945_down(struct iwl_priv *priv)
|
|
|
|
|
|
udelay(5);
|
|
|
|
|
|
- if (exit_pending || test_bit(STATUS_IN_SUSPEND, &priv->status))
|
|
|
+ if (exit_pending)
|
|
|
priv->cfg->ops->lib->apm_ops.stop(priv);
|
|
|
else
|
|
|
priv->cfg->ops->lib->apm_ops.reset(priv);
|
|
@@ -3097,10 +3093,8 @@ static int __iwl3945_up(struct iwl_priv *priv)
|
|
|
clear_bit(STATUS_RF_KILL_HW, &priv->status);
|
|
|
else {
|
|
|
set_bit(STATUS_RF_KILL_HW, &priv->status);
|
|
|
- if (!test_bit(STATUS_IN_SUSPEND, &priv->status)) {
|
|
|
- IWL_WARN(priv, "Radio disabled by HW RF Kill switch\n");
|
|
|
- return -ENODEV;
|
|
|
- }
|
|
|
+ IWL_WARN(priv, "Radio disabled by HW RF Kill switch\n");
|
|
|
+ return -ENODEV;
|
|
|
}
|
|
|
|
|
|
iwl_write32(priv, CSR_INT, 0xFFFFFFFF);
|
|
@@ -3592,9 +3586,6 @@ static int iwl3945_mac_start(struct ieee80211_hw *hw)
|
|
|
|
|
|
IWL_DEBUG_INFO(priv, "Start UP work.\n");
|
|
|
|
|
|
- if (test_bit(STATUS_IN_SUSPEND, &priv->status))
|
|
|
- return 0;
|
|
|
-
|
|
|
/* Wait for START_ALIVE from ucode. Otherwise callbacks from
|
|
|
* mac80211 will not be run successfully. */
|
|
|
ret = wait_event_interruptible_timeout(priv->wait_command_queue,
|
|
@@ -5233,43 +5224,6 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev)
|
|
|
ieee80211_free_hw(priv->hw);
|
|
|
}
|
|
|
|
|
|
-#ifdef CONFIG_PM
|
|
|
-
|
|
|
-static int iwl3945_pci_suspend(struct pci_dev *pdev, pm_message_t state)
|
|
|
-{
|
|
|
- struct iwl_priv *priv = pci_get_drvdata(pdev);
|
|
|
-
|
|
|
- if (priv->is_open) {
|
|
|
- set_bit(STATUS_IN_SUSPEND, &priv->status);
|
|
|
- iwl3945_mac_stop(priv->hw);
|
|
|
- priv->is_open = 1;
|
|
|
- }
|
|
|
- pci_save_state(pdev);
|
|
|
- pci_disable_device(pdev);
|
|
|
- pci_set_power_state(pdev, PCI_D3hot);
|
|
|
-
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
-static int iwl3945_pci_resume(struct pci_dev *pdev)
|
|
|
-{
|
|
|
- struct iwl_priv *priv = pci_get_drvdata(pdev);
|
|
|
- int ret;
|
|
|
-
|
|
|
- pci_set_power_state(pdev, PCI_D0);
|
|
|
- ret = pci_enable_device(pdev);
|
|
|
- if (ret)
|
|
|
- return ret;
|
|
|
- pci_restore_state(pdev);
|
|
|
-
|
|
|
- if (priv->is_open)
|
|
|
- iwl3945_mac_start(priv->hw);
|
|
|
-
|
|
|
- clear_bit(STATUS_IN_SUSPEND, &priv->status);
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
-#endif /* CONFIG_PM */
|
|
|
|
|
|
/*****************************************************************************
|
|
|
*
|
|
@@ -5283,8 +5237,8 @@ static struct pci_driver iwl3945_driver = {
|
|
|
.probe = iwl3945_pci_probe,
|
|
|
.remove = __devexit_p(iwl3945_pci_remove),
|
|
|
#ifdef CONFIG_PM
|
|
|
- .suspend = iwl3945_pci_suspend,
|
|
|
- .resume = iwl3945_pci_resume,
|
|
|
+ .suspend = iwl_pci_suspend,
|
|
|
+ .resume = iwl_pci_resume,
|
|
|
#endif
|
|
|
};
|
|
|
|