aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSasha Levin <sasha.levin@oracle.com>2016-05-31 21:04:01 -0400
committerSasha Levin <sasha.levin@oracle.com>2016-06-06 19:11:03 -0400
commit0bae003f1e6424eca5969bce6e8c539b0e18bd5a (patch)
treeca48005bc7ca62bf14c7bcf5577871d468a4179b /drivers
parent0a11bd162e5cd0060b8896afcec2d887c87a34c8 (diff)
downloadlinux-linaro-stable-0bae003f1e6424eca5969bce6e8c539b0e18bd5a.tar.gz
rtlwifi: Fix logic error in enter/exit power-save mode
[ Upstream commit 873ffe154ae074c46ed2d72dbd9a2a99f06f55b4 ] In commit a269913c52ad ("rtlwifi: Rework rtl_lps_leave() and rtl_lps_enter() to use work queue"), the tests for enter/exit power-save mode were inverted. With this change applied, the wifi connection becomes much more stable. Fixes: a269913c52ad ("rtlwifi: Rework rtl_lps_leave() and rtl_lps_enter() to use work queue") Signed-off-by: Wang YanQing <udknight@gmail.com> CC: Stable <stable@vger.kernel.org> [3.10+] Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rtlwifi/base.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index af2486965782..339f94e72555 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -1587,9 +1587,9 @@ void rtl_watchdog_wq_callback(void *data)
if (((rtlpriv->link_info.num_rx_inperiod +
rtlpriv->link_info.num_tx_inperiod) > 8) ||
(rtlpriv->link_info.num_rx_inperiod > 2))
- rtl_lps_enter(hw);
- else
rtl_lps_leave(hw);
+ else
+ rtl_lps_enter(hw);
}
rtlpriv->link_info.num_rx_inperiod = 0;