diff options
author | Gregory Greenman <gregory.greenman@intel.com> | 2008-09-02 23:18:50 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-09-03 15:10:37 -0400 |
commit | 0b124c31838bcf0459708aa91ce859582c7d3ca1 (patch) | |
tree | 93d5e86d9396bb100425c4f7ba2cc8f75310c139 /drivers/net | |
parent | d535311ecbba0d692b5f1278b8bcb2581c3482e0 (diff) |
iwlwifi: fix STATUS_EXIT_PENDING is not set on pci_remove
This patch sets STATUS_EXIT_PENDING on pci_remove. Otherwise
iwl4965_down may fail to uninitialize the driver.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@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')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 4e3d6c7fd6de..e01f048a02dd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -4372,15 +4372,18 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev) | |||
4372 | iwl_dbgfs_unregister(priv); | 4372 | iwl_dbgfs_unregister(priv); |
4373 | sysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group); | 4373 | sysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group); |
4374 | 4374 | ||
4375 | /* ieee80211_unregister_hw call wil cause iwl4965_mac_stop to | ||
4376 | * to be called and iwl4965_down since we are removing the device | ||
4377 | * we need to set STATUS_EXIT_PENDING bit. | ||
4378 | */ | ||
4379 | set_bit(STATUS_EXIT_PENDING, &priv->status); | ||
4375 | if (priv->mac80211_registered) { | 4380 | if (priv->mac80211_registered) { |
4376 | ieee80211_unregister_hw(priv->hw); | 4381 | ieee80211_unregister_hw(priv->hw); |
4377 | priv->mac80211_registered = 0; | 4382 | priv->mac80211_registered = 0; |
4383 | } else { | ||
4384 | iwl4965_down(priv); | ||
4378 | } | 4385 | } |
4379 | 4386 | ||
4380 | set_bit(STATUS_EXIT_PENDING, &priv->status); | ||
4381 | |||
4382 | iwl4965_down(priv); | ||
4383 | |||
4384 | /* make sure we flush any pending irq or | 4387 | /* make sure we flush any pending irq or |
4385 | * tasklet for the driver | 4388 | * tasklet for the driver |
4386 | */ | 4389 | */ |