aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKolekar, Abhijeet <abhijeet.kolekar@intel.com>2008-12-19 10:37:41 +0800
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:22 -0500
commitd552bfb65241a35d48e44ddb0d27e0454f579ab4 (patch)
tree1ee5a251938a6d5a74c1a8f3eb709399f42ea858 /drivers
parent90a30a021eec15da64a354656cb66987216361eb (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')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c10
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 b84509763ac..17f01a69287 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)
set_bit(STATUS_EXIT_PENDING, &priv->status);
- iwl3945_down(priv);
+ if (priv->mac80211_registered) {
+ ieee80211_unregister_hw(priv->hw);
+ priv->mac80211_registered = 0;
+ } else {
+ iwl3945_down(priv);
+ }
/* make sure we flush any pending irq or
* tasklet for the driver
@@ -7745,9 +7750,6 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev)
iwl3945_unset_hw_params(priv);
iwl3945_clear_stations_table(priv);
- if (priv->mac80211_registered)
- ieee80211_unregister_hw(priv->hw);
-
/*netif_stop_queue(dev); */
flush_workqueue(priv->workqueue);