aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl4965-base.c
diff options
context:
space:
mode:
authorRon Rindjunsky <ron.rindjunsky@intel.com>2008-03-28 19:21:10 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-01 17:13:19 -0400
commitc4f552321fa2cfe1d6b1846138d2aa8254308f96 (patch)
tree6190f636f101aaa14af253406d83495ac5e979bf /drivers/net/wireless/iwlwifi/iwl4965-base.c
parent897e1cf29e05e3373bf380a417d085cd3389a3c0 (diff)
iwlwifi: unregister to upper stack before releasing resources
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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index ae4e53f5bedd..e98695f7f14c 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -8207,6 +8207,11 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev)
8207 8207
8208 IWL_DEBUG_INFO("*** UNLOAD DRIVER ***\n"); 8208 IWL_DEBUG_INFO("*** UNLOAD DRIVER ***\n");
8209 8209
8210 if (priv->mac80211_registered) {
8211 ieee80211_unregister_hw(priv->hw);
8212 priv->mac80211_registered = 0;
8213 }
8214
8210 set_bit(STATUS_EXIT_PENDING, &priv->status); 8215 set_bit(STATUS_EXIT_PENDING, &priv->status);
8211 8216
8212 iwl4965_down(priv); 8217 iwl4965_down(priv);
@@ -8241,9 +8246,6 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev)
8241 iwl4965_unset_hw_setting(priv); 8246 iwl4965_unset_hw_setting(priv);
8242 iwlcore_clear_stations_table(priv); 8247 iwlcore_clear_stations_table(priv);
8243 8248
8244 if (priv->mac80211_registered) {
8245 ieee80211_unregister_hw(priv->hw);
8246 }
8247 8249
8248 /*netif_stop_queue(dev); */ 8250 /*netif_stop_queue(dev); */
8249 flush_workqueue(priv->workqueue); 8251 flush_workqueue(priv->workqueue);