From patchwork Mon Dec 16 17:03:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 11294795 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 505E31580 for ; Mon, 16 Dec 2019 17:10:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 242D4206D7 for ; Mon, 16 Dec 2019 17:10:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="g/Y8hOo2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726512AbfLPRJ4 (ORCPT ); Mon, 16 Dec 2019 12:09:56 -0500 Received: from mail-dm6nam11on2045.outbound.protection.outlook.com ([40.107.223.45]:6092 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726935AbfLPRGo (ORCPT ); Mon, 16 Dec 2019 12:06:44 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zqo0VLAD1OoccU4pFSW0xo/3K1CUJdAj/qeEQZE82sLWHrTK7t4knn9ArDeqgtrPIReYn/w6yVyD7jrYzGIBfg0PDz7sinj/LZnNIO0ER9avKWdopcfiCOYVm+XPwYLFD5S0Jq0GYSQniRXwam0xpLafBpvTX6iFw9pCme8uCuhNgdibH1BUmvSCGhEw5LmmrC9hcYrNhdcx+yCfZ/Nv8jrdou3yOdg+bftz6JlhM6HFpPICoX/jSyOu7O+aIVsze5DiNCwawspPYqsnNhyBf11J+7u9olBS3e60s73KFOuP9FPg/9oMAHOoOh0JRJNEwCgQZIiCvdblhY1KsCmtwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8ypbJi7qzmnzIwUZ0zxTzHV7LB48R3jUIzwmLkkd2hM=; b=QgsyKGJvBJf8NrC4lSz6Yu+kYtsGELdbhra9dalI7VXQ5tdEfWV4Sfh7XOHfZr/dnqJZk1IR33nwmPjzXl0oyo27p9RNwUfVXGtoI3s2kdEVb809NHSrwgVwRUEoW8ErXaDZ0vEu9cCvFFaMW38bEs3C/1hU4la0Avhxnp58uJOCmxAKqO/GuboK1kB3sRDXzynQbdnJrR8E3UW4ZRpLkyV9NCQppkizIfv/ZzgiEDCPOJWHTM5qxxUr/GsoQEmZCOKgRDA8hprx0CqxVbpAfXh0xWyNVgDwUEemtYS2jvspV6DaPsmP1uYce88p1XpMPTiaW558JeGYo1AujdetHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8ypbJi7qzmnzIwUZ0zxTzHV7LB48R3jUIzwmLkkd2hM=; b=g/Y8hOo2TANRsaM9Gr3dZjAcNFk2cUDhVBVhCrhZhOr1YljQaj6REgQruq7KUxgSpEGjTzXMEk9tJh9iCvnqoPq2FRh0m7M/qecoNWKqXVa9ALUVu1c86yrr0joOrIfxj8p+m1lLN2fKDO4kRoenAwGlCcDSPHKfuqKJf8c7msI= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (10.255.180.22) by MN2PR11MB4445.namprd11.prod.outlook.com (52.135.37.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.18; Mon, 16 Dec 2019 17:06:37 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::f46c:e5b4:2a85:f0bf]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::f46c:e5b4:2a85:f0bf%4]) with mapi id 15.20.2538.019; Mon, 16 Dec 2019 17:06:37 +0000 From: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= To: "devel@driverdev.osuosl.org" , "linux-wireless@vger.kernel.org" CC: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 32/55] staging: wfx: drop useless argument from wfx_set_pm() Thread-Topic: [PATCH 32/55] staging: wfx: drop useless argument from wfx_set_pm() Thread-Index: AQHVtDLJbPOrje42kkqeD7yT4l3GGA== Date: Mon, 16 Dec 2019 17:03:50 +0000 Message-ID: <20191216170302.29543-33-Jerome.Pouiller@silabs.com> References: <20191216170302.29543-1-Jerome.Pouiller@silabs.com> In-Reply-To: <20191216170302.29543-1-Jerome.Pouiller@silabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; x-originating-ip: [37.71.187.125] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e6773442-727a-4e26-519c-08d7824a500f x-ms-traffictypediagnostic: MN2PR11MB4445: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:843; x-forefront-prvs: 02530BD3AA x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(346002)(366004)(39850400004)(396003)(136003)(189003)(199004)(110136005)(6486002)(107886003)(36756003)(186003)(316002)(66946007)(54906003)(5660300002)(66574012)(66446008)(66556008)(85182001)(66476007)(76116006)(91956017)(64756008)(2616005)(6506007)(85202003)(2906002)(26005)(71200400001)(6512007)(4326008)(8936002)(81166006)(1076003)(478600001)(86362001)(81156014)(6666004)(8676002);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR11MB4445;H:MN2PR11MB4063.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 2IEi03nX61Ii/Tzlvjszh/rt99h3YtY9n002GnmVvGhDmjlhQSTKBOSHBm/vpPyjwdDbMvQasr8nvYYhmJP5Qsd9mkyUi+3GMjQRGTE0LJ6I+wiBjbFgcN7C88RN3KGwx5klW3y9P3SBy5utNdyqdxA8MYMJq8YmcszNoMot4lHQDFmHR1TNWrtOuGBZBd59K86E2LOgQ244KM1xIG+DhViK1o/suUxGSYPBbl7lHifGDFeFg+gR5AvEvDcbsoRiR/8mImbqa1Juby1CixbfgRD0DLDpkzFnfZ0b1bU2ESj49rv1flyirP12wD/T6bGSjceUahoWzqwVBuJzcsbdAOiyII4czAcOpGrq21MTV9p37R5rUj/H2AIHpI2Iphvg34ItSk4zpoTmYKLVGiKSu1GiQowFATzOTmQG8ukx9HmUzetJyjUQ1+GUNCsCGNGm Content-ID: MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: e6773442-727a-4e26-519c-08d7824a500f X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2019 17:03:50.4204 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wDnRtHVX6VeRsqqENq4OHiNdIeNe03+Rf42sskjj5PIDjAs/hdegRExzyo+khHYAqUVkhmyg+vBeWo6AR/203Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4445 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Argument to wfx_set_pm() is always wvif->powersave_mode. So, we can simplify it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index eb087b9c8097..ee1b15950389 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -326,12 +326,10 @@ void wfx_configure_filter(struct ieee80211_hw *hw, } } -static int wfx_set_pm(struct wfx_vif *wvif, - const struct hif_req_set_pm_mode *arg) +static int wfx_update_pm(struct wfx_vif *wvif) { - struct hif_req_set_pm_mode pm = *arg; + struct hif_req_set_pm_mode pm = wvif->powersave_mode; u16 uapsd_flags; - int ret; if (wvif->state != WFX_STATE_STA || !wvif->bss_params.aid) return 0; @@ -390,7 +388,7 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (!ret && wvif->setbssparams_done && wvif->state == WFX_STATE_STA && old_uapsd_flags != new_uapsd_flags) - ret = wfx_set_pm(wvif, &wvif->powersave_mode); + ret = wfx_update_pm(wvif); } } else { ret = -EINVAL; @@ -1014,7 +1012,7 @@ static void wfx_join_finalize(struct wfx_vif *wvif, hif_set_bss_params(wvif, &wvif->bss_params); wvif->setbssparams_done = true; wfx_set_beacon_wakeup_period_work(&wvif->set_beacon_wakeup_period_work); - wfx_set_pm(wvif, &wvif->powersave_mode); + wfx_update_pm(wvif); } } @@ -1451,7 +1449,7 @@ int wfx_config(struct ieee80211_hw *hw, u32 changed) } } if (wvif->state == WFX_STATE_STA && wvif->bss_params.aid) - wfx_set_pm(wvif, &wvif->powersave_mode); + wfx_update_pm(wvif); } wvif = wdev_to_wvif(wdev, 0); } @@ -1591,7 +1589,7 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) else hif_set_block_ack_policy(wvif, 0x00, 0x00); // Combo force powersave mode. We can re-enable it now - wfx_set_pm(wvif, &wvif->powersave_mode); + wfx_update_pm(wvif); } return 0; } @@ -1666,7 +1664,7 @@ void wfx_remove_interface(struct ieee80211_hw *hw, else hif_set_block_ack_policy(wvif, 0x00, 0x00); // Combo force powersave mode. We can re-enable it now - wfx_set_pm(wvif, &wvif->powersave_mode); + wfx_update_pm(wvif); } }