diff options
author | Sasha Levin <sasha.levin@oracle.com> | 2016-05-31 21:04:01 -0400 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-06-06 19:12:17 -0400 |
commit | 5de658d6f56a158f29baa789880732dbc4375e33 (patch) | |
tree | d50bf53675b0fe051ca7bdd37bc35723c9ec5fab /drivers/net | |
parent | 4cfbd2198055655a81aef121a6031867765fa64f (diff) |
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/net')
-rw-r--r-- | drivers/net/wireless/rtlwifi/base.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c index 01f56c7df8b5..6b4c10676533 100644 --- a/drivers/net/wireless/rtlwifi/base.c +++ b/drivers/net/wireless/rtlwifi/base.c @@ -1662,9 +1662,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; |