From d2ca942b238845c95042ba98872291ff177df1a1 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Wed, 13 Apr 2011 03:14:44 -0700 Subject: [PATCH] --- yaml --- r: 247126 b: refs/heads/master c: 1a10f43313481b99154b3b1ce6863742475422e0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/iwlwifi/iwl-agn.c | 26 ++------------------ 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/[refs] b/[refs] index 3c49f9a4f4ec..e701845cd11c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e46f6538c24f01bb68dc374358ce85a0af666682 +refs/heads/master: 1a10f43313481b99154b3b1ce6863742475422e0 diff --git a/trunk/drivers/net/wireless/iwlwifi/iwl-agn.c b/trunk/drivers/net/wireless/iwlwifi/iwl-agn.c index f8559cc974f8..2845f6372110 100644 --- a/trunk/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/trunk/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -2382,20 +2382,7 @@ static void __iwl_down(struct iwl_priv *priv) if (priv->mac80211_registered) ieee80211_stop_queues(priv->hw); - /* If we have not previously called iwl_init() then - * clear all bits but the RF Kill bit and return */ - if (!iwl_is_init(priv)) { - priv->status = test_bit(STATUS_RF_KILL_HW, &priv->status) << - STATUS_RF_KILL_HW | - test_bit(STATUS_GEO_CONFIGURED, &priv->status) << - STATUS_GEO_CONFIGURED | - test_bit(STATUS_EXIT_PENDING, &priv->status) << - STATUS_EXIT_PENDING; - goto exit; - } - - /* ...otherwise clear out all the status bits but the RF Kill - * bit and continue taking the NIC down. */ + /* Clear out all status bits but a few that are stable across reset */ priv->status &= test_bit(STATUS_RF_KILL_HW, &priv->status) << STATUS_RF_KILL_HW | test_bit(STATUS_GEO_CONFIGURED, &priv->status) << @@ -2421,7 +2408,6 @@ static void __iwl_down(struct iwl_priv *priv) /* Stop the device, and put it in low power state */ iwl_apm_stop(priv); - exit: dev_kfree_skb(priv->beacon_skb); priv->beacon_skb = NULL; @@ -4072,17 +4058,9 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev) if (priv->mac80211_registered) { ieee80211_unregister_hw(priv->hw); priv->mac80211_registered = 0; - } else { - iwl_down(priv); } - /* - * Make sure device is reset to low power before unloading driver. - * This may be redundant with iwl_down(), but there are paths to - * run iwl_down() without calling apm_ops.stop(), and there are - * paths to avoid running iwl_down() at all before leaving driver. - * This (inexpensive) call *makes sure* device is reset. - */ + /* Reset to low power before unloading driver. */ iwl_apm_stop(priv); iwl_tt_exit(priv);