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: 261439 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92CB0C2BB84 for ; Mon, 7 Sep 2020 10:16:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4D19C21473 for ; Mon, 7 Sep 2020 10:16: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="jwSwJXFn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728612AbgIGKP7 (ORCPT ); Mon, 7 Sep 2020 06:15:59 -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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: 261438 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DE9FC433E2 for ; Mon, 7 Sep 2020 10:16:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D67A8207C3 for ; Mon, 7 Sep 2020 10:16:25 +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 S1728720AbgIGKQU (ORCPT ); Mon, 7 Sep 2020 06:16:20 -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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: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: 261424 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A26CC433E2 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 D310D20659 for ; Mon, 7 Sep 2020 10:32:57 +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 S1728988AbgIGKc5 (ORCPT ); Mon, 7 Sep 2020 06:32: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 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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: 261423 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 297A6C433E2 for ; Mon, 7 Sep 2020 10:33:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DD49320659 for ; Mon, 7 Sep 2020 10:33:19 +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 S1729006AbgIGKdQ (ORCPT ); Mon, 7 Sep 2020 06:33:16 -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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: 261425 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A441C433E2 for ; Mon, 7 Sep 2020 10:32:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2519820659 for ; Mon, 7 Sep 2020 10:32:25 +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 S1728964AbgIGKcJ (ORCPT ); Mon, 7 Sep 2020 06:32:09 -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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: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: 261427 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E97BC433E2 for ; Mon, 7 Sep 2020 10:27:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 20F7C21481 for ; Mon, 7 Sep 2020 10:27:45 +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 S1728916AbgIGK11 (ORCPT ); Mon, 7 Sep 2020 06:27:27 -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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: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: 261436 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A2A9C43461 for ; Mon, 7 Sep 2020 10:17:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DFE5F20C09 for ; Mon, 7 Sep 2020 10:17: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="LffBZMLO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728799AbgIGKRF (ORCPT ); Mon, 7 Sep 2020 06:17:05 -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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: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: 261426 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A0F1C2D0A7 for ; Mon, 7 Sep 2020 10:28:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0055621481 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 S1728957AbgIGK2d (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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: 261428 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD68FC433E2 for ; Mon, 7 Sep 2020 10:26:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A1E91205CB for ; Mon, 7 Sep 2020 10:26:35 +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 S1728908AbgIGK0d (ORCPT ); Mon, 7 Sep 2020 06:26: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 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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: 261437 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BB64C43461 for ; Mon, 7 Sep 2020 10:16:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 436FE207C3 for ; Mon, 7 Sep 2020 10:16: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="SmL3e+1w" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728761AbgIGKQk (ORCPT ); Mon, 7 Sep 2020 06:16:40 -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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: 261429 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79883C43461 for ; Mon, 7 Sep 2020 10:25:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 24CC92065E for ; Mon, 7 Sep 2020 10:25:36 +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 S1728857AbgIGKZd (ORCPT ); Mon, 7 Sep 2020 06:25: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 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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: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: 261430 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89B6DC433E2 for ; Mon, 7 Sep 2020 10:24:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 27C7E205CB for ; Mon, 7 Sep 2020 10:24: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="nYbuydGz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728544AbgIGKYv (ORCPT ); Mon, 7 Sep 2020 06:24:51 -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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: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: 261433 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2785BC43461 for ; Mon, 7 Sep 2020 10:20:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D2666207C3 for ; Mon, 7 Sep 2020 10:20:01 +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 S1728887AbgIGKT6 (ORCPT ); Mon, 7 Sep 2020 06:19:58 -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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: 261435 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14A1AC43461 for ; Mon, 7 Sep 2020 10:17:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C84E021473 for ; Mon, 7 Sep 2020 10:17:51 +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 S1728840AbgIGKRs (ORCPT ); Mon, 7 Sep 2020 06:17:48 -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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: 261434 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0218EC43461 for ; Mon, 7 Sep 2020 10:19:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A6FD2207C3 for ; Mon, 7 Sep 2020 10:19:16 +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 S1728705AbgIGKTN (ORCPT ); Mon, 7 Sep 2020 06:19:13 -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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: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: 261431 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5A57C43461 for ; Mon, 7 Sep 2020 10:23:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 74D56204FD for ; Mon, 7 Sep 2020 10:23: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="JojAWDif" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728745AbgIGKVH (ORCPT ); Mon, 7 Sep 2020 06:21:07 -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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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: 261432 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 500B7C433E2 for ; Mon, 7 Sep 2020 10:20:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E4778207C3 for ; Mon, 7 Sep 2020 10:20:24 +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 S1728459AbgIGKUU (ORCPT ); Mon, 7 Sep 2020 06:20:20 -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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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. -