]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
mwifiex: cancel pending commands for signal
authorAmitkumar Karwar <akarwar@marvell.com>
Thu, 20 Mar 2014 23:23:49 +0000 (16:23 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 31 Mar 2014 17:47:40 +0000 (13:47 -0400)
When a thread is interrupted by signal, all
wait_event_interruptible calls after queueing commands return
an error. Numbers of commands in pending queue are increased
in this case. Sometimes all commands nodes in pool are filled.

We will cancel pending commands when signal is received.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/sta_ioctl.c

index 2a9cfd563a07c7e1221e3d4230e14b2bd0ea939a..888f3ae9df83866bc337ca41e21732bc888702fc 100644 (file)
@@ -64,6 +64,7 @@ int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter,
                                          *(cmd_queued->condition));
        if (status) {
                dev_err(adapter->dev, "cmd_wait_q terminated: %d\n", status);
+               mwifiex_cancel_all_pending_cmd(adapter);
                return status;
        }