summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex
diff options
context:
space:
mode:
authorZhaoyang Liu <liuzy@marvell.com>2015-07-22 13:53:44 +0200
committerKalle Valo <kvalo@codeaurora.org>2015-08-06 09:13:56 +0200
commitd788ac29793ae591801103b714c20ca3ae311c21 (patch)
tree4d24419c78e2930e7fffee626d51c982e9170ce3 /drivers/net/wireless/mwifiex
parentmwifiex: fix command timeout for PCIe chipsets (diff)
downloadlinux-d788ac29793ae591801103b714c20ca3ae311c21.tar.xz
linux-d788ac29793ae591801103b714c20ca3ae311c21.zip
mwifiex: fix system crash observed during initialisation
System crash was observed if one of the driver initialisation commands is timed out. The reason is our timeout handler triggers firmware dump, meanwhile driver initialisation error paths have already freed the adapter structure. Firmware hasn't yet completely initialized. So collecting firmware dump is not needed in this case. Command timeout handler is modified in this patch to fix the crash issue. Signed-off-by: Zhaoyang Liu <liuzy@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex')
-rw-r--r--drivers/net/wireless/mwifiex/cmdevt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c
index 27b778d5164e..45ae38e32621 100644
--- a/drivers/net/wireless/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/mwifiex/cmdevt.c
@@ -979,8 +979,10 @@ mwifiex_cmd_timeout_func(unsigned long function_context)
mwifiex_cancel_pending_ioctl(adapter);
}
}
- if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING)
+ if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING) {
mwifiex_init_fw_complete(adapter);
+ return;
+ }
if (adapter->if_ops.device_dump)
adapter->if_ops.device_dump(adapter);