diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2014-03-21 00:23:50 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-03-31 19:47:40 +0200 |
commit | 52250cbee7f62400140295a632e0ffbbe5b083ca (patch) | |
tree | 004c92bd8e696427a215edb9ea44b94461986e79 /drivers/net/wireless/mwifiex/sta_ioctl.c | |
parent | mwifiex: cancel pending commands for signal (diff) | |
download | linux-52250cbee7f62400140295a632e0ffbbe5b083ca.tar.xz linux-52250cbee7f62400140295a632e0ffbbe5b083ca.zip |
mwifiex: use timeout variant for wait_event_interruptible
It has been observed that system hangs during suspend, if host
sleep activation fails due to a missing interrupt from firmware.
Use timeout variant, so that the thread will be woken up when
timer expires.
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>
Diffstat (limited to 'drivers/net/wireless/mwifiex/sta_ioctl.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/sta_ioctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c index 888f3ae9df83..894270611f2c 100644 --- a/drivers/net/wireless/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/mwifiex/sta_ioctl.c @@ -520,8 +520,9 @@ int mwifiex_enable_hs(struct mwifiex_adapter *adapter) return false; } - if (wait_event_interruptible(adapter->hs_activate_wait_q, - adapter->hs_activate_wait_q_woken)) { + if (wait_event_interruptible_timeout(adapter->hs_activate_wait_q, + adapter->hs_activate_wait_q_woken, + (10 * HZ)) <= 0) { dev_err(adapter->dev, "hs_activate_wait_q terminated\n"); return false; } |