diff options
author | wang yanqing <udknight@gmail.com> | 2016-05-05 23:08:22 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-05-11 21:55:31 +0300 |
commit | 976aff5fc94b0a505ccd85391f0e82c3d2d031e9 (patch) | |
tree | de64f1c876a4bd4153e00de3ff7cfec4579665f1 | |
parent | 496aec577b5183716ed9d8bcc853ad9003485fe8 (diff) | |
download | linux-stable-976aff5fc94b0a505ccd85391f0e82c3d2d031e9.tar.gz linux-stable-976aff5fc94b0a505ccd85391f0e82c3d2d031e9.tar.bz2 linux-stable-976aff5fc94b0a505ccd85391f0e82c3d2d031e9.zip |
rtlwifi: Remove double check for cnt_after_linked
rtl_lps_enter does two successive check for cnt_after_linked
to make sure some time has elapsed after linked. The second
check isn't necessary, because if cnt_after_linked is bigger
than 5, it is bigger than 2 of course!
This patch remove the second check code.
Signed-off-by: Wang YanQing <udknight@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/ps.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/ps.c b/drivers/net/wireless/realtek/rtlwifi/ps.c index b69321d45f04..93579cac0d45 100644 --- a/drivers/net/wireless/realtek/rtlwifi/ps.c +++ b/drivers/net/wireless/realtek/rtlwifi/ps.c @@ -443,14 +443,10 @@ void rtl_lps_enter(struct ieee80211_hw *hw) spin_lock_irqsave(&rtlpriv->locks.lps_lock, flag); - /* Idle for a while if we connect to AP a while ago. */ - if (mac->cnt_after_linked >= 2) { - if (ppsc->dot11_psmode == EACTIVE) { - RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, - "Enter 802.11 power save mode...\n"); - - rtl_lps_set_psmode(hw, EAUTOPS); - } + if (ppsc->dot11_psmode == EACTIVE) { + RT_TRACE(rtlpriv, COMP_POWER, DBG_LOUD, + "Enter 802.11 power save mode...\n"); + rtl_lps_set_psmode(hw, EAUTOPS); } spin_unlock_irqrestore(&rtlpriv->locks.lps_lock, flag); |