Skip to content

Commit

Permalink
iwlwifi: unregister to upper stack before releasing resources
Browse files Browse the repository at this point in the history
This patch fixes an early release of driver's resources before upper stack
was notified that low-level driver shuts down.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Ron Rindjunsky authored and John W. Linville committed Apr 1, 2008
1 parent 897e1cf commit c4f5523
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/net/wireless/iwlwifi/iwl4965-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -8207,6 +8207,11 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev)

IWL_DEBUG_INFO("*** UNLOAD DRIVER ***\n");

if (priv->mac80211_registered) {
ieee80211_unregister_hw(priv->hw);
priv->mac80211_registered = 0;
}

set_bit(STATUS_EXIT_PENDING, &priv->status);

iwl4965_down(priv);
Expand Down Expand Up @@ -8241,9 +8246,6 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev)
iwl4965_unset_hw_setting(priv);
iwlcore_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 c4f5523

Please sign in to comment.