diff options
author | Kolekar, Abhijeet <abhijeet.kolekar@intel.com> | 2008-12-18 21:37:41 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:59:22 -0500 |
commit | d552bfb65241a35d48e44ddb0d27e0454f579ab4 (patch) | |
tree | 1ee5a251938a6d5a74c1a8f3eb709399f42ea858 /drivers/net/wireless/iwlwifi/iwl3945-base.c | |
parent | 90a30a021eec15da64a354656cb66987216361eb (diff) |
iwl3945: release resources before shutting down
Release resource before shutting down and notify upper stack.
Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index b84509763ac7..17f01a692870 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -7722,7 +7722,12 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev) | |||
7722 | 7722 | ||
7723 | set_bit(STATUS_EXIT_PENDING, &priv->status); | 7723 | set_bit(STATUS_EXIT_PENDING, &priv->status); |
7724 | 7724 | ||
7725 | iwl3945_down(priv); | 7725 | if (priv->mac80211_registered) { |
7726 | ieee80211_unregister_hw(priv->hw); | ||
7727 | priv->mac80211_registered = 0; | ||
7728 | } else { | ||
7729 | iwl3945_down(priv); | ||
7730 | } | ||
7726 | 7731 | ||
7727 | /* make sure we flush any pending irq or | 7732 | /* make sure we flush any pending irq or |
7728 | * tasklet for the driver | 7733 | * tasklet for the driver |
@@ -7745,9 +7750,6 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev) | |||
7745 | iwl3945_unset_hw_params(priv); | 7750 | iwl3945_unset_hw_params(priv); |
7746 | iwl3945_clear_stations_table(priv); | 7751 | iwl3945_clear_stations_table(priv); |
7747 | 7752 | ||
7748 | if (priv->mac80211_registered) | ||
7749 | ieee80211_unregister_hw(priv->hw); | ||
7750 | |||
7751 | /*netif_stop_queue(dev); */ | 7753 | /*netif_stop_queue(dev); */ |
7752 | flush_workqueue(priv->workqueue); | 7754 | flush_workqueue(priv->workqueue); |
7753 | 7755 | ||