mirror of
https://github.com/torvalds/linux.git
synced 2026-12-05 21:04:14 +00:00
rtlwifi: Fix logic error in enter/exit power-save mode
In commita269913c52("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:a269913c52("rtlwifi: Rework rtl_lps_leave() and rtl_lps_enter() to use work queue") Signed-off-by: Wang YanQing <[email protected]> CC: Stable <[email protected]> [3.10+] Acked-by: Larry Finger <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
This commit is contained in:
@@ -1660,9 +1660,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;
|
||||
|
||||
Reference in New Issue
Block a user