aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/pcie.c
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2013-07-22 22:17:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-07-24 11:02:07 -0400
commit43ba6b9f2f5e8090f16e8efe19d17cc8ce291d22 (patch)
treedc519d71892c5225070408e19ab38e6135498ff5 /drivers/net/wireless/mwifiex/pcie.c
parent8795ca61e4ff3db70f2d072a28aaefc29f1a2301 (diff)
mwifiex: add PCIe shutdown handler to avoid system hang on reboot
If reboot command is issued when device is in connected state, system hangs while booting. This issue is fixed by doing cleanup in shutdown handler. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/pcie.c')
-rw-r--r--drivers/net/wireless/mwifiex/pcie.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c
index 4a57eb45f9a8..dce648682694 100644
--- a/drivers/net/wireless/mwifiex/pcie.c
+++ b/drivers/net/wireless/mwifiex/pcie.c
@@ -235,6 +235,14 @@ static void mwifiex_pcie_remove(struct pci_dev *pdev)
235 kfree(card); 235 kfree(card);
236} 236}
237 237
238static void mwifiex_pcie_shutdown(struct pci_dev *pdev)
239{
240 user_rmmod = 1;
241 mwifiex_pcie_remove(pdev);
242
243 return;
244}
245
238static DEFINE_PCI_DEVICE_TABLE(mwifiex_ids) = { 246static DEFINE_PCI_DEVICE_TABLE(mwifiex_ids) = {
239 { 247 {
240 PCIE_VENDOR_ID_MARVELL, PCIE_DEVICE_ID_MARVELL_88W8766P, 248 PCIE_VENDOR_ID_MARVELL, PCIE_DEVICE_ID_MARVELL_88W8766P,
@@ -268,6 +276,7 @@ static struct pci_driver __refdata mwifiex_pcie = {
268 .pm = &mwifiex_pcie_pm_ops, 276 .pm = &mwifiex_pcie_pm_ops,
269 }, 277 },
270#endif 278#endif
279 .shutdown = mwifiex_pcie_shutdown,
271}; 280};
272 281
273/* 282/*