Commit 9d2e85e0 authored by Marc Yang's avatar Marc Yang Committed by Kalle Valo

mwifiex: Adjust calling place of mwifiex_terminate_workqueue

Workqueue needs to be flushed early when removing card, otherwise
soft lockup issue may happen because main_process is triggered by
interrupt while card is being removed.
Signed-off-by: default avatarMarc Yang <yangyang@marvell.com>
Signed-off-by: default avatarCathy Luo <cluo@marvell.com>
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 7197325b
......@@ -1166,6 +1166,8 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem)
adapter->surprise_removed = true;
mwifiex_terminate_workqueue(adapter);
/* Stop data */
for (i = 0; i < adapter->priv_num; i++) {
priv = adapter->priv[i];
......@@ -1208,8 +1210,6 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem)
wiphy_unregister(adapter->wiphy);
wiphy_free(adapter->wiphy);
mwifiex_terminate_workqueue(adapter);
/* Unregister device */
dev_dbg(adapter->dev, "info: unregister device\n");
if (adapter->if_ops.unregister_dev)
......
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