Commit 1a10f433 authored by Johannes Berg's avatar Johannes Berg Committed by Wey-Yi Guy
Browse files

iwlagn: clean up some exit code

There's no point in running through iwl_down()
when we never registered with mac80211, as it
just cleans up internal structures that were
never initialised in this case. Therefore we
can also remove the special handling for this
case from __iwl_down().

Signed-off-by: default avatarJohannes Berg <>
Signed-off-by: default avatarWey-Yi Guy <>
parent e46f6538
......@@ -2382,20 +2382,7 @@ static void __iwl_down(struct iwl_priv *priv)
if (priv->mac80211_registered)
/* 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) <<
test_bit(STATUS_GEO_CONFIGURED, &priv->status) <<
test_bit(STATUS_EXIT_PENDING, &priv->status) <<
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) <<
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 */
priv->beacon_skb = NULL;
......@@ -4072,17 +4058,9 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev)
if (priv->mac80211_registered) {
priv->mac80211_registered = 0;
} else {
* 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. */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment