Re: [ 14/56] mwifiex: cancel cmd timer and free curr_cmd inshutdown process
From: Ben Hutchings
Date: Sat Apr 06 2013 - 15:56:13 EST
On Tue, 2013-04-02 at 15:49 -0700, Greg Kroah-Hartman wrote:
> 3.0-stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Bing Zhao <bzhao@xxxxxxxxxxx>
>
> commit 084c7189acb3f969c855536166042e27f5dd703f 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@xxxxxxxxxxx>
> Signed-off-by: Bing Zhao <bzhao@xxxxxxxxxxx>
> Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
This also had:
Cc: <stable@xxxxxxxxxxxxxxx> # 3.8
so I wonder whether this is good/bad/indifferent for 3.0.y.
Ben.
> ---
> drivers/net/wireless/mwifiex/init.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> --- a/drivers/net/wireless/mwifiex/init.c
> +++ b/drivers/net/wireless/mwifiex/init.c
> @@ -561,6 +561,14 @@ mwifiex_shutdown_drv(struct mwifiex_adap
> 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");
>
>
--
Ben Hutchings
Power corrupts. Absolute power is kind of neat.
- John Lehman, Secretary of the US Navy 1981-1987
Attachment:
signature.asc
Description: This is a digitally signed message part