From patchwork Tue Dec 17 16:15:12 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: 11298157 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 5084B6C1 for ; Tue, 17 Dec 2019 16:18:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 22C3721835 for ; Tue, 17 Dec 2019 16:18:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="OTnAvgH5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729153AbfLQQS5 (ORCPT ); Tue, 17 Dec 2019 11:18:57 -0500 Received: from mail-bn7nam10on2081.outbound.protection.outlook.com ([40.107.92.81]:6496 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728958AbfLQQPq (ORCPT ); Tue, 17 Dec 2019 11:15:46 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L83fGUrgq1dsjFLLLKJF0H9R2xcaw7j34SYlv0o48YqpVy0k09N8Zr9LoR1frUVCboJS7MNeLzdoO+H1RbJZL/eARy0JE1cU/tD3eJSahLI7s87F+g37EQElOoJTasE8Yw+B3/HnbUDttr9gdmR38Ed9aQT6QxQkN/+NAjBJfOBZJFxdwMXCRL2D4+Hf7HmoqfgWe4YyoP+XyG4ZJ5LaNGWZmFYwQZHNImDnKd3lK1CRq84Jwm0VSmxVkozQjO9O7qLHfxWV6qbJuWTsz3gW9JvfWLqK0sWONXN3iHW/cTLPb+vtD9THXjALV3UyGT2rGAfi2UdimSyvQ4fzL84yGg== 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=L2XACO0dpTiYEzM0HmaENcUMzlW+3tomdmhqT6ZUZlA=; b=ls913lfEcKqK+y50hTa+8fs0SwWodOljr5Tx0UcUuNX91ciDQv+lWN0ev3CAM57do0Cno8TkOz7JF9K7SvY6QydHKYp9I0c83wDt5stquDIVE1VXrhNyg+s8h1fRIErXIzvF26KBmrJsHu/zsPB4G9VdJ5q/9cWlTFpU025nvcxB6yJYyDbJSNkNsUdvNBA8aiN8Se609LzJVSnvRnXY+8LwO1BjLTIq64HGbXKe+bbvbua3GjGDwzXIyjBiCNLe+HP7ua971Tk92K0TUscNTVrJ2b51eUpjFU22P+A0G/bceY6q4HChH7bSLP0S3xKwJckJRcpxkZQ1n8G9OdpWlg== 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=L2XACO0dpTiYEzM0HmaENcUMzlW+3tomdmhqT6ZUZlA=; b=OTnAvgH58dNq/CI+qhTaM7B8/DtkxE3wYY8AiHElb6pJhIWyOJdkjEqveF+SE/Qohb8TS5Ej17zGQdSN3lUNitOhxeYX3D0OPO0KGFg+wD48QumRjnG5NW+ZvzPp48S41gjVAfTdQpXrPcK1HFtkOWfaXwcaohyDLjKGcmOgAbw= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (10.255.180.22) by MN2PR11MB4208.namprd11.prod.outlook.com (52.135.36.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.20; Tue, 17 Dec 2019 16:15:41 +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; Tue, 17 Dec 2019 16:15:41 +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 v2 32/55] staging: wfx: drop useless argument from wfx_set_pm() Thread-Topic: [PATCH v2 32/55] staging: wfx: drop useless argument from wfx_set_pm() Thread-Index: AQHVtPUpo7oG/S2dEEeGnUWnLCzT5g== Date: Tue, 17 Dec 2019 16:15:12 +0000 Message-ID: <20191217161318.31402-33-Jerome.Pouiller@silabs.com> References: <20191217161318.31402-1-Jerome.Pouiller@silabs.com> In-Reply-To: <20191217161318.31402-1-Jerome.Pouiller@silabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PR0P264CA0174.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::18) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.24.0 x-originating-ip: [37.71.187.125] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f34e4e10-12fd-4e6e-c618-08d7830c4b54 x-ms-traffictypediagnostic: MN2PR11MB4208: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:843; x-forefront-prvs: 02543CD7CD x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39850400004)(396003)(366004)(136003)(376002)(346002)(199004)(189003)(5660300002)(316002)(6506007)(85182001)(478600001)(71200400001)(2906002)(36756003)(186003)(26005)(81166006)(54906003)(1076003)(110136005)(66574012)(4326008)(8676002)(86362001)(6486002)(6666004)(52116002)(6512007)(64756008)(85202003)(66946007)(66476007)(66446008)(66556008)(8936002)(107886003)(2616005)(81156014);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR11MB4208;H:MN2PR11MB4063.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX: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: 08CT7vNgjEZs3BM0DuHb6N1veMpXsUs7++94t5RcQtjpnAOUOUCgiVXnysM8a+tdNucdcSQX9pa8yY74OLRjUgK3O32gAnVN82Y0F9ilbTsdrj5CiA9W9b50Mbp6nTvXPD2S/LXPoxRaWoJUgX8S8QptQiifVXYAThnlTG3GNAMHwlgK3Nu47Zvbt5rtw/B1/Dkz9syBL6r3doTiHo0JDj0jAFiyitFNNN/8u3+iH8kwdBFGnh6JXQ551vnqruv6TERlLoSd9IBphyQYrfgfPIoZZHhJRzgYmCR4eeb8SxM8hw/G4KVS7bC9LqECrBFi6P/ESHMuL0MDR9eAZJ0LD7od8LjHJ1+H6Zat5Xmpm5IMOxm0nro7rxm6xKPhhjENMKiM6O+V5G80YiwKdttFGlzHjpWrhWcg4V5hkNdBeFX3JO0/lUnyxPfFiedztwzn Content-ID: MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: f34e4e10-12fd-4e6e-c618-08d7830c4b54 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Dec 2019 16:15:12.5756 (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: J8+/7z0f2ZknzlPAwxcygyXz559gwUieRGTsSc0hPzQ9nN7dOZZ5DOqm0irO7lXsSoIfoReq1G/Se/mUGCmB8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4208 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); } }