From patchwork Mon Sep 7 10:15:19 2020 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: 11760423 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 6000513B1 for ; Mon, 7 Sep 2020 10:18:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 34C9D207C3 for ; Mon, 7 Sep 2020 10:18:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="eJYeuPK5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728806AbgIGKSU (ORCPT ); Mon, 7 Sep 2020 06:18:20 -0400 Received: from mail-mw2nam10on2056.outbound.protection.outlook.com ([40.107.94.56]:42336 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728824AbgIGKRk (ORCPT ); Mon, 7 Sep 2020 06:17:40 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QJL/69MjgTqEiOWEuSGE9GMSJ/5cJKf1Xd6M9TaGj/m0qEjA5LWEVY+OHt4FuFRpeMEnogL7VjiL1/JJjcr29EZbFp2wspTA52LmWObvx6fgj6w8DJCO0lXA3DqD2Q6YPAbQnKkgeIgGmmYBiBYWbU2QPWq+JLAo1mr18FBg5EoBg34GyLxnpgVqEVK3aB/VJkId/JhhQ4cwJLm6Jk03pYir58F+4IBCoYDJjUrXUzDqvecoRXk1uaYEHlz6xercK01CIfllTfyirJXP3u8GAJAkBawnuMzlF72nL4qFCjezflD+HVaO7HqNhqR3kSKMT5nKedIiWDXMFttngcVfMA== 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=44rGh7c9rRoaEPUVjEwmOUdbMciPK9yliP3dmgUdb1A=; b=iBOra6ZT8eePmYG/hvZ5RU+o6hwX1mMayY2qGRYJ2oB725tbLM+tX8OSydt2BcQoLl1yXmdRUXbdfISBH2TuWCLYLxS8+Dpp8wrXUF8dcD/gqaxNGma+XD/NPRbT4snc7zT/mSDUvuveQmRijjvUWNaik9r+Dm+TL2gYFYQrUmew14jy19pdQ8PY1xzn7N+CxohOwKcj9h/Hb2raerzCQPpwWgT7Zvdd/Jb0InC16Y+ixXaXeecLINfXHuo0IfxEQRM/KoTCc/6sR4J/y5mvsKZ/oryTDhhHCjmvsm9JJ+wU6PB9B2/7TN8hDSK7J+A1yBSNtkyhnrCfOckA6isFLw== 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=44rGh7c9rRoaEPUVjEwmOUdbMciPK9yliP3dmgUdb1A=; b=eJYeuPK5jPpXni8h10jmhrMeTnIfaidzbFj8Ges1BaM6d7jsiFKVSqG/yT7BM7JmkvuHTzPzmotalJNHsx8cRMxy610ZGFlTpbh5qtGiOVc1LprRVkIh8mquCDogPJy4XNahgbInqR0msDsFHquAFaAWjd4dVq+y7hCrnTFHN6M= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none;driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB2720.namprd11.prod.outlook.com (2603:10b6:805:56::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.15; Mon, 7 Sep 2020 10:16:32 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::85c9:1aa9:aeab:3fa6]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::85c9:1aa9:aeab:3fa6%4]) with mapi id 15.20.3348.019; Mon, 7 Sep 2020 10:16:32 +0000 From: Jerome Pouiller 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 29/31] staging: wfx: uniformize naming rules in hif_tx_mib.c Date: Mon, 7 Sep 2020 12:15:19 +0200 Message-Id: <20200907101521.66082-30-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200907101521.66082-1-Jerome.Pouiller@silabs.com> References: <20200907101521.66082-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR0P264CA0109.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:19::25) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (37.71.187.125) by PR0P264CA0109.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:19::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.16 via Frontend Transport; Mon, 7 Sep 2020 10:16:30 +0000 X-Mailer: git-send-email 2.28.0 X-Originating-IP: [37.71.187.125] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3a8912fb-c26f-4a3a-463d-08d8531717cd X-MS-TrafficTypeDiagnostic: SN6PR11MB2720: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fvK8FiUBEdm6rOQCjm1y7ugpcwlVP6tQdI0RmS5vpnNkbNtWp9DkNcW4PXcq1xVG8ZrpyAQvAUdv5IghHd4bFWC2BmEwRivKZUdx/hmxIrIbWSAYNDHWWfKJqkXmbiT0OpknUanW9Mm46ZSkcSuPDGyz/Rvee/0wc3kXCe1j7oqius+yPCq9ZSUOv4gcaJwmk9sqNVzIlhP0A1B97cLO+bXEAIF1vtewl9QhFcEo10dNXlWKJ5UE0TUa+pAl/ae+XazuGD+W1cVn2sMmF2vzzJtkhAN94fDhW0blph+bS6k+d3AkBiREbqhSp5eoK4hsqF2qxe0dZY9TtOcxsgGLKg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR11MB2718.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(376002)(366004)(39850400004)(136003)(346002)(396003)(66946007)(66556008)(66476007)(54906003)(26005)(186003)(16526019)(66574015)(83380400001)(107886003)(6486002)(8676002)(956004)(2616005)(2906002)(316002)(86362001)(8936002)(478600001)(4326008)(7696005)(36756003)(52116002)(6666004)(1076003)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: uhkgbAaTNXPZpi4mw9NV0t9j2FPJ8f3GopfvHvXyvqf41Qikh1UbDK7KzAVjq5QcLzJu6ChMIlJr5vH8xkgBseYYvWpP/EGIyaRDG+RwnxvW5KMDygcvgNDHfqmkMjckcOpg9Z+Sy1Hg/QIh6/o6l22nvAlOQw1nGjl1qDkwQfvpEN6CfJAOfrdAx+moTMZrAb1Xqfne6wogvWJBE+71VZjbxC8bjyHc9SpqtrRJHp7DBhk3Ti4P/rxW24cHi9U6EtkypJsHizN5SVBiv0BYFrSEcxxEp9fjbIiFTcK2CmUZQK1nogQsrhEyYK6xdeQu73Q77adVRkFAcKHH74ANA94VScBvVclskK6eKOm5VBGpV94x/HIsXLxb+j7ZqyyyZeELmOpQfyEZmRHwldWX8vAbGP4xEX9mDenVg7HeVAo5ByIDNBKREOvXoCuz3kxz83Lf1f5IkoEY9UHIXM7v4KEiPVGKSoglBuFumuA9R4++iTda9+qqSrTNpcwewVwJUEoHMqwUOijCeHJX4GmCEW4X5ibsfGUT9uBhqR6fdtDBBQvtX+6jVeavGr23JldNRkm9z24O0dOeAI6bPKLNvWj9lD7C4ouB0vhpLaju4R3F7+S0Q5/CQdiHoL+cPVE7g1lEXo0wUeTbH/EinGeVbw== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a8912fb-c26f-4a3a-463d-08d8531717cd X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2020 10:16:32.3276 (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: LzBVzyIvCRdHLrukSex/tQ67PyBnRRjCi3sUMGc33ceDFRaZ+OGqmCrO2wh4wl17OFzPl+Q/mKShir2q0nVC7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2720 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller hif_tx_mib.c contains functions that format data to be sent to the hardware. In this file, sometime the struct to be sent is named 'arg', sometime 'val'. In some other function 'val' is used for the argument of the function. This patch uniformize the things and choose to call all the data in destination to the hardware 'arg' (note this choice is only dictated by the number of lines to change in the code) Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx_mib.c | 50 ++++++++++++++++---------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c index 2eb2a20890c7..c375b9052a07 100644 --- a/drivers/staging/wfx/hif_tx_mib.c +++ b/drivers/staging/wfx/hif_tx_mib.c @@ -29,7 +29,7 @@ int hif_set_beacon_wakeup_period(struct wfx_vif *wvif, unsigned int dtim_interval, unsigned int listen_interval) { - struct hif_mib_beacon_wake_up_period val = { + struct hif_mib_beacon_wake_up_period arg = { .wakeup_period_min = dtim_interval, .receive_dtim = 0, .wakeup_period_max = listen_interval, @@ -39,7 +39,7 @@ int hif_set_beacon_wakeup_period(struct wfx_vif *wvif, return -EINVAL; return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_BEACON_WAKEUP_PERIOD, - &val, sizeof(val)); + &arg, sizeof(arg)); } int hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, @@ -92,31 +92,31 @@ int hif_set_macaddr(struct wfx_vif *wvif, u8 *mac) int hif_set_rx_filter(struct wfx_vif *wvif, bool filter_bssid, bool filter_prbreq) { - struct hif_mib_rx_filter val = { }; + struct hif_mib_rx_filter arg = { }; if (filter_bssid) - val.bssid_filter = 1; + arg.bssid_filter = 1; if (!filter_prbreq) - val.fwd_probe_req = 1; + arg.fwd_probe_req = 1; return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_RX_FILTER, - &val, sizeof(val)); + &arg, sizeof(arg)); } int hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, const struct hif_ie_table_entry *tbl) { int ret; - struct hif_mib_bcn_filter_table *val; - int buf_len = struct_size(val, ie_table, tbl_len); + struct hif_mib_bcn_filter_table *arg; + int buf_len = struct_size(arg, ie_table, tbl_len); - val = kzalloc(buf_len, GFP_KERNEL); - if (!val) + arg = kzalloc(buf_len, GFP_KERNEL); + if (!arg) return -ENOMEM; - val->num_of_info_elmts = cpu_to_le32(tbl_len); - memcpy(val->ie_table, tbl, flex_array_size(val, ie_table, tbl_len)); + arg->num_of_info_elmts = cpu_to_le32(tbl_len); + memcpy(arg->ie_table, tbl, flex_array_size(arg, ie_table, tbl_len)); ret = hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_BEACON_FILTER_TABLE, val, buf_len); - kfree(val); + HIF_MIB_ID_BEACON_FILTER_TABLE, arg, buf_len); + kfree(arg); return ret; } @@ -134,13 +134,13 @@ int hif_beacon_filter_control(struct wfx_vif *wvif, int hif_set_operational_mode(struct wfx_dev *wdev, enum hif_op_power_mode mode) { - struct hif_mib_gl_operational_power_mode val = { + struct hif_mib_gl_operational_power_mode arg = { .power_mode = mode, .wup_ind_activation = 1, }; return hif_write_mib(wdev, -1, HIF_MIB_ID_GL_OPERATIONAL_POWER_MODE, - &val, sizeof(val)); + &arg, sizeof(arg)); } int hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb, @@ -161,36 +161,36 @@ int hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb, int hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required) { - struct hif_mib_protected_mgmt_policy val = { }; + struct hif_mib_protected_mgmt_policy arg = { }; WARN(required && !capable, "incoherent arguments"); if (capable) { - val.pmf_enable = 1; - val.host_enc_auth_frames = 1; + arg.pmf_enable = 1; + arg.host_enc_auth_frames = 1; } if (!required) - val.unpmf_allowed = 1; + arg.unpmf_allowed = 1; return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_PROTECTED_MGMT_POLICY, - &val, sizeof(val)); + &arg, sizeof(arg)); } int hif_set_block_ack_policy(struct wfx_vif *wvif, u8 tx_tid_policy, u8 rx_tid_policy) { - struct hif_mib_block_ack_policy val = { + struct hif_mib_block_ack_policy arg = { .block_ack_tx_tid_policy = tx_tid_policy, .block_ack_rx_tid_policy = rx_tid_policy, }; return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_BLOCK_ACK_POLICY, - &val, sizeof(val)); + &arg, sizeof(arg)); } int hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, bool greenfield, bool short_preamble) { - struct hif_mib_set_association_mode val = { + struct hif_mib_set_association_mode arg = { .preambtype_use = 1, .mode = 1, .spacing = 1, @@ -200,7 +200,7 @@ int hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, }; return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_SET_ASSOCIATION_MODE, &val, sizeof(val)); + HIF_MIB_ID_SET_ASSOCIATION_MODE, &arg, sizeof(arg)); } int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif,