From 52250cbee7f62400140295a632e0ffbbe5b083ca Mon Sep 17 00:00:00 2001 From: Amitkumar Karwar Date: Thu, 20 Mar 2014 16:23:50 -0700 Subject: [PATCH] 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 Signed-off-by: Bing Zhao Signed-off-by: John W. Linville --- drivers/net/wireless/mwifiex/sta_ioctl.c | 5 +++-- 1 file 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; } -- 2.39.5