linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] rtlwifi: Remove double check for cnt_after_linked
@ 2016-05-05 15:08 Wang YanQing
  2016-05-11 18:55 ` [v2] " Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Wang YanQing @ 2016-05-05 15:08 UTC (permalink / raw)
  To: Larry.Finger; +Cc: chaoming_li, kvalo, linux-wireless, netdev, linux-kernel

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>
---
 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(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/ps.c b/drivers/net/wireless/realtek/rtlwifi/ps.c
index b69321d..93579ca 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);
-- 
1.8.5.6.2.g3d8a54e.dirty

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [v2] rtlwifi: Remove double check for cnt_after_linked
  2016-05-05 15:08 [PATCH v2] rtlwifi: Remove double check for cnt_after_linked Wang YanQing
@ 2016-05-11 18:55 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2016-05-11 18:55 UTC (permalink / raw)
  To: wang yanqing
  Cc: Larry.Finger, chaoming_li, linux-wireless, netdev, linux-kernel

wang yanqing <udknight@gmail.com> wrote:
> 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>

Thanks, 1 patch applied to wireless-drivers-next.git:

976aff5fc94b rtlwifi: Remove double check for cnt_after_linked

-- 
Sent by pwcli
https://patchwork.kernel.org/patch/9025161/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-11 18:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-05 15:08 [PATCH v2] rtlwifi: Remove double check for cnt_after_linked Wang YanQing
2016-05-11 18:55 ` [v2] " Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).