rtlwifi: Remove double check for cnt_after_linked
PATCH v2 1/1 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.
---
Changes
v1-v2:
1: rewrite subject and commit message.
2: fix issues report by checkpatch.pl.
drivers/net/wireless/realtek/rtlwifi/ps.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/net/wireless/realtek/rtlwifi/ps.c +4 -8
@@ -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);
Signature · 1 line
1.8.5.6.2.g3d8a54e.dirty
Quoted 8 lines · wang yanqing
rtl_lps_enterdoes two successive check forcnt_after_linkedto make sure some time has elapsed after linked. The second check isn't necessary, because ifcnt_after_linkedis bigger than 5, it is bigger than 2 of course!This patch remove the second check code.
Signed-off-by Wang YanQing <[email protected]>
Thanks, 1 patch applied to wireless-drivers-next.git:
976aff5fc94b rtlwifi: Remove double check for cnt_after_linked
Signature · 2 lines
Sent by pwcli https://patchwork.kernel.org/patch/9025161/