mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-21 10:05:00 +08:00
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>
This commit is contained in:
parent
d535311ecb
commit
0b124c3183
@ -4372,14 +4372,17 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev)
|
|||||||
iwl_dbgfs_unregister(priv);
|
iwl_dbgfs_unregister(priv);
|
||||||
sysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group);
|
sysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group);
|
||||||
|
|
||||||
|
/* ieee80211_unregister_hw call wil cause iwl4965_mac_stop to
|
||||||
|
* to be called and iwl4965_down since we are removing the device
|
||||||
|
* we need to set STATUS_EXIT_PENDING bit.
|
||||||
|
*/
|
||||||
|
set_bit(STATUS_EXIT_PENDING, &priv->status);
|
||||||
if (priv->mac80211_registered) {
|
if (priv->mac80211_registered) {
|
||||||
ieee80211_unregister_hw(priv->hw);
|
ieee80211_unregister_hw(priv->hw);
|
||||||
priv->mac80211_registered = 0;
|
priv->mac80211_registered = 0;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
set_bit(STATUS_EXIT_PENDING, &priv->status);
|
|
||||||
|
|
||||||
iwl4965_down(priv);
|
iwl4965_down(priv);
|
||||||
|
}
|
||||||
|
|
||||||
/* make sure we flush any pending irq or
|
/* make sure we flush any pending irq or
|
||||||
* tasklet for the driver
|
* tasklet for the driver
|
||||||
|
Loading…
Reference in New Issue
Block a user