From patchwork Mon Sep 7 10:14:51 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: 11760403 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 A0151746 for ; Mon, 7 Sep 2020 10:16:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A576207C3 for ; Mon, 7 Sep 2020 10:16:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="jwSwJXFn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728618AbgIGKPz (ORCPT ); Mon, 7 Sep 2020 06:15:55 -0400 Received: from mail-eopbgr770058.outbound.protection.outlook.com ([40.107.77.58]:18596 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728580AbgIGKPs (ORCPT ); Mon, 7 Sep 2020 06:15:48 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ciSQpqI0HyTGLLFi5uuWKgtCNP3ARkfsyVPLk/xmCUSen80oNL6PydyYAa6/qKsOcmjIvuoarK0XEBjHoSYo8xHQxMOaQbw9z1vI0inKjiJZGhfquWnCVEkq0vZU7AV/aCUFMyR7uVsY1wyZErqdxK1SF19gti/geZk/G7ne2Y7Cjz9Qm0+FqjXeE0cVIBDoTMC31PdE0VVv8q0DdeKv9kOxtEEurN1bsuvREZgWzfZpd5dDraGHfWl9omtipmfRD0deKc3SCONW4OaxKJgLB2GVszhfyPiAHVsSV418RHIaK0MOWKbQcLegF6AQLCtskO6pPvKPORnSrcg5JMhXuA== 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=lng78iQsSR7Ed7fccXBiYyVJklOlUJ2lxl/K0GT01Vo=; b=Pu/7HlcM5XuRoK4cUB0vqJu2CeHWwZXqG1ICqYMQl5JjGGUEz+B2zSKOG851QcmjC04ywWm17j9BNf2AQdMajoIAJzdwa6GTdqfZ97ZoMXhiww0XhCBrQVac64K3AbCKETcbyLiMJE/BAUncKP32AHV/hm0L2HkSbbzlzqMjkkqlxO4q6MpiWrMNROxvt6uJ5qXdFv59ihZtR0jdjF6o1aHbXYVTbyXXbLmuXupCIXdAeqN5tFX7OR9D1T3cXOEgkRhiUAQf3uIG1t2QV9CRp3H6StrG0b4SBE6CyVmBM7o0jgq2jjQn8qjbg35hijSMeiJBp1FpKmCYt+RkYvHCAg== 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=lng78iQsSR7Ed7fccXBiYyVJklOlUJ2lxl/K0GT01Vo=; b=jwSwJXFn8yPDtXDxTeXZmNTwssI/YEN18TCHUj4oL3TyT2jlcG3iwOdDo1g0yJ3FzyHnK/wbtp45wZH6O2IiKAajNr1tjEvplVU6AVsqqHGMNIFdaJ5D460x50JAtbu50prP/cVVSJYEaY1Fv+qm3Gd7Cr1tPblyo4OOmk4cwtI= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:15:45 +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:15:45 +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 01/31] staging: wfx: improve readability of association processing Date: Mon, 7 Sep 2020 12:14:51 +0200 Message-Id: <20200907101521.66082-2-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:15:44 +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: 40e4dd50-8b03-4245-1426-08d85316fc06 X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1468; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PUYHNr50QnIsJHaJYMmopobpfy1i+dod9100Qe1EGUa77a6F2vhIFr3nn9oi5u1CDP3UQ4LLNw1CMmrEGUdiDG1/wPgR2pkbl8g4GEOxgUin5qTtHnE871J7l9j6WHLNftyRi3eML0uGmSAU0J+zRW0e8gXmovfgpHK1EQjUyNsOZzg2wjWArIZum+f1XV1fYbjJQMus2S3HvFF886Qu6AIO4LKgm2JCHlgxcLqBKxpViPM53bLWLPuYnwSsVcH47EONuqotQH8P+RCp5KaQiumtAwtTJ2vWNWZkjQvaWX+15wptYlqAb3Pgef78UygFFFIKpxBq6Jf6gEzJ5n4NPA== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(6666004)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(66574015)(83380400001)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Gds44SH5Hor9K0y8OUvBn0utY7Wy9FrVo27qVYGpAIeYgZB1NeAC6DKBjGo27VOHfRTagQzWZOsy6ppUbgHXY0qsUtTgI/nh0p5gqhE8NlvuU7HnLUU0kopsjqSAuaw2oYQAlPgu8Ee5gcYY/A13Btk/h6Lo6h+4/B2oiItIkDeUE39/IhCbe9JNhoxgYA65ElI/bhCU6CWBXXWn65V04rv1d41+1xtg8v6vh1zXuck3DCPWhtW3yYjJDQtzUnn+n6YSTPlJVaGiagIkY8y3pV415JI7KuIV2IP3e5EOVRXEzKwiJs1k/R7utIx43s2+B8E0WYpn73raD+NjT306gZpOqbJFAGAz7AiFGGFXllOWnU1ZYNRgsEnYnKcHQTVoS+84/KBIeucdlXmN60Wku7Uz+nOhLi20bVHqHZZ8YaefWtBG1fGYVFF4Ym06DD24Lrp8DsL3S2I7Sy6HW8mpabHSNSY24d2mEyzW2761I15t55Vdr/0mk61kFd+Iveu0sSBcjuWNX/90mwbPKDsP+wKzTeUXDrzPg7El6TMKepadCTBtAHvavbuv+eUcd5HZFn4cN7Fn84IBfPJb03gGQVJ1HDNt8BodP7mrgqzv/a1lyTAttPF5Tz3F1/xsrSQjbn/TxejJNfaznV+ASLs3LA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 40e4dd50-8b03-4245-1426-08d85316fc06 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:15:45.7356 (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: j/eslpbxM1I3GNCEHrdMsH0J9kKLjV7pS4bJXsgnvqo5Up5iPhXQWcxyV9NwpbI8iYiHysWf/jzHvhJOXT/vjQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The statements in wfx_bss_info_changed() has no particular order. For better readability, group and sort the statements relative to the association processing. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 53 +++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index a890fe32161c..502967874373 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -547,19 +547,6 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, mutex_lock(&wdev->conf_mutex); - /* TODO: BSS_CHANGED_QOS */ - if (changed & BSS_CHANGED_ARP_FILTER) { - for (i = 0; i < HIF_MAX_ARP_IP_ADDRTABLE_ENTRIES; i++) { - __be32 *arp_addr = &info->arp_addr_list[i]; - - if (info->arp_addr_cnt > HIF_MAX_ARP_IP_ADDRTABLE_ENTRIES) - arp_addr = NULL; - if (i >= info->arp_addr_cnt) - arp_addr = NULL; - hif_set_arp_ipv4_filter(wvif, i, arp_addr); - } - } - if (changed & BSS_CHANGED_BASIC_RATES || changed & BSS_CHANGED_BEACON_INT || changed & BSS_CHANGED_BSSID) { @@ -567,12 +554,15 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, wfx_do_join(wvif); } - if (changed & BSS_CHANGED_AP_PROBE_RESP || - changed & BSS_CHANGED_BEACON) - wfx_upload_ap_templates(wvif); - - if (changed & BSS_CHANGED_BEACON_ENABLED) - wfx_enable_beacon(wvif, info->enable_beacon); + if (changed & BSS_CHANGED_ASSOC) { + if (info->assoc || info->ibss_joined) + wfx_join_finalize(wvif, info); + else if (!info->assoc && vif->type == NL80211_IFTYPE_STATION) + wfx_reset(wvif); + else + dev_warn(wdev->dev, "%s: misunderstood change: ASSOC\n", + __func__); + } if (changed & BSS_CHANGED_BEACON_INFO) { if (vif->type != NL80211_IFTYPE_STATION) @@ -585,16 +575,25 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, wfx_filter_beacon(wvif, true); } - if (changed & BSS_CHANGED_ASSOC) { - if (info->assoc || info->ibss_joined) - wfx_join_finalize(wvif, info); - else if (!info->assoc && vif->type == NL80211_IFTYPE_STATION) - wfx_reset(wvif); - else - dev_warn(wdev->dev, "%s: misunderstood change: ASSOC\n", - __func__); + if (changed & BSS_CHANGED_ARP_FILTER) { + for (i = 0; i < HIF_MAX_ARP_IP_ADDRTABLE_ENTRIES; i++) { + __be32 *arp_addr = &info->arp_addr_list[i]; + + if (info->arp_addr_cnt > HIF_MAX_ARP_IP_ADDRTABLE_ENTRIES) + arp_addr = NULL; + if (i >= info->arp_addr_cnt) + arp_addr = NULL; + hif_set_arp_ipv4_filter(wvif, i, arp_addr); + } } + if (changed & BSS_CHANGED_AP_PROBE_RESP || + changed & BSS_CHANGED_BEACON) + wfx_upload_ap_templates(wvif); + + if (changed & BSS_CHANGED_BEACON_ENABLED) + wfx_enable_beacon(wvif, info->enable_beacon); + if (changed & BSS_CHANGED_KEEP_ALIVE) hif_keep_alive_period(wvif, info->max_idle_period * USEC_PER_TU / USEC_PER_MSEC); From patchwork Mon Sep 7 10:14:52 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: 11760511 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 05B7A59D for ; Mon, 7 Sep 2020 10:32:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DB9122067C for ; Mon, 7 Sep 2020 10:32: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="QrHGsC2V" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728578AbgIGKQN (ORCPT ); Mon, 7 Sep 2020 06:16:13 -0400 Received: from mail-eopbgr770058.outbound.protection.outlook.com ([40.107.77.58]:18596 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728524AbgIGKPz (ORCPT ); Mon, 7 Sep 2020 06:15:55 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bMey+gz+G8ZFnBVhWNhZPlGPyUVOaGQTRZt6n3fXhPOT69NgyD++kkoC4APsrpwujhtkuGNCeKcA2CwOf5Wc7RR0nrzbDGHZexFvUWPlwSnVbZjVX2s2sm1muSU1xRhptapgSNxmIaj15B0GGX1jhBHj0oMXYgrTuxQMUEC5Pg8HP5ecmKJRZBgigNshRWM1gdymp0gRzqEo3ernkj2W6W4bQkAvB1Mr6jiwUCvsE/3u816nk3ulXSVu4o1DxbeaL/s2WpkWGw8nmX7QMhIWjBa3gqYYWH8Nv/UbJxCG+AwQuzE1fKxFDk/9W9Ql2tD9HjpPAFMugRgYDA0/s5pj6Q== 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=lG4N+ZCAjhIEwblMAIWNjkT8FzQkA7YkgRQ+/QD2z+4=; b=FZHlJ6c7AOEnkYKMw3ptikBgVEZsJCRQIqkBLFxxF5t4JxvPBCGfCArG8dqGDJDLVVuXRGFvtf72zDYPcfZimOyKqNhhVrnc37uzf8bU0YhtGAO7bYdfOzYLeBMqtQ6qTuAY2FOPI8RVRTFOuW9SZVQQa1/K+YnZADLNjK4uoNzwIYK7PUTSIZPnJtyPKou4Xxzs5Rvpqgka5L5yiKtcON0AN4BaVU5PND4Y8txEh4rtx1k8KjSlYppjuIRVD+3QiI36ZhFoN53AuGcc2fE74b5xboEpQjWmqi4iaDUd5T1NEq4TxDUmIiCBRi23g1lO5tOaXpOw0swwXc/FFH3pSg== 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=lG4N+ZCAjhIEwblMAIWNjkT8FzQkA7YkgRQ+/QD2z+4=; b=QrHGsC2VLp8ZB0UAKbs1D4yC6wGALM20WGgl9/AevuZaihJVMKS/ZCrcflmbrE/Ez13YaR5TRN/Kt1sjtsvSr8B2t5sq7I51V2DvSHlz+nZd3RUH2ozH7XELQ9TkwRkQOOxccW3dUGOUJzp8YIaHO9WtWo3HUZ1Vmuk7ceY1Vow= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:15:47 +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:15:47 +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 02/31] staging: wfx: relocate wfx_join() beside wfx_join_finalize() Date: Mon, 7 Sep 2020 12:14:52 +0200 Message-Id: <20200907101521.66082-3-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:15:45 +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: c15e049d-bc57-4eeb-ec28-08d85316fd02 X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 72Sp/MfNuas5b9iCu9GJuwog1/vwLVFaKRnjuD83BpG55fHZEB3TBlyRBHynw4VYsgWuP5qGn8YoIXgLyFXblWPSYRc0+Da68RQmJ0a2Mqpma7LgIC//o0oNbLT9aSO2+GKJ+NElZCgT7sSnaGxrUJ3BdZoHsdsfvQg/c+/O6LJZn8tdJewQKr1zPg7F7cwGvgDBPn7uhv8xFLDhVJrZen1zak+DswRd9VJGsrTwbqd62E4To6dOmduc6bZrqLYRoXykih0MbthQgiKs6MA9nHXNpuyCN7ry6wH/CxY5y5l9A8I/rPx9MsZMigTb3tSxMldo586vUX+intQxEdv1mw== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(6666004)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(66574015)(83380400001)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: TeESUgAIkp5iGygOXN28BV80Ya34fLYjcvoLFvNMImDv0dfvjtRgugTprPfMpX11wyrsNHb50Ej13QPv9WV3tgKL9l3oS71XCtHMBWInEWNZlo6r9LByHD9C0EER2v7naKBwl+9ZFPQxe2EsDVWuRnO1GLLUay7t80w/bLXw/AFNokuLryEGcEUNrRX743P379TzsPGLWygXfFUkZAZQXlIMJx+tUT9iNgtZQQXHxAt+Fyy+U6pd4+zbNFU9HXMhfQjzgiX5Tn7BypM0EKwIowQJ2KgU0nvm3KjvfkOIUWJTR2InY2M3ObzgeTm+VjpRs5bHVh6ziXTRJPpTySgXLluuJ5VE04e2ptTUbWXicHMvJ2VtIqcumCERML82MOzIvoAQiqLD40PZhrcmip/OFmJ2ZPltCZ2epgbNy8/yekmLDP+2i0ivi/cM26Gwisw6ScoBgZ1XUVXo1XBDChVLjhuUv0JpHSqzw5nDAtp0c8xsyF6dGjjOWiIhMJyPCAdWjOZ2UpFpEbwNke/O05vWcRumdHCYDi3tl12IB3/te0bWqEgRlXaG97U63T2Rdgix2LJi8EneL98tGiT6bMtVuJD2xqm2chyfb/eHkV3/fjaYAnd5v7pIR6ye2RtdfXJlR770OxDtyACTsuTdubmgjw== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: c15e049d-bc57-4eeb-ec28-08d85316fd02 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:15:47.3947 (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: x91OlafsgrT/214h86THXYGfFvPzhEcg0p7kdFfha23OUjzbVchuI2QoGL8KpyOarAwYRgxjjOeIR6U9tDjx6A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller wfx_join() and wfx_join_finalize() are the two halves of the association process. Group them. In addition, for better uniformity of the code, rename wfx_do_join() in wfx_join(). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 100 +++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 502967874373..b2a29b2ac20c 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -340,54 +340,6 @@ void wfx_reset(struct wfx_vif *wvif) wfx_update_pm(wvif); } -static void wfx_do_join(struct wfx_vif *wvif) -{ - int ret; - struct ieee80211_bss_conf *conf = &wvif->vif->bss_conf; - struct cfg80211_bss *bss = NULL; - u8 ssid[IEEE80211_MAX_SSID_LEN]; - const u8 *ssidie = NULL; - int ssidlen = 0; - - wfx_tx_lock_flush(wvif->wdev); - - bss = cfg80211_get_bss(wvif->wdev->hw->wiphy, wvif->channel, - conf->bssid, NULL, 0, - IEEE80211_BSS_TYPE_ANY, IEEE80211_PRIVACY_ANY); - if (!bss && !conf->ibss_joined) { - wfx_tx_unlock(wvif->wdev); - return; - } - - rcu_read_lock(); // protect ssidie - if (bss) - ssidie = ieee80211_bss_get_ie(bss, WLAN_EID_SSID); - if (ssidie) { - ssidlen = ssidie[1]; - if (ssidlen > IEEE80211_MAX_SSID_LEN) - ssidlen = IEEE80211_MAX_SSID_LEN; - memcpy(ssid, &ssidie[2], ssidlen); - } - rcu_read_unlock(); - - cfg80211_put_bss(wvif->wdev->hw->wiphy, bss); - - wvif->join_in_progress = true; - ret = hif_join(wvif, conf, wvif->channel, ssid, ssidlen); - if (ret) { - ieee80211_connection_loss(wvif->vif); - wfx_reset(wvif); - } else { - /* Due to beacon filtering it is possible that the - * AP's beacon is not known for the mac80211 stack. - * Disable filtering temporary to make sure the stack - * receives at least one - */ - wfx_filter_beacon(wvif, false); - } - wfx_tx_unlock(wvif->wdev); -} - int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta) { @@ -496,6 +448,54 @@ void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) wfx_reset(wvif); } +static void wfx_join(struct wfx_vif *wvif) +{ + int ret; + struct ieee80211_bss_conf *conf = &wvif->vif->bss_conf; + struct cfg80211_bss *bss = NULL; + u8 ssid[IEEE80211_MAX_SSID_LEN]; + const u8 *ssidie = NULL; + int ssidlen = 0; + + wfx_tx_lock_flush(wvif->wdev); + + bss = cfg80211_get_bss(wvif->wdev->hw->wiphy, wvif->channel, + conf->bssid, NULL, 0, + IEEE80211_BSS_TYPE_ANY, IEEE80211_PRIVACY_ANY); + if (!bss && !conf->ibss_joined) { + wfx_tx_unlock(wvif->wdev); + return; + } + + rcu_read_lock(); // protect ssidie + if (bss) + ssidie = ieee80211_bss_get_ie(bss, WLAN_EID_SSID); + if (ssidie) { + ssidlen = ssidie[1]; + if (ssidlen > IEEE80211_MAX_SSID_LEN) + ssidlen = IEEE80211_MAX_SSID_LEN; + memcpy(ssid, &ssidie[2], ssidlen); + } + rcu_read_unlock(); + + cfg80211_put_bss(wvif->wdev->hw->wiphy, bss); + + wvif->join_in_progress = true; + ret = hif_join(wvif, conf, wvif->channel, ssid, ssidlen); + if (ret) { + ieee80211_connection_loss(wvif->vif); + wfx_reset(wvif); + } else { + /* Due to beacon filtering it is possible that the + * AP's beacon is not known for the mac80211 stack. + * Disable filtering temporary to make sure the stack + * receives at least one + */ + wfx_filter_beacon(wvif, false); + } + wfx_tx_unlock(wvif->wdev); +} + static void wfx_join_finalize(struct wfx_vif *wvif, struct ieee80211_bss_conf *info) { @@ -514,7 +514,7 @@ int wfx_join_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif) struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; wfx_upload_ap_templates(wvif); - wfx_do_join(wvif); + wfx_join(wvif); return 0; } @@ -551,7 +551,7 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, changed & BSS_CHANGED_BEACON_INT || changed & BSS_CHANGED_BSSID) { if (vif->type == NL80211_IFTYPE_STATION) - wfx_do_join(wvif); + wfx_join(wvif); } if (changed & BSS_CHANGED_ASSOC) { From patchwork Mon Sep 7 10:14:53 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: 11760405 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 0853F746 for ; Mon, 7 Sep 2020 10:16:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DC93421473 for ; Mon, 7 Sep 2020 10:16:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="dkfBqzFf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728648AbgIGKQF (ORCPT ); Mon, 7 Sep 2020 06:16:05 -0400 Received: from mail-eopbgr770081.outbound.protection.outlook.com ([40.107.77.81]:21675 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728578AbgIGKP7 (ORCPT ); Mon, 7 Sep 2020 06:15:59 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gm8PFqYSvQkiuv6WbsLwvBZWnpPBx+F9Nep6oaVZBVrQMoJ56rY6A+vHCTAJ2AkeGzMUPgbIUhvOMFWeTKSwbKeokjO69DwTH2cx9+3lehAqltyQMmbFsn2SEpeI2cKLwJLHDgmt3Cs0ltEg6h3P07otkxsA2zfN+IAexDuZW3D5Bvio6k3tDBqdsTSIIvrgjndPwsgvpRpnjVucebo+rRbR1l5a2o55Pz5TPrfQTR1zF6gdI6nZQF2CGSU/MkH3altIXEeZoS0ByahwdS0oH7XGjn/cau5lG5P2QXwelJ4/mYwaaHpaJXuHqolvYP1Oqn8DCQnLe9WGY1PEQti0Sw== 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=D2jM+kgD2WXgbBXIjo869uKm6EUwRZpEWfSKlncRfho=; b=JtzQAlpmYeX2ATtAnTBKeENQRTZy7XL27SKDfHJtuE8NLjplvRxcbRgX2JsOlS4QtaRtM9/OVGMMWjnNqaz/F5O3u8bi0wzNDdk5zX/8pRgiLqpa4oKMAvLTDJyyA7Di3DigYyU8G7nFkwB6j1opqwGaJPXpVMPU0teIwFM3/njNpufW9glp4lD0P0ZKitxwt5Id3W3wpPY46P5vQm0mQQA7HxDyvjczrOrq4Zuq/JS/733F6Lb92v8Laj8VSalBR07EvdN1ocTOYs8+6Q63UptAPncQLjxadevLGI9oRFjb9qnHff6IXtLnrLFey+nAsM3FnpVuaSb0lMVId3A7cg== 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=D2jM+kgD2WXgbBXIjo869uKm6EUwRZpEWfSKlncRfho=; b=dkfBqzFfH/cwnZq0M6cA37RdZ2mGakV5IJvzME8EPFOW0B4judgsyW07OSKkZ3tZ3K20briZ0fHRmlbFtL9gHgCRlG0QoIVA17x3lB38Z83nro+AuWedp8Wr7UvCix7HVMuj9/XNd+LOMQueMXWY8RXxO+CM9WKEtIZEQ5U50wg= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:15:49 +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:15:49 +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 03/31] staging: wfx: simplify hif_set_association_mode() Date: Mon, 7 Sep 2020 12:14:53 +0200 Message-Id: <20200907101521.66082-4-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:15:47 +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: f42e480e-764d-4506-0dc8-08d85316fe02 X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XzhSlCPFQiJIPGLXA2Tfxnpg8CfIAntNK4SKiHWf3p/k6ZNz4Jw7glXzfPnn56AQiGSCCowpCepuIqxoXBjs4dZjU9VCFyo0/2agZhnBVB65pnAoyJylE6TPc7n2TK6PijgowV/56fWUkcVgwPre1eY/0t0alCO4a2jkDIPjATz3WkcFwHTnqeW944SBUjGnvV4dDzB88k8WbYhjqlUCktfH59EwiQ0gqIwkqGTfgueRofYYFnzeJCL16+ridse+5ONeeNIDdbSCm4XpUPNiKnDGZWhXsjXQv6wacwB7GZOqe5WzVZ03UtljvBu69R3d+UQGwsRPe8r8j/lUMGPc/Q== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(6666004)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(66574015)(83380400001)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: RazQn8BFpc2QCJ183ysDoIUZq4XzODkud5KnhhLFi68WRbFhvQGwVXWuYPeNerfBCwof07UJu0xxp4cRfCrrTbGrOBpqeSOyan+J/A5vLNFiI3H5pxoIn2zNG0uUI2sWauT0hKrCJlU29GOS+hAK5jrZ/xi00j4KwSB2Bp33v4XqQ0cHYg+vnIg3gcchHQlHiPbf+YqOJDUOZy1i9CMaq4odzuyxFDzdiPVOF5RT8PtsfkNGWvtNvA3dqPcARqS2lbtC40c4g+PlAGnupjBsEpG4HpMVOjZQ4CiBhv+x1Jjg0C/M3GlYhlBdBiR75EqAcZGH7ZVXxKFx4HafkIWIZUeJJFY08A76LNqDI+owe5qnzr7uekhprb5JqeHovxe6CTxbgx/AEalxqVKdpWKahXp9OXFyozbENXES70PUR3WruJ+NmJ0zVdEABk7qOB8F5HrqG3bfVcdvX1nLejlNVF/5PySAUp6j+ByFOjn8h0em10o6SE2X5/Apf1i1oIAJ9kJsQNTAuV3T2BHSogHgKpyM+WjWMY2mRlrHSZnZ/i7wtfLVqmNA5SNeYdWRvRO1I6d53ymovcegI0+pE7Ig63yY4OUOrENJ01/hf4gHCesXr3W1XdBF8NMKZ/Uc2cbB2yMW9fm4onwL43bqL/1qRw== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: f42e480e-764d-4506-0dc8-08d85316fe02 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:15:49.0507 (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: oyj3XIOeFDppA4HXUKYbvv7blwnGhJeJ2e3++mWspAD9QSE5OmGSzR/yUcxxd5NIgMJo7f11hICEmXx4AlDcJg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The file hif_tx_mib.c expects to contain functions that format messages for the hardware. It is unexpected to find function that manipulate RCU and structures from mac80211. Keep hif_set_association_mode() with the code necessary for message formatting and relocate the smart part in wfx_join_finalize(). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx_mib.c | 21 +++++---------------- drivers/staging/wfx/hif_tx_mib.h | 4 ++-- drivers/staging/wfx/sta.c | 17 ++++++++++++++++- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c index 05f1e1e98af9..3b20b7486f08 100644 --- a/drivers/staging/wfx/hif_tx_mib.c +++ b/drivers/staging/wfx/hif_tx_mib.c @@ -187,29 +187,18 @@ int hif_set_block_ack_policy(struct wfx_vif *wvif, &val, sizeof(val)); } -int hif_set_association_mode(struct wfx_vif *wvif, - struct ieee80211_bss_conf *info) +int hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, + bool greenfield, bool short_preamble) { - struct ieee80211_sta *sta = NULL; struct hif_mib_set_association_mode val = { .preambtype_use = 1, .mode = 1, .spacing = 1, - .short_preamble = info->use_short_preamble, + .short_preamble = short_preamble, + .greenfield = greenfield, + .mpdu_start_spacing = ampdu_density, }; - rcu_read_lock(); // protect sta - if (info->bssid && !info->ibss_joined) - sta = ieee80211_find_sta(wvif->vif, info->bssid); - - // FIXME: it is strange to not retrieve all information from bss_info - if (sta && sta->ht_cap.ht_supported) { - val.mpdu_start_spacing = sta->ht_cap.ampdu_density; - if (!(info->ht_operation_mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT)) - val.greenfield = !!(sta->ht_cap.cap & IEEE80211_HT_CAP_GRN_FLD); - } - rcu_read_unlock(); - return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_SET_ASSOCIATION_MODE, &val, sizeof(val)); } diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h index 86683de7de7c..1a6f4221bdeb 100644 --- a/drivers/staging/wfx/hif_tx_mib.h +++ b/drivers/staging/wfx/hif_tx_mib.h @@ -33,8 +33,8 @@ 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); int hif_set_block_ack_policy(struct wfx_vif *wvif, u8 tx_tid_policy, u8 rx_tid_policy); -int hif_set_association_mode(struct wfx_vif *wvif, - struct ieee80211_bss_conf *info); +int hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, + bool greenfield, bool short_preamble); int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, int policy_index, u8 *rates); int hif_set_mac_addr_condition(struct wfx_vif *wvif, diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index b2a29b2ac20c..feebb7c3bdfe 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -499,8 +499,23 @@ static void wfx_join(struct wfx_vif *wvif) static void wfx_join_finalize(struct wfx_vif *wvif, struct ieee80211_bss_conf *info) { + struct ieee80211_sta *sta = NULL; + int ampdu_density = 0; + bool greenfield = false; + + rcu_read_lock(); // protect sta + if (info->bssid && !info->ibss_joined) + sta = ieee80211_find_sta(wvif->vif, info->bssid); + if (sta && sta->ht_cap.ht_supported) + ampdu_density = sta->ht_cap.ampdu_density; + if (sta && sta->ht_cap.ht_supported && + !(info->ht_operation_mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT)) + greenfield = !!(sta->ht_cap.cap & IEEE80211_HT_CAP_GRN_FLD); + rcu_read_unlock(); + wvif->join_in_progress = false; - hif_set_association_mode(wvif, info); + hif_set_association_mode(wvif, ampdu_density, greenfield, + info->use_short_preamble); hif_keep_alive_period(wvif, 0); // beacon_loss_count is defined to 7 in net/mac80211/mlme.c. Let's use // the same value. From patchwork Mon Sep 7 10:14:54 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: 11760513 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 2700513B1 for ; Mon, 7 Sep 2020 10:32:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 04C8C21481 for ; Mon, 7 Sep 2020 10:32:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="L+LfQRYZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728661AbgIGKQM (ORCPT ); Mon, 7 Sep 2020 06:16:12 -0400 Received: from mail-eopbgr770058.outbound.protection.outlook.com ([40.107.77.58]:18596 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728632AbgIGKP6 (ORCPT ); Mon, 7 Sep 2020 06:15:58 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RYu1s9j5YSqKyuGghTgdV8kaOmw1cjlozgoChDbkOIt+1m+b4rwWZAPsTt8hyOoB2RHCFNjrLqoI8JpO4oUnTgmwdFxjxVhP9Zh+1Px6s/jJN3oIPdSflhhkWEb118HHpgPoPe/X1QKGUawldY4ujHnPcraKPzPMsGhgvgC5PUV3ABON1862tvfFIWD8FO1z+hZJEnWl1UUSCAr6p4rOjNnv3RILCjuUhsBzlyI5nK1JIbfAuxn4PisfLSwmhOf/pl9L9J/t+AdMyuMxyuSFomZCDDHsc4g84UA+SnvCoir/KJvrIBZgFFIEANamGe2cqypQYD1W80umf2IyCjWpJA== 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=3G1qs8X9ThRzfl04Z5X/p574+vMrzA+ay+RNKLM/kPg=; b=Gi2KJF6S1E8i44h3YKUV9E8UZgqZc1+rp9yoYw8xB9Y1qchdfdHq+5EFjDyekEcxVR5hR0QbFmPlVTrPIh6lbGeiSNYfUZOFuC25L7R0g1NYzQ1DWGdg8hxRfNkSzfjg3aC+eBYEd6r+OhPJlrebGG2vnV8cZ2lX8Ljc4WPkgTwaEUSEIth9BOuxwYi+NKT0Qt1las0WMLmYa+Vk2KnL1ags7Fr2nCh1enDfI04ASax8uLogmh26QZLjvsSCJvcbSeNPKpMKvP0nJXeoi66aiB3C6fuaRrQfbR1BZrq9J1imHDR814swR0e5Os3KyaaKdKMTgggle8UHA8c+Ud6k+Q== 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=3G1qs8X9ThRzfl04Z5X/p574+vMrzA+ay+RNKLM/kPg=; b=L+LfQRYZAi2Xl0priuEQXT3Y4E1ncK2VZkVmmBQuPf8y628KcmoBE86sFlmWD1Q66njpecBSMQg2Vu23NycrkrQShbuuXLWG2PsEUP1nrqaBzVoTqZ2SUwrMGQ0Dt1c/ou9IASq+ghD2SJleZs3ycHzQiawrTEamyKtAL5WrrH8= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:15:50 +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:15:50 +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 04/31] staging: wfx: keep API error list up-to-date Date: Mon, 7 Sep 2020 12:14:54 +0200 Message-Id: <20200907101521.66082-5-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:15:49 +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: c38a19b2-e95c-4271-79a7-08d85316fefa X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ugy5JBhDZc9uy3zlYkrZwNvsZPJFLPqv0+y3MySstnYmQ9VEOxlB5yQ0R3DMwlCKG3THeUdGwAPVBeRSJGUJFFgGhAvoSTdiVg59FCBhrQXrgoJve5as/atE50dG2prqmRAHLqlraUjJ/dx5LhmY1bo7W5c4ZCoPXCssHvJIM4lzK3ltXyEylHjmb2RkPwlgp8k6T6KWIPlR/QXAdLG/meQy/Itl7y/Dnx2VZO+2Da9BaAHDaEMN7uhrhALOD9Ec585Ybk5sURjPnIOM9S7fcgM0diIvasWMQyNwvCRGcqvG3ujZAOCf4inSkwNvxq8VosIJE/MlX6qR5qE2voeHEg== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(6666004)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(83380400001)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: UuFZUpMXv5qu3+jwGT+Hp/gCfGuDCOQbOGfiiZP2gdAJ4Fbmvrzre0w+Glv5Y2OXC8j9towF3YsuWr2p7YE8o1/yJi4XVkF4ZoAUPMTuMkPqbPmMcZTan5KoHozqvHUV0zyVeT2xeKhjRipOwE8XRpPGZqWnyyHeL5IzECnb59/maYzbTIxwtZyq7J6ws2Dh6swwFWG2KwQrBh/lw+050XU43DI5iA9LgeCL1rhNBZoUj00EeQkogjvPTYFetUcQ+K2phzWwbwvaPP4UWckGsWiCUZTJWrJeNVGHRWkxi5CwdzK3V1FrcK2C0faVJ1yR/ilTujY/eatxCh41HFJNwqK6liTUznBv31eNSyYirE39JrR8ENjMx6KjN3S1ZZI8n/Z5ib43rspVE/Fxse8vsoFfyB+Ab+YieRgmC0gkNU6NxC4juQUMwmFWmvDtidXIlBdiP9A++rGhnuQXGZjqo6+2pE3DywSKc5/Y1g2pqH4JK3mlQEOG1xxiNRXB/ALp4CrnPl6hDX0vrzGoLZMIvf9xJ328bKeZLSoP96hnXVCyNY9CdGJv6T4XNyeAd2oFe/U8qIOYsPOYTPAicRnkH+Kps8vKHGy/wGXVFBVK+zbe0xcxjMuTQ3x/xtc/MwldvfpOp8ps7YDWU1PKRTmKQQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: c38a19b2-e95c-4271-79a7-08d85316fefa 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:15:50.6918 (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: 3EppnKB+hsL0TlwSgOCjNLB3t6iZ9bFxMlr9eSxW0LLDVTSFIthiOH6B+XwE9QETNv2YvxTLlvbHrzpkBJedEw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller A new kind of error has appeared in API 3.4. The Linux driver is not concerned by this new error, but let's keep the API in sync with the firmware. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_general.h | 1 + drivers/staging/wfx/hif_rx.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index dba18a7ae919..791d7375bd7f 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -262,6 +262,7 @@ enum hif_error { HIF_ERROR_HIF_TX_QUEUE_FULL = 0x0d, HIF_ERROR_HIF_BUS = 0x0f, HIF_ERROR_PDS_TESTFEATURE = 0x10, + HIF_ERROR_SLK_UNCONFIGURED = 0x11, }; struct hif_ind_error { diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 1d32973d8ec1..36b393b92936 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -301,6 +301,8 @@ static const struct { "secure link overflow" }, { HIF_ERROR_SLK_WRONG_ENCRYPTION_STATE, "secure link messages list does not match message encryption" }, + { HIF_ERROR_SLK_UNCONFIGURED, + "secure link not yet configured" }, { HIF_ERROR_HIF_BUS_FREQUENCY_TOO_LOW, "bus clock is too slow (<1kHz)" }, { HIF_ERROR_HIF_RX_DATA_TOO_LARGE, From patchwork Mon Sep 7 10:14:55 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: 11760547 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 2E3B313B1 for ; Mon, 7 Sep 2020 10:34:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 056652067C for ; Mon, 7 Sep 2020 10:34:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="MuFxKQ9I" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728785AbgIGKc4 (ORCPT ); Mon, 7 Sep 2020 06:32:56 -0400 Received: from mail-eopbgr770058.outbound.protection.outlook.com ([40.107.77.58]:18596 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728642AbgIGKQH (ORCPT ); Mon, 7 Sep 2020 06:16:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dmL8SWWwqjaMrDKnd6YA1xZThJryV8HikT8LW2Po1WumMoaDX52muoZv+Gsu8v3+aQGtVsUETAHZrSRNrVl1bAZY+9Y+vmsVdki+xNok/sZOp6TbDMIRevFC5fZJLNYItuGFsMpFswCQl/jy6yKayHm6lXaL088g5HkyA7CpULCuUNduzMuQ0sA3sCRstD3Qd7GMp2EeFHGkj0v+R2M8IgJyVGVgKNk56xzeiwJdGYTh5a2V+mouDvHuy2rw1dBm2MrNgtYxvUdeQGCVv8nuEArNfJ5dt4a+Ed30N7xYDxDIR/R1XmfNMhT9U21mf0WnlvN8qMtyqFzoz+sMyTlc/g== 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=wOD31//WcA9Sg/GT3nVtbmqC+EjugKLWOFvDfKa1KTA=; b=djwJihYjwNncWZilXJvtChpkvzXzFPp2QGIxyqHnF87Ae7RmEh0q8bYq0d16gqWS2urNz7vfbCnS+W/Bo9w3DiNSwp24BEjF14fwHV8ymoL6bUWJWZv1fPpi2ruZdHrCf1LUfI6K0f5xnkET2SglocH4LE/kloEv9lpxDftI5M++ipRbJd1W2gxDetTOj5RvbIsymHO5g21+RqrtdqBRJNQy+1bDeC878nTAfDow0+o0y0D0muzrrMCg3Nq9VXGzM5oo8hgtjyNT1Qg3vKNvt0g6bez6M3OgD8XNua/TvLQ3+Ex4awUm++4P7MKR9kyCZdm1o7vxaYVkQZjsM/5hNQ== 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=wOD31//WcA9Sg/GT3nVtbmqC+EjugKLWOFvDfKa1KTA=; b=MuFxKQ9I3OlKBBdareiAVw6NLKkNOLqzecLs02lySv41jAjPiNfjae9W0Q99D1sjQeOctx/nR0BXnorQZl3eUZHJb2ZEr2nUBU0Z0tlnEEIEy7TXoFl9oMwMIKO6cTEaLFJwyzbENiMOVUZmU2dJ9IrUUJ/xUibgkC8fwtA5pkM= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:15:52 +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:15:52 +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 05/31] staging: wfx: drop 'secure link' feature Date: Mon, 7 Sep 2020 12:14:55 +0200 Message-Id: <20200907101521.66082-6-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:15:50 +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: bbe840ed-90c5-401a-b586-08d85316fff6 X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:478; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0PMAZ2Yu4zEFxX0LMlWRT9NWADWNuxwRInQODzKUVH2gkk6LNnJFNsSrrRVPnmTUFNVcJk49Srj/LkkTvfjQo7QstmAGSiEejPfAnCJqRfob+qCx5b0ATYHLmY6lA0+EcT2RRsNWNjUlP5bnQJCMQRqAwyS3xniW6kIJ19G76geL44x3aUF0Nem3vxvZx7zmH4AXa6dU3CaSCf5oCTDjUaZ/5zVnzf9khESaLnFhBR0ZzEdwPf7umF5qPWNVRqEbl0qkBDz6vkmkoHDQIitL3g2Cr+RbuQihuGQ1DPF09IKaHSa0YRABGSlULzeFmatNN+EWGaixctWXGOQkATzTmQ== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(66946007)(4326008)(5660300002)(30864003)(2616005)(66476007)(316002)(956004)(478600001)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(66574015)(83380400001)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: r4Mz00zRX8ciOJi7nQMwMVvGEPJfsx28ebGYulVOxwsQW5x1OdQRF1ZW9RgIlXrfnwd8grymr0rS6Ma6gbRB1Q839VSy8QdfGcES38DFyu6lSS3mY/7tpSRfupdXlwu46umUArmu3Jb+bBsAOw24k9fu+Bscoh9JRwzG93dXKbSDOvcZq3b+A4iU7DKsX9HIui6NOl0X9XigG8EyY8PkSjZrTus6MmpV8Gtok63jK1o/rwmeTwgLyGGdE3tRHAN7kE8C4YAOjvSKCI2//EYsDT3cycMohoOKMPclkPeUz95OPwqPQDFB0kfSqHa3SLglAhSrHsGl6qgH3s+V/0njEVXLX2zioCuAC6xgIXt5rVD4HrihQBusguRS/tncUbrU1n57QUs03YFbqVo9Jg33fc78RJ7gMpHtFWnuzEQA6nJOE8QkH8n0MDWaEenjeUcdFNSDxSjHoOHr7Z1aB/S8AWjrgNkqqRturs7Nv6vxO1imlVlr6p2BCmgFY7CfwRsUBHyFMrb1QH3zzzeSYb+fIYXGvYmqCxdVDDSBDqvLcaJp0IN6qBlZd+4vi2Tu6+34XMAUvTuFVbdP6Xs0IsLmlwfqpiBYYZGD5Ooz5MT48plDyDTqKaNi+i3FVLmHXn5QjHT1yGXKPiYCpm/ew4TE4g== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: bbe840ed-90c5-401a-b586-08d85316fff6 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:15:52.3728 (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: k17Wfjl0hY5jb5w80AbpIrcPaonkwazYAMAvANyjvX7Gl8JnwCbSjbqtJzxLX5rbr34BKQcRXu4PYj9duX3Z2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The Secure Link (slk) feature allows to encrypt (and authenticate) the traffic between the host and the device. The official implementation of this feature relies on mbedTLS. For that reason, this implementation is not included in the current driver. To be included, the implementation has to rely on kernel crypto API instead of mbedTLS. So, for now, the driver contained stub functions waiting for the new implementation based on kernel crypto API. This new implementation represent a bunch of work and it is unlikely to be done in near future. Moreover, we strongly dislike to maintain useless code. So, drop all the code related to secure link. Whoever wants to implement secure link should revert this patch before starting to work on it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 48 ++-------------- drivers/staging/wfx/hif_api_general.h | 80 --------------------------- drivers/staging/wfx/hif_rx.c | 19 ------- drivers/staging/wfx/hif_tx.c | 66 ---------------------- drivers/staging/wfx/hif_tx.h | 6 -- drivers/staging/wfx/main.c | 9 +-- drivers/staging/wfx/secure_link.h | 59 -------------------- drivers/staging/wfx/wfx.h | 2 - 8 files changed, 8 insertions(+), 281 deletions(-) delete mode 100644 drivers/staging/wfx/secure_link.h diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index f07bcee50e3f..72da2f4af49f 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -12,7 +12,6 @@ #include "wfx.h" #include "hwio.h" #include "traces.h" -#include "secure_link.h" #include "hif_rx.h" #include "hif_api_cmd.h" @@ -88,20 +87,11 @@ static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) _trace_piggyback(piggyback, false); hif = (struct hif_msg *)skb->data; - WARN(hif->encrypted & 0x1, "unsupported encryption type"); - if (hif->encrypted == 0x2) { - if (WARN(read_len < sizeof(struct hif_sl_msg), "corrupted read")) - goto err; - computed_len = le16_to_cpu(((struct hif_sl_msg *)hif)->len); - computed_len = round_up(computed_len - sizeof(u16), 16); - computed_len += sizeof(struct hif_sl_msg); - computed_len += sizeof(struct hif_sl_tag); - } else { - if (WARN(read_len < sizeof(struct hif_msg), "corrupted read")) - goto err; - computed_len = le16_to_cpu(hif->len); - computed_len = round_up(computed_len, 2); - } + WARN(hif->encrypted & 0x3, "encryption is unsupported"); + if (WARN(read_len < sizeof(struct hif_msg), "corrupted read")) + goto err; + computed_len = le16_to_cpu(hif->len); + computed_len = round_up(computed_len, 2); if (computed_len != read_len) { dev_err(wdev->dev, "inconsistent message length: %zu != %zu\n", computed_len, read_len); @@ -109,16 +99,6 @@ static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) hif, read_len, true); goto err; } - if (hif->encrypted == 0x2) { - if (wfx_sl_decode(wdev, (struct hif_sl_msg *)hif)) { - dev_kfree_skb(skb); - // If frame was a confirmation, expect trouble in next - // exchange. However, it is harmless to fail to decode - // an indication frame, so try to continue. Anyway, - // piggyback is probably correct. - return piggyback; - } - } if (!(hif->id & HIF_ID_IS_INDICATION)) { (*is_cnf)++; @@ -199,23 +179,7 @@ static void tx_helper(struct wfx_dev *wdev, struct hif_msg *hif) hif->seqnum = wdev->hif.tx_seqnum; wdev->hif.tx_seqnum = (wdev->hif.tx_seqnum + 1) % (HIF_COUNTER_MAX + 1); - if (wfx_is_secure_command(wdev, hif->id)) { - len = round_up(len - sizeof(hif->len), 16) + sizeof(hif->len) + - sizeof(struct hif_sl_msg_hdr) + - sizeof(struct hif_sl_tag); - // AES support encryption in-place. However, mac80211 access to - // 802.11 header after frame was sent (to get MAC addresses). - // So, keep origin buffer clear. - data = kmalloc(len, GFP_KERNEL); - if (!data) - goto end; - is_encrypted = true; - ret = wfx_sl_encode(wdev, hif, data); - if (ret) - goto end; - } else { - data = hif; - } + data = hif; WARN(len > wdev->hw_caps.size_inp_ch_buf, "%s: request exceed WFx capability: %zu > %d\n", __func__, len, wdev->hw_caps.size_inp_ch_buf); diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index 791d7375bd7f..0dc13176a05e 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -282,84 +282,4 @@ enum hif_secure_link_state { SEC_LINK_ENFORCED = 0x3 }; -enum hif_sl_encryption_type { - NO_ENCRYPTION = 0, - TX_ENCRYPTION = 1, - RX_ENCRYPTION = 2, - HP_ENCRYPTION = 3 -}; - -struct hif_sl_msg_hdr { - u32 seqnum:30; - u32 encrypted:2; -} __packed; - -struct hif_sl_msg { - struct hif_sl_msg_hdr hdr; - __le16 len; - u8 payload[]; -} __packed; - -#define AES_CCM_TAG_SIZE 16 - -struct hif_sl_tag { - u8 tag[16]; -} __packed; - -enum hif_sl_mac_key_dest { - SL_MAC_KEY_DEST_OTP = 0x78, - SL_MAC_KEY_DEST_RAM = 0x87 -}; - -#define API_KEY_VALUE_SIZE 32 - -struct hif_req_set_sl_mac_key { - u8 otp_or_ram; - u8 key_value[API_KEY_VALUE_SIZE]; -} __packed; - -struct hif_cnf_set_sl_mac_key { - __le32 status; -} __packed; - -enum hif_sl_session_key_alg { - HIF_SL_CURVE25519 = 0x01, - HIF_SL_KDF = 0x02 -}; - -#define API_HOST_PUB_KEY_SIZE 32 -#define API_HOST_PUB_KEY_MAC_SIZE 64 - -struct hif_req_sl_exchange_pub_keys { - u8 algorithm:2; - u8 reserved1:6; - u8 reserved2[3]; - u8 host_pub_key[API_HOST_PUB_KEY_SIZE]; - u8 host_pub_key_mac[API_HOST_PUB_KEY_MAC_SIZE]; -} __packed; - -struct hif_cnf_sl_exchange_pub_keys { - __le32 status; -} __packed; - -#define API_NCP_PUB_KEY_SIZE 32 -#define API_NCP_PUB_KEY_MAC_SIZE 64 - -struct hif_ind_sl_exchange_pub_keys { - __le32 status; - u8 ncp_pub_key[API_NCP_PUB_KEY_SIZE]; - u8 ncp_pub_key_mac[API_NCP_PUB_KEY_MAC_SIZE]; -} __packed; - -struct hif_req_sl_configure { - u8 encr_bmp[32]; - u8 disable_session_key_protection:1; - u8 reserved1:7; - u8 reserved2[3]; -} __packed; - -struct hif_cnf_sl_configure { - __le32 status; -} __packed; - #endif diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 36b393b92936..cf7a956ef00a 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -15,7 +15,6 @@ #include "bh.h" #include "sta.h" #include "data_rx.h" -#include "secure_link.h" #include "hif_api_cmd.h" static int hif_generic_confirm(struct wfx_dev *wdev, @@ -53,8 +52,6 @@ static int hif_generic_confirm(struct wfx_dev *wdev, } else { wdev->hif_cmd.buf_send = NULL; mutex_unlock(&wdev->hif_cmd.lock); - if (cmd != HIF_REQ_ID_SL_EXCHANGE_PUB_KEYS) - mutex_unlock(&wdev->hif_cmd.key_renew_lock); } return status; } @@ -110,21 +107,6 @@ static int hif_wakeup_indication(struct wfx_dev *wdev, return 0; } -static int hif_keys_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) -{ - const struct hif_ind_sl_exchange_pub_keys *body = buf; - u8 pubkey[API_NCP_PUB_KEY_SIZE]; - - // SL_PUB_KEY_EXCHANGE_STATUS_SUCCESS is used by legacy secure link - if (body->status && body->status != HIF_STATUS_SLK_NEGO_SUCCESS) - dev_warn(wdev->dev, "secure link negotiation error\n"); - memcpy(pubkey, body->ncp_pub_key, sizeof(pubkey)); - memreverse(pubkey, sizeof(pubkey)); - wfx_sl_check_pubkey(wdev, pubkey, body->ncp_pub_key_mac); - return 0; -} - static int hif_receive_indication(struct wfx_dev *wdev, const struct hif_msg *hif, const void *buf, struct sk_buff *skb) @@ -380,7 +362,6 @@ static const struct { { HIF_IND_ID_SET_PM_MODE_CMPL, hif_pm_mode_complete_indication }, { HIF_IND_ID_SCAN_CMPL, hif_scan_complete_indication }, { HIF_IND_ID_SUSPEND_RESUME_TX, hif_suspend_resume_indication }, - { HIF_IND_ID_SL_EXCHANGE_PUB_KEYS, hif_keys_indication }, { HIF_IND_ID_EVENT, hif_event_indication }, { HIF_IND_ID_GENERIC, hif_generic_indication }, { HIF_IND_ID_ERROR, hif_error_indication }, diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 6b89e55f03f4..f91b19ddf8e3 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -20,7 +20,6 @@ void wfx_init_hif_cmd(struct wfx_hif_cmd *hif_cmd) init_completion(&hif_cmd->ready); init_completion(&hif_cmd->done); mutex_init(&hif_cmd->lock); - mutex_init(&hif_cmd->key_renew_lock); } static void wfx_fill_header(struct hif_msg *hif, int if_id, @@ -62,9 +61,6 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, if (wdev->chip_frozen) return -ETIMEDOUT; - if (cmd != HIF_REQ_ID_SL_EXCHANGE_PUB_KEYS) - mutex_lock(&wdev->hif_cmd.key_renew_lock); - mutex_lock(&wdev->hif_cmd.lock); WARN(wdev->hif_cmd.buf_send, "data locking error"); @@ -118,8 +114,6 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, "WSM request %s%s%s (%#.2x) on vif %d returned status %d\n", get_hif_name(cmd), mib_sep, mib_name, cmd, vif, ret); - if (cmd != HIF_REQ_ID_SL_EXCHANGE_PUB_KEYS) - mutex_unlock(&wdev->hif_cmd.key_renew_lock); return ret; } @@ -147,7 +141,6 @@ int hif_shutdown(struct wfx_dev *wdev) else control_reg_write(wdev, 0); mutex_unlock(&wdev->hif_cmd.lock); - mutex_unlock(&wdev->hif_cmd.key_renew_lock); kfree(hif); return ret; } @@ -535,62 +528,3 @@ int hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len) kfree(hif); return ret; } - -int hif_sl_send_pub_keys(struct wfx_dev *wdev, - const u8 *pubkey, const u8 *pubkey_hmac) -{ - int ret; - struct hif_msg *hif; - struct hif_req_sl_exchange_pub_keys *body = wfx_alloc_hif(sizeof(*body), - &hif); - - if (!hif) - return -ENOMEM; - body->algorithm = HIF_SL_CURVE25519; - memcpy(body->host_pub_key, pubkey, sizeof(body->host_pub_key)); - memcpy(body->host_pub_key_mac, pubkey_hmac, - sizeof(body->host_pub_key_mac)); - wfx_fill_header(hif, -1, HIF_REQ_ID_SL_EXCHANGE_PUB_KEYS, - sizeof(*body)); - ret = wfx_cmd_send(wdev, hif, NULL, 0, false); - kfree(hif); - // Compatibility with legacy secure link - if (ret == le32_to_cpu(HIF_STATUS_SLK_NEGO_SUCCESS)) - ret = 0; - return ret; -} - -int hif_sl_config(struct wfx_dev *wdev, const unsigned long *bitmap) -{ - int ret; - struct hif_msg *hif; - struct hif_req_sl_configure *body = wfx_alloc_hif(sizeof(*body), &hif); - - if (!hif) - return -ENOMEM; - memcpy(body->encr_bmp, bitmap, sizeof(body->encr_bmp)); - wfx_fill_header(hif, -1, HIF_REQ_ID_SL_CONFIGURE, sizeof(*body)); - ret = wfx_cmd_send(wdev, hif, NULL, 0, false); - kfree(hif); - return ret; -} - -int hif_sl_set_mac_key(struct wfx_dev *wdev, const u8 *slk_key, int destination) -{ - int ret; - struct hif_msg *hif; - struct hif_req_set_sl_mac_key *body = wfx_alloc_hif(sizeof(*body), - &hif); - - if (!hif) - return -ENOMEM; - memcpy(body->key_value, slk_key, sizeof(body->key_value)); - body->otp_or_ram = destination; - wfx_fill_header(hif, -1, HIF_REQ_ID_SET_SL_MAC_KEY, sizeof(*body)); - ret = wfx_cmd_send(wdev, hif, NULL, 0, false); - kfree(hif); - // Compatibility with legacy secure link - if (ret == le32_to_cpu(HIF_STATUS_SLK_SET_KEY_SUCCESS)) - ret = 0; - return ret; -} diff --git a/drivers/staging/wfx/hif_tx.h b/drivers/staging/wfx/hif_tx.h index b371b3777a31..e8aca39e7497 100644 --- a/drivers/staging/wfx/hif_tx.h +++ b/drivers/staging/wfx/hif_tx.h @@ -20,7 +20,6 @@ struct wfx_vif; struct wfx_hif_cmd { struct mutex lock; - struct mutex key_renew_lock; struct completion ready; struct completion done; bool async; @@ -58,10 +57,5 @@ int hif_beacon_transmit(struct wfx_vif *wvif, bool enable); int hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id, bool mfp); int hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len); -int hif_sl_set_mac_key(struct wfx_dev *wdev, - const u8 *slk_key, int destination); -int hif_sl_config(struct wfx_dev *wdev, const unsigned long *bitmap); -int hif_sl_send_pub_keys(struct wfx_dev *wdev, - const u8 *pubkey, const u8 *pubkey_hmac); #endif diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 5e2b82499004..2af4914e905c 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -30,7 +30,6 @@ #include "scan.h" #include "debug.h" #include "data_tx.h" -#include "secure_link.h" #include "hif_tx_mib.h" #include "hif_api_cmd.h" @@ -271,8 +270,7 @@ struct wfx_dev *wfx_init_common(struct device *dev, hw->queues = 4; hw->max_rates = 8; hw->max_rate_tries = 8; - hw->extra_tx_headroom = sizeof(struct hif_sl_msg_hdr) + - sizeof(struct hif_msg) + hw->extra_tx_headroom = sizeof(struct hif_msg) + sizeof(struct hif_req_tx) + 4 /* alignment */ + 8 /* TKIP IV */; hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | @@ -309,7 +307,6 @@ struct wfx_dev *wfx_init_common(struct device *dev, return ERR_CAST(wdev->pdata.gpio_wakeup); if (wdev->pdata.gpio_wakeup) gpiod_set_consumer_name(wdev->pdata.gpio_wakeup, "wfx wakeup"); - wfx_sl_fill_pdata(dev, &wdev->pdata); mutex_init(&wdev->conf_mutex); mutex_init(&wdev->rx_stats_lock); @@ -381,8 +378,7 @@ int wfx_probe(struct wfx_dev *wdev) goto err0; } - err = wfx_sl_init(wdev); - if (err && wdev->hw_caps.capabilities.link_mode == SEC_LINK_ENFORCED) { + if (wdev->hw_caps.capabilities.link_mode == SEC_LINK_ENFORCED) { dev_err(wdev->dev, "chip require secure_link, but can't negotiate it\n"); goto err0; @@ -466,7 +462,6 @@ void wfx_release(struct wfx_dev *wdev) hif_shutdown(wdev); wdev->hwbus_ops->irq_unsubscribe(wdev->hwbus_priv); wfx_bh_unregister(wdev); - wfx_sl_deinit(wdev); } static int __init wfx_core_init(void) diff --git a/drivers/staging/wfx/secure_link.h b/drivers/staging/wfx/secure_link.h deleted file mode 100644 index c3d055b2f8b1..000000000000 --- a/drivers/staging/wfx/secure_link.h +++ /dev/null @@ -1,59 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (c) 2019, Silicon Laboratories, Inc. - */ -#ifndef WFX_SECURE_LINK_H -#define WFX_SECURE_LINK_H - -#include - -#include "hif_api_general.h" - -struct wfx_dev; - - -struct sl_context { -}; - -static inline bool wfx_is_secure_command(struct wfx_dev *wdev, int cmd_id) -{ - return false; -} - -static inline int wfx_sl_decode(struct wfx_dev *wdev, struct hif_sl_msg *m) -{ - return -EIO; -} - -static inline int wfx_sl_encode(struct wfx_dev *wdev, - const struct hif_msg *input, - struct hif_sl_msg *output) -{ - return -EIO; -} - -static inline int wfx_sl_check_pubkey(struct wfx_dev *wdev, - const u8 *ncp_pubkey, - const u8 *ncp_pubmac) -{ - return -EIO; -} - -static inline void wfx_sl_fill_pdata(struct device *dev, - struct wfx_platform_data *pdata) -{ - if (of_find_property(dev->of_node, "slk_key", NULL)) - dev_err(dev, "secure link is not supported by this driver, ignoring provided key\n"); -} - -static inline int wfx_sl_init(struct wfx_dev *wdev) -{ - return -EIO; -} - -static inline void wfx_sl_deinit(struct wfx_dev *wdev) -{ -} - - -#endif diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 38e24d7f72f2..241eaaf71f5e 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -20,7 +20,6 @@ #include "data_tx.h" #include "main.h" #include "queue.h" -#include "secure_link.h" #include "hif_tx.h" #define USEC_PER_TXOP 32 // see struct ieee80211_tx_queue_params @@ -41,7 +40,6 @@ struct wfx_dev { struct completion firmware_ready; struct hif_ind_startup hw_caps; struct wfx_hif hif; - struct sl_context sl; struct delayed_work cooling_timeout_work; bool poll_irq; bool chip_frozen; From patchwork Mon Sep 7 10:14:56 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: 11760519 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 F063259D for ; Mon, 7 Sep 2020 10:32:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C89E72067C for ; Mon, 7 Sep 2020 10:32: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="jYA9IvCx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728989AbgIGKc5 (ORCPT ); Mon, 7 Sep 2020 06:32:57 -0400 Received: from mail-eopbgr770081.outbound.protection.outlook.com ([40.107.77.81]:21675 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728644AbgIGKQH (ORCPT ); Mon, 7 Sep 2020 06:16:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hk+lll21YPpqo/seif7EtsI10rvfU4eMY0lXkba0/Jl1gPCNKi8ts0YTFBiCRBaXFXQQcFb9ryewaZ3M1AP0LFwjohdvQ0qLWZtCNngH60S0JsAZ282jNeyj233f/dSD0ly42k/LwG0oT7+hv5Y3BffPg8g0NFercEL3ZYmsHQwLoS/OM7n7TS7/1LXB20VWJHJHsyQdzeD0lSDZP/PGFC2R5Gr3Wf9k7+zr9YBnyZQIl0KewmpFDCJaineF3mqu2glmAkd4FILJfYvwWp1b7qUVr8hRzSvPl+IY5Zkbmdv5cc+dMOS0L8Tv7xJ/xaRS3TUV8NwCAfabPQRbQSYiiQ== 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=JbSo7E05B0m+0Yb06ug4t7bSjTRaJJM5NcsY8G8RKIc=; b=JugSg2TtQAkxwEBgzjaxoj4IiOTFdS/UcbspQF3AtELsl1O6aOJw4NtPc31MI6Id5I44RHIVHYteZFi6MAvAeL3lOGMwIyxLC0UtSaeCgMcN9kRrJNGVBlTztBlwnO1r8V7ScSRi+SP2Ee65g1e4WicMsj0nQH2AgF8yOUa2CXAlqxl3XipkjKHPEoc4hx6xWfSUXXqjOJEsF7rYMkOmR7GmlA1PYbmvEv1rGtbgCr9coUSLMKZYXfj+LhJDNKcJ4Y3ygC1tI4v+u1y2DyFpc4eZPB7R3PZlzO6OqT6swL2dwpbn3WFp8QD75KQxwa/5ynY9om7eZpAcS6JDneNkdg== 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=JbSo7E05B0m+0Yb06ug4t7bSjTRaJJM5NcsY8G8RKIc=; b=jYA9IvCxZ61yVF4I7b+f1GJlN7306xRgXnjSiNGrYe4+0R+zu27rXpKr6RVDhJm8b9N8xSGpI6XZbHi18b6Agm56ty+KBv9KnEWei3Ancaev/es5gv/dp4o/FKHhLeL92xBZn4FA273j7qbMUY45ztFTHRQhhc8nBrMuKosQOfo= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:15:54 +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:15:54 +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 06/31] staging: wfx: drop multicast filtering Date: Mon, 7 Sep 2020 12:14:56 +0200 Message-Id: <20200907101521.66082-7-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:15:52 +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: 693df96d-75a4-4c19-bce5-08d8531700f8 X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G4ojmWwmCCzm1FuQkAdlg+ts0damzphARkM9OewmEKOX0aBTjNaRDYY6F5484uipQZR8pGaOhGVnvp8itGD7BE4WnYj7lMQdNatBXnuYuzs2j1pAeYfzbg05AZr/LH0bEYLNzR/F060ssG19ZP1dlZqECv88EUMs9GTrLlilqE4FKMs7803LYpw/aEQpChHjtcz7066a4TJlnIc5462nbs6PaTOG24JzL+5Hv76pWWlu8uVRzbbaEB3eS3rh3pIOP/NhNqa1mR3QKyanRQPl9jiH3eW9r0ZHxXDvKLY1wna3EBUPhMCYrdvgRDhjjSpeJ4AenGDHPHGkg1lXM5143Q== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(66574015)(83380400001)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Cnmzb952X4xxRwl5iaHHf6BQkQqIMIDcaD0Z5m+pdXSRepiH3bCi0r9PfPajkFEXUe+M88CAVjBeQG8a9yowFb4TUev2RNLOhbZD23sQ7sV1wv/3efGYLL8aTaX8vDljoNNMMlxEJpK//P7t5CShePk71sy++s9CIY+a2L+yPnPjSEuiLl5xTzJGJJdqWCYeKorEQs5vnX6S37rRHDq+uW35Yecg0Zl6o5ttxBFfPtk9tOw93x/C+eqgRkyfEBJbcYm8jnOQhQDEkXH12Zi8jp7o3dxPfJo5XfpUG277eX7cLZtlzcaS1nnHsfw1K5/7GojIi3DfFrnWjw7kAQS6D6eC5XDTqzOaOsire3okwo7124nIevloWTicwKMMaCJYl8ZfwjE5pd34tfElsUq/+zBts6ALfm4Imje7HAUtyLuMFMhcj2hqgtPElYZiee2QJYykgU4d8sLqlmFntz48N4KQHnWmgbAy1cxYpApDFtHMk23kWCwPb1iJ7h8wELXXyunpz+RFlVqph/S0fVTjtXFSxWlLqIgR5M2XULIJ/a3XTjIpNjerS7lZE5FrlyVrav+uS8lZHGz95x+aMhMjLNiyRarI0Gx6/ldHfajly4/xXkWj3p8/XBVJgyfrgYm2PHBcDCPUEp3oiBL52NSoiA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 693df96d-75a4-4c19-bce5-08d8531700f8 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:15:54.0358 (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: pXGaHLHkFUbcqqIQ7dCdOQ09xsWfhKjn8WT2f2rg//EkajT2WOwkuUBQTD22cRGr1csw/YviouFKi8gIpkp/Dg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The device allows to filter multicast frames. The driver has the necessary code to take advantage of this feature. However, some bugs has been reported on this feature. So, it was temporary disabled. Finally, the things work well as-is for more than one year now. So there is no plan to enable this feature in near future. Since we dislike to maintain dead code, drop it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_mib.h | 36 ------------------- drivers/staging/wfx/hif_tx_mib.c | 40 --------------------- drivers/staging/wfx/hif_tx_mib.h | 6 ---- drivers/staging/wfx/main.c | 1 - drivers/staging/wfx/sta.c | 59 ++----------------------------- drivers/staging/wfx/sta.h | 2 -- drivers/staging/wfx/wfx.h | 3 -- 7 files changed, 2 insertions(+), 145 deletions(-) diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h index 6f1434795fa8..d0e0a9e29afa 100644 --- a/drivers/staging/wfx/hif_api_mib.h +++ b/drivers/staging/wfx/hif_api_mib.h @@ -82,42 +82,6 @@ struct hif_mib_gl_set_multi_msg { u8 reserved2[3]; } __packed; -enum hif_mac_addr_type { - HIF_MAC_ADDR_A1 = 0x0, - HIF_MAC_ADDR_A2 = 0x1, - HIF_MAC_ADDR_A3 = 0x2 -}; - -struct hif_mib_mac_addr_data_frame_condition { - u8 condition_idx; - u8 address_type; - u8 mac_address[ETH_ALEN]; -} __packed; - -#define HIF_FILTER_UNICAST 0x1 -#define HIF_FILTER_MULTICAST 0x2 -#define HIF_FILTER_BROADCAST 0x4 - -struct hif_mib_uc_mc_bc_data_frame_condition { - u8 condition_idx; - u8 allowed_frames; - u8 reserved[2]; -} __packed; - -struct hif_mib_config_data_filter { - u8 filter_idx; - u8 enable; - u8 reserved1[2]; - u8 eth_type_cond; - u8 port_cond; - u8 magic_cond; - u8 mac_cond; - u8 ipv4_cond; - u8 ipv6_cond; - u8 uc_mc_bc_cond; - u8 reserved2; -} __packed; - struct hif_mib_set_data_filtering { u8 invert_matching:1; u8 reserved1:7; diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c index 3b20b7486f08..7f24e9f77c22 100644 --- a/drivers/staging/wfx/hif_tx_mib.c +++ b/drivers/staging/wfx/hif_tx_mib.c @@ -228,46 +228,6 @@ int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, return ret; } -int hif_set_mac_addr_condition(struct wfx_vif *wvif, - int idx, const u8 *mac_addr) -{ - struct hif_mib_mac_addr_data_frame_condition val = { - .condition_idx = idx, - .address_type = HIF_MAC_ADDR_A1, - }; - - ether_addr_copy(val.mac_address, mac_addr); - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_MAC_ADDR_DATAFRAME_CONDITION, - &val, sizeof(val)); -} - -int hif_set_uc_mc_bc_condition(struct wfx_vif *wvif, int idx, u8 allowed_frames) -{ - struct hif_mib_uc_mc_bc_data_frame_condition val = { - .condition_idx = idx, - .allowed_frames = allowed_frames, - }; - - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_UC_MC_BC_DATAFRAME_CONDITION, - &val, sizeof(val)); -} - -int hif_set_config_data_filter(struct wfx_vif *wvif, bool enable, int idx, - int mac_filters, int frames_types_filters) -{ - struct hif_mib_config_data_filter val = { - .enable = enable, - .filter_idx = idx, - .mac_cond = mac_filters, - .uc_mc_bc_cond = frames_types_filters, - }; - - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_CONFIG_DATA_FILTER, &val, sizeof(val)); -} - int hif_set_data_filtering(struct wfx_vif *wvif, bool enable, bool invert) { struct hif_mib_set_data_filtering val = { diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h index 1a6f4221bdeb..d4cac63164ba 100644 --- a/drivers/staging/wfx/hif_tx_mib.h +++ b/drivers/staging/wfx/hif_tx_mib.h @@ -37,12 +37,6 @@ int hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, bool greenfield, bool short_preamble); int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, int policy_index, u8 *rates); -int hif_set_mac_addr_condition(struct wfx_vif *wvif, - int idx, const u8 *mac_addr); -int hif_set_uc_mc_bc_condition(struct wfx_vif *wvif, - int idx, u8 allowed_frames); -int hif_set_config_data_filter(struct wfx_vif *wvif, bool enable, int idx, - int mac_filters, int frames_types_filters); int hif_set_data_filtering(struct wfx_vif *wvif, bool enable, bool invert); int hif_keep_alive_period(struct wfx_vif *wvif, int period); int hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr); diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 2af4914e905c..1017a2290f08 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -142,7 +142,6 @@ static const struct ieee80211_ops wfx_ops = { .set_rts_threshold = wfx_set_rts_threshold, .set_default_unicast_key = wfx_set_default_unicast_key, .bss_info_changed = wfx_bss_info_changed, - .prepare_multicast = wfx_prepare_multicast, .configure_filter = wfx_configure_filter, .ampdu_action = wfx_ampdu_action, .flush = wfx_flush, diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index feebb7c3bdfe..8700d2fc6a77 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -91,59 +91,12 @@ static void wfx_filter_beacon(struct wfx_vif *wvif, bool filter_beacon) } } -static void wfx_filter_mcast(struct wfx_vif *wvif, bool filter_mcast) -{ - int i; - - // Temporary workaround for filters - hif_set_data_filtering(wvif, false, true); - return; - - if (!filter_mcast) { - hif_set_data_filtering(wvif, false, true); - return; - } - for (i = 0; i < wvif->filter_mcast_count; i++) - hif_set_mac_addr_condition(wvif, i, wvif->filter_mcast_addr[i]); - hif_set_uc_mc_bc_condition(wvif, 0, - HIF_FILTER_UNICAST | HIF_FILTER_BROADCAST); - hif_set_config_data_filter(wvif, true, 0, BIT(1), - BIT(wvif->filter_mcast_count) - 1); - hif_set_data_filtering(wvif, true, true); -} - -u64 wfx_prepare_multicast(struct ieee80211_hw *hw, - struct netdev_hw_addr_list *mc_list) -{ - int i; - struct netdev_hw_addr *ha; - struct wfx_vif *wvif = NULL; - struct wfx_dev *wdev = hw->priv; - int count = netdev_hw_addr_list_count(mc_list); - - while ((wvif = wvif_iterate(wdev, wvif)) != NULL) { - if (count > ARRAY_SIZE(wvif->filter_mcast_addr)) { - wvif->filter_mcast_count = 0; - continue; - } - wvif->filter_mcast_count = count; - - i = 0; - netdev_hw_addr_list_for_each(ha, mc_list) { - ether_addr_copy(wvif->filter_mcast_addr[i], ha->addr); - i++; - } - } - - return 0; -} - void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, unsigned int *total_flags, u64 unused) { struct wfx_vif *wvif = NULL; struct wfx_dev *wdev = hw->priv; - bool filter_bssid, filter_prbreq, filter_beacon, filter_mcast; + bool filter_bssid, filter_prbreq, filter_beacon; // Notes: // - Probe responses (FIF_BCN_PRBRESP_PROMISC) are never filtered @@ -167,15 +120,7 @@ void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, filter_beacon = true; wfx_filter_beacon(wvif, filter_beacon); - if (*total_flags & FIF_ALLMULTI) { - filter_mcast = false; - } else if (!wvif->filter_mcast_count) { - dev_dbg(wdev->dev, "disabling unconfigured multicast filter"); - filter_mcast = false; - } else { - filter_mcast = true; - } - wfx_filter_mcast(wvif, filter_mcast); + hif_set_data_filtering(wvif, false, true); if (*total_flags & FIF_OTHER_BSS) filter_bssid = false; diff --git a/drivers/staging/wfx/sta.h b/drivers/staging/wfx/sta.h index 6b15a64ac9e2..610cfb0fcd02 100644 --- a/drivers/staging/wfx/sta.h +++ b/drivers/staging/wfx/sta.h @@ -25,8 +25,6 @@ int wfx_config(struct ieee80211_hw *hw, u32 changed); int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value); void wfx_set_default_unicast_key(struct ieee80211_hw *hw, struct ieee80211_vif *vif, int idx); -u64 wfx_prepare_multicast(struct ieee80211_hw *hw, - struct netdev_hw_addr_list *mc_list); void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, unsigned int *total_flags, u64 unused); diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 241eaaf71f5e..56fbfab05651 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -79,9 +79,6 @@ struct wfx_vif { struct work_struct update_tim_work; - int filter_mcast_count; - u8 filter_mcast_addr[8][ETH_ALEN]; - unsigned long uapsd_mask; /* avoid some operations in parallel with scan */ From patchwork Mon Sep 7 10:14:57 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: 11760509 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 A44D059D for ; Mon, 7 Sep 2020 10:32:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 827882067C for ; Mon, 7 Sep 2020 10:32:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="VWkF5Ci0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728949AbgIGKcI (ORCPT ); Mon, 7 Sep 2020 06:32:08 -0400 Received: from mail-dm6nam11on2053.outbound.protection.outlook.com ([40.107.223.53]:35584 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728627AbgIGKQN (ORCPT ); Mon, 7 Sep 2020 06:16:13 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QalXUgkeheFY/kKy7NhlpbsVIv1T9wwcrWsrQ3JKvj+0iPoVgyjobt2ClMG2xC15SjagXnaInMrPrs4Wrplp+xwFe45D8MGkw4kkuIeZgjFAUcIHbBrNQNhPl4iEPNJDE88p7UXaxusgnGpkfXO1UlFMj6UAiSnN9jrmTJqnEGGMfhaUmQXMHJHEuqPx7N1fnNWOS065fGNDmc0mMR0sIfSSgP6vg1Ffi31eWoJRUc6A4oY7KwXFNYyUvoUAIETrX/D3kQ5XVGr3RxxdkO0YYljDN8ttz3ftFjEimosCytmkkolkcBKeneW/oESxpXd4RU2FUKgPVuIXcGWDFoiW1Q== 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=ivdj5JFN/2y+dp5HHokI+ALLktiWtShEARWHGyHRUJE=; b=cdx8SilGU6f99uLhgwHLIOGGwDVheVRK1KXSoHZiJcXvptM9Pprj2FWUl3rg6vxXnQONi5qX3/Fu27LFPb/8DgGk3yBpOSj7HlqP7n5VqyddBOctewl7uYcwL0P4Z2V5BnlLMjAZPNnK7u53Gw7biPen3ojpPtosyivL6iATnVfXDqdfeZeg3kVU0gSYc4Lk2vJ05IRi5cXqINrviWgAiSXEbkBepvRpjLWdkLzr26/Jaiy24A54x7wXv5Xm15L/zGrHEBxB+KCx9GvJt3CiUU8Cs1DGFvMQZtJ7PLRu4qwmvz1ITy382VEVbyTmfEXg8cjKY7u8TQRC29ZKaRvlHA== 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=ivdj5JFN/2y+dp5HHokI+ALLktiWtShEARWHGyHRUJE=; b=VWkF5Ci0Ct+nxa4bIzRPQoFJQid+HgMOGqvoOUFy5MziFW55RkU9qcA5yHheekwIw27yyQH+ivid9Z/1vuVU+oIztPaPD0XuH/d7hR/xDZvdMh7KVZO2UEtYi+3eoCGdRz/b3GSxTM9aoZ383VGHf0kK7DkRPslpxpDpyTOq2no= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:15:55 +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:15:55 +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 07/31] staging: wfx: drop useless function Date: Mon, 7 Sep 2020 12:14:57 +0200 Message-Id: <20200907101521.66082-8-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:15:54 +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: 71b25936-36b4-44f4-995d-08d8531701f3 X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1850; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DnNwxLIBeKCmV/TqJWM5Y+MXlyC7gUaAkni9WZ5TUAMU/qrjLQkAa7rwV35UfTQD+0bwkInQ/SrV3S2nEuHVUqU/EpVr3i3CB+pEMYBcjiDDBXUARFgANs6HBRHsuagufpwYmMoO35NjRrD1kA4aOZVjmz4RaF7jyx4AcSRwY4BFneWNByxGKN+40b5xSVjzVaz7K6XTTUxGwR+iSEEMQ2IazhGYNAEJi+NmVUAQtvAIBfwBk1LgpRxdkzAADUjMTP64uPfpDCzP9IL/Ka3LwcK/dMRwKvvb9gOsRbwr5eUWsJCcIK3U/KZMsvKiHQhbr0Lzy54hjZeJJS+K4xbgMg== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(66574015)(83380400001)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Ow4cDwfewEE8RoCWJOdaaZlTquk6ygP6dBNl5t28OJPQA66CmzfSfUsMptBgV8dCOiJ3Gvp9M/+q18s1lNoHB5/9ogcRUjXf3ZZ9JnHuGQdFWuvCtw6XPQwvTeiN0gYC/SOF1kiTpbrjj/oPuKpVWgh2AClRJJg2W79gq7MO6awX2/pQL6a4/s73FNtUKE1L5DLRGuDNe6fm8X0SaGJSOmRvKw34QId1Dwn48NBly2y2jHMEqguM/4rSEhQwNtelOG6hZ6feC/ZNYrUsnLUZh/18UaSsRUuejsa6DHc+mHv/Cyb7w8TYWLSZ2MslQN0GTO4CsML4msiD22YrsUfRjIc2ENJnI3Zxsl0dIx/Lv9+nyDNqGaSoQDPFlwoN/8Dv+H1wEVXwY6spoleQ+XkNKe1BuOm7wTdc56md4WL6GBK3EOGcYIUroaonAWhup/DG52H/8Ss71ckTZDet5trA7xh4XS+WLVF+aKwb9qd0weD8YLLwj0F7qR7T2myW6z/ux0ARmmRNbw2+H4vVZf/fBgSIIjF0CAl9DVAI03+4FddamRtLyhEdJGOl7D6swaiRq7pgco/+CsEZuRP9595PsIjfKF1nI91kjtzRhQk/VdLktC5hj+EXGa2DUaiUsAEvZByKA/6AyIf0RdulFQB+SA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 71b25936-36b4-44f4-995d-08d8531701f3 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:15:55.6699 (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: S4NQiWqLdTPn06hn01UOHMe7u86Nbo1e95244ONwwOh0Tfcoov5rE4eJhyfXfOsZAd0YPtVBUcj418gf8K/Eng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Since the code for multicast filtering has been dropped, the function hif_set_data_filtering() is only called to disable multicast filtering. In fact, the multicast filtering is already disabled by default. So, this function is useless and can be dropped. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_mib.h | 8 -------- drivers/staging/wfx/hif_tx_mib.c | 11 ----------- drivers/staging/wfx/hif_tx_mib.h | 1 - drivers/staging/wfx/sta.c | 2 -- 4 files changed, 22 deletions(-) diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h index d0e0a9e29afa..73873d29456d 100644 --- a/drivers/staging/wfx/hif_api_mib.h +++ b/drivers/staging/wfx/hif_api_mib.h @@ -82,14 +82,6 @@ struct hif_mib_gl_set_multi_msg { u8 reserved2[3]; } __packed; -struct hif_mib_set_data_filtering { - u8 invert_matching:1; - u8 reserved1:7; - u8 enable:1; - u8 reserved2:7; - u8 reserved3[2]; -} __packed; - enum hif_arp_ns_frame_treatment { HIF_ARP_NS_FILTERING_DISABLE = 0x0, HIF_ARP_NS_FILTERING_ENABLE = 0x1, diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c index 7f24e9f77c22..2eb2a20890c7 100644 --- a/drivers/staging/wfx/hif_tx_mib.c +++ b/drivers/staging/wfx/hif_tx_mib.c @@ -228,17 +228,6 @@ int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, return ret; } -int hif_set_data_filtering(struct wfx_vif *wvif, bool enable, bool invert) -{ - struct hif_mib_set_data_filtering val = { - .enable = enable, - .invert_matching = invert, - }; - - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_SET_DATA_FILTERING, &val, sizeof(val)); -} - int hif_keep_alive_period(struct wfx_vif *wvif, int period) { struct hif_mib_keep_alive_period arg = { diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h index d4cac63164ba..6c25015173cd 100644 --- a/drivers/staging/wfx/hif_tx_mib.h +++ b/drivers/staging/wfx/hif_tx_mib.h @@ -37,7 +37,6 @@ int hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, bool greenfield, bool short_preamble); int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, int policy_index, u8 *rates); -int hif_set_data_filtering(struct wfx_vif *wvif, bool enable, bool invert); int hif_keep_alive_period(struct wfx_vif *wvif, int period); int hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr); int hif_use_multi_tx_conf(struct wfx_dev *wdev, bool enable); diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 8700d2fc6a77..0d27ca27e48c 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -120,8 +120,6 @@ void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, filter_beacon = true; wfx_filter_beacon(wvif, filter_beacon); - hif_set_data_filtering(wvif, false, true); - if (*total_flags & FIF_OTHER_BSS) filter_bssid = false; else From patchwork Mon Sep 7 10:14:58 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: 11760407 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 CB00113B1 for ; Mon, 7 Sep 2020 10:16:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC356207C3 for ; Mon, 7 Sep 2020 10:16:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="QPXePh2C" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728712AbgIGKQS (ORCPT ); Mon, 7 Sep 2020 06:16:18 -0400 Received: from mail-eopbgr770081.outbound.protection.outlook.com ([40.107.77.81]:21675 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728666AbgIGKQO (ORCPT ); Mon, 7 Sep 2020 06:16:14 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d1SFneJEMGqgE6KaHLOS0lOL9gZ4IKCYbb6VOxRM+6dubV87zoUH0WY4XJ6gnUz0/BPuOw3nGgt8y61trq7jF6Gukt8VwLiAkqRrIrURCzpnW8Im6aLpIouIWw9szQPd6Ffpmcqz/DRtrFyt1BSzLDwen5zsCgNPzW/OKqaxe8tL83C+/TV5Yqk87+zUpbDQXleQlGuDnKhpAGf68SezR15gKOrJVe8vnacwJlc1xaP9u0sch6077k9sWJBy/XyHZkWbpa57EnJhNMlSe+gODC7/qyXipnSqQTlVhjDHUoLIZLSOAqKaNMigV+fYSJXpwEgb5N7fpqaYqIfKJRMm5w== 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=4VvguwPKLn6fVkPke1B0DYGcov0Q3iXOmizoo2hE+DA=; b=ILFBUyQ/bmGvaqv7BVrZkt9R2RMVkil9dYDOynSvLAbtvkd7AA/DDunmbP3s82IXmPxPdFHJ+7b86piUmddCqzKVNnj+A1mlVo8swutuEg0i58yKc2BVSCYbXKmJlx/gBxA7fxG/188gxKWKfHHTxiyCGGlWS7ZZP1XNE5P595KLskT3NKZ0JINRnAgkqLYvGjABQWFaXc89TfDdKC39LzS1l4TrkJ+o8ayCNnojeFE4LGyTC8FtFBDtieiKwT6jvv7eveSld53SYv3NrzgpYCaJ+BSfo6QuyjFQKO83KxX/1jgM9dQJl/StswvujJwOoH/1f98C2l8ZWNh+v4z87Q== 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=4VvguwPKLn6fVkPke1B0DYGcov0Q3iXOmizoo2hE+DA=; b=QPXePh2CkTw6t4ia8Q6vUkQcQE/4Y0LngLbC/t3nEB+TBAzFTqz34ViW5zj08sd37eT2lo2oLbU7Qa+Eqiw2dxuTyLaC4O4lqYuuagwBaFQZQ5skjqhErgAsEnJOt6b6KkosSShNvvDOKnid86NyslhZ2mBoDicPmu5pya3Ngt8= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:15:57 +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:15:57 +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 08/31] staging: wfx: drop useless enum hif_beacon Date: Mon, 7 Sep 2020 12:14:58 +0200 Message-Id: <20200907101521.66082-9-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:15:55 +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: 86562a5d-e933-4a69-09b6-08d8531702ea X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:106; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: V1BnfImTKkIwO/WCAbzqa55GKkFuuk1zsZxBrlZrdgHAPf4WOuyUW0Q1tANRDYSJC1tob+DmrxY4zuWFvLTv1Lg9q6DRnV6QLyZuT9Slp1o6P3h4ikNMeLDNupZ8OOe5FEihyrNN9ykQGdytt1pF/QIbJ5N0NRn4WEFVYZHwrcnPP0DA3Ir6OPfwIYyIzm4m003z9iMv2Z5VasHa/SSB7dM1tfgxIGCqHlDkg8FISyxBs2PXb+NflGIv27rW3VtYPeEGSgIwfaJyTRznAnl8QkoX5nLvYXEbA/aZ8UNG07amnw1NnK5UMcdJSHJWfZXePRvt6X+lpjI4j8ELJZzbsQ== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(4744005)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(83380400001)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: O656KAGfD0+/5CCB+dRnN+Gu+rA4VGNC+diD2wHYwt9sw6yXWXSJJQGmC3FRWNr/bNnJy6pKffw+jEUU3u12K56QsDSavrRs6iViMXSXDF2qYpy32l7mH8VM+J5zpgaQ8OpAIhB8tbWVb+ItMkNLHDdAABsg4nfu4v71nZQbuxz/o5JVqj0x/wc7lby+xJK0ekXjW2GDT2cUUbbzVCCY1MmYdPFa+3a19GWS8cdiYjrDAtwKyVLoWhumvI/qxmonDQyeomB5MSfI6SRGhKQZThMr9iNL2X2/vcLarrlO9t5iEcCCeigiVUEiGE/iG2H3ofm3LAEkBQ+dcj5y1RMapNABJtS8nsruVsh4A0/h3Ro5CtEDtD25IpUVHERxTrmDQyTadtJ5JmWX0ylqs5Lhexz8a422EDHOfOPgxkW01wf9NpQDzFSUc0bAwEQamW0teMBKi+Wa3p1xc5UAMpu1SPNbenio6v5uYZDBrbHIRPP5vjBpyv75r5idhMfs0XCYwwxkZUUz3z2zIOPwDfserb5T2zB1YfVpWvdPomwvvV/hZlu1bbSpaCsWbEG2hUaRSPD1IJ2JX1PNsxTsaSMYjB1W9UwK2C4VTLXFLO8TKTQgDVRapCVQysTz/+vfgZ1fXRbtxfEHAjcyq/MOqtsLXQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 86562a5d-e933-4a69-09b6-08d8531702ea 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:15:57.4248 (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: BllQWofmIhTvMY0si1CnhFSspQsSDEL7zbF+3yIF4ewztOEsrsMzfH0qMrJ0k//sFEEO2riP0nHftJ/iibb/tg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Enum hif_beacon is not used. Moreover, it is just another definition of a boolean. Absolutely useless. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 21cde19cff75..75e8c2a7fdf9 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -440,11 +440,6 @@ struct hif_cnf_start { __le32 status; } __packed; -enum hif_beacon { - HIF_BEACON_STOP = 0x0, - HIF_BEACON_START = 0x1 -}; - struct hif_req_beacon_transmit { u8 enable_beaconing; u8 reserved[3]; From patchwork Mon Sep 7 10:14:59 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: 11760507 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 D3BC213B1 for ; Mon, 7 Sep 2020 10:32:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B65BC2067C for ; Mon, 7 Sep 2020 10:32:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="BIX352u7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728841AbgIGKb5 (ORCPT ); Mon, 7 Sep 2020 06:31:57 -0400 Received: from mail-eopbgr770058.outbound.protection.outlook.com ([40.107.77.58]:18596 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728672AbgIGKQO (ORCPT ); Mon, 7 Sep 2020 06:16:14 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jXWiNeCl8b527bbRTVrZVoJmfl2Nm4H5SW+VhhHCTqLjvBkXEQV+j4g9pohq/SW04h1NqA1zt65+kDDKFMFRa4/t2Gs4ebzM9/fiw9T6Fb8sTxwllFutjqSs+VH3dm82/YnhRgfnqVJg4LRBu068zHa0aXbUgXO6ruzx9d7JTNeZsm8TvogZhFU843M58xYwXwL2bZHvwv41M1Uc4V3H02lvSz07xCPqZHIWHWlhPOkEdeN9NrgqWoE4OG7OJty6Z5WqZXxxdMriGS6eGrii/DOcAzFMAvjzguCZPjE2p+/TRpEdEjOg/cFBatw9X8BDAOzkL/31rY2ZFqTmO7LuqA== 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=Zq8ya5wHIwkpQIly5Lrv5/t7dlnJkuTFSda/nJRjc2k=; b=a7CN1JggqI0b7zKKuum7cf3nJyifn+4wJ44B9b9kXqD/U0n2qhSsXhpDAEjm6WDFrW0aNX1G/UzPMHZ5MtwEtw5mo+7Ei+nHP7kQaDc2Cbjt2ei/0BAkeLjkZs+76HLqVYGbqcpGEYft7mpTCjb4RmqLRBd3KmGgKXwAMoOVLqkyymGt/ECiRNS4J5M8YRf6rcFMKhtDluc1Z2REqaXyq5tOocn2qARijCgOZ6OYHW/xuWXfO6l26ygkO01WFsHUXysayark2JRdRPGr8++TBDrTbseecg3q6EK+2ZsJ75SjWN8NUuGeK1laIeKD1mLDn9GLgUZQ3ZTsJ7Fx9hpYMA== 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=Zq8ya5wHIwkpQIly5Lrv5/t7dlnJkuTFSda/nJRjc2k=; b=BIX352u7++eExV5V7QSkWVEeA5qKKlpiIm4TOC7kadHtAfsC2P9z7mSeghZ7MM4+79DcZj1rplDKMT/L8AYlK7Ml3VZ2Jn7YvtxHkOzd1ovoYP85+ggKKc9NLMFfVw//ITDWUli+ZSK18JXWn18YKqXx9lJm7yHoFfGl/6wMxWI= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:15:59 +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:15:59 +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 09/31] staging: wfx: drop useless union hif_commands_ids Date: Mon, 7 Sep 2020 12:14:59 +0200 Message-Id: <20200907101521.66082-10-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:15:57 +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: 78e265d2-dea5-48a6-8de4-08d8531703fa X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:296; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AzTHSIAnnXAgrUiGu3x7XRgThcWhPgXXmd0bqNT6pza+v7+y7Nxf+7q2uEp9/fF94SriXbQpxztqW5amoKcTYokc5mKxQzh4k6lmrErJ3vCN7bcEDncNVmU9AWym2chTRq/28l5iMi3jJBkBaqNAoph0c12lsYwni51OrTJDuE5hFAt6xUvKbk0oRz7NhS49z6PetbcM9puEGQgf29OaaYlvjm04X4vB/Xv5jEUPx+6QHTe6SHlSwTqa/PIZJmp+ExhDtkY5al3sKbSOFUDqjUiYsaofb1xaFC2cpBpLLSrCTNIOdwPj+KjJxN4C+3l1orNJr7mFGeR34PPQt1OOFw== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(4744005)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(66574015)(83380400001)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 6kbuX+dtOlBWfusOZKN77qkZT77x9Lfvui/el+GB3EFdyHIjN/DdKqd/ngGyK1S5EwUOB1Kp4to+hzQGz2KYPZufnBojUmznpcjrNG+Eh7xvU3EjSH0er15lafkyeSkHjDVxzx22qRUvfzhiDS6ZxtkPtn+LhFqjSjfoOg4xxdLasImTzAWo5B2giTT6SLCyoegJfUO7OOmRgAJ3n2siPmDkpAOdlUHnsEn03NgRJpBt2ExOjc8pXbaQsLS8H8mJCYp149Y2RIbCjQHP6YHCTAN+kILtxEuairkkr5xe0FAp11Kq9TqLg5u5a+fg4S0xuNzfuml6qZixUuWaGE2HFMeYYhz4g4hNvo4lECJJO3Baqw6zImVwf8urNE4kC987Ug6LiBwJ0QEoLy00ONwpxK8EhNT3p4Y8PYtxe/I4zD2VB0p5W6RTKm/oWqd4WqixRdpIHlyOwgMcEpApsCVgsMLXYsEp/4QFWF2oYdSc5zaxFrBarIEXgQ2HUD1mf6bD6Hzzm+fMaGi26RG9q8404Q5JqKHPTCbYHrln/nIRVtRL90C5Hvwbiv7v/O/Zq+Er2Q3pS5GJILF3J/JVuPET1Ycw3clJruLONdozwar+ynJGcYrCR0PEtNCsZ/W1mVn6337HKiYjieEi6vWsTBzFOA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78e265d2-dea5-48a6-8de4-08d8531703fa 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:15:59.2118 (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: BO8JKs7JaibsZJlEtfRavbQGCwiMPf3F9bveIVAWF6S9SBJ70/iqqnGlq3teUre0nvVcVGFf2CLeJlP93jhrqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Union hif_commands_ids is unused. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 75e8c2a7fdf9..c132d8e43b50 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -60,12 +60,6 @@ enum hif_indications_ids { HIF_IND_ID_EVENT = 0x85 }; -union hif_commands_ids { - enum hif_requests_ids request; - enum hif_confirmations_ids confirmation; - enum hif_indications_ids indication; -}; - struct hif_reset_flags { u8 reset_stat:1; u8 reset_all_int:1; From patchwork Mon Sep 7 10:15:00 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: 11760481 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 4550D746 for ; Mon, 7 Sep 2020 10:27:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2334021473 for ; Mon, 7 Sep 2020 10:27:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="F32IuuHc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728836AbgIGK1U (ORCPT ); Mon, 7 Sep 2020 06:27:20 -0400 Received: from mail-dm6nam11on2053.outbound.protection.outlook.com ([40.107.223.53]:35584 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728692AbgIGKQS (ORCPT ); Mon, 7 Sep 2020 06:16:18 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cog0jtYXG5TjvXB33yqr7/r8D6X1V3zwCJuJNEpG9BGvOGCUyG62fQd3X1IWXpZ7fRTefD7GUQeVsSb1EaxS6pFRsWBEa2ktB9/fWuO9dpugmotFBn0vBXV5sIEZ7OjzyHvWy6ZmqHKx0JmFQKpn2IdmFKv6/T0KF1ecV597bU2iXWnt1sL7qIRosG55MYO7xkYAXfjaUEfoBpN8hN2A8ojLqFNvIgvRYpsZ/yu1qAMyM74mUb9Trjw/LpLYX57snxgSFEyAv+kLHNefBbVT1uEo5SD163CkAFJ6g20Q1oZdw6ShYi31W4XtVY0dQbMYKg7z4LNtP4yFgJwFtJyVRg== 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=ilR0rgjekR2aMgOmeXO+36DoF+KIVq0pSubOrxlKjvo=; b=cBWlxjsaDEKxvtjM4/nuNaJ6QtF2moY0IGN/CPp5Fd8dFfaTzkTyCWcHYIV82Qw1HDTEmujpm55jgW69WQ2Uxo9RgMvhYbpb4CDr8o2vaBUNyclMHSeHBhwbqBjMpA5Gmw7DVYN/lSIjKD7HL+/4UKH3Gb/FLwoYXeB0LS5iwtLNwrkdfF8lCCQsg+tBvmFrhArU5nLEFkfOnD9EkRrRUbcZWkvmQzqKY+sOhwjPu50RQe3nYlb7haFb7zPGoqrbJYFpVBBVfPUGhtC/6OxaDTKFTxfqwS2HcjvfVElv9fi8kBu3ajVvxMgB1z8cbFH90FBzf6oh18ZjXtScfei76Q== 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=ilR0rgjekR2aMgOmeXO+36DoF+KIVq0pSubOrxlKjvo=; b=F32IuuHcgzsApz6jQEqT2yD6YL2M1DnXdXLmZzhm0IfMXir2QyvdN9Gx7evBGGnRfxj6lt1i7sfs7YQZ7WnCeC3SS0NEX2DU00J/Bq9mxFmAXOSRfVWsksiDNw8c5KVwZTWgWGRxZgHiICSe80OEjI2/v202RAkPDgldGMFmcCc= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:16:01 +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:01 +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 10/31] staging: wfx: drop useless struct hif_reset_flags Date: Mon, 7 Sep 2020 12:15:00 +0200 Message-Id: <20200907101521.66082-11-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:15:59 +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: e1e467c4-8bf0-44c8-8ba6-08d853170509 X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:826; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aYZY1SIevERO27B0nn47J3y4bG3WmcA8tahIF6hWRl48eC9nQew9tN9SZns8+L0q67BPWoqIfPH9l+ZuXn5adqhNfCHunCwxYqjPQR27UvpKoGlyD4YH8tJlRWlk+ROeaENhAV5VWPAwJtmYRF8i8xjMYm5jLmynZk73GxDjV2CuoJycY+0UIPbS8jt1pY0397FD3Qa131rve5faM7zjqDOAkJ+5myhdegUotKVXb3kmet7sEEZyu0Z6k2kOruVzcszzyFG9rAy1V3oDTNnz+FRu6L2Fimzlw58sIOo17xGs2FCn0ioHz5Pz1ywKKvntKg+uQ3YoYZmkG3BiQ0kbHw== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(6666004)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(66574015)(83380400001)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: fCOTDfmhWpfEupMM5DCZw+xfnYbb/oFP2dsUSRa8vjBH2j/cKhblk6dQiNbuof42LVzpWJIohMVPx2GyzfFIeQEeTgMXeOhJJ5dtIizJZ7BCpkTZjpLRqBSgvRjC04lCjcQuh1rL7qo9Ih/Ibz7whXGd35/Ex+GUT2bNsbHCZUb32B1Fm2GhbQ2pSlkF1cs7bcTd+Z+pXJ36Ips9nYMEDETF1dwonxDQRkQ+WpzFET+g0GaDwe4YWJfvy5IKsddzYpqoMkYPH5YK1SH70bI8f9YFaaUcBdIkILt3E+OiUa+uKZcNJSa+u+zzh88/XGiVP0M+6i1osDI4VRe9v46HwsggcwGE+wtzQ4uR9CEIKeZtWDviLpN2u8/rees6hq6Rb+NhNia/TT7lRfliMxn0ypwK5UlyroNk7Dqb6eACuHqq/X9Hkak0O7jcEYEWsvrz+w7bNA0mgp5LOgX7ILehzUdFA7DRLL/fgYDiWKeeDznqcAydo8LG8WPxxvt/IvGGtTAZzXRovxhy7ce81uPloDYHgRB9+tjtojcj/Lot9bjyK1o0y7xKCw5iPyht+QhsD/Y69aS7jRU4nRiDmyjQoV/TZCycLIZktqlbuEOWTx8w6ZwLYIcJpqYBZn1a4k8fwCDBBgbaSkrbpFrkeQzvpQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1e467c4-8bf0-44c8-8ba6-08d853170509 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:00.8539 (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: Uh412PLqwdh44d2ZitLIU1dMQNKSztAfmc67dbkk66L5XttNWG0DegncXNZVm5M5bxboN2I9oRNKcq9VcsXfpA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Struct hif_reset_flags has no reason to exist. Drop it and simplify access to struct hif_req_reset. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 6 +++--- drivers/staging/wfx/hif_tx.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index c132d8e43b50..3da736dbf52c 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -60,15 +60,15 @@ enum hif_indications_ids { HIF_IND_ID_EVENT = 0x85 }; -struct hif_reset_flags { +struct hif_req_reset { u8 reset_stat:1; u8 reset_all_int:1; u8 reserved1:6; u8 reserved2[3]; } __packed; -struct hif_req_reset { - struct hif_reset_flags reset_flags; +struct hif_cnf_reset { + __le32 status; } __packed; struct hif_req_read_mib { diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index f91b19ddf8e3..8736eb4d5f15 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -170,7 +170,7 @@ int hif_reset(struct wfx_vif *wvif, bool reset_stat) if (!hif) return -ENOMEM; - body->reset_flags.reset_stat = reset_stat; + body->reset_stat = reset_stat; wfx_fill_header(hif, wvif->id, HIF_REQ_ID_RESET, sizeof(*body)); ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false); kfree(hif); From patchwork Mon Sep 7 10:15:01 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: 11760479 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 233CE13B1 for ; Mon, 7 Sep 2020 10:27:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F404A21473 for ; Mon, 7 Sep 2020 10:27:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="jJ4P0e2x" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728913AbgIGK11 (ORCPT ); Mon, 7 Sep 2020 06:27:27 -0400 Received: from mail-eopbgr770081.outbound.protection.outlook.com ([40.107.77.81]:21675 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728704AbgIGKQR (ORCPT ); Mon, 7 Sep 2020 06:16:17 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aWwd23RDyRJp59GRletsDRKpqIZHnBfSv64T0wOV1ozQmMPHAcUuytfrC9eVjwn7SwH7qVvTvClaLMPY109kDLe3cWePoeN5crg9rtQwMoaQohP9Lp8f1wcXCYofULFa3bzGgHJJms+7WrMJ/U8xc84cG9T6o9oE+FHjqrEqqI/nLtt4SkDnPSTaK7sCzkZQMx9XyJQplxICB9k0NvvDo9HqaVw4VCzI+9LOhxNxsZVwm0cJvJCsnGYOpwnaavtlVXFrZiLpdHOX/kMApc7sx4zzBQIyy2ZbiTGq5hbEvjz4CnCN+xrdO5A0GOkCHwUXqMdzFviMzR9wzJ1oKtqh3g== 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=YqztAsbl4nfn21gkjpH4w2DK6L/ANObHzTWyuyTLncI=; b=AHRqEnAEKv/WwXstWLnQRTpzBhXByG8I/S5+duYuuLpBRT+8yEoNPUaMIrVyWWtaRkc+/vrN0QpuEzwRrAJ+XnE+cMSb5zHj3BiNmSyU+Y/wQXMhXIYXj0YhAWdpixXIPcWQNxInLOwRguMF9GbDUQbkRK4sMuHNN14BE3196BGCznChoEfhL3iVpYprp9baE1n6uQ1Ko8hsAf9BDRMfu6MyLslU6C+0vycpzQ2TFauSue2Cb4+1VJ+q+xLKtBtCyk8Oqoia60HTa5IyYkY2gcxBnsuazvdbWJF1y9t65FNqGDFXFP6meY7HBNYeDQY0do4h7fA41cH1wQY2/jIQjQ== 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=YqztAsbl4nfn21gkjpH4w2DK6L/ANObHzTWyuyTLncI=; b=jJ4P0e2xV/zEa1jfUGEqDKeGTjb6Xu6q9YrcYDz6G7fbD78mQyyRcH+ciJHrBVHy4aE2B6BtFIONOkKEovxck99nIgomRv2/qetkUDhq+ZgkJvB8kOU85qAP0KL+h0n2c/XmOi6ZSVx4ly3x/TPJnSgjtGapNCYAc6fzLzDWLHM= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:16:02 +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:02 +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 11/31] staging: wfx: drop useless struct hif_ie_flags Date: Mon, 7 Sep 2020 12:15:01 +0200 Message-Id: <20200907101521.66082-12-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:01 +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: 34189f51-5d9f-46df-5265-08d853170605 X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:826; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YhddmrIK2W2h8B68srIws20AbwPBEtK9MxKIXzfUXH7AMqYAnyS5aBrkUM1OOk6/0aBiX0GmJDc6gfySI5IObaeblANpSz4gADSSMk7oCMxkEGWlOYSvgqdXY/0YYCXpc8wjhuzhyfAIarwcImVevz26zj4linFCLnctS+OMzIK/TiNOYs9AqcQjRdHcGZyJGG3mnWzZFWI3eTuayp8kPDJmyoQL8gbibpXVUVpO72s/9tsBjv1GOvqxSnmu8QUXYyiDuDVYRbDRVj9iTwXMhv1u1L9CTjBLKgOFUex2DmDj5nyvSnWIgI2ppE5P0FzJi1iAz9TyBNa5ahRfHZwZrg== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(66574015)(83380400001)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: autAfulsZJ9ISOsEo+aHpnbTL/w/wTOZSNGQWcU+2Gj9QGncF3Q24gTg6zTDIc3i2b2txcgDBmsOVFs/kBnQEcb9mpOr6Z+bxUBm7glGoLb+yJf7wIZS89aD4T0czIYjlvOA0hSmFZ2ybwhz9kd52ze2wYsL3OhXIDaKHeyUS4greeKjXixC3szEwkCtrv1y3SopeCdDcA00aLCPoxZggsTFo4zWkUev8uTA4kiDcaf3COE0A37EtrLzrIw5wyW4ypLTwY3ndXLP7CFs7PDWHfy8EOU3M+G3AM1kZg/VxKcLbCveGHolMsmZUdmvO3Y4l7xxY5f6vIpnF/77kbYLFkkse64fhsafiQZ5pXzNWhctN2T+WvIV/cO+aZ4YgJlnUS0/TYUSuN6OpAetfxvad1esJ9PQIbvIFSV1Cg/ayi3zRVzv0wDEn6t6S4kQSmxzV7wz9ob28YQCZlZX092m8UQopaKIgU/koOKF++fBre1iLxWqijVNS9zLw2sYbAheDVPAPevM0SIw6EXI+yvbQJyxoR7O5J8NVg3fi+2jNHVEf8D7VbWyjazgi5KjftqKOVDVSPMjC+ays3VaPdDnBSaDs1pwBd1VgdpkuOFawpn/hvOtWB3LX5hTD8/dD7ZPZ+CE67iN7cT7sKnln4oC4w== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 34189f51-5d9f-46df-5265-08d853170605 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:02.4989 (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: 0yEfgOwSOVwx3Li+CpLmsu/VrNGwtRe98MqKSLdS4T7gwLhxSqzAWBC559KmfEmyH0v8aPwvJsffyCnmSPIzAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Struct hif_ie_flags has no reason to exist. Drop it and simplify access to struct hif_req_update_ie. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 14 +++++--------- drivers/staging/wfx/hif_tx.c | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 3da736dbf52c..b104abbc5b25 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -93,14 +93,6 @@ struct hif_cnf_write_mib { __le32 status; } __packed; -struct hif_ie_flags { - u8 beacon:1; - u8 probe_resp:1; - u8 probe_req:1; - u8 reserved1:5; - u8 reserved2; -} __packed; - struct hif_ie_tlv { u8 type; u8 length; @@ -108,7 +100,11 @@ struct hif_ie_tlv { } __packed; struct hif_req_update_ie { - struct hif_ie_flags ie_flags; + u8 beacon:1; + u8 probe_resp:1; + u8 probe_req:1; + u8 reserved1:5; + u8 reserved2; __le16 num_ies; struct hif_ie_tlv ie[]; } __packed; diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 8736eb4d5f15..49523e70af6c 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -520,7 +520,7 @@ int hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len) if (!hif) return -ENOMEM; - body->ie_flags.beacon = 1; + body->beacon = 1; body->num_ies = cpu_to_le16(1); memcpy(body->ie, ies, ies_len); wfx_fill_header(hif, wvif->id, HIF_REQ_ID_UPDATE_IE, buf_len); From patchwork Mon Sep 7 10:15:02 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: 11760485 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 2D02B746 for ; Mon, 7 Sep 2020 10:28:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B4F421531 for ; Mon, 7 Sep 2020 10:28:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="cR4f1bm6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728776AbgIGK2I (ORCPT ); Mon, 7 Sep 2020 06:28:08 -0400 Received: from mail-eopbgr770058.outbound.protection.outlook.com ([40.107.77.58]:18596 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728706AbgIGKQQ (ORCPT ); Mon, 7 Sep 2020 06:16:16 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hPsS2KZL0aGeG0uPYyKDn7S1XSxX71twJkRbmg1MKedMy0G44gmF/o9ftqshjYJed/f/OoYiwxIBhgVozPVCaqGh0676G66IiBC4ATpYpQvBsWKatmpozWIdF/veZMj/S4m8HRe6R9PSt3QCRA4z3VzWgzB29uayNxJE+oOfWc+PFTE2rKtIAjOhRst55P8SZsJp1bAfxl+8jNByOSwNvlF9Qm5Zmbw6PQsYkvG/tecuzRRVmyn38VD4eWtgEsOCYPybSNoHbAdnPTrEmPs7q2zxhL3glOvQ9CSCKkUGqPCfiP8MvvFWfyHD0sDge6N91sR2H8JFhVShcuN7LT9A3w== 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=KFPDdFefJRslQCCpL0dfvmzXLY8YZF9YL8lX1uV0Z9I=; b=LjNqJOSH+YzkMczxceNxhhRemL7tHezUJ9K8lVMd/nzWJDhdpmoXmb4vYS4Kb/KcRBT9uLYrvShdpjVrFNskDFT8ju1Cgm8qNxmPcBTpc2bpc77arVjRoimZBtDTYrOqMYqy8b8G/Z2RF39GZwszjeEH312uHLEbD2vEzhqugcV8wH4BxFh4czAjRKqsajRrPxOYu4Ie1BuJPtMF38He4gRZxM7gSNWQydOrC0uknhj5ZdzGG+d1gsPDSOZtmLWTaHxE5PQtd2S/NWbb/zbXU3NpZZ7Ws2533U6icbsKgf5E+qBIsfU7DOjjvmSKzoHE3UUVkPboyCbVNxXa/AgKPQ== 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=KFPDdFefJRslQCCpL0dfvmzXLY8YZF9YL8lX1uV0Z9I=; b=cR4f1bm6koyIfiLVpoq4LDbASoBlyZKT4qmR5+FrWgDz4hVATGXapTO7mbMm5OKyUhckZELRiATQ0L0HTVOX7VT42eBbYUh1Czv9QwE81WSb1snjpX7v6ZQ9vlrTZ2esRG6/h3m7Er1Lt36ks1iGHPnqHt2/zfEsOXiAsNCIi4U= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:16:04 +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:04 +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 12/31] staging: wfx: drop useless struct hif_join_flags Date: Mon, 7 Sep 2020 12:15:02 +0200 Message-Id: <20200907101521.66082-13-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:02 +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: 9286ac69-7fc9-4be6-a87e-08d8531706fe X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2958; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4fWJVwKIO98VlgFPu63CCJdnxNz4NiAKEVa/oe2PQg99/gTup6vuN5Dj1NL46yrgg9ABWtbkfbVzs7KLBeTfSIJYMidTla0t1DxwvsW8+ha8OgKC8UNmWskoSDruwy5K0/SMrVJY10TxH145fP5Yli2hRbUIYCdkzgsbYM06H4QSyBbb+rgAY0aefyZ8dNQF1Kj9zmceiHQRBCPgOP5TtUCLe8ObHtZ36Ex/BNL9ErHyL7/aqCVzfohItZ41SxKek4sg7tySvNih+msNoeuS6ncNfjntvRiQ4szt19h+a0c4aAppo53OcwampKEN1qP9aNQrvIDt5NRBxpl/TUleWw== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(66574015)(83380400001)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: r397UsputiUaQsBA3pofR4TIHR4EtMy/Ek9hE03s2goJvWvTUleV5zuNCwKXMYMEjO0UMud0pdQhnBP9xfak6Ch42ZJFdls90T5NDhr3QkdZS8/pDnfYCb7M81jhQIHLIF5SFMl5d9642hAYmKoUeza9vO4FTPMZM9vnIjcQFK9jmeUMvh4xk0J9inQMPmTn1zqVzbAEKUiQHjAqBX6SSaKf4oMap+VzSvRnF7bEleEy0ut0YKQLUGhUotnaGbTnBwS+R096iaKBa3cRP9457NJTpKWt4WaUg05iRMtzN60+VaGNRX2ZfM9phIBornl5stxLCG6jK+AzOWMWIBFDaANeb/NFZ/7AHlDrvF8F8RDzMBlzpfq4+i0eO+DcISR+hxxnu2s2RJhKfnJgK01l5u8IzyYbCNIn0b3buR2cu9r2LTNas37wxdVAjkqNvJ602ePjEXcukv8Jyid1/Rjqb2nt15jJLXL0W+53sCmaOLW0r2GRZf07RpFsM5TXU2SY+YSYPYrrdpzpaiq7pxL+WPv7qR/dT3vUBIC/lv9YbZG3B4RxuDMUVievTGxmpEMbBcAidY/yn2pDZeN88IPP8+QVxKIOCe1FwaNb/XWYPwqvqQQYuBqWnUC5dGwq21VNkNaAsbRLvB7A9R0u/wU+8A== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9286ac69-7fc9-4be6-a87e-08d8531706fe 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:04.1329 (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: mhFOhyAomG8jRMVMBczgxbr0BCzklTW7EGIqURTESt02NvJVO/BQ+HhL+rH56jf1wm1l8RDEMnxHFwypj3xOcg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Struct hif_join_flags has no reason to exist. Drop it and simplify access to struct hif_req_join. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index b104abbc5b25..1c99431eb90f 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -336,26 +336,22 @@ struct hif_cnf_edca_queue_params { __le32 status; } __packed; -struct hif_join_flags { - u8 reserved1:2; - u8 force_no_beacon:1; - u8 force_with_ind:1; - u8 reserved2:4; -} __packed; - struct hif_req_join { u8 infrastructure_bss_mode:1; u8 reserved1:7; u8 band; u8 channel_number; - u8 reserved; + u8 reserved2; u8 bssid[ETH_ALEN]; __le16 atim_window; u8 short_preamble:1; - u8 reserved2:7; + u8 reserved3:7; u8 probe_for_join; - u8 reserved3; - struct hif_join_flags join_flags; + u8 reserved4; + u8 reserved5:2; + u8 force_no_beacon:1; + u8 force_with_ind:1; + u8 reserved6:4; __le32 ssid_length; u8 ssid[HIF_API_SSID_SIZE]; __le32 beacon_interval; From patchwork Mon Sep 7 10:15:03 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: 11760457 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 E21F1746 for ; Mon, 7 Sep 2020 10:25:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C165D205CB for ; Mon, 7 Sep 2020 10:25:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="LffBZMLO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728778AbgIGKQm (ORCPT ); Mon, 7 Sep 2020 06:16:42 -0400 Received: from mail-eopbgr770058.outbound.protection.outlook.com ([40.107.77.58]:18596 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728740AbgIGKQ3 (ORCPT ); Mon, 7 Sep 2020 06:16:29 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jw+AMvVAmGMJGhdWoK+MGuIF6/QCWiNaxwBLas2g4Sx75CNlVcvfP816w3V+wb+RXar3jvJoPAyi2x8RdZ9W3W37ZeGYlHbURij5Kwm1DlBN8zxBcDCZKy7PP8+MR4dW8qfYDx+0redT1Xdof5G5YopeyraKylvYJlXyB0igBANebjKhMzjvVGv40ouKk/Ua0BDiMr9CeeW81+pL/2N9tmPx4zj1GCBrQCrQS6YsaJNViMA/H4VBOtmxR6JUeGrbkoVWuqnbdB5H0tTgbPBdlxmS1+UYx9FB/fB0h3Mg1Z4AKN8raEUYGWf0C1miZX9nMxjk5XuPE2zi/UGQ3j+HSg== 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=ymZ8Ry/Xl4xkB76feNsIwKl+LQiceEInvMQJe0UCX5A=; b=S8YaEGpG3E/tbbdzFaw7WonrMd49x0LpXo36KRYaz4AGOzgitsafbEK8pc4cpX0x4/8ZKxqReiOy12aknP+9t9jYW+JMCrgOD8cllLzb3qr9NSa+HRUdBj7ELE7UPlJcdyJKvhYhmBJPW5oPks/IlTlEGL4TWJrOQhMOgLrvLbOJORQlSbBteXLwC4SFdXPhOdk8GbjPtIz5qp1lkxlNo1jUDiORvqETABvcxNZcCe0QRHXemL/HWyouq+yduoJHMscSEihoVqus6rV8fqSgr4pgx24RxY8ibFy7isBRFcmDWbdELHkd/nHtPVURQNtyYC/PUTWtDDvX3iGsIWKg5Q== 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=ymZ8Ry/Xl4xkB76feNsIwKl+LQiceEInvMQJe0UCX5A=; b=LffBZMLOTvIZcrq6tMR6zoTIjJ5E0bK5SOAeO/KqTNh3wWAnW0SFMDjdZhM75ftggm+AOTyaDiYfbrE6GSBirYk6MHzE1e3KZoM4DrHwRliqNez5Sb6U6blcUZ33FPuyYg4pmUUyvpCTrgka4mk6m96PltI/MWe3ID2g3QbJdoo= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:16:06 +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:06 +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 13/31] staging: wfx: drop useless struct hif_bss_flags Date: Mon, 7 Sep 2020 12:15:03 +0200 Message-Id: <20200907101521.66082-14-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:04 +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: 3cf47290-2fa3-457c-fa23-08d8531707f9 X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:551; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7te9NdC0PujWR+TSLL/93Oe9jjL+ep2TOvDgeNqoxm5GpKfdti59hD5pIOhpmNLma25fToQTAP49QIVx/RhJTlSdVXryIiQ0LegIzKKg9Og10IB4lUJeakc04sktarpBBUSn0+B2i9paA9bQd9K5BsVIVWiwJefb+zPaw1uHJ+4brGz+0H3IQ7cydQPRHVSObI0eJFAdRD8sWedHoTgXeeX0MpjaDCtKihrjuooL80T7z/k26LyIL/zxncKq7tMTGiSuSWpKuHrBYUNJ2IlBZva82sPcgQ7P9rUFHsf4QSsy8o5jCPQxEtwiubo/D4bqbWZA5lE3CavS78Ts22x5uw== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(4744005)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(83380400001)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 0X1VYXiIkbD7Qnc2W27n9vv/S+DxliDOQ3nHkFgn3NzbAsjd+dpbpMQ/FqbEv42rzNjoTIZL9nlyFgGtSyEQx52v7rnd8rMzr0BpCfXUiyJNy+0Lxpm7r2tjGrL02AUce9LP+ZuNlyCE9E7LRHaPHTRvpWBq0rHBafqCaq9Q+EfSJ/Bem6yQDMc0+mzUttCI0fNML9uCz/tBDQxGKjNQcChedDQ4dFg//XshAaHgzD0iorLXs9v3qpE/whNcNf5WEstgsZl3lZJgPymCDbOGiQxpOemicnLVGXLF8XwAkAuGjEOAUC723wHsWEJT0lqbeYH4pW4lt79z5x4Jm+VR3zCJEaQKfdLzXxMoM3QQFawfHOIyhtq397cmq2J/G/a6GrdpnNHQGubtMONfmh3gz2al1ihbZodCH/ct67Y66BW8x6k6tvUnsyB0ECv68vp0v1ruMBiLnSOXic8UA4mFNddU8zMmvVgHCFrxHp/4QQKxLSxFX7HgOze8/S94VxXj+NU9Ds4/BGP7Uoq7ARkfcQyA1YNHifoOqT/7hmqzjCPVW5LJiU+fMAglvz8eNWxpL/BqHqMIb2KgHrK4oJtyc1u0UylzvKp1w854xo1gslGxAIU4kH100+hiXPr+TysdsrFYnFJEkRwsEQqZKcEL8Q== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3cf47290-2fa3-457c-fa23-08d8531707f9 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:05.9229 (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: G6oLWG8eEoNCH96PJ/f2hOPcIPJWK0/Bsr9wgpoKnIgqIfvcn84O70s1ZAy1q5fk1Wcy+Buq9SmICcbyQ1g28g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Struct hif_bss_flags has no reason to exist. In add, it is never used. Drop it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 1c99431eb90f..895f26d9f1a2 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -366,13 +366,9 @@ struct hif_ind_join_complete { __le32 status; } __packed; -struct hif_bss_flags { +struct hif_req_set_bss_params { u8 lost_count_only:1; u8 reserved:7; -} __packed; - -struct hif_req_set_bss_params { - struct hif_bss_flags bss_flags; u8 beacon_lost_count; __le16 aid; __le32 operational_rate_set; From patchwork Mon Sep 7 10:15:04 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: 11760459 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 37756746 for ; Mon, 7 Sep 2020 10:25:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 15E4921531 for ; Mon, 7 Sep 2020 10:25:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="fNgmVdmX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728406AbgIGKQk (ORCPT ); Mon, 7 Sep 2020 06:16:40 -0400 Received: from mail-eopbgr770081.outbound.protection.outlook.com ([40.107.77.81]:21675 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728741AbgIGKQa (ORCPT ); Mon, 7 Sep 2020 06:16:30 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KLafFf/gXXrqzGzuGcG3simyjFjf1k+A+4ZPVZShH5s181be7aqeENHHekj8DXBSnN38pGATzVnUM6l3o7h2kquNf8jznLWv+oGzkdGKx62SlW39TdxH8+OtMi2FAAXBXU3eTIWUEe+eiMwkKy96ivF1s6Sd/0jVuLTugwktSyQXHkf3mTMe/akNwF2/PRqkjMjOaZTCpTy87pwD73aiZ7VFQGNGDdM3RafwEytan3AO7pqUYDadiJcWAsPZmuryPKL/IL88tMhjg3ajpHiWVmTRvILAxb55iLz8uuaCddQP/Ujd9wCSQu3vF0dAtCXWLP2PrzXJ3YnyF6cvO56l/A== 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=kYDK+4n3lVRV+3X4FSxbCFv4F3eKWdbh6ZIPIgKPxZM=; b=IkghpV38k7q4SsANJ7MED0ocZSS6yqAk2IbZ21Uk8Ul7H24ZfjyPJqB/t8yXHkaARbfuki65/zbiky5peUCXojZbpT+dT5lorKTBgPCuWtNcHNzkYqgIzh/lY1/AHk8D2+L1pxkRIlYZGsApvZ2oqEuLDRalPQFlYdG7A/tVBdw3mHkpANhOeJHYKynLQ+bjohGttFNwFwx2hFgzh4Vtgbe8FmxPI+1ixARrsYMox8UL41hsg95G+s0pcIZDgCirDIPE0CCK4y3oeAtmEe6IuEFiFaHbrLagXMwXgTZv/iIRSZec1Db/CrusuaVj69pmIK6IjJ8Q21j7QndeOszQsA== 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=kYDK+4n3lVRV+3X4FSxbCFv4F3eKWdbh6ZIPIgKPxZM=; b=fNgmVdmX7Pi4tbpK5zy5zJV7Y7xr6ZTpSMVNtDzzuSKTE3vnHaHWkVY1R1Zp8iDl9Y1reH+2xOtWlEOq09Byh8nUL92itwFJMFuzf0sqJt6C1mnYEIymt2IFjmnpvFmM0WAmpd4x60A2pxmLqXxHQT+FNKtAxun/+oVMr4nBoQY= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:16:07 +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:07 +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 14/31] staging: wfx: drop useless struct hif_map_link_flags Date: Mon, 7 Sep 2020 12:15:04 +0200 Message-Id: <20200907101521.66082-15-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:06 +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: a3cc4816-f727-47f3-eef3-08d85317090c X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4125; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qz19+Cs7gHpmcZFvbWo4VwaojBm4JpEZtLjlnw5BCjdwSjxx6yN4iztjTxOY4gQvoFzzC7bQEJtDy236bQcxDbW9CasYsGII1u99ZULZvUL2oKKBqiimeejOLgFO7oKysmJ9uk1OKPzY61HVFt2lKIZeuPXzeJkTOshTOBUCYcaKOBXAZDo/sN8K/0BxGhQ3wgX06zMxC9aNGziBRf169cxBJrmMYzN8K79PAXLRMILZ4rwH8ajI71yz8mGA3JGscQb/QroSJEj7JIPaY4Py9A0+qR9HkykOS9HNx8ML+J/0NnLrMBTa1DX8KOnGL4APZjMwrzuT/5ywwX64IaySwg== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(66574015)(83380400001)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: UNaVLDRXJlT96RPr3bslParBZv8RUyZtEt7sSPlQAW/O5ujEgvyUuJbarrpsews4xCziXgBj7VN6tSAgP8/CmpSjgJzkHiJFwQEnRrJ+af7eFhy+5EFZ2jaFgmblBd8Ze1Bl2CwqmPHQcljuzAS47teD0HEh5SKziklREV0NQLwqFXpxP9YDe+1zQ+qbKDlEkJjC6tDw1ijpyGeqL5ng2cm8UcLwO0hn73/8lr8aZj6x6Cuwub73wJfvmEbzmpWmj17SM9Vxht7c1RWRQqCdBQzOtEcMY4pWl+2KNRDrTll4iZS00O/zzGvnODegxDsA9bvKYYaQyk75Su0tGrGVo7ffyIcalreRUfCgSwrHBruBFQzwBNfqsSPxaQGro70RMi5HY0fmMLy5GKPNWQ8yIQStymjuaAsLgxtQqWQaVXw53BXfRBJb0TSfxAq/fZs8eBzeTdko4hjanDW/Ifbkw5JQcAR7Xy176TcS1Bizl9wTzrMDPj3kYEPs1lhTWSyp1fohbNnp1CaaLd5qTBrSfStmmRWGgtuGBc+Vl3ogPpjr/uwtXBy2GHj6F+Vxkh9S+Xq7gwvbefjdR6D20hbPZZb53zTAwl/dofh4Mgnvywj769Nm5MipDIME83Hz+YjEYUeqtrGvoQAiZnWMXLRa7Q== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3cc4816-f727-47f3-eef3-08d85317090c 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:07.5749 (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: +toXlm85eX9lv+JzoXVsrSyJbC2LfOknRaajI7O79r2IK2hPmhp1bi3tGWMRVWIioAhOFm9bJIxVV0JMYY5rlw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Struct hif_map_link_flags has no reason to exist. Drop it and simplify access to struct hif_req_map_link. Also rename the field 'map_direction' in 'unmap'. It is more meaningful and allows to drop enum hif_sta_map_direction. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 15 +++------------ drivers/staging/wfx/hif_tx.c | 4 ++-- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 895f26d9f1a2..f86f6d491fb2 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -434,20 +434,11 @@ struct hif_cnf_beacon_transmit { #define HIF_LINK_ID_MAX 14 #define HIF_LINK_ID_NOT_ASSOCIATED (HIF_LINK_ID_MAX + 1) -enum hif_sta_map_direction { - HIF_STA_MAP = 0x0, - HIF_STA_UNMAP = 0x1 -}; - -struct hif_map_link_flags { - u8 map_direction:1; - u8 mfpc:1; - u8 reserved:6; -} __packed; - struct hif_req_map_link { u8 mac_addr[ETH_ALEN]; - struct hif_map_link_flags map_link_flags; + u8 unmap:1; + u8 mfpc:1; + u8 reserved:6; u8 peer_sta_id; } __packed; diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 49523e70af6c..eddb60dec069 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -502,8 +502,8 @@ int hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id, boo return -ENOMEM; if (mac_addr) ether_addr_copy(body->mac_addr, mac_addr); - body->map_link_flags.mfpc = mfp ? 1 : 0; - body->map_link_flags.map_direction = unmap ? 1 : 0; + body->mfpc = mfp ? 1 : 0; + body->unmap = unmap ? 1 : 0; body->peer_sta_id = sta_id; wfx_fill_header(hif, wvif->id, HIF_REQ_ID_MAP_LINK, sizeof(*body)); ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false); From patchwork Mon Sep 7 10:15:05 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: 11760467 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 E93F313B1 for ; Mon, 7 Sep 2020 10:26:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C9BEA2067C for ; Mon, 7 Sep 2020 10:26:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="OdHxT+3W" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728798AbgIGKZP (ORCPT ); Mon, 7 Sep 2020 06:25:15 -0400 Received: from mail-dm6nam11on2053.outbound.protection.outlook.com ([40.107.223.53]:35584 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728716AbgIGKQi (ORCPT ); Mon, 7 Sep 2020 06:16:38 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bJfj/u9vGU4ClpGP0d7LYo/VLzPq0sCLD9xVL12wbHqGlrq6wSAzK1IPLm8miYIh/rskWLaJ5+/hMuzpZ0SoFoCc7wOAxW0kmH4x+/djD13nhTGDzwrpEgeZZwZFhiFxNtFp9xv7Rjp5L8uYJF17TDy6vONQhvOHOz05XaTKHsyq9FP5YmX6/ihfM1AgcXKy5AxK8Dt5yN8dgGnHP+BTsWCK8egkvW1RwbmgfggrMltTjZyKW/BAshHtThqJfD4EQINwTilApAMPxoht8dcJvmKZxZnUlSnbsOnsSFqn7TYhma5PrRiUmunrdjyihh9OkYez93z9o1hfzGd/kIu4rg== 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=T9kslUkyFYLokogGAq7Sj2kXuTtF4FpGls5NgcASykQ=; b=R2ApV7J6Fs+xTSCf3itzN3C0rEiaLKA2ZROEkBffw+u+bvYWqTMJFCwG+KkN5xOkiHSdoEUXS9ZhwE7q4t6/85bVOyUU+r0Rui5AfTFGtKao73/7Ho4Jqo3Nkl1rTDydsIvFcJhNWdvgatYRgKPxqREWKBN0w8ZD5PmGA6XYzzpepkwv3/40fvyZU/0oQcRlv5W5EYGkYG22p0QEhKige5KqjGxCQFLtWRBLi9Vvv/1klHz396dJekBij/L3q58NShVz2oH6uHyQUCWb6F0210Y2I/Q0rNHNcakzspHxhty9ptZKEBmpE8rBOkUtKYkiTFCX/ZLBFaRwSuRLEzyPuw== 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=T9kslUkyFYLokogGAq7Sj2kXuTtF4FpGls5NgcASykQ=; b=OdHxT+3WW30+nMc5nImSszzR/J80TCOj4SPt74Q+K109H8p43iJ9fWnVrUbXQtCvmt6Hu0zUxSQQeDwgQCFQQ31fMBi4cT8qpqeF8LLjFozS59ezBeQTLcrZaBte466txjHi7P+sW49Xs1D8J/gxBZWUGj6n9rhG10liaa+kE9Q= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:16:09 +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:09 +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 15/31] staging: wfx: drop useless struct hif_suspend_resume_flags Date: Mon, 7 Sep 2020 12:15:05 +0200 Message-Id: <20200907101521.66082-16-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:07 +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: 74c6d5ac-56ba-44d5-9c16-08d853170a02 X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:826; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: b1UKnD3m/5wQjv2nJaGik0Dc0k9izHx2Wd1wt+kWc7bAVKNU/cJSMsW2V+hGOzIqVC/Cs8lrFzMK2N2AkVtjqsNcPnUgH9b1tTi7bbNQrf/WHKKoCnLbVjMEPIrPmx7z2yvxy5iRion6SKXbvYj2CSwxxUujdDdMlABg/hI+vfF3taoZY0qs4AAsKZwl93vg6S1UJqE0xn4cg3N92yeYNPmT8G2nw/sJGj9gEU9AMm3cidOvfYD/OBqaArZa/S65uuG4aZA0A3EyCNwS/aZOwquvwqv5v8AZcLPS/uBTFLJ4NwZ+oGdgGkagNssWdLF6WdUVd1e7DXU42AOCz8db3g== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(66574015)(83380400001)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: b6UmhTUO8bBeFD1J0LG6+SUFUl0hWSaAsVZZTawVpg+BgCc5rRTiiViajnrPKOVFzs45z2ncnfrw85olxghn0e5HgRU4IiUit+6i6d//RhaF3KOf68ttpzl+tunSUFiIwZ/qubAATDH7pVX59TICfuYbnU+zNFp0ILS1erxGDgbtFyClkg/0w+oyL+TgAohx9ffOmYV22w5+7Ti/BInFkujgRPPmzvuwqf+8cYEU6SKUOxqJGhV7JQJewOYxFSaZMmKoG0i3gGW0+TVHXAD8Lmw5bc7NP9cClZBCKfuLQRZiL1q98LEa1a4poMwJdYAc9fdbCbSvtqFqwS04atmE6UTnK9mcoPoKb1Um7B1IbfU+eVdtcRfESlJEEfdexLnTp4pLmpyqe1iAJkWn6Qqjs6Bu6C4l8lCnUOiB2FcWPYkTOPs7lhnzoteq36vNlsQqiVx8Q73WXIWC7Mlhrz45ASeYKvhVhY4ICiL+MK61iufyAV+zWB0JOHnQmJy7vDz2ZIjUECvIU70rX7nRPCLxehABONHjbZUojSCQyvnK2zVzISuy7IiWVtY4wgZwQGIib9gzIY/gozKJQO5v5hs8emfXeuQRHx07MlNMa668wWDqtyNs83jUR/3J3Qic7EhWErWtMl19gsxRPYVP5FRedw== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74c6d5ac-56ba-44d5-9c16-08d853170a02 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:09.1850 (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: nSKYknctZyv5qXpPDZnw2HKrdMuw8AizLTFe4i6i+CoYx/kJ/Fa1WcUbnllzcHczvax+fB1Px54uRWVCdob5+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Struct hif_suspend_resume_flags has no reason to exist. Drop it and simplify access to struct hif_ind_suspend_resume_tx. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 6 +----- drivers/staging/wfx/hif_rx.c | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index f86f6d491fb2..4b01be677e08 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -446,16 +446,12 @@ struct hif_cnf_map_link { __le32 status; } __packed; -struct hif_suspend_resume_flags { +struct hif_ind_suspend_resume_tx { u8 resume:1; u8 reserved1:2; u8 bc_mc_only:1; u8 reserved2:4; u8 reserved3; -} __packed; - -struct hif_ind_suspend_resume_tx { - struct hif_suspend_resume_flags suspend_resume_flags; __le16 peer_sta_set; } __packed; diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index cf7a956ef00a..798167aa4c7f 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -203,16 +203,16 @@ static int hif_suspend_resume_indication(struct wfx_dev *wdev, struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); const struct hif_ind_suspend_resume_tx *body = buf; - if (body->suspend_resume_flags.bc_mc_only) { + if (body->bc_mc_only) { WARN_ON(!wvif); - if (body->suspend_resume_flags.resume) + if (body->resume) wfx_suspend_resume_mc(wvif, STA_NOTIFY_AWAKE); else wfx_suspend_resume_mc(wvif, STA_NOTIFY_SLEEP); } else { WARN(body->peer_sta_set, "misunderstood indication"); WARN(hif->interface != 2, "misunderstood indication"); - if (body->suspend_resume_flags.resume) + if (body->resume) wfx_suspend_hot_dev(wdev, STA_NOTIFY_AWAKE); else wfx_suspend_hot_dev(wdev, STA_NOTIFY_SLEEP); From patchwork Mon Sep 7 10:15:06 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: 11760461 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 EA57715AB for ; Mon, 7 Sep 2020 10:25:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BC2DB21473 for ; Mon, 7 Sep 2020 10:25:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="U0VZIatD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728847AbgIGKZ0 (ORCPT ); Mon, 7 Sep 2020 06:25:26 -0400 Received: from mail-eopbgr770058.outbound.protection.outlook.com ([40.107.77.58]:18596 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728525AbgIGKQh (ORCPT ); Mon, 7 Sep 2020 06:16:37 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RdQ9cqAuhEU2aMH1Unl/khBDoy0AKApg/qCjSZowXOGk1M9tgrf5o+4BKExpVf1Or5ay0PCkxb+kzI0P6ZdxcF//St1vddZHvHGrM79rJc2lQzsNoOuMud9wcEySpw8zU2UVPbYE+zvmvGEyblt4UBrnrOdQRm2/6RQmJJzaMI043hcy+Rb7i4L2dL9twLuiUJ1JIGUWFSQHPTEBOm2D8/JvflzHcf0p3Ya8TqPq1g7fKEQzLLdErVZkh0RDYMkQCZ1/+4qp309e61C78dbtqet2SO2vqHXPyvamsqUI0a7tiC0PRe0AeESISz+agwog+bRreu/0nFB0/LqbKmZc4A== 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=8/rLImZdR+5ufn6LoNn8ygLK+eYAQzrdfMxmL7GsftI=; b=jMKoiOUDoqo/LkkiL7igd/yvKglDcrT5B2kt216TptJ/OR6H61LMwnjAVQWH4Vw9DQ2zSAiYPH3tvIFzHW5QeE+m9WCoPA/lx6eJRjn3tQ0P1OU2X/qybSDTWClAU3J6GJ2Yk43CGieaDLpxZnznnQVeMrnu9TbJ1Lc8VoC1kCUHVO+rInGm+pZH42Uxn8nes+q1YoCYArbgNdFknGf4FNu9Alo/JFzXBaBsh1KMlbdVz7P9ncS/Kw0uFiBJWwx/km9/vD6fQ9uMEiWM7ewpyRfdGLIWmwfdKSF8WfTP+DqTIQnWgnyxjO2vj5cF+XobgSHr/AR7rrxBpe5swu1kqA== 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=8/rLImZdR+5ufn6LoNn8ygLK+eYAQzrdfMxmL7GsftI=; b=U0VZIatDeDkc5UmNc93bQgYQK8eJXgq9zEEuIAkgGkmKATrksmUzN4lWlKUSiPbnGw+s9j29+KV72+ahHI21w56bh7ylDB+WZ9QtGJIyyrbG5zp51Gvsb2F4DLQ/hN7diWWdwyLOfg7UnNlRb9kUpoyP3m/v+bL8Yp0+1xkQRgg= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:16:11 +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:10 +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 16/31] staging: wfx: drop useless struct hif_pm_mode Date: Mon, 7 Sep 2020 12:15:06 +0200 Message-Id: <20200907101521.66082-17-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:09 +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: ff3092e2-330b-4566-cfa7-08d853170af9 X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:962; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gzlIPPkQW4AMzXIBFhuMlF9McR1k+kj2O64NqU2pGHlOw+v3bc+/Z0TE9wam/Dnxf2jEg1milfVFalHSqvQXbMsf/iXGMTsBwu3M8kQvXP6lTar0tbDYHiB1cemLTADGbTHa+mSVGBO6SQpxllOze1YisHYLeaBURGkjoqNsGsCYMZSxUhtgISWHLYQDm4AKQNsx5JaYXghkooJYKV2n2o2OlopfjX9YBHAqOWW9Zti+2vYhYgoI7iMy/XCuLa1mHoihqxyrnCFwEUZJq4Be0qwg6TJ9tFzHoXy+6b+ZJ93R+UqGullfsqUWkbo2sZPvibqa5af3eXK5gZRWYGo5pQ== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(6666004)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(66574015)(83380400001)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: exxEdnn1alfKLwbnCfMp1VJM5Vs5KKLQ+ReWvM/KQQuhMiO5RS+JmtkHJKKZcE/+zndNDUnUFeFHCmejvIpGGgFdn93ip2EpKIjWTFg5CXTAdpplKFjAghz2SyMZw0/fSbrQs9sjktFdShLz1lw0jJHOOVlUG/sgbD3c/mom777OlN2/r1/FFhw9dP9kRbZXSrrmc9x7CEbC5il+tfCho5KEcWOOlHfh9/yuh9cGhgDp8ofus8PJsStMb+6cFR9H7ujhy8mfgQfK6mY9GKfhuNo2smViGL5kOKbL+RqI0j/Fog1WlCADKnUPa5kkEcnpalDu4UsBaPDLmbEOkmZI/gRcxgx2+8Z4zKE4gw3DiiivtduEwl6WgCag9KlRjoXpJ1aOvFRO+zb6AM825ez50lQnoR1CwBJkz/pDUkzTRq4wBpmLhnieHjAq4XEceYgGvO3T3PupTgGfbHiPROy+Kr7sVTaVIhE3o9yHzH70yfpWTEqwmVYT+wizHlGJvTeJkfIpHGistrkQ6/k2Y5ng8LbMnHxvHMEoHvUhjb7bZAomH4meDlMvpVO7HEtZubLzXo03N4ibQAHzVPmlRZ4zqqMfqzVoq6fV695wzPD7KSCa8CN8TnnbuC9oZoU+kkMDeGkL3I+6T/hnXxzdwP5oBA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: ff3092e2-330b-4566-cfa7-08d853170af9 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:10.8261 (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: 1irotb5hhDkMgw/J/hAnL/UZ35TUVAckLY776DtroWg8J6H2tVLS5RgGb5TjLb+XCTwIQu8yKEz8AqaSAGquMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Struct hif_pm_mode has no reason to exist. Drop it and simplify access to struct hif_req_set_pm_mode. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 6 +----- drivers/staging/wfx/hif_tx.c | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 4b01be677e08..6ecb23ceaf8c 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -378,14 +378,10 @@ struct hif_cnf_set_bss_params { __le32 status; } __packed; -struct hif_pm_mode { +struct hif_req_set_pm_mode { u8 enter_psm:1; u8 reserved:6; u8 fast_psm:1; -} __packed; - -struct hif_req_set_pm_mode { - struct hif_pm_mode pm_mode; u8 fast_psm_idle_period; u8 ap_psm_change_period; u8 min_auto_ps_poll_period; diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index eddb60dec069..134af4daee96 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -439,11 +439,11 @@ int hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout) if (!hif) return -ENOMEM; if (ps) { - body->pm_mode.enter_psm = 1; + body->enter_psm = 1; // Firmware does not support more than 128ms body->fast_psm_idle_period = min(dynamic_ps_timeout * 2, 255); if (body->fast_psm_idle_period) - body->pm_mode.fast_psm = 1; + body->fast_psm = 1; } wfx_fill_header(hif, wvif->id, HIF_REQ_ID_SET_PM_MODE, sizeof(*body)); ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false); From patchwork Mon Sep 7 10:15:07 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: 11760493 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 A53FD746 for ; Mon, 7 Sep 2020 10:28:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8523D2067C for ; Mon, 7 Sep 2020 10:28:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="qAfmLBNd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728632AbgIGK2d (ORCPT ); Mon, 7 Sep 2020 06:28:33 -0400 Received: from mail-mw2nam10on2078.outbound.protection.outlook.com ([40.107.94.78]:7488 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728696AbgIGKQQ (ORCPT ); Mon, 7 Sep 2020 06:16:16 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BBWwFLB/IADBRri7eii2cFzqPib7ZaUvLy1/qhQiIYLxYiXZZOWHgcl5k+O5YblCqiIavuRPln0+76ux4veUZIXTWwiMrdY2f2D8mfrLkYPnF1XMg+5TGIDmJ3oYguvCEWLhnU415c1vABZL5GTMw0q7btnWKYi1mXeE5Zv10bzzfKPNTYkKA8H/SQusLLuDGumPoELkEn8HGUHx1mqIxssK/Njt+5VK9DY6yHHz7/tnoe2OaWbybehhqsKyG/FsfBsoOLXn2leg6LjXromvZ5AkZFK7XxzjeLDFiYaL72G1BLXISIyYQa+n6UM4WVnc2WrBJRnRR2rUGF1FH2fnKw== 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=7Dy+pb+xeWU0Uyjl8xrkHSmYLx/Hl8HHhdR/L/9xnSw=; b=cO+20R8Ug7fKbdsZOqaeOS/nJlOdFMxWXRwaNWqMHMZDiBdd5dCgNJkCuf7NWKk4Y36+obzLpMGWKw62T3ZHgDTRN1mULTPh2f5ueNH+m2YwS/6dMgkUULiITiYQFxpFMdHS/W5j4u56r9+IGCxybRcNmb9mGtDs+T9XmujfAwNVFcUoygO2cfWBJXAMjZnUCZhsUe7F3ozYY8y3uJvlp+h/6LMdR/FCr6pqwnkIxIWfx2IUcQ0W/RyMHGrrQ/Db2rOObHkVHq9OG61aQL7DYf4xnDwNkMXkspySkafZu4ODiDjaai1X9XMsPsk2GDGdbKYzXzK0y1TG4BjUSqRT4A== 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=7Dy+pb+xeWU0Uyjl8xrkHSmYLx/Hl8HHhdR/L/9xnSw=; b=qAfmLBNdE8e0z4fOQiRPSzYVNIVnLHLTYq0gZPycCjOS89d7OFIjLHZq8NwI15tnmx/eI4cH42YKxFUglkLek/QqkOkIEyan1jKzw1mxEhSVjTUBfQuBqtAMnEpaTCJzcVoJJi0uj6ibtCQTdhwydJ/ZKwDzJ87tkHxwKA0Ik58= 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:12 +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:12 +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 17/31] staging: wfx: drop useless struct hif_rx_flags Date: Mon, 7 Sep 2020 12:15:07 +0200 Message-Id: <20200907101521.66082-18-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:11 +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: 413e933b-37a2-45f3-77af-08d853170bfa X-MS-TrafficTypeDiagnostic: SN6PR11MB2720: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4125; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QiXQXbzQG13fdCabyzU8Rmb0CXkKv8gXK+tXKhG+pSodd0xVPO447XZTowfon/2vExje+4nsfH+rG+KvD3pNS2sVnLB2JN3pXJLITYPtwm7QXX980qUztFIy2lMKypGLjvma7+z/1iV5ni7So3Nm+DgMyibCzmlvXFPIMc5C0D8eTD7G1z5tMCcIc7IU+tPjLv3Vcb4oCk7ZW7YuMQF2sOvNwjbX6KH9rmZWlJsvnfqnCafFhzsimmQdlBZfRbdk0iiwgvFKPKw8kOUcH/hZ5/Zd9qsKzzoCLxERJ9LBmZN+HnzPs908rZFRtM0tkvKxhcImMBRchUsDzbSMPU3Udg== 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: hqD00ICtlbWXrkhKFUxg1RonrZ/l6NHa9c4PZYPUYRJgQtGRVAnIP3FImkXrehvQ0A4EDzEHaZzoLq6M/sDn23pM4DB867YI60cR/VGM0GWV0jgUeZc+/Nac83D6GEj6GLdCc9mpgUTLCgBPH5BaikOhvsAj7A17U4GSYgPQvlt82+Gr2hDbSXAdUpoN3ddeltmezzgz3tFS8MlYg7NKdDgSodnFT6ULzhPxA7WVJKAvMgRFw5Yhu7TC13Icz541quUNukpnIwaXyp7IY852d7g7aYKya8vC+Snbs0dFpSUQQIC58Ac6j60U81vOngNzIY+ekA1afgWKC5S3mdGOHUIctkUJ8PYP733Gie5LKqupkQSNlfDrmlpIlpGncnk7EEdMczK3u3Qs+ZFWfTSkaJrdITmnLM0sut9OMKVYPu2a40GpmF7bFsov1CSRtDdWH1My3vcnoFb33RwfIuOfJDKvJe4Ys5pK/yzUGc6g06JmU92I92upFN+cIAwgUlMM5w+bEHdwt8P1NghHSpKnwxgYAfVL45BQaHMV3LCdH97H+2kCTjDQxIH5oAKaQIrY58g29kgC/0rKEaYRgDJLQga+w6jg/YM3GcdwxlLt1REeKHxZ6MkgXg6f8SRbscYOWDOCyX2ijgOkp4dQeE/4cw== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 413e933b-37a2-45f3-77af-08d853170bfa 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:12.5411 (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: nn3MXAEhz2k9VnkBJ+6vJrg7EZaMyn7OoLME7KtyB7Z5Z1kEMvJ4SDo7e8gc9pXux12P3HjqT9vogqLQ1qpoaA== 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 Struct hif_rx_flags has no reason to exist. Drop it and simplify access to struct hif_ind_rx. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_rx.c | 2 +- drivers/staging/wfx/hif_api_cmd.h | 25 ++++++++++--------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c index 7fcbbfc53416..fe111d0aab63 100644 --- a/drivers/staging/wfx/data_rx.c +++ b/drivers/staging/wfx/data_rx.c @@ -70,7 +70,7 @@ void wfx_rx_cb(struct wfx_vif *wvif, hdr->signal = arg->rcpi_rssi / 2 - 110; hdr->antenna = 0; - if (arg->rx_flags.encryp) + if (arg->encryp) hdr->flag |= RX_FLAG_DECRYPTED; // Block ack negotiation is offloaded by the firmware. However, diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 6ecb23ceaf8c..3a60bdf286f3 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -283,7 +283,12 @@ enum hif_ri_flags_encrypt { HIF_RI_FLAGS_WAPI_ENCRYPTED = 0x4 }; -struct hif_rx_flags { +struct hif_ind_rx { + __le32 status; + u8 channel_number; + u8 reserved1; + u8 rxed_rate; + u8 rcpi_rssi; u8 encryp:3; u8 in_aggr:1; u8 first_aggr:1; @@ -295,7 +300,7 @@ struct hif_rx_flags { u8 match_ssid:1; u8 match_bssid:1; u8 more:1; - u8 reserved1:1; + u8 reserved2:1; u8 ht:1; u8 stbc:1; u8 match_uc_addr:1; @@ -303,23 +308,13 @@ struct hif_rx_flags { u8 match_bc_addr:1; u8 key_type:1; u8 key_index:4; - u8 reserved2:1; + u8 reserved3:1; u8 peer_sta_id:4; - u8 reserved3:2; - u8 reserved4:1; -} __packed; - -struct hif_ind_rx { - __le32 status; - u8 channel_number; - u8 reserved; - u8 rxed_rate; - u8 rcpi_rssi; - struct hif_rx_flags rx_flags; + u8 reserved4:2; + u8 reserved5:1; u8 frame[]; } __packed; - struct hif_req_edca_queue_params { u8 queue_id; u8 reserved1; From patchwork Mon Sep 7 10:15:08 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: 11760473 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 6D2FD13B1 for ; Mon, 7 Sep 2020 10:26:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4ED722067C for ; Mon, 7 Sep 2020 10:26:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="GEehFPpS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728788AbgIGK0a (ORCPT ); Mon, 7 Sep 2020 06:26:30 -0400 Received: from mail-mw2nam10on2078.outbound.protection.outlook.com ([40.107.94.78]:7488 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728715AbgIGKQV (ORCPT ); Mon, 7 Sep 2020 06:16:21 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WOcpuNQgbkztH+G4oB5ExDGswBchCTwVjuFRWn9EtS+Wa+p80q9djXD0Cu4VmC6o3oIMn1OFE8HFVXuyO71D41Eer6I9MRPbnB4D8mkhb4WuRs1OInivAysMFFxyhoTaSqODABZtrmo9s0gelgKUULUrs8hbIevX5qS6AWxmOqMrR1MhESqigN6RsXmqkagprbZRq72nwGidK/83Jy/RZMzp6cR8qYycHzM7z7AzMN9iFFfcyHg48QbXV0WcuJJ/0aEWdecac+YW4FetsB32yDGfNT0gsZAZk7liUQ6hx6G3cnRCyemQbsaEEm0ua6Oev/aqTCGZ7RJY+GwiE/UCiw== 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=ujUlujIB6wO1ZYDJtSkyrb3rog6jRF8m+w6QhN2mNYo=; b=haYdRMZsQ/mQbHPCZBLsC8OFNEXT6eENo4n6767X5yl5+oB47skzE6PPdZI5k1SS6nrIuE6dAAXKEw0UDu6yKxzGe+wg08UBWInHohBAkdRQQHnxPWEeMc/IYg88Hz4ia+RRRX2GA0gNXrIgWw2uGNhUzA3bKTIoYWOVIgX/S3Lg3uwCWUJmFe4Y2+UXMulQzir1P6qxHs3s1yFuhIp/mkmL1I2GXRnSBpF5QwUn4KpWVUvUK7P4YQYdqMvmBzJFRFvCGLZYuN6wFsMMVdTFR/xkkKyRv3aDCR7fFWOdW2Cl/s8BBWLbqx3xgATkOjUrEzuIFORmIKLrESHPtLtiag== 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=ujUlujIB6wO1ZYDJtSkyrb3rog6jRF8m+w6QhN2mNYo=; b=GEehFPpS2BbJ13qKf1uzyznk20YmcHB1Q2SXp5JMugWwL17OPnvVq+nw1xZX2bxgvnEByMMrVDc3d73tWjPOB7rY2ZbHqJlzKA27DKkaQH3jOhctHY60aOcWY7MvUFF6erAliNekUonlGObmEKJmRm2D3HCbf8Y21LPyaSblca0= 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:14 +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:14 +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 18/31] staging: wfx: drop useless struct hif_tx_result_flags Date: Mon, 7 Sep 2020 12:15:08 +0200 Message-Id: <20200907101521.66082-19-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:12 +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: 585bd539-aa85-43ee-994d-08d853170cf9 X-MS-TrafficTypeDiagnostic: SN6PR11MB2720: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:983; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 26zSf+fku1CJgDZNSj1WeYHrkksqERmHU5JX0DZSv+5vsQooHWvnmaYAVV/hbL0DO2b5a1LU0Lh6k4YW6r4x6/C8yyIy85bWXfziEAMcemJEIi9St9+GwpczUWkEzapDL3XeS9FbG8MVC/JRfrwYzdHXvgrYn80WtHT/zEGIyhhaVBDdW+pikUng7ysG8UVpwpvrBRL/Y47F/Q13e1Nks2767cUQ93NY5Oxyz4f4+VxjmofJkQywnaoB9kzNii9NKjxQAKS24RmIdehWRtiadeJbpuqEub4Jgys15C/8yeHt2nZf2/X18Y9BnxAWVFmGYuMPFDgkeQOGqLB7Dv+Adg== 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: 26C4kXXEYDyiRKdFVfHOul2K/V+u9RpDh7HtpSUvSO/5HQiqHFqAEFr8IMd59YkgAMOm0LLIGLjDPw+4SKtY5BngZqKYfGfgPQ7eGCLblmQwEKE0Z/FIvv5YfRvhW4SevgOUijSqQ1lKzjHqQbGVUbNIQyo2Cf7NpOKdugId3djHuxCPX8Sr3bEwQ80mZlhItSQlNiSZWCTm2NV1ikKQ42GAjVvHeQVbFC+t7U2zasLVA1OdsIVIopjzrV0+4d42sPhOtQXZvlnI6THvGULwx5OFxTzW9yeFx+ZuO9IFW0uETK9rnMMZ+fAjwYCepJKM4YXI6dVFDn4yb+zygAW+hw+Cey+e/7+B1CtOIyo4a1PiG6TiyCqUlWCVAQV3feGmkudYMRv63wS0i4JK73IzhtyckrW1ZJ5r9eoSeSrNyseWp0iqXm4z/J4b7S/PqHhA5o2jfZLPSiEzAkHyHsl6BBtqW7yj8nKctsnXd3Zbqca7JANUuYFR8oOAHLBKbhEnD/bCBaXF0FHiyocRxrMPX78Lc80QfMqYSs5eY+XGevmnGYMqBbwI7DfLicJTkpjwALP6+QkDv/syIKcfm7WXSNbIyHiKFnstATZEqfoIrWI7dvm5nKzcIGjZCXJAnWJy0CAqID3MCaBrGWjbdvEk+w== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 585bd539-aa85-43ee-994d-08d853170cf9 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:14.1701 (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: pONOz0MD3uOszb0NWpPGrrUgsizqVM14chk+86bFKo8rI96coRhLTck60b1NumI5Rf21H/7CNko9Tv3xedsU1Q== 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 Struct hif_tx_result_flags has no reason to exist. Drop it and simplify access to struct hif_cnf_tx. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 3 +-- drivers/staging/wfx/hif_api_cmd.h | 16 ++++++---------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 485907b0faa2..1f2158d6eaa9 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -518,8 +518,7 @@ void wfx_tx_confirm_cb(struct wfx_dev *wdev, const struct hif_cnf_tx *arg) else tx_info->flags |= IEEE80211_TX_STAT_ACK; } else if (arg->status == HIF_STATUS_TX_FAIL_REQUEUE) { - WARN(!arg->tx_result_flags.requeue, - "incoherent status and result_flags"); + WARN(!arg->requeue, "incoherent status and result_flags"); if (tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) { wvif->after_dtim_tx_allowed = false; // DTIM period elapsed schedule_work(&wvif->update_tim_work); diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 3a60bdf286f3..b86ec39f2615 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -248,15 +248,6 @@ enum hif_qos_ackplcy { HIF_QOS_ACKPLCY_BLCKACK = 0x3 }; -struct hif_tx_result_flags { - u8 aggr:1; - u8 requeue:1; - u8 ack_policy:2; - u8 txop_limit:1; - u8 reserved1:3; - u8 reserved2; -} __packed; - struct hif_cnf_tx { __le32 status; // packet_id is copied from struct hif_req_tx without been interpreted @@ -264,7 +255,12 @@ struct hif_cnf_tx { u32 packet_id; u8 txed_rate; u8 ack_failures; - struct hif_tx_result_flags tx_result_flags; + u8 aggr:1; + u8 requeue:1; + u8 ack_policy:2; + u8 txop_limit:1; + u8 reserved1:3; + u8 reserved2; __le32 media_delay; __le32 tx_queue_delay; } __packed; From patchwork Mon Sep 7 10:15:09 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: 11760469 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 5BAD4746 for ; Mon, 7 Sep 2020 10:26:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 32B8B205CB for ; Mon, 7 Sep 2020 10:26:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="SmL3e+1w" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728754AbgIGKQh (ORCPT ); Mon, 7 Sep 2020 06:16:37 -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 S1728730AbgIGKQ1 (ORCPT ); Mon, 7 Sep 2020 06:16:27 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fGMFvfzsqWMnisKY7hKQnwzHQgdgRR+chiwYmq9Ui7ho4561xNlrkmdMheaJHC9dRBwQUT1KiHGhkicL3SbyvYNFE0ej+5B6znFXJLVvKoAwDG/ouX5Qexq816vpttFQ6asLwUS7aRx0M6dXMBwrj6xbDiwylRPjF2lvxNd3Eb0v/MMGwlNCby3uYp/naRQcb2hhrlqevyeH/lA60U1exdEUJHS360lPKxArEnkX3gPerCnDe9E3VH0ImecVCc789L3YLLxGoPge6Fmp7nktmycerLesWx6NzH1LpSJ6aO3p2/FwZx+BRdNqQpZPRUqDiv65dveCx1UI5Uoc/sYZ1Q== 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=zKyeUrA8GZtNGT/z7Q/A3bkD35wlAPzbZtsXF5PzqGg=; b=SOXO2mCTTUrvEfCdY2O/LX4g3y15yDTc34SzCZ/sjuCmmNJSzZKUau6WHC76nLipFDPvlpHOyxBAxvO7lfXJCqRYmwhwgveO+qyXQO7BONJGRp0dGdMzZDmJ5nlGCoBSPR0xW3cPuAZAxZ5T+UEz3CRxOaKgFXJ39z32IGnu07iZdrPaLln+gkbQY7RLZFytLzP8MYKGuAEIRvMg2lwa9NUwVMFluLKVgArMRp7/oyH7aWB9GMGWVsRhTao5jq+5O+v3yivn9uVo1XMUQfVY6rszboTcdL6JjKShnwsixZNPAe8kxmxE4Wc2p8cZRVruQUgM0KgajoT/GffMnPhNmg== 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=zKyeUrA8GZtNGT/z7Q/A3bkD35wlAPzbZtsXF5PzqGg=; b=SmL3e+1wH5eeBAIlEiQHygyODlmn8kSzsuu/+ezvuaFQqkLdxoXybLg5vArITi2DK+iGHqMihpDENmcEqwS+eQjnx+pp5n7d7z14XiBi30xYXEwVXlpAQZQ5IIXH8ZbvPz0KwYwAr2LyqrOAoU9/IJDdEACistVNGLV2GOUF0rs= 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:16 +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:16 +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 19/31] staging: wfx: drop useless structs only used in hif_req_tx Date: Mon, 7 Sep 2020 12:15:09 +0200 Message-Id: <20200907101521.66082-20-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:14 +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: 3cf55b09-9efc-4988-75d2-08d853170df4 X-MS-TrafficTypeDiagnostic: SN6PR11MB2720: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2958; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RoSY1Y/jQpk9tRwKNLZQzv7PJT5GBKEPMdAgcKJUwWgfKcroiI/iRTOlKj5In5igitvQX5n/HI1l+UuJtLk+bWbOjQf/p9THzAXkDM2G8dHe5u0/qIe0j9PH82zdlDRZrqHxO2aBpNDuPqXKyiCifvh0ZgO8JpTTbKzw5kNWagS89McF30QxwOwlw159cConqlFr7BnLZITjLpX3/dQndiPDnu6aWrhhVOS5vXlHCVTBNilYQ2ET2wE6996CYHFII42cQniJUuIOpiiuBl3Z99308R8dYOxGVy3mc5rcvPAYrJDyR3XUNFIJnYcq9TYIlk2TkTYTpCHF89f07oWjhg== 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: idA5u1Ggr0NWEAh0E3W1j3n2qhh1MO1y3wkZa0l7cz0xf/rKZgd0MdauGubnEpNSeq/vDd+lk7lLcmHbJ8CplXqhRqeJprZOYNYJk+43iwsdfriI0mPDi2M0Km+/YaCulgqqcozxytL4eeC8b4UdyAF72+Kuhy6tjHBvQWgvnKc5AR47G6247YQ90x4p/JIJm8KOdqk1GDSw6WyJ6bzO5b/GJIuZOQI284Rd5ustiWYItRbW3MmO3JOpPZGeI5qTEfrACrC18lmYvnd9daqrBRmvkbxcefl5jJSeCxZf8I2wk1KvWBB9d/zfRotLdyZn3egYN8GsZ9c+ex8B9OKy75ZTis0E0k0dCfTPHfC5t91Tieq4pavcAme5VG6bLDfSk7OT4xF+EdmIJERHHeeokLTWrmJZGpB0De9lscAOt41z3E7x7xXSprfzDSe6JRungviRFHNhf2xE30lY0bBNVnokz99Y5EjBme0WOtvLCUPnGa1i9gJTd/KExNA71ZD89Hx5uvyOKTfaq1VerIoPoubnvVE1o+8ZZqalsJ6QlHOJ3+cr2OuuClZfG88fhZilH8Gt0E5BonThiwMe3Pd4cFW6yVk4Kqemh85pO6GsHf7PiPLVWDQS9+j25uLy70ESWecl/Vbd1/pwtqgLI9fLbg== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3cf55b09-9efc-4988-75d2-08d853170df4 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:15.8042 (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: RW69Rntvnv3HrOxOwvWy+1zUM2aGVYhRkCte7j+UHb/Sveij1gFZDGRSqSS1tdkBOIr/xTJzUQTEb57rlQDkjw== 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 The structs hif_queue, hif_data_flags, hif_tx_flags and hif_ht_tx_parameters have no real reasons to exist. Drop them and simplify access to fields of struct hif_req_tx. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 39 ++++++++++-------------- drivers/staging/wfx/hif_api_cmd.h | 49 +++++++++---------------------- 2 files changed, 30 insertions(+), 58 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 1f2158d6eaa9..e2fb770e98fc 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -300,23 +300,14 @@ static u8 wfx_tx_get_rate_id(struct wfx_vif *wvif, return rate_id; } -static struct hif_ht_tx_parameters wfx_tx_get_tx_parms(struct wfx_dev *wdev, - struct ieee80211_tx_info *tx_info) +static int wfx_tx_get_frame_format(struct ieee80211_tx_info *tx_info) { - struct ieee80211_tx_rate *rate = &tx_info->driver_rates[0]; - struct hif_ht_tx_parameters ret = { }; - - if (!(rate->flags & IEEE80211_TX_RC_MCS)) - ret.frame_format = HIF_FRAME_FORMAT_NON_HT; - else if (!(rate->flags & IEEE80211_TX_RC_GREEN_FIELD)) - ret.frame_format = HIF_FRAME_FORMAT_MIXED_FORMAT_HT; + if (!(tx_info->driver_rates[0].flags & IEEE80211_TX_RC_MCS)) + return HIF_FRAME_FORMAT_NON_HT; + else if (!(tx_info->driver_rates[0].flags & IEEE80211_TX_RC_GREEN_FIELD)) + return HIF_FRAME_FORMAT_MIXED_FORMAT_HT; else - ret.frame_format = HIF_FRAME_FORMAT_GF_HT_11N; - if (rate->flags & IEEE80211_TX_RC_SHORT_GI) - ret.short_gi = 1; - if (tx_info->flags & IEEE80211_TX_CTL_STBC) - ret.stbc = 0; // FIXME: Not yet supported by firmware? - return ret; + return HIF_FRAME_FORMAT_GF_HT_11N; } static int wfx_tx_get_icv_len(struct ieee80211_key_conf *hw_key) @@ -377,14 +368,16 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, req->packet_id |= IEEE80211_SEQ_TO_SN(le16_to_cpu(hdr->seq_ctrl)) << 16; req->packet_id |= queue_id << 28; - req->data_flags.fc_offset = offset; + req->fc_offset = offset; if (tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) - req->data_flags.after_dtim = 1; - req->queue_id.peer_sta_id = wfx_tx_get_link_id(wvif, sta, hdr); + req->after_dtim = 1; + req->peer_sta_id = wfx_tx_get_link_id(wvif, sta, hdr); // Queue index are inverted between firmware and Linux - req->queue_id.queue_id = 3 - queue_id; - req->ht_tx_parameters = wfx_tx_get_tx_parms(wvif->wdev, tx_info); - req->tx_flags.retry_policy_index = wfx_tx_get_rate_id(wvif, tx_info); + req->queue_id = 3 - queue_id; + req->retry_policy_index = wfx_tx_get_rate_id(wvif, tx_info); + req->frame_format = wfx_tx_get_frame_format(tx_info); + if (tx_info->driver_rates[0].flags & IEEE80211_TX_RC_SHORT_GI) + req->short_gi = 1; // Auxiliary operations wfx_tx_queues_put(wvif, skb); @@ -436,10 +429,10 @@ static void wfx_skb_dtor(struct wfx_vif *wvif, struct sk_buff *skb) struct hif_req_tx *req = (struct hif_req_tx *)hif->body; unsigned int offset = sizeof(struct hif_msg) + sizeof(struct hif_req_tx) + - req->data_flags.fc_offset; + req->fc_offset; WARN_ON(!wvif); - wfx_tx_policy_put(wvif, req->tx_flags.retry_policy_index); + wfx_tx_policy_put(wvif, req->retry_policy_index); skb_pull(skb, offset); ieee80211_tx_status_irqsafe(wvif->wdev->hw, skb); } diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index b86ec39f2615..d5ef1118b87c 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -191,53 +191,32 @@ enum hif_frame_format { HIF_FRAME_FORMAT_GF_HT_11N = 0x2 }; -enum hif_stbc { - HIF_STBC_NOT_ALLOWED = 0x0, - HIF_STBC_ALLOWED = 0x1 -}; - -struct hif_queue { +struct hif_req_tx { + // packet_id is not interpreted by the device, so it is not necessary to + // declare it little endian + u32 packet_id; + u8 max_tx_rate; u8 queue_id:2; u8 peer_sta_id:4; - u8 reserved:2; -} __packed; - -struct hif_data_flags { + u8 reserved1:2; u8 more:1; u8 fc_offset:3; u8 after_dtim:1; - u8 reserved:3; -} __packed; - -struct hif_tx_flags { + u8 reserved2:3; u8 start_exp:1; - u8 reserved:3; + u8 reserved3:3; u8 retry_policy_index:4; -} __packed; - -struct hif_ht_tx_parameters { + __le32 reserved4; + __le32 expire_time; u8 frame_format:4; u8 fec_coding:1; u8 short_gi:1; - u8 reserved1:1; + u8 reserved5:1; u8 stbc:1; - u8 reserved2; + u8 reserved6; u8 aggregation:1; - u8 reserved3:7; - u8 reserved4; -} __packed; - -struct hif_req_tx { - // packet_id is not interpreted by the device, so it is not necessary to - // declare it little endian - u32 packet_id; - u8 max_tx_rate; - struct hif_queue queue_id; - struct hif_data_flags data_flags; - struct hif_tx_flags tx_flags; - __le32 reserved; - __le32 expire_time; - struct hif_ht_tx_parameters ht_tx_parameters; + u8 reserved7:7; + u8 reserved8; u8 frame[]; } __packed; From patchwork Mon Sep 7 10:15:10 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: 11760463 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 D3E46746 for ; Mon, 7 Sep 2020 10:25:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B29C62067C for ; Mon, 7 Sep 2020 10:25:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="MtRvB3y6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728822AbgIGKZV (ORCPT ); Mon, 7 Sep 2020 06:25:21 -0400 Received: from mail-mw2nam10on2078.outbound.protection.outlook.com ([40.107.94.78]:7488 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728743AbgIGKQh (ORCPT ); Mon, 7 Sep 2020 06:16:37 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CiGL2KCcEGCkGb0mBduwvtibvb74QMkUKiQXYv3TAKZTfgl4I3dUV3u+iwJndqUE4M3pR5QXzj/3swAG6xpez2hQMGwcuHofsSUSivSQ7VzGCG0cthVi7efAPaITuhMA73MGck8CZtbtKVQUAzdrHBNUOfugwaCjNIxRrbWWOxgZvbEPxewm7/a+XWvXl5nqQkvWOO76ufpdcz2a/YoTcu0jHmRCpe0E97ln+qVBeyNHaywGaut62htE9bGk0xmeBiVhl/MmUQFiJP+5X1h0X1QTfpXbc9gsB7nAEFvn9A7xanwd+QbBuCoL+8OvSJ2IUr1SIenAhxZtWo5WtHJ5tA== 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=b9+HgoqKyWO/WNKMbwFLCH48hV1aj5DkkNWjjjRegOk=; b=J4nAp5+rtwU7F2aLA89pRLnJXWL0kUNaKuBT/hAcmnBJ5HgxImFET5hhGFqccdz7z3RID/WTDeRuR/4lT1ZBKqVpVh4dUh0uml4vc7BO9UB6jzIPjIOdZVLu3iSo0vsMLgQmkvV/gnbRDfRY61KlM0jFNObtyDeJQb4nHAEIh8h9mT36Lrov6OCmwPL+rKvkeHZXtN5AzME9S96v002ruTAXH0fgkL8oxvaQZzE2LwRzsPxS1CXRkoRBO4ZBT3jHoLVB0Ja0ilLL8pGYZRDyYx0qcZlooFqsEbQXGYzEBZ3P4dTlzATYbwPILsh3bNzACgTNOxuNDc12SFLWb1JWzA== 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=b9+HgoqKyWO/WNKMbwFLCH48hV1aj5DkkNWjjjRegOk=; b=MtRvB3y6yglEt/bySvtwt71xJxrRrEx+GZ0aiU43FxMYL5zj25HE3VClaat2vBpm92jxfuG4KGYMT1NLpSHI+VV8SX3dFmMYpPv6I9KBszyrV0oJWLcJazi4tdHMGsFwxk6jzmLPT42UjNm0ffV3mXj9dh0xYaA+0KUc+b2mtFU= 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:17 +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:17 +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 20/31] staging: wfx: drop useless stricts only used in hif_req_start_scan_alt Date: Mon, 7 Sep 2020 12:15:10 +0200 Message-Id: <20200907101521.66082-21-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:16 +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: f6869f43-c49c-4dce-dd37-08d853170eee X-MS-TrafficTypeDiagnostic: SN6PR11MB2720: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1443; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XSZguBvMVIae17vQkizDTP7REJmsboa/SpJ6AuBMLPaxAMxoTHQ9j5L5ffHWXhDQaPvZuccbuLFXbFFOcB1xiNouO0m29MHbrBAapxNJTXwlyQRJgW9BfZCkmmeipF6sA8rsWA4IAlm21Wl21FTXZwpntLDTrX3I5kfIacpJPU9hCC17cpV4x/IwWB4eIYMDDwzAcbg+7VLL+LSDbIfZ1hSI6FfVzWHz7JSXnTnHOZ8CgCXtJBgPOEdHTa8YzU7O4Vj5BusghP/QCwfU5Y4m/9Dz497eZilr/55yGJkfRRzbW3uhKd6EL+DkvvcGCCm3 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: 9iTCWll80ny/bRR99iGctDkOz1Q/yvet5NoK4vUqcBbu5yVPlRfgyOi2HAN8brDigusULr6JLw/x6mBCHSVjbO2yeaNIu9fToNOPNX6VodE8kEuJs0v56ShQ7jWF4Xo6D5ypJeZYT2Vbpt9pArIPvDxA7e6YWwR5lO5BI53K0OGljbF9fm1pKPkNsQxBtuqFOtD5aQvomUXgwgoEIOVwCp6aAg6JivXdEW0BVCPDGBPC6Zg6OI4AV/kqkVRPB9iBkLWW8hk75t2zcE/sqdZxnNdYp9xl0hdcRyPCtt+iFpBYQjcFVjYGQrNSrTOsurqj0MFzYRS6PI4t8mw6qKacJg4Ur6eAEZCOXHgjTdjWbKKNyWP5BPN3ulEMWDT+wT0l6FiB/rHMNPXE7k73B6c7zgpHWUXtZ07+vYk8RYkLUe2Fgben8MOOIN7CK0B5LfNK2GJItt3O+Fu5yCANOmLyXzjLrOiTIEgfeh3ZWWLsTYXp6SPEZ9eloHuGTOOq2edas8g7r94doCEzJzXRyhljflzIbLlUPpQ2oDIatiOX83uTrea61s/L35VtApouKEch/TnouX2tInd8idAFA77FcFb2uiIdqp4VPnCKtEPWSq9+YQymxKlo7Piv3zog6Osmm8/74YGYhCN7ODjE91NVUg== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: f6869f43-c49c-4dce-dd37-08d853170eee 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:17.4562 (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: fy+UsMfexcgNEtYGoQEZ8cU/9Tw3Zbn4WIVOcEDGMc2JT4jLFIGdtuDcHtQlq11/u/jnw4hHY7jckbzC0TYlKg== 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 The structs hif_scan_type, hif_scan_flags and hif_auto_scan_param have no real reasons to exist (apart maybe defining namespaces). Moreover, the names of the fields within these structs are not all meaningful. Drop the structs and rename the fields. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 32 ++++++++++--------------------- drivers/staging/wfx/hif_tx.c | 5 ++--- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index d5ef1118b87c..c7e6fdf183b1 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -113,25 +113,6 @@ struct hif_cnf_update_ie { __le32 status; } __packed; -struct hif_scan_type { - u8 type:1; - u8 mode:1; - u8 reserved:6; -} __packed; - -struct hif_scan_flags { - u8 fbg:1; - u8 reserved1:1; - u8 pre:1; - u8 reserved2:5; -} __packed; - -struct hif_auto_scan_param { - __le16 interval; - u8 reserved; - s8 rssi_thr; -} __packed; - struct hif_ssid_def { __le32 ssid_length; u8 ssid[HIF_API_SSID_SIZE]; @@ -142,10 +123,17 @@ struct hif_ssid_def { struct hif_req_start_scan_alt { u8 band; - struct hif_scan_type scan_type; - struct hif_scan_flags scan_flags; + u8 maintain_current_bss:1; + u8 periodic:1; + u8 reserved1:6; + u8 disallow_ps:1; + u8 reserved2:1; + u8 short_preamble:1; + u8 reserved3:5; u8 max_transmit_rate; - struct hif_auto_scan_param auto_scan_param; + __le16 periodic_interval; + u8 reserved4; + s8 periodic_rssi_thr; u8 num_of_probe_requests; u8 probe_delay; u8 num_of_ssids; diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 134af4daee96..0553e79595a6 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -256,9 +256,8 @@ int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, cpu_to_le32(req->ssids[i].ssid_len); } body->num_of_ssids = HIF_API_MAX_NB_SSIDS; - // Background scan is always a good idea - body->scan_type.type = 1; - body->scan_flags.fbg = 1; + body->maintain_current_bss = 1; + body->disallow_ps = 1; body->tx_power_level = cpu_to_le32(req->channels[chan_start_idx]->max_power); body->num_of_channels = chan_num; From patchwork Mon Sep 7 10:15:11 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: 11760453 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 E8694746 for ; Mon, 7 Sep 2020 10:24:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C54B921473 for ; Mon, 7 Sep 2020 10:24:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="XuUxLlz+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728844AbgIGKVD (ORCPT ); Mon, 7 Sep 2020 06:21:03 -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 S1728745AbgIGKRM (ORCPT ); Mon, 7 Sep 2020 06:17:12 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZiR+qrwRuPv61q96qYRHOZtGN5p3PkmYokYqKn9+S1wbxbvqXPfLmSYrdNdfO93lfz7cgbljI9q3+5hJiS8q5rRTkh9t7k7aTRmOXgQtUmcIHPb7iT9vEVntW4eFoEiWLlVvgMb1ZHxC/1dVK2eUTydBCZ/8H1AiyD69LKcqvPFnosxGy4bnPZK4PKMgda+HqmUGOsBJBHEVqysKhckr3iW2PioThHYRvLiZvjGvkVsOmwlCet/u8I85awxTAyBwyfg2tCImiM9cyVqGxJVUI4kyVE98nzImjfwGHeTiq/zTYCk8gs3HTXKG7UEL4kOXj1mdcCwD6daE56Y7eZRrHg== 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=S88uLDlFTB5T8xAtqkryG6651zwk2ZJeueih/rYLPM0=; b=iSlmSgQRiz1Kxrfa6G46swXpELRkBO/axVZAdy8YYn0oyiCyRsopWsEBJ+DMR67kbqeghUucBs9KU0QMMe9+fJZdbq9jm+QmFV5zp2tsYVB2kAAgdifsb3e5Km78zc433bV/ORxr0nhhkCOBwObXxV9Bw7iGSlEZOvJsW95EZk0vbOarWyXiE8lLblw+/if4OdHxrlMvn2hy4sh456HzGG0FOh5uMgMnkd2r46Dr4GyMnEg9XHxa8SDpNmI6apRqenFaMZ0X45ntVMEFfdigIURpx9Wk/BwLR2t4BirWSsIlquCrukOBhUn2bVNDhg6rEQzHGxKfX15uknND7hibUA== 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=S88uLDlFTB5T8xAtqkryG6651zwk2ZJeueih/rYLPM0=; b=XuUxLlz+5HgLfAG32w5wblaKvQojYiDPJ6kHONGaI/ENbrXmq3jU89Wk7WnPQ6FYGPT8d5uf/wK3kCZrUl52FE98zpElhuvWEVCavUtOyK1uAzuksvIgiwP8+API7OPXghUYlM8WvNpgrh7bUHENjg+Mzd8QLQOrvxH1SEassv4= 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:19 +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:19 +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 21/31] staging: wfx: drop useless structs only used in hif_ind_startup Date: Mon, 7 Sep 2020 12:15:11 +0200 Message-Id: <20200907101521.66082-22-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:17 +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: ac3de66f-4be9-465c-a871-08d853170fe8 X-MS-TrafficTypeDiagnostic: SN6PR11MB2720: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Qaghc2mhWi68i/I5dtnzBsBE6tBoyar523ncFG+95BZvjxHH0qwoxZHFw7AOuoErEpJt7jo3lCa6PYC7R6oUVAKCQnXxJkuvb49ZeG+HBh65yKTwfpi0R86bBKxzEbSZ2wQtphw1zyZQleb3+xydeR4hbH93avpWx2uCjjn6ztWHclofOKmJPRPsIcgfrraTwQQP+B6a0btLSzpIoSco+EFuTCSl5nY57ccD2IFDUiZ9cusI3rlWNXMz5uq2ceq0OqrVssL/CE5+wO9F8S6FEORaHrrOLKRUviXv3iPiSKViHeTPnMjBD53lKIAIF/NZB3XwRzcyZPmu6RX87ohcDw== 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: 2e3gCXv3NTw2fNbYGmCw/0OFBvzZcm1dVYqwAbOCrhU3k0i6s2/D4fPUXD2Smsn6qJtz5QelDM/MJVSsNZ94X5Ve56NrhNc/ltdDhsZHvN+Ki1IvdlkoQyDk01aRcd7lTd79JB5v8naM8tCH0GoPl2K23sIapABJgmWyG20O8z0+u/TtY5h6x5hmKOlLkptsYJY2BREgSqDIbGav0PDVnjUEXjAtQ4jpKWNS3PdomijJl4gQ6D3vmVnsgQY9QUZEtR75HDG8mOTkbQbJTddel0x44DQmvdV3HXndgK+0Dtfup/8fasvAcXIo+23CLIXBwZQlSwu9lLKZXYimZGs4RDqmYUBTf+IQ/pDj6m8cthPMTC4+TXsGJFnfX53HZW6MfD0bcj5+URFV0OfAgNpa9HivSr4NwGk+vR88jPyyUASTZe+kQIR1MVt9UX5AiEMsiEFq23B6GRDMUnJc+jJIJELNMFTmVn1ZicL4EUwGuR96DEqjoD17770PCWccipe4vt/s0JdeH09O/bPlokifnpz/0wEOH1vnsCCZJPHHaET6L+2uQMZeW+SEPgDunjQAf3yeF+Zsr2Ctz84WooNZx5h67Yhz0m2EL+zOCfcUEbBFZ5ELJ4cTqX1BkM9S8XESK2T6cxVNzqqx74UPdkLTcg== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: ac3de66f-4be9-465c-a871-08d853170fe8 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:19.0963 (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: QsV8WiqSojZecDGpegT8lllzYbldg298EazgjlYDwlcBniVufsczfgy94QMD83obmzOWYdi5XJjMIBM2DY8yHA== 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 The structs hif_capabilities, hif_otp_regul_sel_mode_info and hif_otp_phy_info have no real reasons to exist. Drop them and simplify access to fields of struct hif_ind_startup. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_general.h | 32 +++++++++------------------ drivers/staging/wfx/main.c | 9 ++++---- 2 files changed, 14 insertions(+), 27 deletions(-) diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index 0dc13176a05e..4058016ec664 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -122,25 +122,6 @@ enum hif_fw_type { HIF_FW_TYPE_WSM = 0x2 }; -struct hif_capabilities { - u8 link_mode:2; - u8 reserved1:6; - u8 reserved2; - u8 reserved3; - u8 reserved4; -} __packed; - -struct hif_otp_regul_sel_mode_info { - u8 region_sel_mode:4; - u8 reserved:4; -} __packed; - -struct hif_otp_phy_info { - u8 phy1_region:3; - u8 phy0_region:3; - u8 otp_phy_ver:2; -} __packed; - struct hif_ind_startup { // As the others, this struct is interpreted as little endian by the // device. However, this struct is also used by the driver. We prefer to @@ -156,14 +137,21 @@ struct hif_ind_startup { u8 mac_addr[2][ETH_ALEN]; u8 api_version_minor; u8 api_version_major; - struct hif_capabilities capabilities; + u8 link_mode:2; + u8 reserved1:6; + u8 reserved2; + u8 reserved3; + u8 reserved4; u8 firmware_build; u8 firmware_minor; u8 firmware_major; u8 firmware_type; u8 disabled_channel_list[2]; - struct hif_otp_regul_sel_mode_info regul_sel_mode_info; - struct hif_otp_phy_info otp_phy_info; + u8 region_sel_mode:4; + u8 reserved5:4; + u8 phy1_region:3; + u8 phy0_region:3; + u8 otp_phy_ver:2; u32 supported_rate_mask; u8 firmware_label[128]; } __packed; diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 1017a2290f08..2a9098bad1f5 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -359,9 +359,8 @@ int wfx_probe(struct wfx_dev *wdev) dev_info(wdev->dev, "started firmware %d.%d.%d \"%s\" (API: %d.%d, keyset: %02X, caps: 0x%.8X)\n", wdev->hw_caps.firmware_major, wdev->hw_caps.firmware_minor, wdev->hw_caps.firmware_build, wdev->hw_caps.firmware_label, - wdev->hw_caps.api_version_major, - wdev->hw_caps.api_version_minor, - wdev->keyset, *((u32 *)&wdev->hw_caps.capabilities)); + wdev->hw_caps.api_version_major, wdev->hw_caps.api_version_minor, + wdev->keyset, wdev->hw_caps.link_mode); snprintf(wdev->hw->wiphy->fw_version, sizeof(wdev->hw->wiphy->fw_version), "%d.%d.%d", @@ -377,13 +376,13 @@ int wfx_probe(struct wfx_dev *wdev) goto err0; } - if (wdev->hw_caps.capabilities.link_mode == SEC_LINK_ENFORCED) { + if (wdev->hw_caps.link_mode == SEC_LINK_ENFORCED) { dev_err(wdev->dev, "chip require secure_link, but can't negotiate it\n"); goto err0; } - if (wdev->hw_caps.regul_sel_mode_info.region_sel_mode) { + if (wdev->hw_caps.region_sel_mode) { wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels[11].flags |= IEEE80211_CHAN_NO_IR; wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels[12].flags |= IEEE80211_CHAN_NO_IR; wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels[13].flags |= IEEE80211_CHAN_DISABLED; From patchwork Mon Sep 7 10:15:12 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: 11760455 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 7D8E013B1 for ; Mon, 7 Sep 2020 10:25:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5607C204FD for ; Mon, 7 Sep 2020 10:25:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="nYbuydGz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728790AbgIGKYl (ORCPT ); Mon, 7 Sep 2020 06:24:41 -0400 Received: from mail-mw2nam10on2078.outbound.protection.outlook.com ([40.107.94.78]:7488 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728772AbgIGKQn (ORCPT ); Mon, 7 Sep 2020 06:16:43 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QyZn/Buvl6yKOZkHcacdm4T1cuV/9PFR7LO8XTH8a8J0+KyZqf4cOEPwuAdnzQCygO3eTfAfvvVy7jGEFdeN2UztRZ+x/HF7JiDm2sRgWcU1Aap5nvQ9TBbKqhNLe5/SkG+5NS3Waw+s4pbkwNcOom0JSOb0ax+FfGKjhFTDcXX3LIeRWle8sPgp7fhBP2X6qPWK2F06KxKKsKB+eF+J+1Gjq7zqkmT3CuIPKKR6/Q181loQCZXuQG4RNl/DtKss1F783LgAIRwb+afPPdR3HtYmCDsnuPF/MYfu7oZNpIhcRTtYqbi72gze51dCVfz4nsi3X2sMw+Yxs6X27dC7ZQ== 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=J89mvlOfc8/oXPu8VOthbqleo0jGQgLiy4h+Mtcqspk=; b=JKQiKLWUTClQ++RFWIgLM0os3MwGYvnCMUta3MxsUexyF8hzEp+fll0AMwCDwYdm2Zu5/AnBjfc0VZko2jVritSG5P78b6zW8psF8JM9+KMbPQ96UYwXqtauu2JWhZNSbBUyz0gHDzzude5iblE6HQ3n8YElKvuDx0b4P+297m+26ODWE2ji//Lr8HvOeqgkNsrp79qDVZrtuI7w5kqkuMsT9HIZIISvgj1E5tTKHkUNeGmcLO3/90bV9O2XNeEulwziFfaqT7WqnJXA3NwrBkALU1HD3Gf9iodwXtCx9G6ggAavvuB97G1lxFbT5GoHLb/tUsYQ+nFUgtuvQBaMjA== 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=J89mvlOfc8/oXPu8VOthbqleo0jGQgLiy4h+Mtcqspk=; b=nYbuydGzDdBzboXNMTSBroB2N06xh1IY6J/V3xOlw1cSUeqDkKNaZCjR4hGVS3UHjFVJOu7tOa+KbHIp4pbXtNUfc5umn1NkV1aVNRNUivAuvqo/pWbp8oFRSSfTaVFYquOtaXBOQxx/OXQknyH4huwWe3I2kASD4v02UgJfloE= 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:21 +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:20 +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 22/31] staging: wfx: drop useless union hif_privacy_key_data Date: Mon, 7 Sep 2020 12:15:12 +0200 Message-Id: <20200907101521.66082-23-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:19 +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: 2ef60cda-1c8b-480c-f59e-08d8531710e5 X-MS-TrafficTypeDiagnostic: SN6PR11MB2720: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IJtRZW9su9OX+14bFv+ComVNTqpnSn3SbGnRdMcoty+gFSH+QZ1FtTBjc7vJ2JKI1xJqavq+jaS+zDcR2c1miXPGa12NkabrGJzU56lzFAcs+M1N/rIGE1f5TM24uorgpfTpQG7ps/jVnMSk1Bd57xdyYT2OpKeJHwqDEPZN67lcQ5hqEIVXdkTNYkmjjJuV6FDSMeo49LjEt4XAOp4eps8jC9bNH50I1JO198qxB3cnKRDCtrQpt8m5kkmMzghRKQamZn4B43+5TWPXmvuOT3QK51VGSUWrkWVFel3w4U2Gn4PdsuIkyegfNruh4WX5dxHT5Fql/qSaK/Uu1SdqKw== 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)(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: wIVptYqinB/hUs32RAjDLD69+tSjBmBmOEnTc0MQfFhj/FeI0RVvf781M0JLuljI9Fe/i8RMJQ8oPULun128hBL9wzuDnIzxHDjLKQqHTjriKXP6ahimNHwvapfzJ0qLQufdWQt5VXMomlLEs01eHCV2ivrEefHqyPAzXljXbqFrRQf+NQU7mHfRAR4DMWxvxy/QA1TIc9WZcl4yQN3E6uJzfjS5uzcZxU+3UEwlUdXxVYdrc51Fhgk87GPhsJW1U6hqHHjLHT7kJR0T5IhwB38y1Ah1Rss+7umyftjj3ynNfUqF9aPph+Cp614xq3tniJPiPOdzUnvieh6D+UncEc4lqWxjyrhkncVTwIA7Ui0/AZvp3iaqSodocl0CefEEubZwUJg6awMBC5FLAM6hotFZr++XHZ+JJHzjZeD8gW7MrdJu199wjfztzrY5mdIm82H0Wm4w0lhbq0aRKMqIDE7y7wAr3YgX0dlN9FZtZYUsHb1Xh6+JNWDVbLXQqkhKmt4nBe9NvfuZNrjUksSXM9HoIZ7MT6xcmKJcdfuJRR0q2wrBTpVvZphOJHrzEPds6ZDhX7CIRkehe7IgnYuc8fcKCugh1Qnr/CDsRS3TaPr+oi+9QDAjs3oo8A562ahkOFG/EWgcy+ZenxCE15S9wg== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ef60cda-1c8b-480c-f59e-08d8531710e5 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:20.7483 (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: KXmBBFRvl/JZrf4kiLwKYhTXsSam56OyXhyXdKlb5XMZjYTCZ0mg2ef11cl5w6rj409qVnRcxjPkcsVHHE105g== 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 The union hif_privacy_key_data is never used in the driver. So, it is not necessary to declare it separately from hif_req_add_key. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index c7e6fdf183b1..17cd317de824 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -500,25 +500,23 @@ struct hif_igtk_group_key { u8 ipn[HIF_API_IPN_SIZE]; } __packed; -union hif_privacy_key_data { - struct hif_wep_pairwise_key wep_pairwise_key; - struct hif_wep_group_key wep_group_key; - struct hif_tkip_pairwise_key tkip_pairwise_key; - struct hif_tkip_group_key tkip_group_key; - struct hif_aes_pairwise_key aes_pairwise_key; - struct hif_aes_group_key aes_group_key; - struct hif_wapi_pairwise_key wapi_pairwise_key; - struct hif_wapi_group_key wapi_group_key; - struct hif_igtk_group_key igtk_group_key; -}; - struct hif_req_add_key { u8 type; u8 entry_index; u8 int_id:2; u8 reserved1:6; u8 reserved2; - union hif_privacy_key_data key; + union { + struct hif_wep_pairwise_key wep_pairwise_key; + struct hif_wep_group_key wep_group_key; + struct hif_tkip_pairwise_key tkip_pairwise_key; + struct hif_tkip_group_key tkip_group_key; + struct hif_aes_pairwise_key aes_pairwise_key; + struct hif_aes_group_key aes_group_key; + struct hif_wapi_pairwise_key wapi_pairwise_key; + struct hif_wapi_group_key wapi_group_key; + struct hif_igtk_group_key igtk_group_key; + } key; } __packed; struct hif_cnf_add_key { From patchwork Mon Sep 7 10:15:13 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: 11760451 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 7C68613B1 for ; Mon, 7 Sep 2020 10:23:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 59C92205CB for ; Mon, 7 Sep 2020 10:23:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="QSewbqVO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728932AbgIGKVH (ORCPT ); Mon, 7 Sep 2020 06:21:07 -0400 Received: from mail-mw2nam10on2078.outbound.protection.outlook.com ([40.107.94.78]:7488 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728421AbgIGKRI (ORCPT ); Mon, 7 Sep 2020 06:17:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A3FArI739QBff6wmJYD8GdRrfyNTaBrKLpBMURZJr7TEd3nLCCDAgPtrEtKsxsg6HCDeTu3bg51m0azpEFFE7w0g7rdn3bUy0MN04m//ryq42i4xvS39WNMyUoj2OG7s6F8FiOkrmn+98WhOJSW3fN6PdjiUwdb2s9hVFuycuOQjxAEZpfsJ+Z+aH0KdhgBW5qd7nNdIwK19cwMpzJC25hCdPMkbUFHlQUCIi54VFRbB73bt1eZ9FKdNzBhEH03K+JQM6Cm/sGAj/+gc3PShwHCwkpTd7H4wMSVw2ptJXIckDosdO/rIzpLVtPlqQ60Tr6DQSt09uKB95QexqrOj2w== 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=OyaTk4nGdiD/SodbKM8DXYOjqFCAWbvWDSsuajm8qnE=; b=OhTTpwbS+cJ3aE+EtNgcp3C2bZXYAlzZJKYTWXm4WRzPbjoXSawJR6E4J+9qSrA3n4s8Ln8dJ9O3S3KDOOqZUzyV5u/E8uCkIknvqAFntv3NK0nzk60ZAiYFgcnBazD40xg/hRJnFPjTWAsdmrvHLgSQIOfP7bOK+SJuh8aDttmKkHFKbp4x55amT1mhtW0T580efldy4ISaRivVpzZI0tF1f69dL+SY6ZX6SyNXO6K4HiKKA/AP+R1m5QjYjESbbC7gnqyzeRQqU79XLp7CzPGHHAq80rnuWggDPSMFvEcNJfkYepD2NsWf7ijd8Ozi7io0ra/F9Dd1O96Ni2k4Tw== 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=OyaTk4nGdiD/SodbKM8DXYOjqFCAWbvWDSsuajm8qnE=; b=QSewbqVOc1qM0X4wdKGJABXr1aeBxf28NBFDhTKomsgbXgJNTtUKH1hnhycMnQvZkfBRI5wPm8H22/xc45dXHZXjDJ4SQGxWc8MQCfL6VRVAbj+0gRsldhuPsGXknSw7jh2NMsB3Q0NY+GrsJMlikb1peSbXLLLSUb3009LHZj0= 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:22 +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:22 +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 23/31] staging: wfx: drop useless union hif_event_data Date: Mon, 7 Sep 2020 12:15:13 +0200 Message-Id: <20200907101521.66082-24-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:20 +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: 7de4d973-9da2-4069-24bc-08d8531711df X-MS-TrafficTypeDiagnostic: SN6PR11MB2720: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FWtr4sG7dStbGFVTDXKseReVdF+f7mkRctM/UuYZafjy1Hkg0VJzjCyVu7l3NwnIl1YVL212Y6O8mV/mqkraKgSD5kjHTPhOnsOeleu/VErsDCtHcKgjI7bvhQMV3hRuB4ZJk5VPgnR3+5wNubJr7EoKhFy0dp2oz9GOJxo3AbKPTJTM7dKI4OgVeoQoPi5hDfFUIAUFjhMxG6Qsd0DTWgX5J4IJ/uvXiBHqMG1ZASZFc9V9IOzPtTEkpknWnsny2JF8thWwYkFl7RKAJ657ZICmvO0AvI080RrLb9dVAG0aC5M7XrDSyd7Jpvg/82petqCzIJzVgPb4b5eebwUUiQ== 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)(83380400001)(107886003)(6486002)(8676002)(4744005)(956004)(2616005)(2906002)(316002)(86362001)(8936002)(478600001)(4326008)(7696005)(36756003)(52116002)(6666004)(1076003)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: MI7xZKwJnj6pUlbeaGPYYpi9eaozaC3VI22H9Npec3fYN5TLW0gyZkVZJ2LXhWxcdOpEdeHrgg0mdlNoKILLYtQ8W4dm5mLjy47ecdCkAuxJZGNSz3m83Q0Q3ujRiI3+FNbzSOERMeuC/UYqyS++4WsWI2x+t+1oTY+4QN+gjQiMRhl46gs35OaMULgruiLN/CiqNIabbh2Grnzz1ciC/5QgdzhaqXzihHbkZVSac7NxDtVckavULZQD1ETCuiQ5wvsFp2iqOumaDOHiyyk46lq+dVpD+yUz3xOikTF5gs+6yMUj5IxnBFKrXOV/xsO+MJbV6wWjn1/E5Q0IqyFJyvIjTJ1vdZi6YzMbE3WxiHM9ObAYiSZJpyBHoh5/W1yav93xVkDvh8e3y7LoIRhwd2L+LBX1hthPiRUOWA2vmbly8dtQT8jusK2mAQ4czVLcj4ivDO82+U+xwlECXoObNQPXRVOocBmDN2j7w+3ziKXhYJ5eTcfaptHCjtoB/k6tmSpgVsFovTYsB2sbpZL1oqyh/Lkv5c1BylUIbfaeQ/hZiS2vVJ6Pbb/5GVe9IvgJUEn/n4GrDkppMLO50WDF/VHufeeILXNA9cSzxF8NfBU0+B5CouRcsIqsDE3hqe1CNUvA4NCojeppbc7fyYgCTw== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7de4d973-9da2-4069-24bc-08d8531711df 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:22.5133 (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: H/49+ACX0p5YrNXyyXQ0rou7dKrDvBpl5PuwCxah7Q3R/6wIBVtWYnM5mf5H7skzyagEAnjnKvNjj6SdJmPRsA== 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 The union hif_event_data is never used in the driver. So, it is not necessary to declare it separately from hif_ind_event. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 17cd317de824..c18e762485a9 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -548,15 +548,13 @@ enum hif_ps_mode_error { HIF_PS_ERROR_AP_NO_DATA_AFTER_TIM = 4 }; -union hif_event_data { - u8 rcpi_rssi; - __le32 ps_mode_error; - __le32 peer_sta_set; -}; - struct hif_ind_event { __le32 event_id; - union hif_event_data event_data; + union { + u8 rcpi_rssi; + __le32 ps_mode_error; + __le32 peer_sta_set; + } event_data; } __packed; From patchwork Mon Sep 7 10:15:14 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: 11760435 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 8EB8E13B1 for ; Mon, 7 Sep 2020 10:21:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6CD0B21481 for ; Mon, 7 Sep 2020 10:21: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="ak96eV1d" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728732AbgIGKUJ (ORCPT ); Mon, 7 Sep 2020 06:20:09 -0400 Received: from mail-mw2nam10on2078.outbound.protection.outlook.com ([40.107.94.78]:7488 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728550AbgIGKRT (ORCPT ); Mon, 7 Sep 2020 06:17:19 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NXYBech5Xs6XFc62nwXjYRD5beZ2XWVn13OFhFcQ1RWCHyP5aIcOWfl3do3qZozWsphcxejeEEN+DYulP42CyF+KOjBsbnoMf6ZNaPZ6oT/+S5dsmASRJLcrd1wTKbf0KwDOS+OgCY5ybgyrDsD8fI2aBDLR/sl2vqptzibB/o/LUcVBN90rsBtAw6Bi+xh6tnX+d+G3Dd6rxMpY/b5aYYMNKlPTM7lSoS4xxoxUpVe0X5GrgO9Hqap8uXi/TgvBwLzmJvTphYfhud0FVLsvirZrcXGTfR59FSSu/hoNQMSqUy8CBbGu0kgeVfrUcW79/cTUE1trg7WTSj3N/LEMkg== 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=TzLeOEwzJocxUt4EbhtFEkvS1ODweV/cY4EpplLa4pI=; b=WLQEqyklU8VSPRuMogB6Ne5CnVLbKQwJMAFtjPP9DYpPOfpHLaRmJH9EmwJPCtYebdUfGnRPdhrkBbA/rXQCsKGB1nZUc80Sv/1Fc3jGJ8dCXV87p6cxLkCQQN/GowubdkXDgxarp0q/w0c92xno3XJsC8HsWhxI5/Z8RZabOMvYmGF6CnMDze1ofHyOBuNZU4eRn0tsQW2UqmRWMufOuAJUCBJQfAcyJcZFPpm3cqp8RKWSn0c9j71VM1bGHYsWyMzoGxBIUDO8GDL6hy16sAVG0Ex2laGpCsAk0SjRYs9q5WA8QPlAHuKvLc0syd1+aiHMGaaWTxgXFY304FEw5A== 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=TzLeOEwzJocxUt4EbhtFEkvS1ODweV/cY4EpplLa4pI=; b=ak96eV1ddwqp+hptPTavtcrDvF7a4uZDvCHTfQYI+BWgwUjEV/HHL4rOut9Yh43NtMSyxzd7PP66X/8g9HBkWMa3LDE6zkC0TikE9xZ60d/tlVzusbePveH3LcKG1CYZMPWT4HsMA9Bbd2UO6y4uY0Cvt/3ovRBmUO1ipTM2QsI= 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:24 +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:24 +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 24/31] staging: wfx: drop useless union hif_indication_data Date: Mon, 7 Sep 2020 12:15:14 +0200 Message-Id: <20200907101521.66082-25-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:22 +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: b451f160-d4fb-4625-c320-08d8531712ec X-MS-TrafficTypeDiagnostic: SN6PR11MB2720: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4125; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nqOEpwU2bj+txpVj5+vjTE+UgyjoZFEdj2irJJiPEsr4bHIPKGDp4Mm8SDEnl6HTsdCqVjGLPRPOaaHx2fWdjLytRvXrnxZ21/EkLcwWCCxFkgqE6Ft4hzdmPlDXEV3IwF07EOJLkNe8RNL/biwQgWxAuWJbs5SlG4uhObnyarqCAKd1oqyieEJ6sdKc1hFmIGrjDqpyBKozBX4D49d7KkQDh1qZf32msZk+fXbPf4JcnvtfIlTTy+XJ2LB1t/vhVdjXh7+qe2v1PQGR/Ys8QISXB6jgzYgtcMZ84yiad/BeAkZRzGVDK4bF/aKsLy+I 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: Y+ba5gDUJfkR/RKa2pywr8TxMJsHP5sOkIhnrzFvxOuYAs1oBquyYNQWNM7qXa6cPf3nYKISqvbIFQZctD6nK83x98EUhb5Vp0RCXjad2wGg+JDJSv+xtxOJ1IzauOgU8g1Gs+zY1zuvqlRKuyc//Lxahg/kn+yCunuKEKpsMuLQKVo+tOrZVyvWPwRijYo4xgCda10UwWxiiOGVyv0akrqVC7xsGhG5CRo4MXvBbzfubpfg1WWKetRXj/IEHXoQtpELt2sPsvgi1zp93Ii6+cFyLnLBUu8uOT18x7I3VKj0RVzgTcgM2e5fkrHdr29EWJGqNjg3y8w2qCmtOAYk11wpUXfX/GvCRggUK8iumWDCRw575XEb2n3VhSIILO5kvHS5in/A7il0RyjfhJZ2mKZZvGwxaBr1kuISWrKVbF02fbhPeQrn4HSmApYXFZq/R8ya924bx2aEAVXiYxyQHHdl2q3zQ4SRGAPeosExiXBYmxsCZx8hnqjH5lfNkgXogiDVbwTn9IpJv3Ra98aiLDu8oR7sVt2f6HvFX8Cicn7MUGMBD0sysDi3mHMAP0pDqZewqephVAutg2nb9H2xn79P/2FM6AgpDA2arpsvvEIF4N6ffipcMCWEQzeMoZ617Fj/vpjlxtYWDUYUCCJ2FQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: b451f160-d4fb-4625-c320-08d8531712ec 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:24.1633 (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: vv0J4JwdTSx7d9mC6cbF49XXrcLx6NyP3y0rCJpCZrZacwx5GlOTkQ7prF43wyeOd3toiD67XTu4SJMjKnYoOg== 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 The union hif_indication_data is never used in the driver. So, it is not necessary to declare it separately from hif_ind_generic. In add, drop prefix 'indication_' from the names 'indication_type' and 'indication_data' since it is redundant with the name of the struct. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_general.h | 13 +++++-------- drivers/staging/wfx/hif_rx.c | 11 +++++------ 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index 4058016ec664..da63ba6f5148 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -221,15 +221,12 @@ struct hif_tx_power_loop_info { u8 reserved; } __packed; -union hif_indication_data { - struct hif_rx_stats rx_stats; - struct hif_tx_power_loop_info tx_power_loop_info; - u8 raw_data[1]; -}; - struct hif_ind_generic { - __le32 indication_type; - union hif_indication_data indication_data; + __le32 type; + union { + struct hif_rx_stats rx_stats; + struct hif_tx_power_loop_info tx_power_loop_info; + } data; } __packed; enum hif_error { diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 798167aa4c7f..6950b3e9d7cf 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -225,29 +225,28 @@ static int hif_generic_indication(struct wfx_dev *wdev, const struct hif_msg *hif, const void *buf) { const struct hif_ind_generic *body = buf; - int type = le32_to_cpu(body->indication_type); + int type = le32_to_cpu(body->type); switch (type) { case HIF_GENERIC_INDICATION_TYPE_RAW: return 0; case HIF_GENERIC_INDICATION_TYPE_STRING: - dev_info(wdev->dev, "firmware says: %s\n", - (char *)body->indication_data.raw_data); + dev_info(wdev->dev, "firmware says: %s\n", (char *)&body->data); return 0; case HIF_GENERIC_INDICATION_TYPE_RX_STATS: mutex_lock(&wdev->rx_stats_lock); // Older firmware send a generic indication beside RxStats if (!wfx_api_older_than(wdev, 1, 4)) dev_info(wdev->dev, "Rx test ongoing. Temperature: %d°C\n", - body->indication_data.rx_stats.current_temp); - memcpy(&wdev->rx_stats, &body->indication_data.rx_stats, + body->data.rx_stats.current_temp); + memcpy(&wdev->rx_stats, &body->data.rx_stats, sizeof(wdev->rx_stats)); mutex_unlock(&wdev->rx_stats_lock); return 0; case HIF_GENERIC_INDICATION_TYPE_TX_POWER_LOOP_INFO: mutex_lock(&wdev->tx_power_loop_info_lock); memcpy(&wdev->tx_power_loop_info, - &body->indication_data.tx_power_loop_info, + &body->data.tx_power_loop_info, sizeof(wdev->tx_power_loop_info)); mutex_unlock(&wdev->tx_power_loop_info_lock); return 0; From patchwork Mon Sep 7 10:15:15 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: 11760429 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 D7D97746 for ; Mon, 7 Sep 2020 10:19:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B467521775 for ; Mon, 7 Sep 2020 10:19:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="a0+5vfE+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728818AbgIGKRf (ORCPT ); Mon, 7 Sep 2020 06:17:35 -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 S1728806AbgIGKRT (ORCPT ); Mon, 7 Sep 2020 06:17:19 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Uw1pMNzlBu2QL7wTGJaCAMax9X7hdzs57V752HzoQmabbJ1qcgupbBrux0QsQWP7fIMgPGU6K69CgJGlzPNdCbbtSQtwjWPvhGWthYOJmIhYNCPRlg3UznTyjxMMx6VUPPSq494WA1VycMco5y2NscnrLqCycevOHe2Q1Y4IXvh4/tKrJL0mS8L4zBvzb3iLeFNfNfdB+vCYHl6OjRdaR5ocabIscUzKd2zerfwW7KZiQu6HUpOmrNoftcWvREkn19M7OhQPIeJCuKqPiEL/uD0C45XUuSO3zwDp06iTT0D1m/I4LQJBwL8mP8ZPeKY7pjN+wDB5kIxtVCNCbPzlVg== 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=NecxHB2RpeFlsqBvTeTcPZGkodCW88C3fdLKLL79wzY=; b=hJ73E6KiEQn7z+knFp2KL5QU+MF0+jFqIxZYboZVGL8O5uMLtDGD8NA+tb4vDpARXUtQ3yZTf8872O61gGPNJASNZRUgVEFGsv7Gw6HIYO+WQH6CetMbPT9vcpLl4bk10a8h6BoN5P7vNvIp4dwPkXG9EuWA+zqAqcfkbnIpoq6BPkJej5oFdi3r8pgaujLLjKPE7S2rgm9h2EIsjqsmaNlXlE/gpvdAbScAhhx1lbDx/u1eUy1r/7PTqtgx1cF92xsFpA3WIGZyWcWcQ34TZgkJB0ov/8aJvkqtDYb2kmZw3+jW7i4LItSnUb4kxHqDMNRpJcR0VkftsMLhaDUUZw== 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=NecxHB2RpeFlsqBvTeTcPZGkodCW88C3fdLKLL79wzY=; b=a0+5vfE+j/bNsAx9RvsasTEPOoeINefhj3//PXYerBRpec92umCBTCsvEYA9yaJV/QTC3kDm23DnpyOG7cCe0q3iSoGArg+R33jRuoM2Snmn7elcQXRRCIMlyWJTFD7UGzL2pgpfuriJMCbncI2mBBsxTA5yV9LYb328IbeRKJk= 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:25 +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:25 +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 25/31] staging: wfx: drop struct hif_ie_tlv Date: Mon, 7 Sep 2020 12:15:15 +0200 Message-Id: <20200907101521.66082-26-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:24 +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: a8b4a15c-2b9a-42fd-a41f-08d8531713e5 X-MS-TrafficTypeDiagnostic: SN6PR11MB2720: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1079; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Q6PiOWsGSxnAm1ojXGKd4jGR3QdwAX0Ig6aiqFNS442+Jf2KamtsJKuCa+e2sIG2rq0SPswIPxwwkhT8XKVcUrGkKiws8fqD+SUd2PrUiUFo8NQJCiS8wLlwgtQ8t5kIzPxyri0YG2p+rMa7kXmNjDgOcZrX+pE44mUr40NWOlh7G0HK3MSbwr3KCAvw2iDKXh2BTfdiEU/G9OarnK9q3yzBK0A84oU2mxcif5Laq+JZh9wu4XUdiEqJsSVenhlCnmUFp5RSZAod84ydJTUvT7Hn9WfiHBtfgcajE7NwZ8AGtfZEAH7w6G+DrWn+i3wp5pkgtY/tujlMuQ+ihzTdug== 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: XAxB7ub2JwSlDRjpeiiZBPug0xrsfZ8rkZP9KYNYyKiwAU1Y7CO6sPVXp5C71xXPtgwgLDA2mO/VaPF4m872ScOU399lGS26k2BqT3kDHqJZMTPXwHf/fNfmroI4Gj4yWc0ty523HB1cODi4TC4+b0NmbT7NX427DQqPWGiKj/t5Sv6QN/ISz95F81kb91wpBUCVXP6LY7LM2Da/2oUEQWKYYHOafpOIaO3e9sXHrNwQ7o57cRkrC3UdohKYdhkpYFMaCdYmOiFb1wb0X8BWENohQiYYFA1NLNvJtrTZkuDoSHV+W+ofc3vT0NjcRBNAN7BpJ44UYMpQQclZMHu5Xdv7cEKSRZUkB/q0wyU9w15ZOhhGrHPM828XZ43XTO8UVyDYldprWLsi/RfDuLk0zFikA++Mzw5Q2KfVG13GiP3QIeijEdniRILzpKmfghlpCctqc0j30vfUt+yOeIaAZWC0eCvNu1eeiKlAtMaHnpVKunAHepnODdwHTFea3/Goj4rVs5wGuJbl/is9yqzJLti2nv77wgb71yZRvhwoIJKFB6NPGOtY0618hgL4gTY2sUnikex9qIeMEBNopnpmKmtqkKDONNKzKSUP2epEoLI79M6gAuZphFyU4ual8uT19s0A75Aef5DkXXaMh4bNaw== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8b4a15c-2b9a-42fd-a41f-08d8531713e5 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:25.7724 (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: 1+POA2mnYOiKtJEuSRBtnnxaKim2sjDY/aqS74m70L13PYSeaK4e3MAQR67LMgpILENOmI63XoXDwh848JOE8g== 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 This struct hif_ie_tlv is definitively an Information Element (IE). This struct is defined by 802.11 specification and already exists in mac80211. Reuse this definition instead of struct hif_ie_tlv. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index c18e762485a9..ef5483609dcb 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -8,6 +8,8 @@ #ifndef WFX_HIF_API_CMD_H #define WFX_HIF_API_CMD_H +#include + #include "hif_api_general.h" #define HIF_API_SSID_SIZE API_SSID_SIZE @@ -93,12 +95,6 @@ struct hif_cnf_write_mib { __le32 status; } __packed; -struct hif_ie_tlv { - u8 type; - u8 length; - u8 data[]; -} __packed; - struct hif_req_update_ie { u8 beacon:1; u8 probe_resp:1; @@ -106,7 +102,7 @@ struct hif_req_update_ie { u8 reserved1:5; u8 reserved2; __le16 num_ies; - struct hif_ie_tlv ie[]; + struct element ie[]; } __packed; struct hif_cnf_update_ie { From patchwork Mon Sep 7 10:15:16 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: 11760431 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 EE43113B1 for ; Mon, 7 Sep 2020 10:19:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CAEE720C09 for ; Mon, 7 Sep 2020 10:19: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="bcItqjYd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728877AbgIGKTy (ORCPT ); Mon, 7 Sep 2020 06:19:54 -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 S1728810AbgIGKRb (ORCPT ); Mon, 7 Sep 2020 06:17:31 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EyARK1iV6h1BfrVt/OslR1YuAMJWe1VIEsM/vFjmOfwOp3zUd9jRLIPiIMIw+tYmmGFIVXsS+uE1YDbV2EG/fM9S/aYG67r19u7zxWmnHBDPaNFSBBPozQVApL7rYX1dKE+rkcarBaQHfwEsSwNxAH4/4UoXnobobbiZCMv3E69qTDbxlQIddZdRuisiQz/5b1HPPwncNdekZuvWvRFtXWSz0o9l/y7ZTJ4m+FB3K6yS8KWKxJ1XduX/12UnbK7duymuMYeoJLav7MkC2oMbEvLDcQAYCfSEbwE3/Rkt0EahReYolXIZotkfI2+tS6yeeaaDj+CYoVWeYuwzftYwHw== 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=+k+GleFu0J19YsGZFLjhCsk1dC2X1vLIC78Wjtzf3hM=; b=eOBGPmg5E1yRGN0S4bZourW8Rt2lkq8Si5WApQJk6PdhRRJFHI9d7pKM5bZI5x5BDRPoH/9PNW/9x9WbXlCXuS9K1vedKBKOd9KOLokESVTh0+Q9wf3qohDhlS1QHwU+m1XCE4d7iIAPiS9acO+vLLnW2GND8r9UEtU9T47Qn3Di4ZF6JTu0e2dHZsS2ICh6mveVzv09DLUgA0jKH+18ZiwZgyCxSbInHZc1VenpD8EjVZwFvvNXlMlU7Ny9FX6g4NtviBp5zm1OoxNOBJGW7M+3i21pVNtpBSp4to8ChkKHeNhTMLYjQRoduQyiTqTOFxSSpjKM4jjM6aDYAcBQoQ== 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=+k+GleFu0J19YsGZFLjhCsk1dC2X1vLIC78Wjtzf3hM=; b=bcItqjYd9+uioGEW6NUQMe/XA1O/QHNVYHmjJhtnmgmYbWBiIJ/dSvM9bEY+Ke3xlV6YDiecgMkJYyf9rhjrxFc4097vk9Cuid4LvLfTMfXnnCCPFJDvc0KiSXjsGpH1l41qDC/73OzpBvk/i7ZAsnNC7PrJgz6JhLmOtMX/VD0= 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:27 +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:27 +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 26/31] staging: wfx: drop macro API_SSID_SIZE Date: Mon, 7 Sep 2020 12:15:16 +0200 Message-Id: <20200907101521.66082-27-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:26 +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: 6cd601d4-1f14-4980-966e-08d8531714df X-MS-TrafficTypeDiagnostic: SN6PR11MB2720: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:403; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7bs+Nfw/wKZablRzXN38jKv6/NeKWBuaihGr/HkFSKwx/uXyHOLYiyiV9ZJ+GJe7n9JDnhkh17NNdAeEoDphiazJXsU38VrDoQOfhI9rAUhdHkxY4FnwOPR3FtE1NBnlTpkCgfbBDFY1Giw4WN1k3CTFF65MJ1lFI8mqkMu9SQf+ydSYfq6jggwFb1XHA+WtMfEM/McPOHNwLEUcVsupWaJPtLqKnxPhV2TCZMTmw0CkpKr4kg6ZOPK6frZ2XUS6EBZ4E7YwkCgi3fBu64haPIy0aks6iTJ2zHZZZ9fyQX+BlFaiqMey6doeihnGIXtB0Xy3vd7DkOf5aNU72gOkXA== 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: STTfU3/IN0a0X6I1kt1W9nx4+bFwl1U3r8256Q0bEgH37hQAcRJRn61KvdmgS3qNUUIfoL7m7BilR5qyBtKV1X9VGK07eTUKG9kXr/7EOHguhUM5cGeP/jn9bONXfP6PyMNUeEo8z/ud7Pg7NyGfXaXdTeROE/LA/utTUyVWZafVM4lNbsjf9YfJL+HL0b8CbS2IAjIvpH9a8BZwzFSbaxK79L6dAQvwV62wV2dNrQT0u6Pl52qcFV5I3D915BjWKfHT1hoB1bdAoxtx2lbLLOyPNW3gC+9Phx3wBJP0kGFgwFJ4KOnRT/ES3gkQBZ9yd3kyvZsD3sPBogMEOH6A96f/2Ebo1d9MZfWyrBhJfYyGj7Dm+oZvVInBpxE1lTMHSXReXlKL/slOrmOpndPoUTzc/63ec4oIplcVePo2WtwGPDUCZ7KUKi89l98Dwz+Kthu9X30p2eKFZTjEFZUXkQ82DN1itsxE4PfheCVHdLAPJyOvO7T0gRu0uPaiO93ILb4wCWCGXdjOfzrH+JpsYnHp2IOaw+paFxifS/7pBCFQ/rg3JyMD9K51Ly9t9mEzPYOlCV9o4BcKOOPKdYXWrOQzk8Rweu0+LgcDQVFN2OMqavv4blDOyIcQwfrfXhvpuZFKV858JjwfQErAvY6VTw== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6cd601d4-1f14-4980-966e-08d8531714df 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:27.4094 (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: uAHL6GicdwvM8sVsVonh6bA4PC3Lro9fvvmOowS6g/jVJsKPuL5Stsqvd6+4qDU3e6khc+fOgXZ/+1AR7n8P1g== 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 The maximum length of a SSID is defined by 802.11 specification. It is already defined in mac80211: IEEE80211_MAX_SSID_LEN. Therefore, use this generic definition. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 8 +++----- drivers/staging/wfx/hif_api_general.h | 2 -- drivers/staging/wfx/hif_tx.c | 2 -- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index ef5483609dcb..7b365bd01b81 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -12,8 +12,6 @@ #include "hif_api_general.h" -#define HIF_API_SSID_SIZE API_SSID_SIZE - enum hif_requests_ids { HIF_REQ_ID_RESET = 0x0a, HIF_REQ_ID_READ_MIB = 0x05, @@ -111,7 +109,7 @@ struct hif_cnf_update_ie { struct hif_ssid_def { __le32 ssid_length; - u8 ssid[HIF_API_SSID_SIZE]; + u8 ssid[IEEE80211_MAX_SSID_LEN]; } __packed; #define HIF_API_MAX_NB_SSIDS 2 @@ -307,7 +305,7 @@ struct hif_req_join { u8 force_with_ind:1; u8 reserved6:4; __le32 ssid_length; - u8 ssid[HIF_API_SSID_SIZE]; + u8 ssid[IEEE80211_MAX_SSID_LEN]; __le32 beacon_interval; __le32 basic_rate_set; } __packed; @@ -364,7 +362,7 @@ struct hif_req_start { u8 reserved3:7; u8 reserved4; u8 ssid_length; - u8 ssid[HIF_API_SSID_SIZE]; + u8 ssid[IEEE80211_MAX_SSID_LEN]; __le32 basic_rate_set; } __packed; diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index da63ba6f5148..c9e3c0f758c8 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -17,8 +17,6 @@ #define __packed __attribute__((__packed__)) #endif -#define API_SSID_SIZE 32 - #define HIF_ID_IS_INDICATION 0x80 #define HIF_COUNTER_MAX 7 diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 0553e79595a6..a75c6b9804ba 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -245,8 +245,6 @@ int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, WARN(chan_num > HIF_API_MAX_NB_CHANNELS, "invalid params"); WARN(req->n_ssids > HIF_API_MAX_NB_SSIDS, "invalid params"); - compiletime_assert(IEEE80211_MAX_SSID_LEN == HIF_API_SSID_SIZE, - "API inconsistency"); if (!hif) return -ENOMEM; for (i = 0; i < req->n_ssids; i++) { From patchwork Mon Sep 7 10:15:17 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: 11760421 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 DE5CE13B1 for ; Mon, 7 Sep 2020 10:17:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BE64120C09 for ; Mon, 7 Sep 2020 10:17:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="SGWpwTM5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728838AbgIGKRr (ORCPT ); Mon, 7 Sep 2020 06:17:47 -0400 Received: from mail-mw2nam10on2078.outbound.protection.outlook.com ([40.107.94.78]:7488 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728491AbgIGKRd (ORCPT ); Mon, 7 Sep 2020 06:17:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZcKhNdFLaqkLysfFoH33sbdHHCpCCV0rTVrI2mFJfdHVg4RVlhY5vkpXnBiUl0peN7uQzRGwSrFXzG4slSOKfxz+TbQjnnRCL1YTpCUQxv8tU+3ael5HVXnFI+PMJzZPcDcNLGGaKnPdvEIciJis67+IFgKNEB2G9ybYPyW1pNldVGjIMBvO2e5jIP+Pn4MT7BVTwvHPh1/THHLPotWVnda8nOHrJkI21rxNc2kb+qPYoisO+bz5r9VXBC7HGKy1Cz2voEH4XW+JI4E2PAi9bIXERYpSv/3LaBcJH6kDKNc2CL7vH4VSoUK7Tqlv29IezO8WzSehrva+OqFQTIHAqQ== 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=uCXLlvSneXCHNUu//m0D2+mQC7GzCWYN0ggpoiqqiTY=; b=IRu6A3oUtetNp0KsHYs4P+gabI0fINidTOvVG4ul0hEisX1RNCR3uoOtq3WLDs2mu+ROZoBSEi8AqXI5FJr/H/7kQunU7ksKpfjlWANg8+J0/cmRplsOoZ5tKGktbWT1SkeIm+bUEBG2fxFoLq+GpvqG0vS3oE9Ov+6+7VdI1QSpc9E5VS9T1GWH0HR9WAPFbtMVnOcqHduTUa6OEcTGsIKLHObQyeijt+FbDubaPPAavTVLlzzpKWEvZ8sjM5e1PC87oM6YRyptrhwC6g7d8P+0hZHPIVzQHuCpZoi00ltpDGcvWi4pP1rugvLWoWOmho+NsSQKjFK5hTbse4HudA== 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=uCXLlvSneXCHNUu//m0D2+mQC7GzCWYN0ggpoiqqiTY=; b=SGWpwTM5z4Gh7PWPam/ocsB05094I+QA4OmkMGDg86CDU8W1rS43QFsMc6u/wTlALHkvEsuulMOxgOzvOVKWhhGBpEl2PNsOipM47eXbaR0EggM4tBkau2nNXGIEBdL2GRFqQ3kYKjOkqKobXB0ZZUyyA/EQXqnh6dO212Kds4k= 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:29 +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:29 +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 27/31] staging: wfx: fix naming of hif_tx_rate_retry_policy Date: Mon, 7 Sep 2020 12:15:17 +0200 Message-Id: <20200907101521.66082-28-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:27 +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: edf85acd-5203-4114-72f5-08d8531715da X-MS-TrafficTypeDiagnostic: SN6PR11MB2720: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pNVjhHygl0Ywz8PHz0ENHdym59F5xvRxTsDhC/fIVANnr4EfweuvrfSxMhhadAeDC3whzHWD3APl9uM7z53hQP7CZHrGtOxB2KoCSRXW6LX6SVmy1o+vITDJNf55OSqwOpup3OVGXomX16gudumqAs0PDQpHCuCEGeCYx3MdECaAmmEYFupuATWl0mjA9ZJi6ANXahUddp0lNOGG/kN/XVdxHfLjlg0xYWLZ05XI/nsnSZoriLbRXycxf1w9eSYIFgwjI55oCtT3PHwZWZtZQZVMhIzP0L5fuYozTvvFl76BjDoH173RW2HGT807b/87X68rOw8hYRoN+WMuJZjQKA== 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)(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: vPW1i3Y1YFYi2/cxSsQsdsHWW6qAEvOaoHneXjgudfluNF2JKN717o+feLmRZ1YYAsRtviwekaZhPB7Gc3Gxd2nB+Vjkh0tDDsXIK5uyBXrDzKtoc4cJRmxWNi/WLmE+nr+E2/MxgSOq9ymNFaAyBp0Dju/d6TfcVHLT51ZkHVhHqiX+p+fiEUePZPG8mG9Z87GdCHiP5SyvW7e1tS1X9nQMDf7EVhK0XhCc7ICr3BGktGlyT/tCyFSoNIQsIgeSeoQujDP9tOIdIQsT5LGVJ/bMGn++bUWPdzQ6gww48wjfTJB8typoN85oTzvbx2yic25KEiVD+2+FGBKJ5Tg4nqAZcboxEW1FE7yUbYuYXbY11yALr2Mzb4cf749Amau6pGqeSdujIwKjrlC3wkgUqRJG1sc8xj868w9S3O8XjtfkiSkZdHNcKzMWjpPjmPMOIRk+YLDA9vb1wqSxCYDMlmkTHWqmDtjokhRYa55Y+Olld7KhF7dZOK7ZqwaIAUnKQX1W1gOSz3rIWFTLk4fk8mJQmt44Zyt29qDOxOcL57VTMuCLYISNzh6GRWLC7gosRPWr+k4oDqgMs2Mc0MdjSTDA65V+k3S3ZK7dxNpYtbsb1w+TcyWvzqCe8NNjOiYq/FWtUS/vp0TLA+xZdsHu0A== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: edf85acd-5203-4114-72f5-08d8531715da 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:29.0645 (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: YFI3f5LT3oIkGDTPc9C526Tgm2ELevb6BuR3Sdl3FfQrZO12r4HwDzmqXAAmp/xkt/zk4eYZTFoaswhAeyPofg== 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 In the wfx driver, the prefix 'hif_mib_' is normally used for structures that represent a hardware message. hif_mib_tx_rate_retry_policy does not fall in this category. So, rename it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_mib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h index 73873d29456d..55bd399ccdfb 100644 --- a/drivers/staging/wfx/hif_api_mib.h +++ b/drivers/staging/wfx/hif_api_mib.h @@ -305,7 +305,7 @@ struct hif_mib_set_uapsd_information { __le16 auto_trigger_step; } __packed; -struct hif_mib_tx_rate_retry_policy { +struct hif_tx_rate_retry_policy { u8 policy_index; u8 short_retry_count; u8 long_retry_count; @@ -324,7 +324,7 @@ struct hif_mib_tx_rate_retry_policy { struct hif_mib_set_tx_rate_retry_policy { u8 num_tx_rate_policies; u8 reserved[3]; - struct hif_mib_tx_rate_retry_policy tx_rate_retry_policy[]; + struct hif_tx_rate_retry_policy tx_rate_retry_policy[]; } __packed; struct hif_mib_protected_mgmt_policy { From patchwork Mon Sep 7 10:15:18 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: 11760425 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 120AA746 for ; Mon, 7 Sep 2020 10:19:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E243521473 for ; Mon, 7 Sep 2020 10:19:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="GlPEEaGw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728708AbgIGKTF (ORCPT ); Mon, 7 Sep 2020 06:19:05 -0400 Received: from mail-mw2nam10on2078.outbound.protection.outlook.com ([40.107.94.78]:7488 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728825AbgIGKRi (ORCPT ); Mon, 7 Sep 2020 06:17:38 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EMRl3uOCQdhCqs3aTl6IH5fqcdA+fvzhXJ8ABfoWtx9qmnpePRsI07Zh+SkmJr5BV8hc5LcoosDO8WgTQme9GgWqGxprQZfE0QbNmGOULdxb3QPGTPGyoMX6xM9lCNefshFYevAUY3Ult9T2M0pqmtQxfpPj8EnpFmPlfy5WnqhjdC5VBGtlgSJmM/y6K+VzrZWqjVNYbiZQ1Lv2VBE8G/zYycVOT5I5fHIwrtDGxf4QWztIMbEo7PwICCfnxcspRVL0gYnSPkNiWawETKa6rgCmRewhZkYQxXGEOmNkWqAc//kepayTE6YSnafa5iN/nXv/ty8ra6Dq9LuBAipv/A== 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=eqyCOufpB/dPCyM1HrkP1JK3NRPHTYXJg1sfpSx4l1Y=; b=GL/HePLrltSBWDHDxLVIkoU+uszERTo5pyREmX4rrQJNKAE6wddxySp9BvtPjhWhkDI7j2Tmi+zFzopzrtjdbatIPhHQRXxKM0o99U1/nUciBWS5l8z/XlL97uaF9DpS3nZc4oPrDO+sivTyd1gs7T51Q//MtEZhUz6kRz3cLFapOlKwUyRJs1sHuczfAFBosxPjo0oNeUKbXsCVKBOhn+2joofN01bRMrnffrlBGYSYj02/3fs+ScSafpx1Y7VoeVHI5LIYbz6GoI3jmOXno/A7B1JolBe0brdMY3qqZ7Fimcj2GhWnbYpVfK+6+N7e0jMmM6o+0CI2UDSvcLoQlw== 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=eqyCOufpB/dPCyM1HrkP1JK3NRPHTYXJg1sfpSx4l1Y=; b=GlPEEaGw+MBb2hQXmOOFp73u1NIlA3R7WdIGbJTvbIa+FSEHwE2FJSvsMeoiLDyh7u8m+JBppitK+5TVhoN4w+54gVxGII5sCb6TnnZdlvWdANVbjQDUKisURKzc6kUm1wCMSqiCdCNRHuLLAuzVMtH+W2pTY9m+pPtu9+ZgNzk= 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:30 +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:30 +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 28/31] staging: wfx: fix spaces Date: Mon, 7 Sep 2020 12:15:18 +0200 Message-Id: <20200907101521.66082-29-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:29 +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: 5e813913-91bf-4f66-da5a-08d8531716d4 X-MS-TrafficTypeDiagnostic: SN6PR11MB2720: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1107; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ILxg1nrj+kmV4rmjPJcTNBVkciWEYJTxaXoqQzcSjsDx5Vsn/xad3y/YwD3pBic1U8bcIrNUrPA9Gx7kbKEFNYWIcVwTHNBJlND+BSmCK2q8vafKnxana6T8NpFPriP413tB4iKauikv8X+mHVOi7IsoC8vYjMJCobSWpATSgkFwvwp0Ja0P55a/kjBCDloC5rnzW3GX7Ask+nV9KF7gmLTmOibNs4gmZKVIlBoHIyXxRkAmg8Gcq1DcL74mANfGRXH0rs4rl9HrCs2hIyAV5jtffVaArF4I2524YT4CO3HjRuYwJb6s8IsMDNRZk6wdlVLSBl4/N2g5YSYKgweoZg== 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)(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: wdXRNz8WG9sVp4D7ooSk4Hh/lM3tyuMg3BYmpXzeY3mZxR5jBsypJLXRZDLY443QBlWJylyzHfJ9Y/eJ/9IeAnRW1I5Y9zZDL7x2XBwjqkPvTSpD6bBtH4b0mhNr3ICbgVonM3aJXg2hckWz05YoVhH/PAmdgoLTej/O0GfIdEkw7wg1pK0pE/RAU3k7jfGMkuSwtXtx53m+WQa0LPQC8aLy8IENdqy2NCNUQ+02tcLqzKgrg8lie60gBJ6537tK+3z42QIC/8+nL1PCfrdmqVxb+qTWxNlCSV0ei0pCo/9Su9I66nzctLuiA9AAKoqJHLu8RXF0tscKlNpsQTeKTV/H+uI+orZ4zxkfMQ4TrgSWA+on/R/hQWA3Bs3eIW2UPKPJUsvBBp/UvsBtgPyY23XZkgSBIpsmhA1YQC5HTO4PvBknFuaS4lzP8lupt76LxIVrQ+TdCdA9tLLP1JSV5SuYx67iQuHctO1G2y5KonP19zkP5xy64+JBqn3gLtONImvsfA3PYf4kMzS4d0U86Ul9y1uNPDXgEoAxEQsYv8X45i7kvmnEY9BotDjhPXWFVFb1luoWRwFfb1GO6WvJwZFVZnRLBeR9HjdRQbN1n9tl79Gi9OfNZ/Ijkgyu7pGPBVVcjt7E7l7V+2OjNw1KHA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e813913-91bf-4f66-da5a-08d8531716d4 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:30.6965 (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: ylCFru5aQoS22xNShCXu1VfwMH/5uZ9q5hp1t5itJUzFjNsuC9fNs3drb+FatUrxJnSn0IXs+Q/H/+qNdSTCRw== 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 There is no reason to place two spaces between the field tx_conf_payload and its type. In the same vein, remove duplicate empty lines between declarations. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 4 +--- drivers/staging/wfx/hif_api_general.h | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 7b365bd01b81..bdd468800189 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -229,7 +229,7 @@ struct hif_cnf_tx { struct hif_cnf_multi_transmit { u8 num_tx_confs; u8 reserved[3]; - struct hif_cnf_tx tx_conf_payload[]; + struct hif_cnf_tx tx_conf_payload[]; } __packed; enum hif_ri_flags_encrypt { @@ -349,7 +349,6 @@ struct hif_ind_set_pm_mode_cmpl { u8 reserved[3]; } __packed; - struct hif_req_start { u8 mode; u8 band; @@ -551,5 +550,4 @@ struct hif_ind_event { } event_data; } __packed; - #endif diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index c9e3c0f758c8..9d522bc1aa69 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -113,7 +113,6 @@ enum hif_api_rate_index { API_RATE_NUM_ENTRIES = 22 }; - enum hif_fw_type { HIF_FW_TYPE_ETF = 0x0, HIF_FW_TYPE_WFM = 0x1, 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, From patchwork Mon Sep 7 10:15:20 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: 11760439 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 E8C07746 for ; Mon, 7 Sep 2020 10:21:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B54B721481 for ; Mon, 7 Sep 2020 10:21:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="JojAWDif" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728838AbgIGKVF (ORCPT ); Mon, 7 Sep 2020 06:21:05 -0400 Received: from mail-eopbgr770070.outbound.protection.outlook.com ([40.107.77.70]:3728 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728801AbgIGKRH (ORCPT ); Mon, 7 Sep 2020 06:17:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g3RIxvevnzUdsYEOn7WJ1zeHSY6gUT5O5jYhO+2w+a0jTGyYc0enhiDcfhtz7ApPJNINehTCqpZxNIDvHSPX9Kitb0ei9ANI+78Yle+d7ayQCQnOosRZV9mZIEit9/sCFyp7XUAQ+aseptufxj0zl1fEjt/OlN8bAgfNAwYmluePKT8yICgI2O+GK68mkOp0LOdlKiUa9wtZd2SHtBSkc0VQK5lmdYI0iOx0RdVx0XpurcknfeCpJXm82B5OH778KH9W/bC1IrLsJdhftyNoxyNPsrlWvPX6qAfuNP+tTC4+tOhyoP/22ZpVGEf3F3bFo7fgWtlMMKQRWuPnGN7Dng== 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=IYlUoioZ4+ScWtK2lDN3keIebpm36JjJsAk+Lqd4trs=; b=AHAnlJZDnYRwmI3j9jqN17hJhaADe+Yzw2HKZeu2qUHMHsYmXon72sfhuGR7TZo6LC0ZRWUCvMnp8Yv4t7i1f2eKDZAaRDWaGJUDLbTdNJKBangO5CeyqpWtByuCM3HXTQ7LcMEA5lDtbhuLRn0D3i9doA3Y+iHqMhz0OKU2xkikpbSmJwDXe/KkCxNeVtuIdL46FcLRo8iTjcCJLtjTENISJ7LH+c3+6UH9ezVPENgi1vuUznn0mtRnkOE/7YGsHEQjrA7jpED0bpL++eQLDXkSt4VPcusYVTeVBWdxcDShN0EYngLNmY561dJG6fxR/CvHQYXZH1+FvclTmGzgXg== 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=IYlUoioZ4+ScWtK2lDN3keIebpm36JjJsAk+Lqd4trs=; b=JojAWDifF1lLX4TKYSKdTLdT3ZsUPQwwA5BjcIO+AuU7gVuvfGXEY4PgwgIEpTPyoOvlsKu3oXqyftxWt4045wbSzC6VNXD097LCZbvkyd2gbYpBPAWkW1D1OIwspjbTTocAnJmZW6z6Q044UmHQ878iPeKf4N5LegMswruU7bQ= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:17:04 +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:17:04 +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=?= , kbuild test robot , Julia Lawall Subject: [PATCH 30/31] staging: wfx: drop async field from struct hif_cmd Date: Mon, 7 Sep 2020 12:15:20 +0200 Message-Id: <20200907101521.66082-31-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:32 +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: e713b419-0904-4b76-5400-08d8531718ef X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:332; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XmpNEPs/EzOu8pooXpbYYQmMb9mnJcDQJQK70f/TJtvaHbwu7gygs2s9LnrGBLI28hA5FvuHgQyZLn1NiCyXu1Af1PRq5objR1Qf4GwzuTn4PrlENWnjAe3JXyO0QV+jtDyTkHBJ/tl72oyzFFl2EyDzyMNSXzbRV/4DTF+JUNHW+uBMGdNL6TQc6ezCwlUUiIZDwQRbqxiC6tNOUguM9OK0C5D+OFxh4oNjVZOkyqTrNn387qwgvpImiffEj1eICpYqDRhRHcunhkF/UbX24vrDquGndr7ZFEjVQYP+e+OsQwlUI/meHgyKuLE9hYIeO4heIkbP/n3HpFPHKKYcGy4b0Qs62sNdapiUbgQw1VvyWIKTXPzj5SiWBkz4DHEv02noj6dr61KlZ0mZ7P2y2w== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(6666004)(54906003)(52116002)(2906002)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(66574015)(83380400001)(966005)(26005)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: w3RJ8PHutsXAQ1+JveY9eBhrOHnjQjMOd+hQOpNPmSwx83Zx9Cg5MyTkvUBkfEediHcv8p+ZSccLTCoCDI+n8wnqWm0h5NIMPt6WvZ3pPgr0lftPelhWrX2vdebKEz4sq3105J21na63GjrEhPLvt/7DOAgkkeDmqezz5H3IRlBD69WLUyRvC4RLY8cU0OUqp2vuk26XJAqxZluqzgWaFuNXXADoiLYSl3lqdiAkgl+ZgAqpEwz434/b0Vd9RvTPEuQyiDYqvXMVbyMy5heh7qDmWvWnSchb0t/Qb8SKqpIFuY6jwtrJtYZkQhW61xYsgWFtDxQGXMf0QLSM34I5pEJKaYPPYa1MALbTf/2tg/WAkYR3h90DWlfoEQBbEqYtD8pAQyA7uuXwD1eJky1g7+7D4y0Zxnt/k6VLu/6Cd4Oux0hAVDm7u1HS7N6pRO083I+dGgJ5GTZhO8mjP4AjniaXhowZKdaAnKjMhA5Sbf1IznDhBqIvVvh2zi83UQHgdd1ypMRllGGEWvNVjmh+fpj6ZY6gqApwy2kCtKfr89atKeyVmwpFacbDs9a/mv3biKf6tLErjb4RPFmoiRnKUH55u+V4uV2HaAEz0NchJ/12uO81X6ll5GFjqVJv59x+HboHF2w4oEC0pvPGJJpfKA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: e713b419-0904-4b76-5400-08d8531718ef 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:34.2655 (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: SUgQWPQIWJV21noICpJy2aKUa7sJ7TyvpDxr9DHGsrHvIN+d2KhzwVO4Ns/JFbLs7bLsvNpW+QVeiRjp/hL4DA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The parameter "async" in wfx_cmd_send() allows to send command without waiting for the reply. In this case, the mutex hif_cmd.lock is released asynchronously in the context of the receiver workqueue. However, "kbuild test robot" complains about this architecture[1] since it is not able to follow the lock duration of hif_cmd.lock (and indeed, the state of the driver if the hardware wouldn't reply is not well defined). Besides, this feature is not really necessary. It is only used by hif_shutdown(). This function hijack the 'async' flag to run a command that won't answer. So, this patch removes the 'async' flag and introduces a 'no_reply' flag. Thus, the mutex hif_cmd.lock is only acquired/released from hif_cmd_send(). Therefore: - hif_shutdown() does not have to touch the private data of the struct hif_cmd - Kbuild test robot should be happy - the resulting code is simpler [1] https://lore.kernel.org/driverdev-devel/alpine.DEB.2.21.1910041317381.2992@hadrien/ Reported-by: kbuild test robot Reported-by: Julia Lawall Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_rx.c | 7 +------ drivers/staging/wfx/hif_tx.c | 24 +++++++++--------------- drivers/staging/wfx/hif_tx.h | 1 - 3 files changed, 10 insertions(+), 22 deletions(-) diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 6950b3e9d7cf..b40af86356f1 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -47,12 +47,7 @@ static int hif_generic_confirm(struct wfx_dev *wdev, } wdev->hif_cmd.ret = status; - if (!wdev->hif_cmd.async) { - complete(&wdev->hif_cmd.done); - } else { - wdev->hif_cmd.buf_send = NULL; - mutex_unlock(&wdev->hif_cmd.lock); - } + complete(&wdev->hif_cmd.done); return status; } diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index a75c6b9804ba..1bd7f773209c 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -47,7 +47,7 @@ static void *wfx_alloc_hif(size_t body_len, struct hif_msg **hif) } int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, - void *reply, size_t reply_len, bool async) + void *reply, size_t reply_len, bool no_reply) { const char *mib_name = ""; const char *mib_sep = ""; @@ -55,8 +55,6 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, int vif = request->interface; int ret; - WARN(wdev->hif_cmd.buf_recv && wdev->hif_cmd.async, "API usage error"); - // Do not wait for any reply if chip is frozen if (wdev->chip_frozen) return -ETIMEDOUT; @@ -69,14 +67,18 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, wdev->hif_cmd.buf_send = request; wdev->hif_cmd.buf_recv = reply; wdev->hif_cmd.len_recv = reply_len; - wdev->hif_cmd.async = async; complete(&wdev->hif_cmd.ready); wfx_bh_request_tx(wdev); - // NOTE: no timeout is caught async is enabled - if (async) + if (no_reply) { + // Chip won't reply. Give enough time to the wq to send the + // buffer. + msleep(100); + wdev->hif_cmd.buf_send = NULL; + mutex_unlock(&wdev->hif_cmd.lock); return 0; + } if (wdev->poll_irq) wfx_bh_poll_irq(wdev); @@ -118,29 +120,21 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, } // This function is special. After HIF_REQ_ID_SHUT_DOWN, chip won't reply to any -// request anymore. We need to slightly hack struct wfx_hif_cmd for that job. Be -// careful to only call this function during device unregister. +// request anymore. Obviously, only call this function during device unregister. int hif_shutdown(struct wfx_dev *wdev) { int ret; struct hif_msg *hif; - if (wdev->chip_frozen) - return 0; wfx_alloc_hif(0, &hif); if (!hif) return -ENOMEM; wfx_fill_header(hif, -1, HIF_REQ_ID_SHUT_DOWN, 0); ret = wfx_cmd_send(wdev, hif, NULL, 0, true); - // After this command, chip won't reply. Be sure to give enough time to - // bh to send buffer: - msleep(100); - wdev->hif_cmd.buf_send = NULL; if (wdev->pdata.gpio_wakeup) gpiod_set_value(wdev->pdata.gpio_wakeup, 0); else control_reg_write(wdev, 0); - mutex_unlock(&wdev->hif_cmd.lock); kfree(hif); return ret; } diff --git a/drivers/staging/wfx/hif_tx.h b/drivers/staging/wfx/hif_tx.h index e8aca39e7497..960d5f2fa41c 100644 --- a/drivers/staging/wfx/hif_tx.h +++ b/drivers/staging/wfx/hif_tx.h @@ -22,7 +22,6 @@ struct wfx_hif_cmd { struct mutex lock; struct completion ready; struct completion done; - bool async; struct hif_msg *buf_send; void *buf_recv; size_t len_recv; From patchwork Mon Sep 7 10:15:21 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: 11760433 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 ED1C5746 for ; Mon, 7 Sep 2020 10:20:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C320620C09 for ; Mon, 7 Sep 2020 10:20:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="HKSHRzAP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728904AbgIGKUM (ORCPT ); Mon, 7 Sep 2020 06:20:12 -0400 Received: from mail-eopbgr770070.outbound.protection.outlook.com ([40.107.77.70]:3728 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728802AbgIGKRQ (ORCPT ); Mon, 7 Sep 2020 06:17:16 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ALa3jpFKGE7ar+ZeG23GnOwOUdP98WlKdJgUtbSfhjyC86uoFqwnfvagvWCpS6OTt3MpO3R2cCjGnXHhaCsnmsWztl0YEfhQogtrgqS0AWBusVtRw+fFT7+ZhOob/KxssWorQuEuRi15AoDHZvOxzpEapaVQHhr4O/+yvl28wuMUPGaJO91zkgJiSVcSCBmqxc+sIgKyqQII7j/vSt7nF7w8UivabbRwHwPHWqoyYJvlzyrKyVUhIIKAZMGE0MfJYbUJhyRgZw7dA7uAUIuGGFZ4c+coGKQ8m1d8xPjD2DGhnxDQQw3CE07c86FaqFm1XLgDK+VqcRme8zZmgEYFng== 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=/ha9bLL1iB7oklPDnmBPi0BNz4qopztsf+sfspwWNco=; b=MU5E29bo5NMvsWw/if2A4SaH6sU8sZkJ3ULo8rxCVH98gYFIt67WK+UuW0c6wDThToejJldhqu1hoYEKChXSattEtFC3P9TfG69Jx2frJ6yHhpB6APaAXT1MRt63hfQAOMuGi+VwiWVLcLvKIkXcKiE1qtDeAbajg8Vew/mE9AXMqQR8PH05ydqHmnVxBk8iSEGq4vXYITvzPbjau/wAK5raZP7by+bR7IbLn/LthXY6Titgctf4318B7EPaqtEC3m+0he1jfZoNwA1s9hBhbZZ3YohtlkuYVvjcaozlV24sjyatInC4q0aTbDxbYym16iV/rqnFXDQ3bTx1YJi1rg== 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=/ha9bLL1iB7oklPDnmBPi0BNz4qopztsf+sfspwWNco=; b=HKSHRzAPB98poBk1bYWTzh1Ung+suamJR8v77Uc/a1jBo+FBf87qtp9fBDRRVLWBE22jqllYallPmI8CyZ0893QbfFlwZ+u+wEFmilzw3VGFsLjN0hprcKthVVxZdAMg5vjIIJX1Kv+Lb5Gxf/oJS6zkmOU6gam/C81XAp35JJs= 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 SN6PR11MB2606.namprd11.prod.outlook.com (2603:10b6:805:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3348.17; Mon, 7 Sep 2020 10:17:04 +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:17:04 +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 31/31] staging: wfx: update TODO list Date: Mon, 7 Sep 2020 12:15:21 +0200 Message-Id: <20200907101521.66082-32-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:34 +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: 17e23a10-6b45-43c7-d8d9-08d8531719f6 X-MS-TrafficTypeDiagnostic: SN6PR11MB2606: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eAs9Gxr7wGd0LdrHLLLHYyTli4wsgofOgiehKtvgMU0JqP+UJVRc28aVMZ3SJ9oKABrVEw6+NO9RFpLSqmt3k5GHLJkHoQp2i44LYzVriibvkC00Tntp8kxt+eFKSNYHado+cVcelFYpj5kqruz61DAb7hFr3Sjpfcsi7IrKN6Oh8xVS1l1WKwdsBqU4WiH5R2Pzifq46P+aRXJj1JSwD+Dgtb/VUi0u4ENEV7iwdX+3D4MqtSv4UMubPjbU8oL6SxuM7QolCKFFEBv8h8jsT9fRqU7eTBKWYpIcSjXSIzTiq51NXAKuSF58/KJtEX5QGb1cNV9Lh/cgf662A610NSfIWEead0vgORcV2ZR9/jNaCi1f4tzwwcmCx5Mm5gfNRlsSSkWwanjPymKVBTr7Zg== 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:(396003)(376002)(346002)(366004)(136003)(39850400004)(66946007)(4326008)(5660300002)(2616005)(66476007)(316002)(956004)(478600001)(6666004)(54906003)(52116002)(2906002)(15650500001)(66556008)(1076003)(36756003)(8676002)(86362001)(6486002)(8936002)(7696005)(66574015)(83380400001)(966005)(26005)(107886003)(16526019)(186003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: ZRMZhQ3V0bYDfxXeC3D9Q5CKg16iZ9cevRT62KAXwoW0FbS3BJiXQPyhenSuf1p7JsxcOxAB3vB01mE+0u3p4dQHXpaNQp7C6z3UMcNDny+Zf6lsfDSBOewGVAlY5jWnprumGtFVKR0ewL9GmzAQ5pWpWetapq//K+dCBSLePMZ+aaxkcL/bliLgthbu2ambdOz7P7diMIsRIqlcS1DcOKdmO8s7t4ckGKUTyeHaep+bKmT+wuwRF879O5ZDJ5bdIZbkJoNxNzWeUlHGcL5dEmL9Q5+op1Me6flOS6IP4rdVklMyE9ntq7XqwQ3igsQZGjxmUce/lBS9ojmie1Ql9F8IrEFs3SS/QyI1VwMzHLEGGAf+8kB4io2pnuuebRrPN89g7dezChp32FbIa41XqqWtG+1ZRIbpFn4MmrFhLa4z4/M+TbclUAdG7bqtpkpA2A964oDCPCuU/2LDc8UQbjBlsj2p71p2GryciC/MgY3NH4NckWqcLm99oQ5Zj3Q9v8xWEptVRKfAoEzfcBIAjTi78IXBvhEGhxQfDghaz9iBHnStsQf4rKCoa8d49y2JCkF5tCKK8Jr3s3WyKb0eFuG8iV5hS6a31ltYyGY3NceOLLKk67Kij+NYKv3gAdHgKK/fjSw/elTlEYVL5VE+bA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 17e23a10-6b45-43c7-d8d9-08d8531719f6 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:35.9575 (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: 3XchI7lObSHP1rqzBRUwM0Kcltk1PPJePwjDRRKZgzZDDMRsGnIkW2l6GkacNF0n+1XuDXG8nzgP3lhrW9mSkA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2606 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The driver is now close to leave the staging directory. Update the TODO list to reflect the work done. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/TODO | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/drivers/staging/wfx/TODO b/drivers/staging/wfx/TODO index 42bf36d43970..1b4bc2af94b6 100644 --- a/drivers/staging/wfx/TODO +++ b/drivers/staging/wfx/TODO @@ -1,25 +1,6 @@ This is a list of things that need to be done to get this driver out of the staging directory. - - The HIF API is not yet clean enough. - - - The code that check the corectness of received message (in rx_helper()) can - be improved. See: - https://lore.kernel.org/driverdev-devel/2302785.6C7ODC2LYm@pc-42/ - - As suggested by Felix, rate control could be improved following this idea: https://lore.kernel.org/lkml/3099559.gv3Q75KnN1@pc-42/ - - Feature called "secure link" should be either developed (using kernel - crypto API) or dropped. - - - The device allows to filter multicast traffic. The code to support these - filters exists in the driver but it is disabled because it has never been - tested. - - - In wfx_cmd_send(), "async" allow to send command without waiting the reply. - It may help in some situation, but it is not yet used. In add, it may cause - some trouble: - https://lore.kernel.org/driverdev-devel/alpine.DEB.2.21.1910041317381.2992@hadrien/ - So, fix it (by replacing the mutex with a semaphore) or drop it. -