Commit d788ac29 authored by Zhaoyang Liu's avatar Zhaoyang Liu Committed by Kalle Valo

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: default avatarZhaoyang Liu <liuzy@marvell.com>
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 39875099
...@@ -979,8 +979,10 @@ mwifiex_cmd_timeout_func(unsigned long function_context) ...@@ -979,8 +979,10 @@ mwifiex_cmd_timeout_func(unsigned long function_context)
mwifiex_cancel_pending_ioctl(adapter); 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); mwifiex_init_fw_complete(adapter);
return;
}
if (adapter->if_ops.device_dump) if (adapter->if_ops.device_dump)
adapter->if_ops.device_dump(adapter); adapter->if_ops.device_dump(adapter);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment