mirror of
https://github.com/torvalds/linux.git
synced 2026-06-10 07:32:29 +02:00
mwifiex: cancel cmd timer and free curr_cmd in shutdown process
commit 084c7189ac upstream.
curr_cmd points to the command that is in processing or waiting
for its command response from firmware. If the function shutdown
happens to occur at this time we should cancel the cmd timer and
put the command back to free queue.
Tested-by: Marco Cesarano <marco@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
86302600f8
commit
e92c5efcb2
|
|
@ -584,6 +584,14 @@ mwifiex_shutdown_drv(struct mwifiex_adapter *adapter)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* cancel current command */
|
||||
if (adapter->curr_cmd) {
|
||||
dev_warn(adapter->dev, "curr_cmd is still in processing\n");
|
||||
del_timer(&adapter->cmd_timer);
|
||||
mwifiex_insert_cmd_to_free_q(adapter, adapter->curr_cmd);
|
||||
adapter->curr_cmd = NULL;
|
||||
}
|
||||
|
||||
/* shut down mwifiex */
|
||||
dev_dbg(adapter->dev, "info: shutdown mwifiex...\n");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user