Skip to content

Commit

Permalink
iwl3945: release resources before shutting down
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kolekar, Abhijeet authored and John W. Linville committed Jan 29, 2009
1 parent 90a30a0 commit d552bfb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);

Expand Down

0 comments on commit d552bfb

Please sign in to comment.