From patchwork Mon Feb 6 21:01:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 53508 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2462492wrn; Mon, 6 Feb 2023 13:09:09 -0800 (PST) X-Google-Smtp-Source: AK7set/VqHYsWZhn9ZyBDsLPmdVn5+vxGd35fane1NNj0Vl3tS819++YqHwo41K8AiBiX3IOZ/IH X-Received: by 2002:a17:906:e213:b0:878:71fe:2f12 with SMTP id gf19-20020a170906e21300b0087871fe2f12mr704949ejb.50.1675717749324; Mon, 06 Feb 2023 13:09:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675717749; cv=none; d=google.com; s=arc-20160816; b=Oxh3mS/CO8L0OtC97VUMxL6vKYhCbh8dbYiB3BhFG42aMlvWgvOj4FiKQRrjjIC3M0 HX+Rg8yS346HTTELRXL8WPGJlyfAjK08q5ZoOSwhyxYgvS1gB/la5DhK9CHCbMxJ/elZ KLrfwy2SpoMAkf8egsxuI270lqA5ef1o93BEhFZ4GgXjVaN+Hv9avmqa1MJ9tHbQjOtH HV6L/VAcAN+eke1xkUB+LicfC0kup+q0gzqlod8EXC+QAvDcIt0nC3NGA339td1lW/wU T9d7KKy3nN6pRczyLmoDPLjDKm0SrlYGB/n1rmBFwRVKxZ4uekAoqr1XQMtz5S6pQfML KWYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=BfdUlJb53+zycG+vinPnL5p8tFhxI/KGgoYBeda8Nps=; b=RWL0n0i3ABLfjwd09JjJwD/Rcw/VwT5bxNy0OxefjVMEe9UNyNgiLgMUqcPWHyMofm ltURgBe1iQhboL8FO6eV1g14JduwpZo+OsmZG9CjNH5Od5w7bI7WlCsbwg4cn3qhcJvJ dYoqKqzrXotFN9vgYvUV3C9chu5YObhERrD197M71AFCrsw7uGll7faJhO47WCkJ4JQO D9+Fb3uaRr7NCJW9S0zULelOc9tGI6z3nuHY/2Q1w2BeVdWpoJJos6ulR18+aea+/u6t 5VBSJr3gJIJIjByFcz+aDhYQOi4PQdpVVjK5FuVaxhkp5EC0GKXSyAF5oSmcHWud9etl EU1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f27-20020a1709063f5b00b00889a972c67esi16202495ejj.225.2023.02.06.13.08.45; Mon, 06 Feb 2023 13:09:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230411AbjBFVBs (ORCPT + 99 others); Mon, 6 Feb 2023 16:01:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230209AbjBFVBm (ORCPT ); Mon, 6 Feb 2023 16:01:42 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29FF324CB8 for ; Mon, 6 Feb 2023 13:01:41 -0800 (PST) Received: from ipservice-092-217-084-033.092.217.pools.vodafone-ip.de ([92.217.84.33] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pP8cI-000876-HV; Mon, 06 Feb 2023 22:01:34 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 1/3] staging: r8188eu: make ips_enter static Date: Mon, 6 Feb 2023 22:01:22 +0100 Message-Id: <20230206210124.150142-2-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230206210124.150142-1-martin@kaiser.cx> References: <20230206210124.150142-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757117415103346184?= X-GMAIL-MSGID: =?utf-8?q?1757117415103346184?= The ips_enter function is used only in rtw_pwrctrl.c. We can make this function static. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_pwrctrl.c | 2 +- drivers/staging/r8188eu/include/rtw_pwrctrl.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c index 5290ac36f08c..e70d78357bcb 100644 --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c @@ -8,7 +8,7 @@ #include "../include/osdep_intf.h" #include "../include/linux/usb.h" -void ips_enter(struct adapter *padapter) +static void ips_enter(struct adapter *padapter) { struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; struct xmit_priv *pxmit_priv = &padapter->xmitpriv; diff --git a/drivers/staging/r8188eu/include/rtw_pwrctrl.h b/drivers/staging/r8188eu/include/rtw_pwrctrl.h index 6e9fdd66fad1..56492ab0f78d 100644 --- a/drivers/staging/r8188eu/include/rtw_pwrctrl.h +++ b/drivers/staging/r8188eu/include/rtw_pwrctrl.h @@ -99,7 +99,6 @@ void rtw_set_firmware_ps_mode(struct adapter *adapter, u8 mode); void rtw_set_ps_mode(struct adapter *adapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode); void LeaveAllPowerSaveMode(struct adapter *adapter); -void ips_enter(struct adapter *padapter); int ips_leave(struct adapter *padapter); void rtw_ps_processor(struct adapter *padapter); From patchwork Mon Feb 6 21:01:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 53513 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2462769wrn; Mon, 6 Feb 2023 13:09:42 -0800 (PST) X-Google-Smtp-Source: AK7set9tkcw+/TuPW1tzKYjhb4qN+tv0PRfpry68k7gaQWbOy6laQyMnadRfWaMNRXou+DRgINEy X-Received: by 2002:a50:d09d:0:b0:4a2:6d1c:fb38 with SMTP id v29-20020a50d09d000000b004a26d1cfb38mr1139720edd.10.1675717782626; Mon, 06 Feb 2023 13:09:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675717782; cv=none; d=google.com; s=arc-20160816; b=ly59K8kV2rjyilNG12XjTviqkjTyN8wbrTefLn22fuQLEiOWJEp7rbAVeg8ZNieiZV R9MWxQYWm/w6BqbCQvlp0G6+CCjuHL2zpD0NONFR2EDsGHIZZG7zcy8GXv5S0XS3S0E7 bvCWNqDxdpn0RNNUggO2mAygVv9uzbYhjKryUwTy86UM8pMGX2IkwlAtHhLKbMpO0Vcn LVyeROQU3RZ0drPbC9xXg1PzVKMk0uHmEVsHeCT2bqOmJbpfudRGaY1pXkBK/PJS9yKc OPigJIcT9tzzoQgrL5qrpmZr7Ff8eKpeU42T5q1Im/qVGXqfIc0l+PUZinnMZHHEl269 RDKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=/Spd3h+WJ8TxKMuqVEfMnxHNUmLYSz84vM5UPVJwwSo=; b=teZpgbl3Eiyv8ZeUeqYoZMtnLJcd+83M5dJ6YBJd38lCuDo/Fi/O3LKdQ6JjzA7QTp Q4Uq6SDMhPGncMJ5GwonbmDlFitZAXhz01R1aDixvC27pbp1TwtqHCmbAnzyroj/cDcy n9e2HV9vRHQcYffxHEHcg+O8MAf9znw5vHrIiFYtkZeYpGKRnVFN4duqYodPjv1UHWHO WdeG4tR14JuYmX9AQG/2dT7t+iKUwlOwsUK5jhuHNP1JiuBUMEdbtUPF+qFR2NR8WoDj YmyaWNLfEZwcOzrc7+M/lUDiaBsVTXofH9D5g9mUE2jVce1u+gWEB4rTGNHjaPomRDre J1Mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f4-20020a056402194400b0046b2840ca3dsi13552393edz.474.2023.02.06.13.09.19; Mon, 06 Feb 2023 13:09:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230464AbjBFVBx (ORCPT + 99 others); Mon, 6 Feb 2023 16:01:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230344AbjBFVBs (ORCPT ); Mon, 6 Feb 2023 16:01:48 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BAE92B2B5 for ; Mon, 6 Feb 2023 13:01:46 -0800 (PST) Received: from ipservice-092-217-084-033.092.217.pools.vodafone-ip.de ([92.217.84.33] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pP8cJ-000876-HA; Mon, 06 Feb 2023 22:01:35 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 2/3] staging: r8188eu: make ips_leave static Date: Mon, 6 Feb 2023 22:01:23 +0100 Message-Id: <20230206210124.150142-3-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230206210124.150142-1-martin@kaiser.cx> References: <20230206210124.150142-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757117449792100881?= X-GMAIL-MSGID: =?utf-8?q?1757117449792100881?= The ips_leave function is used only in rtw_pwrctrl.c. We can make this function static. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_pwrctrl.c | 2 +- drivers/staging/r8188eu/include/rtw_pwrctrl.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c index e70d78357bcb..702a29f96d74 100644 --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c @@ -39,7 +39,7 @@ static void ips_enter(struct adapter *padapter) mutex_unlock(&pwrpriv->lock); } -int ips_leave(struct adapter *padapter) +static int ips_leave(struct adapter *padapter) { struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; struct security_priv *psecuritypriv = &padapter->securitypriv; diff --git a/drivers/staging/r8188eu/include/rtw_pwrctrl.h b/drivers/staging/r8188eu/include/rtw_pwrctrl.h index 56492ab0f78d..f7aeac262fad 100644 --- a/drivers/staging/r8188eu/include/rtw_pwrctrl.h +++ b/drivers/staging/r8188eu/include/rtw_pwrctrl.h @@ -99,7 +99,6 @@ void rtw_set_firmware_ps_mode(struct adapter *adapter, u8 mode); void rtw_set_ps_mode(struct adapter *adapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode); void LeaveAllPowerSaveMode(struct adapter *adapter); -int ips_leave(struct adapter *padapter); void rtw_ps_processor(struct adapter *padapter); From patchwork Mon Feb 6 21:01:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 53507 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2462015wrn; Mon, 6 Feb 2023 13:08:16 -0800 (PST) X-Google-Smtp-Source: AK7set+ZfazcfaiyE9cm9uEBDcGLRBsjdYcQ4Ir7mQ4S+bEv8lPuX56xeLhpYpmkKJD6dBrgdKRJ X-Received: by 2002:a05:6a20:6d27:b0:bc:80bd:462d with SMTP id fv39-20020a056a206d2700b000bc80bd462dmr390888pzb.46.1675717695782; Mon, 06 Feb 2023 13:08:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675717695; cv=none; d=google.com; s=arc-20160816; b=HMM4jEyj9rA55jS1cWOuvroIS/GMZT+7qKy29iuH1c/9om2Ize3XihKOD+Fb94mFMs yI7dMr2tUGqXOPjFgttDjXwz6IYFl9klOP3NdTLt/8VXTe4vysfiivJ3RkZp23io4Gdm EJBIb3zHDSIiGPNclDQjkLtHxrkjEd0HQG8QyfyKBjgpDyGVseMkM3DyzgfF2FMusbT2 ryrthEXB1mgLKOApgZsxh6aR/3L10hzoK7zXiQot8MRy/YVLjNcWGjhlNry5n5HvXpwF SS4M1/ucIs45sO7RBWKXL14hcl5rYINybHeS0dS5Cy/3A4D0xROWSgUOT9Pzq1HLksw4 nuQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=AI1gon81gxk+icUFKpwRQJQTQYm/KlV0smkLAz7wSA4=; b=k1jM/gOld0nN2S4D6nq2GzTZ5kZTqhqJ5+gdLB9S7JVtoXMCRUR6vUwRlYsCv4iMkL FKEZ7Toj4bG5P6uM7Hm0Awae51oTnPfloMpCsZWtermctlK8NZTO6heYOlo+OtHv5bl+ 1+dPK8d5aZi0S6z7qzkt0E8BFyftpdlzXj1CTGUCp0UDD/WCUULNtarddbsOqdUzU/hK vTlpyL0McOscY+L9gXBqobK2KvSCRPICCSFY/GHWWSPbn9Hawzft4w8lW6JAAr0xxs2Z GI79IPzY8Xi0BVHA3NSm0TfVny1HYWdYJTAMH2Nok9oKZ/FBjqXqNhEnAp/tIqBFLWH2 yz3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s9-20020a639249000000b004fae5f0895dsi4369281pgn.45.2023.02.06.13.08.01; Mon, 06 Feb 2023 13:08:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230261AbjBFVBv (ORCPT + 99 others); Mon, 6 Feb 2023 16:01:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230235AbjBFVBn (ORCPT ); Mon, 6 Feb 2023 16:01:43 -0500 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD05629162 for ; Mon, 6 Feb 2023 13:01:42 -0800 (PST) Received: from ipservice-092-217-084-033.092.217.pools.vodafone-ip.de ([92.217.84.33] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1pP8cK-000876-Rq; Mon, 06 Feb 2023 22:01:36 +0100 From: Martin Kaiser To: Greg Kroah-Hartman Cc: Larry Finger , Phillip Potter , Michael Straube , Pavel Skripkin , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH 3/3] staging: r8188eu: remove change_rfpwrstate Date: Mon, 6 Feb 2023 22:01:24 +0100 Message-Id: <20230206210124.150142-4-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230206210124.150142-1-martin@kaiser.cx> References: <20230206210124.150142-1-martin@kaiser.cx> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757117358365143970?= X-GMAIL-MSGID: =?utf-8?q?1757117358365143970?= Remove the change_rfpwrstate component in struct pwrctrl_priv. change_rfpwrstate is set to rf_off directly before each ips_enter call and then checked in ips_enter. This makes no sense. change_rfpwrstate might have been used to avoid conflicts between suspend and resume operations. If a driver has to do this at all, pwrpriv->ps_processing will do this job. Signed-off-by: Martin Kaiser --- drivers/staging/r8188eu/core/rtw_pwrctrl.c | 19 ++++++++----------- drivers/staging/r8188eu/include/rtw_pwrctrl.h | 1 - 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c index 702a29f96d74..051cdcb11ff5 100644 --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c @@ -25,15 +25,14 @@ static void ips_enter(struct adapter *padapter) pwrpriv->ips_mode = pwrpriv->ips_mode_req; pwrpriv->ips_enter_cnts++; - if (rf_off == pwrpriv->change_rfpwrstate) { - pwrpriv->bpower_saving = true; + pwrpriv->bpower_saving = true; - if (pwrpriv->ips_mode == IPS_LEVEL_2) - pwrpriv->bkeepfwalive = true; + if (pwrpriv->ips_mode == IPS_LEVEL_2) + pwrpriv->bkeepfwalive = true; + + rtw_ips_pwr_down(padapter); + pwrpriv->rf_pwrstate = rf_off; - rtw_ips_pwr_down(padapter); - pwrpriv->rf_pwrstate = rf_off; - } pwrpriv->bips_processing = false; mutex_unlock(&pwrpriv->lock); @@ -51,7 +50,6 @@ static int ips_leave(struct adapter *padapter) if ((pwrpriv->rf_pwrstate == rf_off) && (!pwrpriv->bips_processing)) { pwrpriv->bips_processing = true; - pwrpriv->change_rfpwrstate = rf_on; pwrpriv->ips_leave_cnts++; result = rtw_ips_pwr_up(padapter); @@ -133,10 +131,9 @@ void rtw_ps_processor(struct adapter *padapter) if (!rtw_pwr_unassociated_idle(padapter)) goto exit; - if (pwrpriv->rf_pwrstate == rf_on) { - pwrpriv->change_rfpwrstate = rf_off; + if (pwrpriv->rf_pwrstate == rf_on) ips_enter(padapter); - } + exit: rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv); pwrpriv->ps_processing = false; diff --git a/drivers/staging/r8188eu/include/rtw_pwrctrl.h b/drivers/staging/r8188eu/include/rtw_pwrctrl.h index f7aeac262fad..9f5cffd8bfb1 100644 --- a/drivers/staging/r8188eu/include/rtw_pwrctrl.h +++ b/drivers/staging/r8188eu/include/rtw_pwrctrl.h @@ -71,7 +71,6 @@ struct pwrctrl_priv { int pwr_state_check_interval; enum rt_rf_power_state rf_pwrstate;/* cur power state */ - enum rt_rf_power_state change_rfpwrstate; u8 bkeepfwalive; };