diff options
| author | Amitkumar Karwar <akarwar@marvell.com> | 2014-03-20 19:23:50 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2014-03-31 13:47:40 -0400 |
| commit | 52250cbee7f62400140295a632e0ffbbe5b083ca (patch) | |
| tree | 004c92bd8e696427a215edb9ea44b94461986e79 | |
| parent | 3d026d09b28dda24777129a931634949c75a9181 (diff) | |
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>
| -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) | |||
| 520 | return false; | 520 | return false; |
| 521 | } | 521 | } |
| 522 | 522 | ||
| 523 | if (wait_event_interruptible(adapter->hs_activate_wait_q, | 523 | if (wait_event_interruptible_timeout(adapter->hs_activate_wait_q, |
| 524 | adapter->hs_activate_wait_q_woken)) { | 524 | adapter->hs_activate_wait_q_woken, |
| 525 | (10 * HZ)) <= 0) { | ||
| 525 | dev_err(adapter->dev, "hs_activate_wait_q terminated\n"); | 526 | dev_err(adapter->dev, "hs_activate_wait_q terminated\n"); |
| 526 | return false; | 527 | return false; |
| 527 | } | 528 | } |
