mwifiex: skipping pending commands after unload
We skip downloading other commands after FUNC_SHUTDOWN is queued during driver unload. Main thread should be woken up each time after freeing skipped command so that FUNC_SHUTDOWN gets served in case if there are other pending commands before FUNC_SHUTDOWN. Also, call mwifiex_complete_cmd() only for synchronous commands. Reported-by: Avery Pennarun <apenwarr@gmail.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Maithili Hinge <maithili@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
4af2bd49e6
commit
ace273551b
|
@ -165,8 +165,10 @@ static int mwifiex_dnld_cmd_to_fw(struct mwifiex_private *priv,
|
||||||
dev_err(adapter->dev,
|
dev_err(adapter->dev,
|
||||||
"DNLD_CMD: FW in reset state, ignore cmd %#x\n",
|
"DNLD_CMD: FW in reset state, ignore cmd %#x\n",
|
||||||
cmd_code);
|
cmd_code);
|
||||||
|
if (cmd_node->wait_q_enabled)
|
||||||
mwifiex_complete_cmd(adapter, cmd_node);
|
mwifiex_complete_cmd(adapter, cmd_node);
|
||||||
mwifiex_recycle_cmd_node(adapter, cmd_node);
|
mwifiex_recycle_cmd_node(adapter, cmd_node);
|
||||||
|
queue_work(adapter->workqueue, &adapter->main_work);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue