Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1422692 > unrolled thread

[PATCH 3.12 39/56] rtlwifi: Fix logic error in enter/exit power-save mode

Started byJiri Slaby <jslaby@suse.cz>
First post2016-06-15 09:40 +0200
Last post2016-06-15 09:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.12 39/56] rtlwifi: Fix logic error in enter/exit power-save mode Jiri Slaby <jslaby@suse.cz> - 2016-06-15 09:40 +0200

#1422692 — [PATCH 3.12 39/56] rtlwifi: Fix logic error in enter/exit power-save mode

FromJiri Slaby <jslaby@suse.cz>
Date2016-06-15 09:40 +0200
Subject[PATCH 3.12 39/56] rtlwifi: Fix logic error in enter/exit power-save mode
Message-ID<rKdAC-80i-17@gated-at.bofh.it>
From: wang yanqing <udknight@gmail.com>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

commit 873ffe154ae074c46ed2d72dbd9a2a99f06f55b4 upstream.

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>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/net/wireless/rtlwifi/base.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index e99d8b1aa3bd..3fd83a87194f 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -1402,9 +1402,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))
-			rtlpriv->enter_ps = true;
-		else
 			rtlpriv->enter_ps = false;
+		else
+			rtlpriv->enter_ps = true;
 
 		/* LeisurePS only work in infra mode. */
 		schedule_work(&rtlpriv->works.lps_change_work);
-- 
2.9.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web