From patchwork Mon Apr 6 11:17:46 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: 221416 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=-9.8 required=3.0 tests=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 50850C2BA80 for ; Mon, 6 Apr 2020 11:18:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1EB51206F5 for ; Mon, 6 Apr 2020 11:18:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="cvHQdv9S" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727464AbgDFLS2 (ORCPT ); Mon, 6 Apr 2020 07:18:28 -0400 Received: from mail-dm6nam11on2071.outbound.protection.outlook.com ([40.107.223.71]:6126 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727125AbgDFLS2 (ORCPT ); Mon, 6 Apr 2020 07:18:28 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S1SvjGEVgGJeT/Xi5oCYPkBnJLHcjRn9dcaA5qYhu8pxKh2F5+ZeKYtlQVcxtBUm9hxzWi3UbKU8zXC/qQXL4bOICafJsiVs0Db25IXEDVgkPs/T5H0o46Qa/BcoR662dPo6c3GLzipxh8z493xUntGa5ZToG7rsfoQqqk4ejJ+n26ZAs95HjGT92DBFrw0Bx7UtyB/mIS2K+2LT8d50iD51cgEG4iaTwMu3z5617LQMwbCRdAtJOkt2LDafS1TGLoh1vVMF1rd8i48PMsVYiRyHLtlSuUp1g0iZP4rluBv1RWzKec2GEHxilm0ab1YvaEGEgPhcoIB36I4tVZsXdw== 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=JDUdKC5MG45uXW86FF3QFFtB2tT6J3KT7RhKATBOomQ=; b=go5d+PbFFjE+14mzoSDvyO6CfswhuBPG6uUbBUuW/zN5uojQcRanunyZoP58r+DWQ7MJDVX1kDsIaEnukmHjF0h5qWZ0+WGPZBEknh04kXSYQOW7RCTKeCG311sPX2xUvI4LGtHrOodvdAeIRZ6+jL7WwjjVFBgvZxe15ohsFJ7gc8Qr/yr6xDCd5KaeIfNMBK+LvfY21TzN3xD1+NaYchJSbPb+4ZHXH1A7BiMeSyp84RKuYtw+pjPGYVhkK863lL6QDl8LSoHMz0wRpYt3+LwhqUPnNZnWw9iO7iy9bOAEdDVfap9qZf4lZKi0dnXEliDuFFmBGliSyLNcs2pXzQ== 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=JDUdKC5MG45uXW86FF3QFFtB2tT6J3KT7RhKATBOomQ=; b=cvHQdv9SI/y0twln6A/gb2A64EaIkyeSJtjGbpwl0QdkjGoJJd87nsCK3R3N//JgknrIfE7sU26X0jcq4mokafN/bqizT1m08ve6yRtGXVOwV8/+S31Kzig617Mq7mGoJJH3jq5Tk9C4FW0rppbCgnO7GcNLENFEWaGJC2Zp7DM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from BN6PR11MB4052.namprd11.prod.outlook.com (2603:10b6:405:7a::37) by BN6PR11MB3860.namprd11.prod.outlook.com (2603:10b6:405:77::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15; Mon, 6 Apr 2020 11:18:15 +0000 Received: from BN6PR11MB4052.namprd11.prod.outlook.com ([fe80::e0af:e9de:ffce:7376]) by BN6PR11MB4052.namprd11.prod.outlook.com ([fe80::e0af:e9de:ffce:7376%3]) with mapi id 15.20.2878.018; Mon, 6 Apr 2020 11:18:15 +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/11] staging: wfx: drop unused WFX_LINK_ID_GC_TIMEOUT Date: Mon, 6 Apr 2020 13:17:46 +0200 Message-Id: <20200406111756.154086-2-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200406111756.154086-1-Jerome.Pouiller@silabs.com> References: <20200406111756.154086-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR05CA0010.namprd05.prod.outlook.com (2603:10b6:3:d4::20) To BN6PR11MB4052.namprd11.prod.outlook.com (2603:10b6:405:7a::37) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by DM5PR05CA0010.namprd05.prod.outlook.com (2603:10b6:3:d4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.13 via Frontend Transport; Mon, 6 Apr 2020 11:18:13 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7b7daadd-0ca9-42a9-9c13-08d7da1c337f X-MS-TrafficTypeDiagnostic: BN6PR11MB3860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:136; X-Forefront-PRVS: 0365C0E14B X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB4052.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(396003)(39850400004)(346002)(366004)(136003)(376002)(186003)(16526019)(7696005)(52116002)(36756003)(5660300002)(107886003)(316002)(54906003)(66946007)(66476007)(4326008)(2616005)(66556008)(1076003)(66574012)(81166006)(6666004)(6486002)(8936002)(2906002)(86362001)(81156014)(4744005)(8676002)(478600001); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aHXD46as/q4E8cewX6P0gFH2a2vyC38CO6BSpziPxZpVVjHjBk0Y6kk3dpKumWMR/3X6i3a8o8S+8uM79YntUvjCpIaV1MKIBQGwa8sqWHvzn1MmzvvITDTGTGGuYnPPmsh3buApd6FK7vjyXJpHvbloziDjyKb6I8W+UULBnyEevs54E3mpyX8pKJ82WEEOIkmy+/HkKQ+N7akj94l+11Ag39/vor+NcoK1UoZBPyC3SEYWMZg0Hz1jukYpya/vLOdu9xAiDHEOHjE7zwx/RMjlZAlg68QAQR0o3aok9ikuTlcP504iaCmXaFZKcck8W3i3+rDNwwAoU5tuF1pK4hXtcjj2atXxjk20GxFaI/xjSEx/RvVP3l5dVizdmELU3fomwKMWVgw8b7JlEWHTdRkPRuzt0NbGnkErZ6LLjKfJjHJx+1cmk9SZoUVkT/8J X-MS-Exchange-AntiSpam-MessageData: LV0iFZwUFuRmZhC/6PW+xAUN88Ge0ZzMIzh5CeVBH/0feHnB+O5IVnTDlFIvljoXup5SblBzQ60W3ma9Y5zUUq3N3wCeAmUVlfIXfqUakRjoGgWvw+16uBKMYv8AF/cCvE6h3oVe42n2+kFGtC3M+fv5q0Qb7FkhrhaxZaiN4u2UEfj+GuYowxhsM/xsrfEWiddXHZfYm0AlieJCghkmVA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b7daadd-0ca9-42a9-9c13-08d7da1c337f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2020 11:18:15.7972 (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: 8cnMrzriV2vbn0000dbiCRM/9LaIMsz5pu4ZMygJeF2EaWLUZtjYkMPktfXWJ/Mow9mtNWfEFZUryENeOl0ywQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB3860 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The definition WFX_LINK_ID_GC_TIMEOUT is not used anymore since commit d6aeba575f27 ("staging: wfx: simplify the link-id allocation") Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 93ed0ed63bb2..c88d14fe614b 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -17,7 +17,6 @@ #include "hif_tx_mib.h" #define WFX_INVALID_RATE_ID 15 -#define WFX_LINK_ID_GC_TIMEOUT ((unsigned long)(10 * HZ)) static int wfx_get_hw_rate(struct wfx_dev *wdev, const struct ieee80211_tx_rate *rate) From patchwork Mon Apr 6 11:17:48 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: 221415 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=-9.8 required=3.0 tests=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 19054C2BA19 for ; Mon, 6 Apr 2020 11:18:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D00562072A for ; Mon, 6 Apr 2020 11:18: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="VG5vcKRm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727696AbgDFLSe (ORCPT ); Mon, 6 Apr 2020 07:18:34 -0400 Received: from mail-dm6nam11on2071.outbound.protection.outlook.com ([40.107.223.71]:6126 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727125AbgDFLSc (ORCPT ); Mon, 6 Apr 2020 07:18:32 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lkhwnJYimYKxLrdhVU7Kbs+ZVkUWjYgBi3V6HehT73iJx8zPVsLD2xlnsTdZfrUOe8UTvW5jBJOqMtJJhlCMrpM+VOjBotcG9inpkIsuVHiVqNYZxRUS4U+y43n4igAPVLMkMVL3nRYsbLYRVTJWaObDUg5f8e3Uk4sJKldfV/g+gjbJ5l32NGmxiqvo7H+HRRe2ZPlEysOs508pe0QeS+Dif7yO1nKCGq5mrVEeeqTZKiR54wXC3mHBM39pSijrmrLw6a7EgZNyZcInuqv0faLsJGXMEzy5+/46V4cA2Sgl/IOucCkdF+NFdeqmsHkPpHR3xS34ifDVT+L1EY+jMQ== 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=epV5OE2uRpefDLHUseHqf8jRskPj/AAkhm53GUx3fGA=; b=Fu44F45isGvOyci/rknDxt4Gat2Jfh7BhOQawf2NAcnmkWp1BLnBg0Co2sTS8tWHmaP38LVehJ9N6QYqYs0ALM2+OFrBYGHlGCLqpvF+GtVE3QjY2Vg4XF9OZX5ekWq0H9/7I0kQp4tqjyfVH4rPKwK4rUNDxkFmg2NALW17QTmoH1z0EZbgecuuN5PVFyOcyG8QPPUeZx+RU0HoOx8mpQd/fIiPHqFbHMe5ecXmlXwPJ9n1Go5MkD57Rz49g7Vmacw02/6v4VtJeVPZwZRpY4tirwsSDmyUih/sjbD4ARZB7VcWEKy4ZBNwrI//vrD6lNncVvtyE5iSTm1Dn0CJ8w== 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=epV5OE2uRpefDLHUseHqf8jRskPj/AAkhm53GUx3fGA=; b=VG5vcKRmxZqnC4ymbhfPy6ILsX3NyNTJeJt4eh0MtQA0bwjNue7ckIFdJoSjR1lE9umHertZ4kwTsc4CVAGizIgSffOyJZYXt1qcerp+Eg0FMNXv7bJU5QK6rIdnBYeuHTPlMEH3Fi0QoAdX1qNnY3Ct4gPvxYrgHBT0PcVXTTQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from BN6PR11MB4052.namprd11.prod.outlook.com (2603:10b6:405:7a::37) by BN6PR11MB3860.namprd11.prod.outlook.com (2603:10b6:405:77::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15; Mon, 6 Apr 2020 11:18:20 +0000 Received: from BN6PR11MB4052.namprd11.prod.outlook.com ([fe80::e0af:e9de:ffce:7376]) by BN6PR11MB4052.namprd11.prod.outlook.com ([fe80::e0af:e9de:ffce:7376%3]) with mapi id 15.20.2878.018; Mon, 6 Apr 2020 11:18: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 03/11] staging: wfx: relocate TX_RETRY_POLICY_MAX and TX_RETRY_POLICY_INVALID to hif API Date: Mon, 6 Apr 2020 13:17:48 +0200 Message-Id: <20200406111756.154086-4-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200406111756.154086-1-Jerome.Pouiller@silabs.com> References: <20200406111756.154086-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR05CA0010.namprd05.prod.outlook.com (2603:10b6:3:d4::20) To BN6PR11MB4052.namprd11.prod.outlook.com (2603:10b6:405:7a::37) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by DM5PR05CA0010.namprd05.prod.outlook.com (2603:10b6:3:d4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.13 via Frontend Transport; Mon, 6 Apr 2020 11:18:18 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 52b18c32-aeca-4802-8428-08d7da1c3645 X-MS-TrafficTypeDiagnostic: BN6PR11MB3860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3513; X-Forefront-PRVS: 0365C0E14B X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB4052.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(396003)(39850400004)(346002)(366004)(136003)(376002)(186003)(16526019)(7696005)(52116002)(36756003)(5660300002)(107886003)(316002)(54906003)(66946007)(66476007)(4326008)(2616005)(66556008)(1076003)(66574012)(81166006)(6666004)(6486002)(8936002)(2906002)(86362001)(81156014)(8676002)(478600001); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yBiG+2DwAznJMg4JwcgoRKRYqfHALRFkv/rJYCA+cotJuwPLPBRhqABlk0glOMT6iT4yCShT2FTyC4p+dsnvHJqXVmGukrmpShNcJyXOziiXheUkFegZrHLRZS22Xa7bFbs9Eo0WWnlSTZYQXhgNNyMv1GqV060R7Cb0smuNhhP0iihlhIBSbHTW07dGjJbxTvc0FjyvmpxFbAQUsAvkPrR700s7EFp7NfRja7jUKDYO4zygMioa0UJ0ECWMeby8gAafEsgtsWBryLC10KlMQ03AXarfEiFkvCNjvp28uE75BROVAkBvXzTY5XKr125q7af4lGeI1MPhiflJ887xOe1xkuyqasLOFtSalHcsjQEHZ4NMxFkS5ltoSGcI/6BnuPcbc7Fj1SV9zAYNZelMnxwUs+3fGWkJx/xcZq56D3rEf1yDrFpnfAxFMHm0NVjY X-MS-Exchange-AntiSpam-MessageData: hgoKtisI+FU/YsYh3vUv1tCIPWhUGwWIq+paIoIqMV+QvP2IBscabQJyS1WXwThcqBeT7jRcRCM2RLCdd/zyFJqFSVRgf9kIkFs35qr1xE/IX1FxPXeDIFgceFToP9nXfvMWujQfPyg9mNdfQosqClgGQEiGYbZ3jD1kbw4Al8eHsqKsb8Zp/VIFt0PWXmJ0lrLHslbzC6oYO+weunIuOA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 52b18c32-aeca-4802-8428-08d7da1c3645 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2020 11:18:20.3917 (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: Q9TDWmFhpjmGPKQMRHnvXzTjj5YoiDQ7csdFP1RMzF+7o6Sw1JJDblZf4rqj3OXgFZnOnQrr8C1TyZL6CQlP5g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB3860 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The definitions TX_RETRY_POLICY_MAX and TX_RETRY_POLICY_INVALID are imposed by the hardware. Therefore, they should be located in the hardware interface API. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 16 +++++++--------- drivers/staging/wfx/data_tx.h | 2 +- drivers/staging/wfx/hif_api_mib.h | 3 ++- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 757e37454391..a34f6231b878 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -16,8 +16,6 @@ #include "traces.h" #include "hif_tx_mib.h" -#define WFX_INVALID_RATE_ID 15 - static int wfx_get_hw_rate(struct wfx_dev *wdev, const struct ieee80211_tx_rate *rate) { @@ -117,7 +115,7 @@ static int wfx_tx_policy_get(struct wfx_vif *wvif, if (list_empty(&cache->free)) { WARN(1, "unable to get a valid Tx policy"); spin_unlock_bh(&cache->lock); - return WFX_INVALID_RATE_ID; + return HIF_TX_RETRY_POLICY_INVALID; } idx = wfx_tx_policy_find(cache, &wanted); if (idx >= 0) { @@ -146,7 +144,7 @@ static void wfx_tx_policy_put(struct wfx_vif *wvif, int idx) int usage, locked; struct tx_policy_cache *cache = &wvif->tx_policy_cache; - if (idx == WFX_INVALID_RATE_ID) + if (idx == HIF_TX_RETRY_POLICY_INVALID) return; spin_lock_bh(&cache->lock); locked = list_empty(&cache->free); @@ -164,11 +162,11 @@ static int wfx_tx_policy_upload(struct wfx_vif *wvif) do { spin_lock_bh(&wvif->tx_policy_cache.lock); - for (i = 0; i < HIF_MIB_NUM_TX_RATE_RETRY_POLICIES; ++i) + for (i = 0; i < HIF_TX_RETRY_POLICY_MAX; ++i) if (!policies[i].uploaded && memzcmp(policies[i].rates, sizeof(policies[i].rates))) break; - if (i < HIF_MIB_NUM_TX_RATE_RETRY_POLICIES) { + if (i < HIF_TX_RETRY_POLICY_MAX) { policies[i].uploaded = true; memcpy(tmp_rates, policies[i].rates, sizeof(tmp_rates)); spin_unlock_bh(&wvif->tx_policy_cache.lock); @@ -176,7 +174,7 @@ static int wfx_tx_policy_upload(struct wfx_vif *wvif) } else { spin_unlock_bh(&wvif->tx_policy_cache.lock); } - } while (i < HIF_MIB_NUM_TX_RATE_RETRY_POLICIES); + } while (i < HIF_TX_RETRY_POLICY_MAX); return 0; } @@ -200,7 +198,7 @@ void wfx_tx_policy_init(struct wfx_vif *wvif) INIT_LIST_HEAD(&cache->used); INIT_LIST_HEAD(&cache->free); - for (i = 0; i < HIF_MIB_NUM_TX_RATE_RETRY_POLICIES; ++i) + for (i = 0; i < HIF_TX_RETRY_POLICY_MAX; ++i) list_add(&cache->cache[i].link, &cache->free); } @@ -308,7 +306,7 @@ static u8 wfx_tx_get_rate_id(struct wfx_vif *wvif, rate_id = wfx_tx_policy_get(wvif, tx_info->driver_rates, &tx_policy_renew); - if (rate_id == WFX_INVALID_RATE_ID) + if (rate_id == HIF_TX_RETRY_POLICY_INVALID) dev_warn(wvif->wdev->dev, "unable to get a valid Tx policy"); if (tx_policy_renew) { diff --git a/drivers/staging/wfx/data_tx.h b/drivers/staging/wfx/data_tx.h index 7f201f626410..a308af3d68ad 100644 --- a/drivers/staging/wfx/data_tx.h +++ b/drivers/staging/wfx/data_tx.h @@ -26,7 +26,7 @@ struct tx_policy { }; struct tx_policy_cache { - struct tx_policy cache[HIF_MIB_NUM_TX_RATE_RETRY_POLICIES]; + struct tx_policy cache[HIF_TX_RETRY_POLICY_MAX]; // FIXME: use a trees and drop hash from tx_policy struct list_head used; struct list_head free; diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h index 0c67cd4c1593..36c9152785c4 100644 --- a/drivers/staging/wfx/hif_api_mib.h +++ b/drivers/staging/wfx/hif_api_mib.h @@ -500,7 +500,8 @@ struct hif_mib_tx_rate_retry_policy { u8 rates[12]; } __packed; -#define HIF_MIB_NUM_TX_RATE_RETRY_POLICIES 15 +#define HIF_TX_RETRY_POLICY_MAX 15 +#define HIF_TX_RETRY_POLICY_INVALID HIF_TX_RETRY_POLICY_MAX struct hif_mib_set_tx_rate_retry_policy { u8 num_tx_rate_policies; From patchwork Mon Apr 6 11:17:49 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: 221414 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=-9.8 required=3.0 tests=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 0DF63C2BA19 for ; Mon, 6 Apr 2020 11:18:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BAC822076C for ; Mon, 6 Apr 2020 11:18:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="l1lv3Qb0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727756AbgDFLSi (ORCPT ); Mon, 6 Apr 2020 07:18:38 -0400 Received: from mail-dm6nam11on2071.outbound.protection.outlook.com ([40.107.223.71]:6126 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727181AbgDFLSf (ORCPT ); Mon, 6 Apr 2020 07:18:35 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Djvsa8NWb4sMlYkJCUC3wvosJMNrHJ0rEBqJc5dpOJnrh96y5x7xyF1HXA+E9lC28M/1WPxkpSj8S6c13s3pmq0OQ58y1U/Z+fP1gLeLp11UFZBYY/swHf7JTrUE6g/EXOqaIvQvi9yzt5Jnug9BieSZvsLSfFx0toJiY8ULyzTme5ZTaWMa7whkCO1iCGFc5W7vfyxAZNtDeEgQSbffeVEOQxymInB7as8WwRTQo1a0yoDM7SWQqLOsUX6KZDj0ZJyyBwvJcZzn36xYfeqQLtO56Me0epk6xM7C62DwanDzRzSbalv2Zvnn5HWAjJYH+dW1zNJQKGEkXxeTQL7TVw== 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=DfnL3pRd194MvXJy4u4gkfopF+Bsj+lYq4RBZHnEnn4=; b=fTNDAsRszLkUB1b3LGwwax4s1iWHv3p1lpOhxTIF0K9Nyl2nruM5fOrtNOTX6RMjwV7OU/mQCvqCKhb6g29Gi7zQgH3LsZ/ESQoYTJcp7eIBVcaaQ8lfoBOx2nPuw1otW5AocP+YRCX2EJAo+SNSCwTCc2zGL8MnNfzdJ9YqJKW472mn0BCl6qwTO0EEGkehjbWrJZXkxwvfSSPCIVr2WE/4mtqMNok6b6nNHMiMeXA9KJmSSxs+1HvKp5wzMv5ip2EKACLCWEkS29n5QHOhrZ+ye6u1FTpDWW9YR5DWePNfd6ZO9pKbaF+FRJ7S5uJAGaoXN7h8Y2LbF2A9kUdvZQ== 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=DfnL3pRd194MvXJy4u4gkfopF+Bsj+lYq4RBZHnEnn4=; b=l1lv3Qb0XD1bBMPIDux63slkqwregU442300dD1pFmxQUeuh44ypa5iIkgiPmZC8xgo1A4dQrJuW5OWGmGR+FapgUD/SMai9qhCAVzPyCB50EMd8Q35HQswiClIy3QLolQGlfSQx4OVupZ+cQ0/gx2CcCnH1LryEprufqbuE0j0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from BN6PR11MB4052.namprd11.prod.outlook.com (2603:10b6:405:7a::37) by BN6PR11MB3860.namprd11.prod.outlook.com (2603:10b6:405:77::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15; Mon, 6 Apr 2020 11:18:22 +0000 Received: from BN6PR11MB4052.namprd11.prod.outlook.com ([fe80::e0af:e9de:ffce:7376]) by BN6PR11MB4052.namprd11.prod.outlook.com ([fe80::e0af:e9de:ffce:7376%3]) with mapi id 15.20.2878.018; Mon, 6 Apr 2020 11:18:22 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 04/11] staging: wfx: remove unused definitions from the hif API Date: Mon, 6 Apr 2020 13:17:49 +0200 Message-Id: <20200406111756.154086-5-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200406111756.154086-1-Jerome.Pouiller@silabs.com> References: <20200406111756.154086-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR05CA0010.namprd05.prod.outlook.com (2603:10b6:3:d4::20) To BN6PR11MB4052.namprd11.prod.outlook.com (2603:10b6:405:7a::37) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by DM5PR05CA0010.namprd05.prod.outlook.com (2603:10b6:3:d4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.13 via Frontend Transport; Mon, 6 Apr 2020 11:18:20 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b664122a-f6eb-4a62-fb5e-08d7da1c3776 X-MS-TrafficTypeDiagnostic: BN6PR11MB3860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2582; X-Forefront-PRVS: 0365C0E14B X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB4052.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(396003)(39850400004)(346002)(366004)(136003)(376002)(186003)(16526019)(7696005)(52116002)(36756003)(5660300002)(107886003)(316002)(54906003)(66946007)(66476007)(4326008)(2616005)(66556008)(1076003)(66574012)(81166006)(6666004)(6486002)(8936002)(2906002)(86362001)(81156014)(8676002)(478600001); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ULa4lye8Wml866zouKYfjNmvrNI578rekrSnHnFzCHns8yvD2jQRyBvAidD81haCb6v9HoMthilW+ROXbjrKhMG+pFbrAX3HJljftHAmkFwx+ctevY9mgsmcxcbnPqYggpGJygANvQoWEL91S39JTm+hYvwLx4DiemCLyqZY0zE+q2h0xgVjbT0HdOasDE7REGztca2yAfVWQR1VykHllaTiWQkGGhjO+wAWeUybma8kQ80xNi8O8t5W3r2U5ZU4K4pYQRccg+e/tY3BBxIRDC9XLf1kIbR+cTQ9i1/3A+pSR8jHA+nQ7r1iwgN7Dl+5eMCYRb0H6JQB41lsdYZYpz5FECIsZ4Z9csZuqNh91DyfD/xuKavakAzv+rAZ3XnGZ5RQxbMbg0kiZYLk93C+NnRCjRzUnN4ozlyuxwcGNTGmQfcqYZNbsRH7kB7pDIx4 X-MS-Exchange-AntiSpam-MessageData: i7yO4vsWkxlH0cxXy4Bpq32u6V67oBgPSKVsGFpIlWe5yKHAuKy3Il0jRAYSJa4WjqFIEMRlc6yH7stT4JyrlcWxksBY/VDT+1LKTJt/yBMUKXsQf1dKPFSso0nzTvXtXffKMIax+QrH8S8ZjadOlVhdAU6uHvEkTiEtRNgdRoq/K3GY1nfI+axlLd4b1NonSjfxM66QbmkDg4JFR+g6IA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: b664122a-f6eb-4a62-fb5e-08d7da1c3776 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2020 11:18:22.5036 (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: vMNdl3R7vDISE3wW3aaM1rCIQCvzc81FYgZdgkIAkj6RqcIXXqYmTlPAilmOy3h5vEN75PIvFY8bbjQPSdyRLA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB3860 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Until now, hif API was directly imported from firmware sources. However, it does not make sense to keep ton of unused structures in the driver. Moreover, the hif API is now stable enough to be keep in sync by importing delta from firmware. So, drop unused definitions from the hif API. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 18 --- drivers/staging/wfx/hif_api_general.h | 90 --------------- drivers/staging/wfx/hif_api_mib.h | 155 -------------------------- 3 files changed, 263 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index f6934598f319..321f4fb27b35 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -10,8 +10,6 @@ #include "hif_api_general.h" -#define HIF_NUM_AC 4 - #define HIF_API_SSID_SIZE API_SSID_SIZE enum hif_requests_ids { @@ -168,22 +166,6 @@ struct hif_ssid_def { #define HIF_API_MAX_NB_SSIDS 2 #define HIF_API_MAX_NB_CHANNELS 14 -struct hif_req_start_scan { - u8 band; - struct hif_scan_type scan_type; - struct hif_scan_flags scan_flags; - u8 max_transmit_rate; - struct hif_auto_scan_param auto_scan_param; - u8 num_of_probe_requests; - u8 probe_delay; - u8 num_of_ssids; - u8 num_of_channels; - u32 min_channel_time; - u32 max_channel_time; - s32 tx_power_level; - u8 ssid_and_channel_lists[]; -} __packed; - struct hif_req_start_scan_alt { u8 band; struct hif_scan_type scan_type; diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index a069c3a21b4d..73016135f538 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -191,12 +191,6 @@ struct hif_req_control_gpio { u8 gpio_mode; } __packed; -enum hif_gpio_error { - HIF_GPIO_ERROR_0 = 0x0, - HIF_GPIO_ERROR_1 = 0x1, - HIF_GPIO_ERROR_2 = 0x2 -}; - struct hif_cnf_control_gpio { u32 status; u32 value; @@ -350,88 +344,4 @@ struct hif_cnf_sl_configure { u32 status; } __packed; -struct hif_req_prevent_rollback { - u32 magic_word; -} __packed; - -struct hif_cnf_prevent_rollback { - u32 status; -} __packed; - -enum hif_pta_mode { - PTA_1W_WLAN_MASTER = 0, - PTA_1W_COEX_MASTER = 1, - PTA_2W = 2, - PTA_3W = 3, - PTA_4W = 4 -}; - -enum hif_signal_level { - SIGNAL_LOW = 0, - SIGNAL_HIGH = 1 -}; - -enum hif_coex_type { - COEX_TYPE_GENERIC = 0, - COEX_TYPE_BLE = 1 -}; - -enum hif_grant_state { - NO_GRANT = 0, - GRANT = 1 -}; - -struct hif_req_pta_settings { - u8 pta_mode; - u8 request_signal_active_level; - u8 priority_signal_active_level; - u8 freq_signal_active_level; - u8 grant_signal_active_level; - u8 coex_type; - u8 default_grant_state; - u8 simultaneous_rx_accesses; - u8 priority_sampling_time; - u8 tx_rx_sampling_time; - u8 freq_sampling_time; - u8 grant_valid_time; - u8 fem_control_time; - u8 first_slot_time; - u16 periodic_tx_rx_sampling_time; - u16 coex_quota; - u16 wlan_quota; -} __packed; - -struct hif_cnf_pta_settings { - u32 status; -} __packed; - -enum hif_pta_priority { - HIF_PTA_PRIORITY_COEX_MAXIMIZED = 0x00000562, - HIF_PTA_PRIORITY_COEX_HIGH = 0x00000462, - HIF_PTA_PRIORITY_BALANCED = 0x00001461, - HIF_PTA_PRIORITY_WLAN_HIGH = 0x00001851, - HIF_PTA_PRIORITY_WLAN_MAXIMIZED = 0x00001A51 -}; - -struct hif_req_pta_priority { - u32 priority; -} __packed; - -struct hif_cnf_pta_priority { - u32 status; -} __packed; - -enum hif_pta_state { - PTA_OFF = 0, - PTA_ON = 1 -}; - -struct hif_req_pta_state { - u32 pta_state; -} __packed; - -struct hif_cnf_pta_state { - u32 status; -} __packed; - #endif diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h index 36c9152785c4..732f82d10a19 100644 --- a/drivers/staging/wfx/hif_api_mib.h +++ b/drivers/staging/wfx/hif_api_mib.h @@ -63,8 +63,6 @@ enum hif_mib_ids { HIF_MIB_ID_BEACON_STATS = 0x2056, }; -#define HIF_OP_POWER_MODE_MASK 0xf - enum hif_op_power_mode { HIF_OP_POWER_MODE_ACTIVE = 0x0, HIF_OP_POWER_MODE_DOZE = 0x1, @@ -78,78 +76,12 @@ struct hif_mib_gl_operational_power_mode { u8 reserved2[3]; } __packed; -struct hif_mib_gl_block_ack_info { - u8 rx_buffer_size; - u8 rx_max_num_agreements; - u8 tx_buffer_size; - u8 tx_max_num_agreements; -} __packed; - struct hif_mib_gl_set_multi_msg { u8 enable_multi_tx_conf:1; u8 reserved1:7; u8 reserved2[3]; } __packed; -enum hif_cca_thr_mode { - HIF_CCA_THR_MODE_RELATIVE = 0x0, - HIF_CCA_THR_MODE_ABSOLUTE = 0x1 -}; - -struct hif_mib_gl_cca_config { - u8 cca_thr_mode; - u8 reserved[3]; -} __packed; - -#define MAX_NUMBER_DATA_FILTERS 0xA - -#define MAX_NUMBER_IPV4_ADDR_CONDITIONS 0x4 -#define MAX_NUMBER_IPV6_ADDR_CONDITIONS 0x4 -#define MAX_NUMBER_MAC_ADDR_CONDITIONS 0x4 -#define MAX_NUMBER_UC_MC_BC_CONDITIONS 0x4 -#define MAX_NUMBER_ETHER_TYPE_CONDITIONS 0x4 -#define MAX_NUMBER_PORT_CONDITIONS 0x4 -#define MAX_NUMBER_MAGIC_CONDITIONS 0x4 -#define MAX_NUMBER_ARP_CONDITIONS 0x2 -#define MAX_NUMBER_NS_CONDITIONS 0x2 - -struct hif_mib_ethertype_data_frame_condition { - u8 condition_idx; - u8 reserved; - u16 ether_type; -} __packed; - -enum hif_udp_tcp_protocol { - HIF_PROTOCOL_UDP = 0x0, - HIF_PROTOCOL_TCP = 0x1, - HIF_PROTOCOL_BOTH_UDP_TCP = 0x2 -}; - -enum hif_which_port { - HIF_PORT_DST = 0x0, - HIF_PORT_SRC = 0x1, - HIF_PORT_SRC_OR_DST = 0x2 -}; - -struct hif_mib_ports_data_frame_condition { - u8 condition_idx; - u8 protocol; - u8 which_port; - u8 reserved1; - u16 port_number; - u8 reserved2[2]; -} __packed; - -#define HIF_API_MAGIC_PATTERN_SIZE 32 - -struct hif_mib_magic_data_frame_condition { - u8 condition_idx; - u8 offset; - u8 magic_pattern_length; - u8 reserved; - u8 magic_pattern[HIF_API_MAGIC_PATTERN_SIZE]; -} __packed; - enum hif_mac_addr_type { HIF_MAC_ADDR_A1 = 0x0, HIF_MAC_ADDR_A2 = 0x1, @@ -162,25 +94,6 @@ struct hif_mib_mac_addr_data_frame_condition { u8 mac_address[ETH_ALEN]; } __packed; -enum hif_ip_addr_mode { - HIF_IP_ADDR_SRC = 0x0, - HIF_IP_ADDR_DST = 0x1 -}; - -struct hif_mib_ipv4_addr_data_frame_condition { - u8 condition_idx; - u8 address_mode; - u8 reserved[2]; - u8 i_pv4_address[HIF_API_IPV4_ADDRESS_SIZE]; -} __packed; - -struct hif_mib_ipv6_addr_data_frame_condition { - u8 condition_idx; - u8 address_mode; - u8 reserved[2]; - u8 i_pv6_address[HIF_API_IPV6_ADDRESS_SIZE]; -} __packed; - #define HIF_FILTER_UNICAST 0x1 #define HIF_FILTER_MULTICAST 0x2 #define HIF_FILTER_BROADCAST 0x4 @@ -226,13 +139,6 @@ struct hif_mib_arp_ip_addr_table { u8 ipv4_address[HIF_API_IPV4_ADDRESS_SIZE]; } __packed; -struct hif_mib_ns_ip_addr_table { - u8 condition_idx; - u8 ns_enable; - u8 reserved[2]; - u8 ipv6_address[HIF_API_IPV6_ADDRESS_SIZE]; -} __packed; - struct hif_mib_rx_filter { u8 reserved1:1; u8 bssid_filter:1; @@ -273,23 +179,6 @@ struct hif_mib_bcn_filter_enable { u32 bcn_count; } __packed; -struct hif_mib_group_seq_counter { - u32 bits4716; - u16 bits1500; - u16 reserved; -} __packed; - -struct hif_mib_tsf_counter { - u32 tsf_counterlo; - u32 tsf_counterhi; -} __packed; - -struct hif_mib_stats_table { - s16 latest_snr; - u8 latest_rcpi; - s8 latest_rssi; -} __packed; - struct hif_mib_extended_count_table { u32 count_plcp_errors; u32 count_fcs_errors; @@ -345,29 +234,11 @@ struct hif_mib_count_table { u32 count_rx_bipmic_errors; } __packed; -struct hif_mib_max_tx_power_level { - s32 max_tx_power_level_rf_port1; - s32 max_tx_power_level_rf_port2; -} __packed; - -struct hif_mib_beacon_stats { - s32 latest_tbtt_diff; - u32 reserved[4]; -} __packed; - struct hif_mib_mac_address { u8 mac_addr[ETH_ALEN]; u16 reserved; } __packed; -struct hif_mib_dot11_max_transmit_msdu_lifetime { - u32 max_life_time; -} __packed; - -struct hif_mib_dot11_max_receive_lifetime { - u32 max_life_time; -} __packed; - struct hif_mib_wep_default_key_id { u8 wep_default_key_id; u8 reserved[3]; @@ -440,12 +311,6 @@ struct hif_mib_block_ack_policy { u8 block_ack_rx_max_buffer_size; } __packed; -struct hif_mib_override_int_rate { - u8 internal_tx_rate; - u8 non_erp_internal_tx_rate; - u8 reserved[2]; -} __packed; - enum hif_mpdu_start_spacing { HIF_MPDU_START_SPACING_NO_RESTRIC = 0x0, HIF_MPDU_START_SPACING_QUARTER = 0x1, @@ -528,24 +393,4 @@ struct hif_mib_keep_alive_period { u8 reserved[2]; } __packed; -struct hif_mib_arp_keep_alive_period { - u16 arp_keep_alive_period; - u8 encr_type; - u8 reserved; - u8 sender_ipv4_address[HIF_API_IPV4_ADDRESS_SIZE]; - u8 target_ipv4_address[HIF_API_IPV4_ADDRESS_SIZE]; -} __packed; - -struct hif_mib_inactivity_timer { - u8 min_active_time; - u8 max_active_time; - u16 reserved; -} __packed; - -struct hif_mib_interface_protection { - u8 use_cts_prot:1; - u8 reserved1:7; - u8 reserved2[3]; -} __packed; - #endif From patchwork Mon Apr 6 11:17: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: 221413 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=-9.8 required=3.0 tests=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 65207C2BA19 for ; Mon, 6 Apr 2020 11:18:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0BD4D206F5 for ; Mon, 6 Apr 2020 11:18:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="AOneos0O" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727882AbgDFLSt (ORCPT ); Mon, 6 Apr 2020 07:18:49 -0400 Received: from mail-dm6nam11on2071.outbound.protection.outlook.com ([40.107.223.71]:6126 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727813AbgDFLSr (ORCPT ); Mon, 6 Apr 2020 07:18:47 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IkMuJ9SIhIa+RSQydDx/jyCQS/bsTY80cw7y50ZpHbaLJQJzaYU8UyDr/mi2BuBH1fS88iLvJ1at02APlh9CLBavDrjKpE7hz8O950bGjqlTX+ZymDv5fsh7HO8Dfl9bxprrU9YWSEqlLIu3p9fpFnnyizKGn7G7kT+PbG+4iyDXQv6BltNa9ndQ1IFGqWdgAg7+A9jd8cUhqv/TERizYVe8yrJ1QC1bHBIT7pUZ8b4ZfGzYypeizftaBw34aAR5fFA+15yrJwyreKLhqj+jeOIBqRhIu+6C74Dz502t+gYM1Y60TE/7MEyJLG3x0Nr7F7mwbXzDHE9fEvLOfL2ISA== 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=pJX5g4nvss7j/Y68hkDb+goi/x1XVcrwQNSxsVAYD0Q=; b=nklkaSRrdhN+C0+jgFo4kKBCQbEMq7tPxeTnZg8NDQC3OsC9zbB/Q8XjsyW19TlHHewERslLL96jVc88NXGm5wxmzk6XW5fofv2Bc3xXX1UImJCO/1QY+Z450k/tDA07fAO4jQFha/IulJGMETNYaDatZlzqJc6czoJA13zPmMa+XSTn9J+CbeuiPdbCQc5pvkh8BIlR9hDJ9aUut6OU27UE8UFx7y/HnMvOCJdqTKvxjIJ3eB8Ka3TeMkLvqxOJYp9M6hu1bgHIjgutynIGeTj8+IdLkR7s1D1H7ZwOxdtzwW6XGKJTKWgNGsSka3+xoSem9Opq//wGhxCHl62SbQ== 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=pJX5g4nvss7j/Y68hkDb+goi/x1XVcrwQNSxsVAYD0Q=; b=AOneos0O1rHXqi7xiOkDE4BBX2XtqyQSJogPUZxOBj25cUxXVLq0qQxTyq4r/PWEDoTOY0SYBcz2mtcT0meaXxM9g1swqrYpxu9zpoL7hsUN9CHThokOziBY0XK939G2+awBKZRN21yShjZqW6ef6msDeBiMJy+yrdaSAIbpWbU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from BN6PR11MB4052.namprd11.prod.outlook.com (2603:10b6:405:7a::37) by BN6PR11MB3860.namprd11.prod.outlook.com (2603:10b6:405:77::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15; Mon, 6 Apr 2020 11:18:28 +0000 Received: from BN6PR11MB4052.namprd11.prod.outlook.com ([fe80::e0af:e9de:ffce:7376]) by BN6PR11MB4052.namprd11.prod.outlook.com ([fe80::e0af:e9de:ffce:7376%3]) with mapi id 15.20.2878.018; Mon, 6 Apr 2020 11:18:28 +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/11] staging: wfx: align members declarations in hif API Date: Mon, 6 Apr 2020 13:17:52 +0200 Message-Id: <20200406111756.154086-8-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200406111756.154086-1-Jerome.Pouiller@silabs.com> References: <20200406111756.154086-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR05CA0010.namprd05.prod.outlook.com (2603:10b6:3:d4::20) To BN6PR11MB4052.namprd11.prod.outlook.com (2603:10b6:405:7a::37) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by DM5PR05CA0010.namprd05.prod.outlook.com (2603:10b6:3:d4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.13 via Frontend Transport; Mon, 6 Apr 2020 11:18:26 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a330fb44-d16e-40de-a951-08d7da1c3b1f X-MS-TrafficTypeDiagnostic: BN6PR11MB3860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:22; X-Forefront-PRVS: 0365C0E14B X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB4052.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(396003)(39850400004)(346002)(366004)(136003)(376002)(186003)(16526019)(7696005)(52116002)(36756003)(5660300002)(107886003)(316002)(54906003)(66946007)(66476007)(4326008)(2616005)(66556008)(1076003)(66574012)(81166006)(6666004)(6486002)(8936002)(2906002)(86362001)(30864003)(81156014)(8676002)(478600001)(579004); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F7P+FjlN8IuJ27vDtHePTBo4hAVKlpn7Do7gjq9wiID8ZFo/EHx6gj7RhyQ4RRqK2vD5KG2ZBHzBz5uF2zGZ72dAXRYDcNROMXWcxYXvFtYFPui5ECp5qZvDw4ndnACVMr1nxjvkIevCK/NV5FY6WRwVWFn+U/q+URHAU8CWDJXyl0pvb6drXx/98ZfNqbRbdtEZEl1lpNuHqOOKqYWAtiFE/v34bvlUt91TpWnlmC21YIoDSdW+nVEqpP6+FSc7iD4exIcDbefc2vdCKPn+bLIMGlJQ4yJV64wu6xpzXFw8wdsv0DLmPr8+SDxS+apd3bPVNU+mgjpw/H6g/aYQy3Vza37/8fSiQRCcB25jgIi5qstmCJLHGUcwon3g8e9n2zMAGAEIfozLyJX+t4IUvf1Ai/7wEtjrVdH1K7IzoZI/EZhpZazqFl7rigEZbHgo X-MS-Exchange-AntiSpam-MessageData: F8aDYeahZYQavu8d14qHs+7TJjzfDFULRwoy1xi65+ohQCErKHsjVhG5dOGXIceZDzupeKRzLCXRyT+Jyk4c518VOoTVKplqIDa/9t0qeYetbhxRZeAmut37nEEZCcU8Sr8OHhyLyyeblKIHFQj1Ki5DoPHq573s+RfAG+wMJiOnid/ks3O2vFDPckwRYHte0iZh84uPRnGTNHvOZ2cmfQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: a330fb44-d16e-40de-a951-08d7da1c3b1f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2020 11:18:28.6882 (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: YOQj0JiSiVmlmFqvaZXdciEt87evznxQ0zM8r8sfIJBBRbPt1DkIyoSTuL9jKpyeoBA2+CQUZ+uzzhQteUQsBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB3860 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Hardware API headers were not uniformly aligned. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 484 +++++++++++++------------- drivers/staging/wfx/hif_api_general.h | 272 +++++++-------- drivers/staging/wfx/hif_api_mib.h | 388 ++++++++++----------- 3 files changed, 572 insertions(+), 572 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 82a9f4ae4555..6f70801949bb 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -13,51 +13,51 @@ #define HIF_API_SSID_SIZE API_SSID_SIZE enum hif_requests_ids { - HIF_REQ_ID_RESET = 0x0a, - HIF_REQ_ID_READ_MIB = 0x05, - HIF_REQ_ID_WRITE_MIB = 0x06, - HIF_REQ_ID_START_SCAN = 0x07, - HIF_REQ_ID_STOP_SCAN = 0x08, - HIF_REQ_ID_TX = 0x04, - HIF_REQ_ID_JOIN = 0x0b, - HIF_REQ_ID_SET_PM_MODE = 0x10, - HIF_REQ_ID_SET_BSS_PARAMS = 0x11, - HIF_REQ_ID_ADD_KEY = 0x0c, - HIF_REQ_ID_REMOVE_KEY = 0x0d, - HIF_REQ_ID_EDCA_QUEUE_PARAMS = 0x13, - HIF_REQ_ID_START = 0x17, - HIF_REQ_ID_BEACON_TRANSMIT = 0x18, - HIF_REQ_ID_UPDATE_IE = 0x1b, - HIF_REQ_ID_MAP_LINK = 0x1c, + HIF_REQ_ID_RESET = 0x0a, + HIF_REQ_ID_READ_MIB = 0x05, + HIF_REQ_ID_WRITE_MIB = 0x06, + HIF_REQ_ID_START_SCAN = 0x07, + HIF_REQ_ID_STOP_SCAN = 0x08, + HIF_REQ_ID_TX = 0x04, + HIF_REQ_ID_JOIN = 0x0b, + HIF_REQ_ID_SET_PM_MODE = 0x10, + HIF_REQ_ID_SET_BSS_PARAMS = 0x11, + HIF_REQ_ID_ADD_KEY = 0x0c, + HIF_REQ_ID_REMOVE_KEY = 0x0d, + HIF_REQ_ID_EDCA_QUEUE_PARAMS = 0x13, + HIF_REQ_ID_START = 0x17, + HIF_REQ_ID_BEACON_TRANSMIT = 0x18, + HIF_REQ_ID_UPDATE_IE = 0x1b, + HIF_REQ_ID_MAP_LINK = 0x1c, }; enum hif_confirmations_ids { - HIF_CNF_ID_RESET = 0x0a, - HIF_CNF_ID_READ_MIB = 0x05, - HIF_CNF_ID_WRITE_MIB = 0x06, - HIF_CNF_ID_START_SCAN = 0x07, - HIF_CNF_ID_STOP_SCAN = 0x08, - HIF_CNF_ID_TX = 0x04, - HIF_CNF_ID_MULTI_TRANSMIT = 0x1e, - HIF_CNF_ID_JOIN = 0x0b, - HIF_CNF_ID_SET_PM_MODE = 0x10, - HIF_CNF_ID_SET_BSS_PARAMS = 0x11, - HIF_CNF_ID_ADD_KEY = 0x0c, - HIF_CNF_ID_REMOVE_KEY = 0x0d, - HIF_CNF_ID_EDCA_QUEUE_PARAMS = 0x13, - HIF_CNF_ID_START = 0x17, - HIF_CNF_ID_BEACON_TRANSMIT = 0x18, - HIF_CNF_ID_UPDATE_IE = 0x1b, - HIF_CNF_ID_MAP_LINK = 0x1c, + HIF_CNF_ID_RESET = 0x0a, + HIF_CNF_ID_READ_MIB = 0x05, + HIF_CNF_ID_WRITE_MIB = 0x06, + HIF_CNF_ID_START_SCAN = 0x07, + HIF_CNF_ID_STOP_SCAN = 0x08, + HIF_CNF_ID_TX = 0x04, + HIF_CNF_ID_MULTI_TRANSMIT = 0x1e, + HIF_CNF_ID_JOIN = 0x0b, + HIF_CNF_ID_SET_PM_MODE = 0x10, + HIF_CNF_ID_SET_BSS_PARAMS = 0x11, + HIF_CNF_ID_ADD_KEY = 0x0c, + HIF_CNF_ID_REMOVE_KEY = 0x0d, + HIF_CNF_ID_EDCA_QUEUE_PARAMS = 0x13, + HIF_CNF_ID_START = 0x17, + HIF_CNF_ID_BEACON_TRANSMIT = 0x18, + HIF_CNF_ID_UPDATE_IE = 0x1b, + HIF_CNF_ID_MAP_LINK = 0x1c, }; enum hif_indications_ids { - HIF_IND_ID_RX = 0x84, - HIF_IND_ID_SCAN_CMPL = 0x86, - HIF_IND_ID_JOIN_COMPLETE = 0x8f, - HIF_IND_ID_SET_PM_MODE_CMPL = 0x89, - HIF_IND_ID_SUSPEND_RESUME_TX = 0x8c, - HIF_IND_ID_EVENT = 0x85 + HIF_IND_ID_RX = 0x84, + HIF_IND_ID_SCAN_CMPL = 0x86, + HIF_IND_ID_JOIN_COMPLETE = 0x8f, + HIF_IND_ID_SET_PM_MODE_CMPL = 0x89, + HIF_IND_ID_SUSPEND_RESUME_TX = 0x8c, + HIF_IND_ID_EVENT = 0x85 }; union hif_commands_ids { @@ -67,26 +67,26 @@ union hif_commands_ids { }; enum hif_status { - HIF_STATUS_SUCCESS = 0x0, - HIF_STATUS_FAILURE = 0x1, - HIF_INVALID_PARAMETER = 0x2, - HIF_STATUS_WARNING = 0x3, - HIF_ERROR_UNSUPPORTED_MSG_ID = 0x4, - HIF_STATUS_DECRYPTFAILURE = 0x10, - HIF_STATUS_MICFAILURE = 0x11, - HIF_STATUS_NO_KEY_FOUND = 0x12, - HIF_STATUS_RETRY_EXCEEDED = 0x13, - HIF_STATUS_TX_LIFETIME_EXCEEDED = 0x14, - HIF_REQUEUE = 0x15, - HIF_STATUS_REFUSED = 0x16, - HIF_STATUS_BUSY = 0x17 + HIF_STATUS_SUCCESS = 0x0, + HIF_STATUS_FAILURE = 0x1, + HIF_INVALID_PARAMETER = 0x2, + HIF_STATUS_WARNING = 0x3, + HIF_ERROR_UNSUPPORTED_MSG_ID = 0x4, + HIF_STATUS_DECRYPTFAILURE = 0x10, + HIF_STATUS_MICFAILURE = 0x11, + HIF_STATUS_NO_KEY_FOUND = 0x12, + HIF_STATUS_RETRY_EXCEEDED = 0x13, + HIF_STATUS_TX_LIFETIME_EXCEEDED = 0x14, + HIF_REQUEUE = 0x15, + HIF_STATUS_REFUSED = 0x16, + HIF_STATUS_BUSY = 0x17 }; struct hif_reset_flags { - u8 reset_stat:1; - u8 reset_all_int:1; - u8 reserved1:6; - u8 reserved2[3]; + u8 reset_stat:1; + u8 reset_all_int:1; + u8 reserved1:6; + u8 reserved2[3]; } __packed; struct hif_req_reset { @@ -102,13 +102,13 @@ struct hif_cnf_read_mib { __le32 status; __le16 mib_id; __le16 length; - u8 mib_data[]; + u8 mib_data[]; } __packed; struct hif_req_write_mib { __le16 mib_id; __le16 length; - u8 mib_data[]; + u8 mib_data[]; } __packed; struct hif_cnf_write_mib { @@ -116,17 +116,17 @@ struct hif_cnf_write_mib { } __packed; struct hif_ie_flags { - u8 beacon:1; - u8 probe_resp:1; - u8 probe_req:1; - u8 reserved1:5; - u8 reserved2; + u8 beacon:1; + u8 probe_resp:1; + u8 probe_req:1; + u8 reserved1:5; + u8 reserved2; } __packed; struct hif_ie_tlv { - u8 type; - u8 length; - u8 data[]; + u8 type; + u8 length; + u8 data[]; } __packed; struct hif_req_update_ie { @@ -140,47 +140,47 @@ struct hif_cnf_update_ie { } __packed; struct hif_scan_type { - u8 type:1; - u8 mode:1; - u8 reserved:6; + 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; + u8 fbg:1; + u8 reserved1:1; + u8 pre:1; + u8 reserved2:5; } __packed; struct hif_auto_scan_param { __le16 interval; - u8 reserved; + u8 reserved; s8 rssi_thr; } __packed; struct hif_ssid_def { __le32 ssid_length; - u8 ssid[HIF_API_SSID_SIZE]; + u8 ssid[HIF_API_SSID_SIZE]; } __packed; #define HIF_API_MAX_NB_SSIDS 2 #define HIF_API_MAX_NB_CHANNELS 14 struct hif_req_start_scan_alt { - u8 band; + u8 band; struct hif_scan_type scan_type; struct hif_scan_flags scan_flags; - u8 max_transmit_rate; + u8 max_transmit_rate; struct hif_auto_scan_param auto_scan_param; - u8 num_of_probe_requests; - u8 probe_delay; - u8 num_of_ssids; - u8 num_of_channels; + u8 num_of_probe_requests; + u8 probe_delay; + u8 num_of_ssids; + u8 num_of_channels; __le32 min_channel_time; __le32 max_channel_time; __le32 tx_power_level; // signed value struct hif_ssid_def ssid_def[HIF_API_MAX_NB_SSIDS]; - u8 channel_list[]; + u8 channel_list[]; } __packed; struct hif_cnf_start_scan { @@ -199,8 +199,8 @@ enum hif_pm_mode_status { struct hif_ind_scan_cmpl { __le32 status; - u8 pm_mode; - u8 num_channels_completed; + u8 pm_mode; + u8 num_channels_completed; __le16 reserved; } __packed; @@ -223,46 +223,46 @@ enum hif_stbc { }; struct hif_queue { - u8 queue_id:2; - u8 peer_sta_id:4; - u8 reserved:2; + u8 queue_id:2; + u8 peer_sta_id:4; + u8 reserved:2; } __packed; struct hif_data_flags { - u8 more:1; - u8 fc_offset:3; - u8 after_dtim:1; - u8 reserved:3; + u8 more:1; + u8 fc_offset:3; + u8 after_dtim:1; + u8 reserved:3; } __packed; struct hif_tx_flags { - u8 start_exp:1; - u8 reserved:3; - u8 retry_policy_index:4; + u8 start_exp:1; + u8 reserved:3; + u8 retry_policy_index:4; } __packed; struct hif_ht_tx_parameters { - u8 frame_format:4; - u8 fec_coding:1; - u8 short_gi:1; - u8 reserved1:1; - u8 stbc:1; - u8 reserved2; - u8 aggregation:1; - u8 reserved3:7; - u8 reserved4; + u8 frame_format:4; + u8 fec_coding:1; + u8 short_gi:1; + u8 reserved1:1; + u8 stbc:1; + u8 reserved2; + u8 aggregation:1; + u8 reserved3:7; + u8 reserved4; } __packed; struct hif_req_tx { __le32 packet_id; - u8 max_tx_rate; + 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 frame[]; + u8 frame[]; } __packed; enum hif_qos_ackplcy { @@ -273,19 +273,19 @@ enum hif_qos_ackplcy { }; struct hif_tx_result_flags { - u8 aggr:1; - u8 requeue:1; - u8 ack_policy:2; - u8 txop_limit:1; - u8 reserved1:3; - u8 reserved2; + 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; __le32 packet_id; - u8 txed_rate; - u8 ack_failures; + u8 txed_rate; + u8 ack_failures; struct hif_tx_result_flags tx_result_flags; __le32 media_delay; __le32 tx_queue_delay; @@ -305,46 +305,46 @@ enum hif_ri_flags_encrypt { }; struct hif_rx_flags { - u8 encryp:3; - u8 in_aggr:1; - u8 first_aggr:1; - u8 last_aggr:1; - u8 defrag:1; - u8 beacon:1; - u8 tim:1; - u8 bitmap:1; - u8 match_ssid:1; - u8 match_bssid:1; - u8 more:1; - u8 reserved1:1; - u8 ht:1; - u8 stbc:1; - u8 match_uc_addr:1; - u8 match_mc_addr:1; - u8 match_bc_addr:1; - u8 key_type:1; - u8 key_index:4; - u8 reserved2:1; - u8 peer_sta_id:4; - u8 reserved3:2; - u8 reserved4:1; + u8 encryp:3; + u8 in_aggr:1; + u8 first_aggr:1; + u8 last_aggr:1; + u8 defrag:1; + u8 beacon:1; + u8 tim:1; + u8 bitmap:1; + u8 match_ssid:1; + u8 match_bssid:1; + u8 more:1; + u8 reserved1:1; + u8 ht:1; + u8 stbc:1; + u8 match_uc_addr:1; + u8 match_mc_addr:1; + u8 match_bc_addr:1; + u8 key_type:1; + u8 key_index:4; + u8 reserved2:1; + u8 peer_sta_id:4; + u8 reserved3:2; + u8 reserved4:1; } __packed; struct hif_ind_rx { __le32 status; __le16 channel_number; - u8 rxed_rate; - u8 rcpi_rssi; + u8 rxed_rate; + u8 rcpi_rssi; struct hif_rx_flags rx_flags; - u8 frame[]; + u8 frame[]; } __packed; struct hif_req_edca_queue_params { - u8 queue_id; - u8 reserved1; - u8 aifsn; - u8 reserved2; + u8 queue_id; + u8 reserved1; + u8 aifsn; + u8 reserved2; __le16 cw_min; __le16 cw_max; __le16 tx_op_limit; @@ -357,26 +357,26 @@ struct hif_cnf_edca_queue_params { } __packed; struct hif_join_flags { - u8 reserved1:2; - u8 force_no_beacon:1; - u8 force_with_ind:1; - u8 reserved2:4; + u8 reserved1:2; + u8 force_no_beacon:1; + u8 force_with_ind:1; + u8 reserved2:4; } __packed; struct hif_req_join { - u8 infrastructure_bss_mode:1; - u8 reserved1:7; - u8 band; + u8 infrastructure_bss_mode:1; + u8 reserved1:7; + u8 band; __le16 channel_number; - u8 bssid[ETH_ALEN]; + u8 bssid[ETH_ALEN]; __le16 atim_window; - u8 short_preamble:1; - u8 reserved2:7; - u8 probe_for_join; - u8 reserved3; + u8 short_preamble:1; + u8 reserved2:7; + u8 probe_for_join; + u8 reserved3; struct hif_join_flags join_flags; __le32 ssid_length; - u8 ssid[HIF_API_SSID_SIZE]; + u8 ssid[HIF_API_SSID_SIZE]; __le32 beacon_interval; __le32 basic_rate_set; } __packed; @@ -390,13 +390,13 @@ struct hif_ind_join_complete { } __packed; struct hif_bss_flags { - u8 lost_count_only:1; - u8 reserved:7; + 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; + u8 beacon_lost_count; __le16 aid; __le32 operational_rate_set; } __packed; @@ -406,16 +406,16 @@ struct hif_cnf_set_bss_params { } __packed; struct hif_pm_mode { - u8 enter_psm:1; - u8 reserved:6; - u8 fast_psm:1; + u8 enter_psm:1; + u8 reserved:6; + u8 fast_psm:1; } __packed; struct hif_req_set_pm_mode { struct hif_pm_mode pm_mode; - u8 fast_psm_idle_period; - u8 ap_psm_change_period; - u8 min_auto_ps_poll_period; + u8 fast_psm_idle_period; + u8 ap_psm_change_period; + u8 min_auto_ps_poll_period; } __packed; struct hif_cnf_set_pm_mode { @@ -424,23 +424,23 @@ struct hif_cnf_set_pm_mode { struct hif_ind_set_pm_mode_cmpl { __le32 status; - u8 pm_mode; - u8 reserved[3]; + u8 pm_mode; + u8 reserved[3]; } __packed; struct hif_req_start { - u8 mode; - u8 band; + u8 mode; + u8 band; __le16 channel_number; __le32 reserved1; __le32 beacon_interval; - u8 dtim_period; - u8 short_preamble:1; - u8 reserved2:7; - u8 reserved3; - u8 ssid_length; - u8 ssid[HIF_API_SSID_SIZE]; + u8 dtim_period; + u8 short_preamble:1; + u8 reserved2:7; + u8 reserved3; + u8 ssid_length; + u8 ssid[HIF_API_SSID_SIZE]; __le32 basic_rate_set; } __packed; @@ -454,8 +454,8 @@ enum hif_beacon { }; struct hif_req_beacon_transmit { - u8 enable_beaconing; - u8 reserved[3]; + u8 enable_beaconing; + u8 reserved[3]; } __packed; struct hif_cnf_beacon_transmit { @@ -471,15 +471,15 @@ enum hif_sta_map_direction { }; struct hif_map_link_flags { - u8 map_direction:1; - u8 mfpc:1; - u8 reserved:6; + u8 map_direction:1; + u8 mfpc:1; + u8 reserved:6; } __packed; struct hif_req_map_link { - u8 mac_addr[ETH_ALEN]; + u8 mac_addr[ETH_ALEN]; struct hif_map_link_flags map_link_flags; - u8 peer_sta_id; + u8 peer_sta_id; } __packed; struct hif_cnf_map_link { @@ -487,11 +487,11 @@ struct hif_cnf_map_link { } __packed; struct hif_suspend_resume_flags { - u8 resume:1; - u8 reserved1:2; - u8 bc_mc_only:1; - u8 reserved2:4; - u8 reserved3; + u8 resume:1; + u8 reserved1:2; + u8 bc_mc_only:1; + u8 reserved2:4; + u8 reserved3; } __packed; struct hif_ind_suspend_resume_tx { @@ -526,88 +526,88 @@ enum hif_key_type { }; struct hif_wep_pairwise_key { - u8 peer_address[ETH_ALEN]; - u8 reserved; - u8 key_length; - u8 key_data[HIF_API_WEP_KEY_DATA_SIZE]; + u8 peer_address[ETH_ALEN]; + u8 reserved; + u8 key_length; + u8 key_data[HIF_API_WEP_KEY_DATA_SIZE]; } __packed; struct hif_wep_group_key { - u8 key_id; - u8 key_length; - u8 reserved[2]; - u8 key_data[HIF_API_WEP_KEY_DATA_SIZE]; + u8 key_id; + u8 key_length; + u8 reserved[2]; + u8 key_data[HIF_API_WEP_KEY_DATA_SIZE]; } __packed; struct hif_tkip_pairwise_key { - u8 peer_address[ETH_ALEN]; - u8 reserved[2]; - u8 tkip_key_data[HIF_API_TKIP_KEY_DATA_SIZE]; - u8 rx_mic_key[HIF_API_RX_MIC_KEY_SIZE]; - u8 tx_mic_key[HIF_API_TX_MIC_KEY_SIZE]; + u8 peer_address[ETH_ALEN]; + u8 reserved[2]; + u8 tkip_key_data[HIF_API_TKIP_KEY_DATA_SIZE]; + u8 rx_mic_key[HIF_API_RX_MIC_KEY_SIZE]; + u8 tx_mic_key[HIF_API_TX_MIC_KEY_SIZE]; } __packed; struct hif_tkip_group_key { - u8 tkip_key_data[HIF_API_TKIP_KEY_DATA_SIZE]; - u8 rx_mic_key[HIF_API_RX_MIC_KEY_SIZE]; - u8 key_id; - u8 reserved[3]; - u8 rx_sequence_counter[HIF_API_RX_SEQUENCE_COUNTER_SIZE]; + u8 tkip_key_data[HIF_API_TKIP_KEY_DATA_SIZE]; + u8 rx_mic_key[HIF_API_RX_MIC_KEY_SIZE]; + u8 key_id; + u8 reserved[3]; + u8 rx_sequence_counter[HIF_API_RX_SEQUENCE_COUNTER_SIZE]; } __packed; struct hif_aes_pairwise_key { - u8 peer_address[ETH_ALEN]; - u8 reserved[2]; - u8 aes_key_data[HIF_API_AES_KEY_DATA_SIZE]; + u8 peer_address[ETH_ALEN]; + u8 reserved[2]; + u8 aes_key_data[HIF_API_AES_KEY_DATA_SIZE]; } __packed; struct hif_aes_group_key { - u8 aes_key_data[HIF_API_AES_KEY_DATA_SIZE]; - u8 key_id; - u8 reserved[3]; - u8 rx_sequence_counter[HIF_API_RX_SEQUENCE_COUNTER_SIZE]; + u8 aes_key_data[HIF_API_AES_KEY_DATA_SIZE]; + u8 key_id; + u8 reserved[3]; + u8 rx_sequence_counter[HIF_API_RX_SEQUENCE_COUNTER_SIZE]; } __packed; struct hif_wapi_pairwise_key { - u8 peer_address[ETH_ALEN]; - u8 key_id; - u8 reserved; - u8 wapi_key_data[HIF_API_WAPI_KEY_DATA_SIZE]; - u8 mic_key_data[HIF_API_MIC_KEY_DATA_SIZE]; + u8 peer_address[ETH_ALEN]; + u8 key_id; + u8 reserved; + u8 wapi_key_data[HIF_API_WAPI_KEY_DATA_SIZE]; + u8 mic_key_data[HIF_API_MIC_KEY_DATA_SIZE]; } __packed; struct hif_wapi_group_key { - u8 wapi_key_data[HIF_API_WAPI_KEY_DATA_SIZE]; - u8 mic_key_data[HIF_API_MIC_KEY_DATA_SIZE]; - u8 key_id; - u8 reserved[3]; + u8 wapi_key_data[HIF_API_WAPI_KEY_DATA_SIZE]; + u8 mic_key_data[HIF_API_MIC_KEY_DATA_SIZE]; + u8 key_id; + u8 reserved[3]; } __packed; struct hif_igtk_group_key { - u8 igtk_key_data[HIF_API_IGTK_KEY_DATA_SIZE]; - u8 key_id; - u8 reserved[3]; - u8 ipn[HIF_API_IPN_SIZE]; + u8 igtk_key_data[HIF_API_IGTK_KEY_DATA_SIZE]; + u8 key_id; + u8 reserved[3]; + 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_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; + u8 type; + u8 entry_index; + u8 int_id:2; + u8 reserved1:6; + u8 reserved2; union hif_privacy_key_data key; } __packed; @@ -616,8 +616,8 @@ struct hif_cnf_add_key { } __packed; struct hif_req_remove_key { - u8 entry_index; - u8 reserved[3]; + u8 entry_index; + u8 reserved[3]; } __packed; struct hif_cnf_remove_key { @@ -641,7 +641,7 @@ enum hif_ps_mode_error { }; union hif_event_data { - u8 rcpi_rssi; + u8 rcpi_rssi; __le32 ps_mode_error; __le32 peer_sta_set; }; diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index 5ff86e556182..275354eb6b6a 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -17,10 +17,10 @@ #define __packed __attribute__((__packed__)) #endif -#define API_SSID_SIZE 32 +#define API_SSID_SIZE 32 -#define HIF_ID_IS_INDICATION 0x80 -#define HIF_COUNTER_MAX 7 +#define HIF_ID_IS_INDICATION 0x80 +#define HIF_COUNTER_MAX 7 struct hif_msg { __le16 len; @@ -33,38 +33,38 @@ struct hif_msg { } __packed; enum hif_general_requests_ids { - HIF_REQ_ID_CONFIGURATION = 0x09, - HIF_REQ_ID_CONTROL_GPIO = 0x26, - HIF_REQ_ID_SET_SL_MAC_KEY = 0x27, - HIF_REQ_ID_SL_EXCHANGE_PUB_KEYS = 0x28, - HIF_REQ_ID_SL_CONFIGURE = 0x29, - HIF_REQ_ID_PREVENT_ROLLBACK = 0x2a, - HIF_REQ_ID_PTA_SETTINGS = 0x2b, - HIF_REQ_ID_PTA_PRIORITY = 0x2c, - HIF_REQ_ID_PTA_STATE = 0x2d, - HIF_REQ_ID_SHUT_DOWN = 0x32, + HIF_REQ_ID_CONFIGURATION = 0x09, + HIF_REQ_ID_CONTROL_GPIO = 0x26, + HIF_REQ_ID_SET_SL_MAC_KEY = 0x27, + HIF_REQ_ID_SL_EXCHANGE_PUB_KEYS = 0x28, + HIF_REQ_ID_SL_CONFIGURE = 0x29, + HIF_REQ_ID_PREVENT_ROLLBACK = 0x2a, + HIF_REQ_ID_PTA_SETTINGS = 0x2b, + HIF_REQ_ID_PTA_PRIORITY = 0x2c, + HIF_REQ_ID_PTA_STATE = 0x2d, + HIF_REQ_ID_SHUT_DOWN = 0x32, }; enum hif_general_confirmations_ids { - HIF_CNF_ID_CONFIGURATION = 0x09, - HIF_CNF_ID_CONTROL_GPIO = 0x26, - HIF_CNF_ID_SET_SL_MAC_KEY = 0x27, - HIF_CNF_ID_SL_EXCHANGE_PUB_KEYS = 0x28, - HIF_CNF_ID_SL_CONFIGURE = 0x29, - HIF_CNF_ID_PREVENT_ROLLBACK = 0x2a, - HIF_CNF_ID_PTA_SETTINGS = 0x2b, - HIF_CNF_ID_PTA_PRIORITY = 0x2c, - HIF_CNF_ID_PTA_STATE = 0x2d, - HIF_CNF_ID_SHUT_DOWN = 0x32, + HIF_CNF_ID_CONFIGURATION = 0x09, + HIF_CNF_ID_CONTROL_GPIO = 0x26, + HIF_CNF_ID_SET_SL_MAC_KEY = 0x27, + HIF_CNF_ID_SL_EXCHANGE_PUB_KEYS = 0x28, + HIF_CNF_ID_SL_CONFIGURE = 0x29, + HIF_CNF_ID_PREVENT_ROLLBACK = 0x2a, + HIF_CNF_ID_PTA_SETTINGS = 0x2b, + HIF_CNF_ID_PTA_PRIORITY = 0x2c, + HIF_CNF_ID_PTA_STATE = 0x2d, + HIF_CNF_ID_SHUT_DOWN = 0x32, }; enum hif_general_indications_ids { - HIF_IND_ID_EXCEPTION = 0xe0, - HIF_IND_ID_STARTUP = 0xe1, - HIF_IND_ID_WAKEUP = 0xe2, - HIF_IND_ID_GENERIC = 0xe3, - HIF_IND_ID_ERROR = 0xe4, - HIF_IND_ID_SL_EXCHANGE_PUB_KEYS = 0xe5 + HIF_IND_ID_EXCEPTION = 0xe0, + HIF_IND_ID_STARTUP = 0xe1, + HIF_IND_ID_WAKEUP = 0xe2, + HIF_IND_ID_GENERIC = 0xe3, + HIF_IND_ID_ERROR = 0xe4, + HIF_IND_ID_SL_EXCHANGE_PUB_KEYS = 0xe5 }; enum hif_hi_status { @@ -84,79 +84,79 @@ enum hif_hi_status { }; enum hif_api_rate_index { - API_RATE_INDEX_B_1MBPS = 0, - API_RATE_INDEX_B_2MBPS = 1, - API_RATE_INDEX_B_5P5MBPS = 2, - API_RATE_INDEX_B_11MBPS = 3, - API_RATE_INDEX_PBCC_22MBPS = 4, - API_RATE_INDEX_PBCC_33MBPS = 5, - API_RATE_INDEX_G_6MBPS = 6, - API_RATE_INDEX_G_9MBPS = 7, - API_RATE_INDEX_G_12MBPS = 8, - API_RATE_INDEX_G_18MBPS = 9, - API_RATE_INDEX_G_24MBPS = 10, - API_RATE_INDEX_G_36MBPS = 11, - API_RATE_INDEX_G_48MBPS = 12, - API_RATE_INDEX_G_54MBPS = 13, - API_RATE_INDEX_N_6P5MBPS = 14, - API_RATE_INDEX_N_13MBPS = 15, - API_RATE_INDEX_N_19P5MBPS = 16, - API_RATE_INDEX_N_26MBPS = 17, - API_RATE_INDEX_N_39MBPS = 18, - API_RATE_INDEX_N_52MBPS = 19, - API_RATE_INDEX_N_58P5MBPS = 20, - API_RATE_INDEX_N_65MBPS = 21, - API_RATE_NUM_ENTRIES = 22 + API_RATE_INDEX_B_1MBPS = 0, + API_RATE_INDEX_B_2MBPS = 1, + API_RATE_INDEX_B_5P5MBPS = 2, + API_RATE_INDEX_B_11MBPS = 3, + API_RATE_INDEX_PBCC_22MBPS = 4, + API_RATE_INDEX_PBCC_33MBPS = 5, + API_RATE_INDEX_G_6MBPS = 6, + API_RATE_INDEX_G_9MBPS = 7, + API_RATE_INDEX_G_12MBPS = 8, + API_RATE_INDEX_G_18MBPS = 9, + API_RATE_INDEX_G_24MBPS = 10, + API_RATE_INDEX_G_36MBPS = 11, + API_RATE_INDEX_G_48MBPS = 12, + API_RATE_INDEX_G_54MBPS = 13, + API_RATE_INDEX_N_6P5MBPS = 14, + API_RATE_INDEX_N_13MBPS = 15, + API_RATE_INDEX_N_19P5MBPS = 16, + API_RATE_INDEX_N_26MBPS = 17, + API_RATE_INDEX_N_39MBPS = 18, + API_RATE_INDEX_N_52MBPS = 19, + API_RATE_INDEX_N_58P5MBPS = 20, + API_RATE_INDEX_N_65MBPS = 21, + API_RATE_NUM_ENTRIES = 22 }; enum hif_fw_type { - HIF_FW_TYPE_ETF = 0x0, - HIF_FW_TYPE_WFM = 0x1, - HIF_FW_TYPE_WSM = 0x2 + HIF_FW_TYPE_ETF = 0x0, + HIF_FW_TYPE_WFM = 0x1, + HIF_FW_TYPE_WSM = 0x2 }; struct hif_capabilities { - u8 link_mode:2; - u8 reserved1:6; - u8 reserved2; - u8 reserved3; - u8 reserved4; + u8 link_mode:2; + u8 reserved1:6; + u8 reserved2; + u8 reserved3; + u8 reserved4; } __packed; struct hif_otp_regul_sel_mode_info { - u8 region_sel_mode:4; - u8 reserved:4; + u8 region_sel_mode:4; + u8 reserved:4; } __packed; struct hif_otp_phy_info { - u8 phy1_region:3; - u8 phy0_region:3; - u8 otp_phy_ver:2; + u8 phy1_region:3; + u8 phy0_region:3; + u8 otp_phy_ver:2; } __packed; struct hif_ind_startup { __le32 status; __le16 hardware_id; - u8 opn[14]; - u8 uid[8]; + u8 opn[14]; + u8 uid[8]; __le16 num_inp_ch_bufs; __le16 size_inp_ch_buf; - u8 num_links_ap; - u8 num_interfaces; - u8 mac_addr[2][ETH_ALEN]; - u8 api_version_minor; - u8 api_version_major; + u8 num_links_ap; + u8 num_interfaces; + u8 mac_addr[2][ETH_ALEN]; + u8 api_version_minor; + u8 api_version_major; struct hif_capabilities capabilities; - u8 firmware_build; - u8 firmware_minor; - u8 firmware_major; - u8 firmware_type; - u8 disabled_channel_list[2]; + u8 firmware_build; + u8 firmware_minor; + u8 firmware_major; + u8 firmware_type; + u8 disabled_channel_list[2]; struct hif_otp_regul_sel_mode_info regul_sel_mode_info; struct hif_otp_phy_info otp_phy_info; __le32 supported_rate_mask; - u8 firmware_label[128]; + u8 firmware_label[128]; } __packed; struct hif_ind_wakeup { @@ -164,7 +164,7 @@ struct hif_ind_wakeup { struct hif_req_configuration { __le16 length; - u8 pds_data[]; + u8 pds_data[]; } __packed; struct hif_cnf_configuration { @@ -172,18 +172,18 @@ struct hif_cnf_configuration { } __packed; enum hif_gpio_mode { - HIF_GPIO_MODE_D0 = 0x0, - HIF_GPIO_MODE_D1 = 0x1, - HIF_GPIO_MODE_OD0 = 0x2, - HIF_GPIO_MODE_OD1 = 0x3, - HIF_GPIO_MODE_TRISTATE = 0x4, - HIF_GPIO_MODE_TOGGLE = 0x5, - HIF_GPIO_MODE_READ = 0x6 + HIF_GPIO_MODE_D0 = 0x0, + HIF_GPIO_MODE_D1 = 0x1, + HIF_GPIO_MODE_OD0 = 0x2, + HIF_GPIO_MODE_OD1 = 0x3, + HIF_GPIO_MODE_TRISTATE = 0x4, + HIF_GPIO_MODE_TOGGLE = 0x5, + HIF_GPIO_MODE_READ = 0x6 }; struct hif_req_control_gpio { - u8 gpio_label; - u8 gpio_mode; + u8 gpio_label; + u8 gpio_mode; } __packed; struct hif_cnf_control_gpio { @@ -192,9 +192,9 @@ struct hif_cnf_control_gpio { } __packed; enum hif_generic_indication_type { - HIF_GENERIC_INDICATION_TYPE_RAW = 0x0, - HIF_GENERIC_INDICATION_TYPE_STRING = 0x1, - HIF_GENERIC_INDICATION_TYPE_RX_STATS = 0x2 + HIF_GENERIC_INDICATION_TYPE_RAW = 0x0, + HIF_GENERIC_INDICATION_TYPE_STRING = 0x1, + HIF_GENERIC_INDICATION_TYPE_RX_STATS = 0x2 }; struct hif_rx_stats { @@ -209,13 +209,13 @@ struct hif_rx_stats { __le16 cfo[API_RATE_NUM_ENTRIES]; // signed value __le32 date; __le32 pwr_clk_freq; - u8 is_ext_pwr_clk; + u8 is_ext_pwr_clk; s8 current_temp; } __packed; union hif_indication_data { - struct hif_rx_stats rx_stats; - u8 raw_data[1]; + struct hif_rx_stats rx_stats; + u8 raw_data[1]; }; struct hif_ind_generic { @@ -225,34 +225,34 @@ struct hif_ind_generic { struct hif_ind_exception { - u8 data[124]; + u8 data[124]; } __packed; enum hif_error { - HIF_ERROR_FIRMWARE_ROLLBACK = 0x0, - HIF_ERROR_FIRMWARE_DEBUG_ENABLED = 0x1, - HIF_ERROR_OUTDATED_SESSION_KEY = 0x2, - HIF_ERROR_INVALID_SESSION_KEY = 0x3, - HIF_ERROR_OOR_VOLTAGE = 0x4, - HIF_ERROR_PDS_VERSION = 0x5, - HIF_ERROR_OOR_TEMPERATURE = 0x6, - HIF_ERROR_REQ_DURING_KEY_EXCHANGE = 0x7, - HIF_ERROR_MULTI_TX_CNF_SECURELINK = 0x8, - HIF_ERROR_SECURELINK_OVERFLOW = 0x9, - HIF_ERROR_SECURELINK_DECRYPTION = 0xa + HIF_ERROR_FIRMWARE_ROLLBACK = 0x0, + HIF_ERROR_FIRMWARE_DEBUG_ENABLED = 0x1, + HIF_ERROR_OUTDATED_SESSION_KEY = 0x2, + HIF_ERROR_INVALID_SESSION_KEY = 0x3, + HIF_ERROR_OOR_VOLTAGE = 0x4, + HIF_ERROR_PDS_VERSION = 0x5, + HIF_ERROR_OOR_TEMPERATURE = 0x6, + HIF_ERROR_REQ_DURING_KEY_EXCHANGE = 0x7, + HIF_ERROR_MULTI_TX_CNF_SECURELINK = 0x8, + HIF_ERROR_SECURELINK_OVERFLOW = 0x9, + HIF_ERROR_SECURELINK_DECRYPTION = 0xa }; struct hif_ind_error { __le32 type; - u8 data[]; + u8 data[]; } __packed; enum hif_secure_link_state { - SEC_LINK_UNAVAILABLE = 0x0, - SEC_LINK_RESERVED = 0x1, - SEC_LINK_EVAL = 0x2, - SEC_LINK_ENFORCED = 0x3 + SEC_LINK_UNAVAILABLE = 0x0, + SEC_LINK_RESERVED = 0x1, + SEC_LINK_EVAL = 0x2, + SEC_LINK_ENFORCED = 0x3 }; enum hif_sl_encryption_type { @@ -270,25 +270,25 @@ struct hif_sl_msg_hdr { struct hif_sl_msg { struct hif_sl_msg_hdr hdr; __le16 len; - u8 payload[]; + u8 payload[]; } __packed; -#define AES_CCM_TAG_SIZE 16 +#define AES_CCM_TAG_SIZE 16 struct hif_sl_tag { - u8 tag[16]; + u8 tag[16]; } __packed; enum hif_sl_mac_key_dest { - SL_MAC_KEY_DEST_OTP = 0x78, - SL_MAC_KEY_DEST_RAM = 0x87 + SL_MAC_KEY_DEST_OTP = 0x78, + SL_MAC_KEY_DEST_RAM = 0x87 }; -#define API_KEY_VALUE_SIZE 32 +#define API_KEY_VALUE_SIZE 32 struct hif_req_set_sl_mac_key { - u8 otp_or_ram; - u8 key_value[API_KEY_VALUE_SIZE]; + u8 otp_or_ram; + u8 key_value[API_KEY_VALUE_SIZE]; } __packed; struct hif_cnf_set_sl_mac_key { @@ -296,39 +296,39 @@ struct hif_cnf_set_sl_mac_key { } __packed; enum hif_sl_session_key_alg { - HIF_SL_CURVE25519 = 0x01, - HIF_SL_KDF = 0x02 + HIF_SL_CURVE25519 = 0x01, + HIF_SL_KDF = 0x02 }; -#define API_HOST_PUB_KEY_SIZE 32 -#define API_HOST_PUB_KEY_MAC_SIZE 64 +#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]; + 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 +#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]; + 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]; + u8 encr_bmp[32]; + u8 disable_session_key_protection:1; + u8 reserved1:7; + u8 reserved2[3]; } __packed; struct hif_cnf_sl_configure { diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h index cd1c3fd37d1d..0490157b4f3b 100644 --- a/drivers/staging/wfx/hif_api_mib.h +++ b/drivers/staging/wfx/hif_api_mib.h @@ -10,88 +10,88 @@ #include "hif_api_general.h" -#define HIF_API_IPV4_ADDRESS_SIZE 4 -#define HIF_API_IPV6_ADDRESS_SIZE 16 +#define HIF_API_IPV4_ADDRESS_SIZE 4 +#define HIF_API_IPV6_ADDRESS_SIZE 16 enum hif_mib_ids { - HIF_MIB_ID_GL_OPERATIONAL_POWER_MODE = 0x2000, - HIF_MIB_ID_GL_BLOCK_ACK_INFO = 0x2001, - HIF_MIB_ID_GL_SET_MULTI_MSG = 0x2002, - HIF_MIB_ID_CCA_CONFIG = 0x2003, - HIF_MIB_ID_ETHERTYPE_DATAFRAME_CONDITION = 0x2010, - HIF_MIB_ID_PORT_DATAFRAME_CONDITION = 0x2011, - HIF_MIB_ID_MAGIC_DATAFRAME_CONDITION = 0x2012, - HIF_MIB_ID_MAC_ADDR_DATAFRAME_CONDITION = 0x2013, - HIF_MIB_ID_IPV4_ADDR_DATAFRAME_CONDITION = 0x2014, - HIF_MIB_ID_IPV6_ADDR_DATAFRAME_CONDITION = 0x2015, - HIF_MIB_ID_UC_MC_BC_DATAFRAME_CONDITION = 0x2016, - HIF_MIB_ID_CONFIG_DATA_FILTER = 0x2017, - HIF_MIB_ID_SET_DATA_FILTERING = 0x2018, - HIF_MIB_ID_ARP_IP_ADDRESSES_TABLE = 0x2019, - HIF_MIB_ID_NS_IP_ADDRESSES_TABLE = 0x201A, - HIF_MIB_ID_RX_FILTER = 0x201B, - HIF_MIB_ID_BEACON_FILTER_TABLE = 0x201C, - HIF_MIB_ID_BEACON_FILTER_ENABLE = 0x201D, - HIF_MIB_ID_GRP_SEQ_COUNTER = 0x2030, - HIF_MIB_ID_TSF_COUNTER = 0x2031, - HIF_MIB_ID_STATISTICS_TABLE = 0x2032, - HIF_MIB_ID_COUNTERS_TABLE = 0x2033, - HIF_MIB_ID_MAX_TX_POWER_LEVEL = 0x2034, - HIF_MIB_ID_EXTENDED_COUNTERS_TABLE = 0x2035, - HIF_MIB_ID_DOT11_MAC_ADDRESS = 0x2040, + HIF_MIB_ID_GL_OPERATIONAL_POWER_MODE = 0x2000, + HIF_MIB_ID_GL_BLOCK_ACK_INFO = 0x2001, + HIF_MIB_ID_GL_SET_MULTI_MSG = 0x2002, + HIF_MIB_ID_CCA_CONFIG = 0x2003, + HIF_MIB_ID_ETHERTYPE_DATAFRAME_CONDITION = 0x2010, + HIF_MIB_ID_PORT_DATAFRAME_CONDITION = 0x2011, + HIF_MIB_ID_MAGIC_DATAFRAME_CONDITION = 0x2012, + HIF_MIB_ID_MAC_ADDR_DATAFRAME_CONDITION = 0x2013, + HIF_MIB_ID_IPV4_ADDR_DATAFRAME_CONDITION = 0x2014, + HIF_MIB_ID_IPV6_ADDR_DATAFRAME_CONDITION = 0x2015, + HIF_MIB_ID_UC_MC_BC_DATAFRAME_CONDITION = 0x2016, + HIF_MIB_ID_CONFIG_DATA_FILTER = 0x2017, + HIF_MIB_ID_SET_DATA_FILTERING = 0x2018, + HIF_MIB_ID_ARP_IP_ADDRESSES_TABLE = 0x2019, + HIF_MIB_ID_NS_IP_ADDRESSES_TABLE = 0x201A, + HIF_MIB_ID_RX_FILTER = 0x201B, + HIF_MIB_ID_BEACON_FILTER_TABLE = 0x201C, + HIF_MIB_ID_BEACON_FILTER_ENABLE = 0x201D, + HIF_MIB_ID_GRP_SEQ_COUNTER = 0x2030, + HIF_MIB_ID_TSF_COUNTER = 0x2031, + HIF_MIB_ID_STATISTICS_TABLE = 0x2032, + HIF_MIB_ID_COUNTERS_TABLE = 0x2033, + HIF_MIB_ID_MAX_TX_POWER_LEVEL = 0x2034, + HIF_MIB_ID_EXTENDED_COUNTERS_TABLE = 0x2035, + HIF_MIB_ID_DOT11_MAC_ADDRESS = 0x2040, HIF_MIB_ID_DOT11_MAX_TRANSMIT_MSDU_LIFETIME = 0x2041, - HIF_MIB_ID_DOT11_MAX_RECEIVE_LIFETIME = 0x2042, - HIF_MIB_ID_DOT11_WEP_DEFAULT_KEY_ID = 0x2043, - HIF_MIB_ID_DOT11_RTS_THRESHOLD = 0x2044, - HIF_MIB_ID_SLOT_TIME = 0x2045, - HIF_MIB_ID_CURRENT_TX_POWER_LEVEL = 0x2046, - HIF_MIB_ID_NON_ERP_PROTECTION = 0x2047, - HIF_MIB_ID_TEMPLATE_FRAME = 0x2048, - HIF_MIB_ID_BEACON_WAKEUP_PERIOD = 0x2049, - HIF_MIB_ID_RCPI_RSSI_THRESHOLD = 0x204A, - HIF_MIB_ID_BLOCK_ACK_POLICY = 0x204B, - HIF_MIB_ID_OVERRIDE_INTERNAL_TX_RATE = 0x204C, - HIF_MIB_ID_SET_ASSOCIATION_MODE = 0x204D, - HIF_MIB_ID_SET_UAPSD_INFORMATION = 0x204E, - HIF_MIB_ID_SET_TX_RATE_RETRY_POLICY = 0x204F, - HIF_MIB_ID_PROTECTED_MGMT_POLICY = 0x2050, - HIF_MIB_ID_SET_HT_PROTECTION = 0x2051, - HIF_MIB_ID_KEEP_ALIVE_PERIOD = 0x2052, - HIF_MIB_ID_ARP_KEEP_ALIVE_PERIOD = 0x2053, - HIF_MIB_ID_INACTIVITY_TIMER = 0x2054, - HIF_MIB_ID_INTERFACE_PROTECTION = 0x2055, - HIF_MIB_ID_BEACON_STATS = 0x2056, + HIF_MIB_ID_DOT11_MAX_RECEIVE_LIFETIME = 0x2042, + HIF_MIB_ID_DOT11_WEP_DEFAULT_KEY_ID = 0x2043, + HIF_MIB_ID_DOT11_RTS_THRESHOLD = 0x2044, + HIF_MIB_ID_SLOT_TIME = 0x2045, + HIF_MIB_ID_CURRENT_TX_POWER_LEVEL = 0x2046, + HIF_MIB_ID_NON_ERP_PROTECTION = 0x2047, + HIF_MIB_ID_TEMPLATE_FRAME = 0x2048, + HIF_MIB_ID_BEACON_WAKEUP_PERIOD = 0x2049, + HIF_MIB_ID_RCPI_RSSI_THRESHOLD = 0x204A, + HIF_MIB_ID_BLOCK_ACK_POLICY = 0x204B, + HIF_MIB_ID_OVERRIDE_INTERNAL_TX_RATE = 0x204C, + HIF_MIB_ID_SET_ASSOCIATION_MODE = 0x204D, + HIF_MIB_ID_SET_UAPSD_INFORMATION = 0x204E, + HIF_MIB_ID_SET_TX_RATE_RETRY_POLICY = 0x204F, + HIF_MIB_ID_PROTECTED_MGMT_POLICY = 0x2050, + HIF_MIB_ID_SET_HT_PROTECTION = 0x2051, + HIF_MIB_ID_KEEP_ALIVE_PERIOD = 0x2052, + HIF_MIB_ID_ARP_KEEP_ALIVE_PERIOD = 0x2053, + HIF_MIB_ID_INACTIVITY_TIMER = 0x2054, + HIF_MIB_ID_INTERFACE_PROTECTION = 0x2055, + HIF_MIB_ID_BEACON_STATS = 0x2056, }; enum hif_op_power_mode { - HIF_OP_POWER_MODE_ACTIVE = 0x0, - HIF_OP_POWER_MODE_DOZE = 0x1, - HIF_OP_POWER_MODE_QUIESCENT = 0x2 + HIF_OP_POWER_MODE_ACTIVE = 0x0, + HIF_OP_POWER_MODE_DOZE = 0x1, + HIF_OP_POWER_MODE_QUIESCENT = 0x2 }; struct hif_mib_gl_operational_power_mode { - u8 power_mode:4; - u8 reserved1:3; - u8 wup_ind_activation:1; - u8 reserved2[3]; + u8 power_mode:4; + u8 reserved1:3; + u8 wup_ind_activation:1; + u8 reserved2[3]; } __packed; struct hif_mib_gl_set_multi_msg { - u8 enable_multi_tx_conf:1; - u8 reserved1:7; - u8 reserved2[3]; + u8 enable_multi_tx_conf:1; + u8 reserved1:7; + u8 reserved2[3]; } __packed; enum hif_mac_addr_type { - HIF_MAC_ADDR_A1 = 0x0, - HIF_MAC_ADDR_A2 = 0x1, - HIF_MAC_ADDR_A3 = 0x2 + 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]; + u8 condition_idx; + u8 address_type; + u8 mac_address[ETH_ALEN]; } __packed; #define HIF_FILTER_UNICAST 0x1 @@ -99,65 +99,65 @@ struct hif_mib_mac_addr_data_frame_condition { #define HIF_FILTER_BROADCAST 0x4 struct hif_mib_uc_mc_bc_data_frame_condition { - u8 condition_idx; - u8 allowed_frames; - u8 reserved[2]; + 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; + 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; - u8 enable:1; - u8 reserved2:7; - u8 reserved3[2]; + 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, - HIF_ARP_NS_REPLY_ENABLE = 0x2 + HIF_ARP_NS_FILTERING_DISABLE = 0x0, + HIF_ARP_NS_FILTERING_ENABLE = 0x1, + HIF_ARP_NS_REPLY_ENABLE = 0x2 }; struct hif_mib_arp_ip_addr_table { - u8 condition_idx; - u8 arp_enable; - u8 reserved[2]; - u8 ipv4_address[HIF_API_IPV4_ADDRESS_SIZE]; + u8 condition_idx; + u8 arp_enable; + u8 reserved[2]; + u8 ipv4_address[HIF_API_IPV4_ADDRESS_SIZE]; } __packed; struct hif_mib_rx_filter { - u8 reserved1:1; - u8 bssid_filter:1; - u8 reserved2:1; - u8 fwd_probe_req:1; - u8 keep_alive_filter:1; - u8 reserved3:3; - u8 reserved4[3]; + u8 reserved1:1; + u8 bssid_filter:1; + u8 reserved2:1; + u8 fwd_probe_req:1; + u8 keep_alive_filter:1; + u8 reserved3:3; + u8 reserved4[3]; } __packed; struct hif_ie_table_entry { - u8 ie_id; - u8 has_changed:1; - u8 no_longer:1; - u8 has_appeared:1; - u8 reserved:1; - u8 num_match_data:4; - u8 oui[3]; - u8 match_data[3]; + u8 ie_id; + u8 has_changed:1; + u8 no_longer:1; + u8 has_appeared:1; + u8 reserved:1; + u8 num_match_data:4; + u8 oui[3]; + u8 match_data[3]; } __packed; struct hif_mib_bcn_filter_table { @@ -166,9 +166,9 @@ struct hif_mib_bcn_filter_table { } __packed; enum hif_beacon_filter { - HIF_BEACON_FILTER_DISABLE = 0x0, - HIF_BEACON_FILTER_ENABLE = 0x1, - HIF_BEACON_FILTER_AUTO_ERP = 0x2 + HIF_BEACON_FILTER_DISABLE = 0x0, + HIF_BEACON_FILTER_ENABLE = 0x1, + HIF_BEACON_FILTER_AUTO_ERP = 0x2 }; struct hif_mib_bcn_filter_enable { @@ -232,13 +232,13 @@ struct hif_mib_count_table { } __packed; struct hif_mib_mac_address { - u8 mac_addr[ETH_ALEN]; + u8 mac_addr[ETH_ALEN]; __le16 reserved; } __packed; struct hif_mib_wep_default_key_id { - u8 wep_default_key_id; - u8 reserved[3]; + u8 wep_default_key_id; + u8 reserved[3]; } __packed; struct hif_mib_dot11_rts_threshold { @@ -254,138 +254,138 @@ struct hif_mib_current_tx_power_level { } __packed; struct hif_mib_non_erp_protection { - u8 use_cts_to_self:1; - u8 reserved1:7; - u8 reserved2[3]; + u8 use_cts_to_self:1; + u8 reserved1:7; + u8 reserved2[3]; } __packed; enum hif_tmplt { - HIF_TMPLT_PRBREQ = 0x0, - HIF_TMPLT_BCN = 0x1, - HIF_TMPLT_NULL = 0x2, - HIF_TMPLT_QOSNUL = 0x3, - HIF_TMPLT_PSPOLL = 0x4, - HIF_TMPLT_PRBRES = 0x5, - HIF_TMPLT_ARP = 0x6, - HIF_TMPLT_NA = 0x7 + HIF_TMPLT_PRBREQ = 0x0, + HIF_TMPLT_BCN = 0x1, + HIF_TMPLT_NULL = 0x2, + HIF_TMPLT_QOSNUL = 0x3, + HIF_TMPLT_PSPOLL = 0x4, + HIF_TMPLT_PRBRES = 0x5, + HIF_TMPLT_ARP = 0x6, + HIF_TMPLT_NA = 0x7 }; struct hif_mib_template_frame { - u8 frame_type; - u8 init_rate:7; - u8 mode:1; + u8 frame_type; + u8 init_rate:7; + u8 mode:1; __le16 frame_length; - u8 frame[700]; + u8 frame[700]; } __packed; struct hif_mib_beacon_wake_up_period { - u8 wakeup_period_min; - u8 receive_dtim:1; - u8 reserved1:7; - u8 wakeup_period_max; - u8 reserved2; + u8 wakeup_period_min; + u8 receive_dtim:1; + u8 reserved1:7; + u8 wakeup_period_max; + u8 reserved2; } __packed; struct hif_mib_rcpi_rssi_threshold { - u8 detection:1; - u8 rcpi_rssi:1; - u8 upperthresh:1; - u8 lowerthresh:1; - u8 reserved:4; - u8 lower_threshold; - u8 upper_threshold; - u8 rolling_average_count; + u8 detection:1; + u8 rcpi_rssi:1; + u8 upperthresh:1; + u8 lowerthresh:1; + u8 reserved:4; + u8 lower_threshold; + u8 upper_threshold; + u8 rolling_average_count; } __packed; #define DEFAULT_BA_MAX_RX_BUFFER_SIZE 16 struct hif_mib_block_ack_policy { - u8 block_ack_tx_tid_policy; - u8 reserved1; - u8 block_ack_rx_tid_policy; - u8 block_ack_rx_max_buffer_size; + u8 block_ack_tx_tid_policy; + u8 reserved1; + u8 block_ack_rx_tid_policy; + u8 block_ack_rx_max_buffer_size; } __packed; enum hif_mpdu_start_spacing { - HIF_MPDU_START_SPACING_NO_RESTRIC = 0x0, - HIF_MPDU_START_SPACING_QUARTER = 0x1, - HIF_MPDU_START_SPACING_HALF = 0x2, - HIF_MPDU_START_SPACING_ONE = 0x3, - HIF_MPDU_START_SPACING_TWO = 0x4, - HIF_MPDU_START_SPACING_FOUR = 0x5, - HIF_MPDU_START_SPACING_EIGHT = 0x6, - HIF_MPDU_START_SPACING_SIXTEEN = 0x7 + HIF_MPDU_START_SPACING_NO_RESTRIC = 0x0, + HIF_MPDU_START_SPACING_QUARTER = 0x1, + HIF_MPDU_START_SPACING_HALF = 0x2, + HIF_MPDU_START_SPACING_ONE = 0x3, + HIF_MPDU_START_SPACING_TWO = 0x4, + HIF_MPDU_START_SPACING_FOUR = 0x5, + HIF_MPDU_START_SPACING_EIGHT = 0x6, + HIF_MPDU_START_SPACING_SIXTEEN = 0x7 }; struct hif_mib_set_association_mode { - u8 preambtype_use:1; - u8 mode:1; - u8 rateset:1; - u8 spacing:1; - u8 reserved1:4; - u8 short_preamble:1; - u8 reserved2:7; - u8 greenfield:1; - u8 reserved3:7; - u8 mpdu_start_spacing; + u8 preambtype_use:1; + u8 mode:1; + u8 rateset:1; + u8 spacing:1; + u8 reserved1:4; + u8 short_preamble:1; + u8 reserved2:7; + u8 greenfield:1; + u8 reserved3:7; + u8 mpdu_start_spacing; __le32 basic_rate_set; } __packed; struct hif_mib_set_uapsd_information { - u8 trig_bckgrnd:1; - u8 trig_be:1; - u8 trig_video:1; - u8 trig_voice:1; - u8 reserved1:4; - u8 deliv_bckgrnd:1; - u8 deliv_be:1; - u8 deliv_video:1; - u8 deliv_voice:1; - u8 reserved2:4; + u8 trig_bckgrnd:1; + u8 trig_be:1; + u8 trig_video:1; + u8 trig_voice:1; + u8 reserved1:4; + u8 deliv_bckgrnd:1; + u8 deliv_be:1; + u8 deliv_video:1; + u8 deliv_voice:1; + u8 reserved2:4; __le16 min_auto_trigger_interval; __le16 max_auto_trigger_interval; __le16 auto_trigger_step; } __packed; struct hif_mib_tx_rate_retry_policy { - u8 policy_index; - u8 short_retry_count; - u8 long_retry_count; - u8 first_rate_sel:2; - u8 terminate:1; - u8 count_init:1; - u8 reserved1:4; - u8 rate_recovery_count; - u8 reserved2[3]; - u8 rates[12]; + u8 policy_index; + u8 short_retry_count; + u8 long_retry_count; + u8 first_rate_sel:2; + u8 terminate:1; + u8 count_init:1; + u8 reserved1:4; + u8 rate_recovery_count; + u8 reserved2[3]; + u8 rates[12]; } __packed; -#define HIF_TX_RETRY_POLICY_MAX 15 -#define HIF_TX_RETRY_POLICY_INVALID HIF_TX_RETRY_POLICY_MAX +#define HIF_TX_RETRY_POLICY_MAX 15 +#define HIF_TX_RETRY_POLICY_INVALID HIF_TX_RETRY_POLICY_MAX struct hif_mib_set_tx_rate_retry_policy { - u8 num_tx_rate_policies; - u8 reserved[3]; + u8 num_tx_rate_policies; + u8 reserved[3]; struct hif_mib_tx_rate_retry_policy tx_rate_retry_policy[]; } __packed; struct hif_mib_protected_mgmt_policy { - u8 pmf_enable:1; - u8 unpmf_allowed:1; - u8 host_enc_auth_frames:1; - u8 reserved1:5; - u8 reserved2[3]; + u8 pmf_enable:1; + u8 unpmf_allowed:1; + u8 host_enc_auth_frames:1; + u8 reserved1:5; + u8 reserved2[3]; } __packed; struct hif_mib_set_ht_protection { - u8 dual_cts_prot:1; - u8 reserved1:7; - u8 reserved2[3]; + u8 dual_cts_prot:1; + u8 reserved1:7; + u8 reserved2[3]; } __packed; struct hif_mib_keep_alive_period { __le16 keep_alive_period; - u8 reserved[2]; + u8 reserved[2]; } __packed; #endif From patchwork Mon Apr 6 11:17:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 221412 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=-9.8 required=3.0 tests=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 B9FBEC2BB54 for ; Mon, 6 Apr 2020 11:18:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 86F7A2076C for ; Mon, 6 Apr 2020 11:18: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="EKt7Nya0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727856AbgDFLS4 (ORCPT ); Mon, 6 Apr 2020 07:18:56 -0400 Received: from mail-dm6nam11on2071.outbound.protection.outlook.com ([40.107.223.71]:6126 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727813AbgDFLSz (ORCPT ); Mon, 6 Apr 2020 07:18:55 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VNz2NbL5n62YPHtPN5UZEUAZvhkLv7MzEbvWg7rXFi22F0xMWAjzA1UROmtTlOM3B1sv0hAL4LElW8gRPUDCtGtmTJI8RqpX6mWpi4BI8AC58ZIv9OhFw5hVF02/K0pw1QkOUUgLdNnrsCUW23otfXGMRVDThoVdxoZAb1kVcBRNfqI4gt11ZG99w7U3gm+dPzVa8At/Ie9HpVeN0RE5oT15G+krk71XhNBWqVt8cP6364Zq3owzIL0fzdeNRXyoToiUvFJqFAHWMlI+4JVeHiy63VKKCsSTgVCGwWTzzsxIYMYRUMKLaZeJLU/idvjK+NJnUoI/tTjQZVm0NL8zJA== 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=f+TqyORzHzQYF5t1pQw359Vq4ysUBiutjY0sYLqxW5o=; b=HIOuWBBFuqBEB340PW7A0HA3ocAlO7eyH2d9e/r7yDvgRFM8x/LNrC2KF728WLeH8Z1KDO5BxsRwAQL13tlXXDJzx9LAWd63ATUxeszpi9XF1LLHPPOU6ZOiaU4UvIv7Vk8ZhRvOEr6ie/00wi4dNt1S63Wk1JUyq4cm4b1HaGgU6nqTBFrCD0il4rYEPfL8uKuxmv5vpxF2NJzZyRZNxo+BYBUiDWinAO4D7rm55aruP57gTPtT3I5RQlgUrxb1loQwsMSZbDSesBpQYEMfrt1IcdoL044AMhA9kRXWTnva7qBdL3L8A3T4RftZSztMV5yXILesYPzlHf8H4x0rMg== 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=f+TqyORzHzQYF5t1pQw359Vq4ysUBiutjY0sYLqxW5o=; b=EKt7Nya0wg1xxsvA0Q2MuQCaYRJyw+KI0etCED8vrT++dsTLP0X0UIQentxsssxSc25NYDOEJwMBVCKs+kxEe/zMBjWtU39nXTAZBF/UAih2+j+wQP3k7Dmnbp0CKaQlDii17njAoNUD0+tz+V30MKxhjcQ+B/Q1qMUEanG4d0I= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from BN6PR11MB4052.namprd11.prod.outlook.com (2603:10b6:405:7a::37) by BN6PR11MB3860.namprd11.prod.outlook.com (2603:10b6:405:77::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15; Mon, 6 Apr 2020 11:18:32 +0000 Received: from BN6PR11MB4052.namprd11.prod.outlook.com ([fe80::e0af:e9de:ffce:7376]) by BN6PR11MB4052.namprd11.prod.outlook.com ([fe80::e0af:e9de:ffce:7376%3]) with mapi id 15.20.2878.018; Mon, 6 Apr 2020 11:18:32 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 09/11] staging: wfx: allow to connect an IBSS with an existing SSID Date: Mon, 6 Apr 2020 13:17:54 +0200 Message-Id: <20200406111756.154086-10-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200406111756.154086-1-Jerome.Pouiller@silabs.com> References: <20200406111756.154086-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR05CA0010.namprd05.prod.outlook.com (2603:10b6:3:d4::20) To BN6PR11MB4052.namprd11.prod.outlook.com (2603:10b6:405:7a::37) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by DM5PR05CA0010.namprd05.prod.outlook.com (2603:10b6:3:d4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.13 via Frontend Transport; Mon, 6 Apr 2020 11:18:30 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fd833fe7-1028-4e00-2e31-08d7da1c3d97 X-MS-TrafficTypeDiagnostic: BN6PR11MB3860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1051; X-Forefront-PRVS: 0365C0E14B X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB4052.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(396003)(39850400004)(346002)(366004)(136003)(376002)(186003)(16526019)(7696005)(52116002)(36756003)(5660300002)(107886003)(316002)(54906003)(66946007)(66476007)(4326008)(2616005)(66556008)(1076003)(66574012)(81166006)(6666004)(6486002)(8936002)(2906002)(86362001)(81156014)(4744005)(8676002)(478600001); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z0VRYYMOyEbwmtGhe1YGFlZSyf32Y2D2SKuJlfJX5xgW93Agcv+BCmnBVAVeV9SnW3N1YLzmdXlUFyEPmZyqblI5UsYyr/3sm6qXet9lmRmdA7LiEnmN56AKAjut84Is7suEoiLU/I8myJqeMhMfhglLvTOcit0ePAz9V/9te8H2szrzkVOUsasGjjuf3jfbA3dPIxc45nKLspM1TGSi5i5284C1KoNhyUfd+OKMDygzVxnumFX3ItiIkfg7/HiyWsC4ghxkIY2Z800tYQSHjkzs3mFCYSvk/mKcJRuzPatD13HsW+GlOstbaEp1YD9KK7I5HCsAvmzoHubN5XZ//v8UB1HJ8FzvBp1Oek/AvOXE2NLwfZPn5ZQD6TnOgOzqlU1957CYT7t4cg7jQUzcgOYiKMAo4L7MqpS6S2YokLWwIC8yZ9Wh63d/sgnXIzpG X-MS-Exchange-AntiSpam-MessageData: o700U8rurANnoBYUGR81BbeohMhP0rtVQ6Aarredi16rvBnSYuKImkxc3QmeC2iBRWKbkTK+OwFQWp87sKFnYt/eliB44UhhSUTuaL/bpw2+C+IvMO0Vyar1owzgyAlzPhoc+gbZ4c1GSKT/j/Qwm8Ah9tbxecqlbT6mPjGnbg/IaP6MmvaN+rivFKN3LUDSHkANvJZlkmRUwgD0CKiyJw== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: fd833fe7-1028-4e00-2e31-08d7da1c3d97 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2020 11:18:32.6420 (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: 0dcevD3R5U2pRsDjxei+3e+RmMtpJi9cIDGHfk3KOwJ8MahC57lv9d0eKKfB6B0PltKMsNRCtymY/m8JbB1rdA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB3860 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller With current code, chip is not able to join an existing IBSS network. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 445906035e9d..d44e5cacbbce 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -310,7 +310,7 @@ int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, body->basic_rate_set = cpu_to_le32(wfx_rate_mask_to_hw(wvif->wdev, conf->basic_rates)); memcpy(body->bssid, conf->bssid, sizeof(body->bssid)); - if (!conf->ibss_joined && ssid) { + if (ssid) { body->ssid_length = cpu_to_le32(ssidlen); memcpy(body->ssid, ssid, ssidlen); } From patchwork Mon Apr 6 11:17: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: 221411 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=-9.8 required=3.0 tests=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 F393AC2BABC for ; Mon, 6 Apr 2020 11:19:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BB2522072A for ; Mon, 6 Apr 2020 11:19:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="LOuD2gmV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727952AbgDFLS5 (ORCPT ); Mon, 6 Apr 2020 07:18:57 -0400 Received: from mail-dm6nam11on2071.outbound.protection.outlook.com ([40.107.223.71]:6126 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727913AbgDFLS4 (ORCPT ); Mon, 6 Apr 2020 07:18:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C3aN1hmtQoIhqPsbAEedR1sawE3hJWmc1d/vdDTKf9aMzht/PDExYMC91ZzsgMkLvTjXeXtc+KoXGdh0TV7hj6m9B0QkAcTqxw2J/ZPsfDVvB9y0Zc9cTDfy07R+jMFnmp9KTdtJmJBJWZnMo6B+poyUGWlXb++07lOoRVghglhSBUqYpplROF1A2V4cK4np4nKzRnbOQNxXB1o24XGAalxAdSxJhXIRvENcAUdOB32ZVTbPCEEvfIv9BkdrpykVEDE3NzQUvE19L4iXtUr2luzSPS7oig+ledFUXmnbKV7kNZmRGDWDNz5o7uI0V2EofxP6pi7n6nPuYCYQpxbjAw== 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=elWSuYBOgwonggNoaNuodrNnEMLkPTpW8aEoCYGVEdo=; b=R3zRWLvmTZL9eIrq0Ruv8OQNoWgSqARXOfTv0hQuqZNqw0+yBJSbzZIYflbnKAfFSH4YWXr9ujWG4NErco3achFArXwafOptAsslj8hOLMDckOdLd675avcGlhMI4IwHZYcEFSH3K6oBVyWXdQfvuMi7ExsMayjb8PHx1Vv0NF0L5pReDiyqIPJ/BuRxS7l8jLbUqxURpG2ctIMk1K1UXMhPH45bKJoVWCq7Yc279P8pV8LHM1o9RCqK0i5DkCJ80rGiy5BSRnXt0/Jk3Noo5Z3wsh2kZX2t4T+lQhh+oOlrGv8I00VcCj5h4i6lMYkEId055W8YGhSJx6svvIRf8Q== 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=elWSuYBOgwonggNoaNuodrNnEMLkPTpW8aEoCYGVEdo=; b=LOuD2gmVcfcVpGGlJD7imMn3cQYOFquySkS/rFbLG8qWitU63+PeSuUmZ6W2076K51kzcQz4ycKteIcWO9e/EONeIbG3368reKCzDFjeQQ4pK9XRmRcZ8p4EwbbTbP5eBvfjcWLPN45wbuPE3CbpmaN1rH4/c053QNUqigQiy00= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from BN6PR11MB4052.namprd11.prod.outlook.com (2603:10b6:405:7a::37) by BN6PR11MB3860.namprd11.prod.outlook.com (2603:10b6:405:77::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15; Mon, 6 Apr 2020 11:18:34 +0000 Received: from BN6PR11MB4052.namprd11.prod.outlook.com ([fe80::e0af:e9de:ffce:7376]) by BN6PR11MB4052.namprd11.prod.outlook.com ([fe80::e0af:e9de:ffce:7376%3]) with mapi id 15.20.2878.018; Mon, 6 Apr 2020 11:18:34 +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/11] staging: wfx: make hif_ie_table_entry const Date: Mon, 6 Apr 2020 13:17:55 +0200 Message-Id: <20200406111756.154086-11-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200406111756.154086-1-Jerome.Pouiller@silabs.com> References: <20200406111756.154086-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR05CA0010.namprd05.prod.outlook.com (2603:10b6:3:d4::20) To BN6PR11MB4052.namprd11.prod.outlook.com (2603:10b6:405:7a::37) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by DM5PR05CA0010.namprd05.prod.outlook.com (2603:10b6:3:d4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.13 via Frontend Transport; Mon, 6 Apr 2020 11:18:32 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d13fdabe-3178-4e5b-de34-08d7da1c3ec0 X-MS-TrafficTypeDiagnostic: BN6PR11MB3860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:449; X-Forefront-PRVS: 0365C0E14B X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB4052.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(396003)(39850400004)(346002)(366004)(136003)(376002)(186003)(16526019)(7696005)(52116002)(36756003)(5660300002)(107886003)(316002)(54906003)(66946007)(66476007)(4326008)(2616005)(66556008)(1076003)(66574012)(81166006)(6666004)(6486002)(8936002)(2906002)(86362001)(81156014)(8676002)(478600001); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 315xKUnHMHJOVze15UgM4RVO37eOddj2IaIeYoXlGcePTcsVvoB/8FLQlY2XgpDyE+eDhfGhtS82Ny9mJrs/lCFebjmkeqh/aEbHr3tLUAj1RWFmGXqVFjz/g9XYwuHhZucktOlU4iAfIgdpShOeHmoKcYJPStT5rTMYZXL3HpEIL4YGksgKUsmG4M9xGVdl6HSpNrncRgWpuhS/+CaaYmmyOd7RRzAoZvEOHUOCBOiBwzC4/801LZC5vdCP8FtxDOPal8ZJ8HxLgX0mbWO1VK7S1/8i8K5+P/WuRmb1FpguFBM3dO5Xc9xMTkFsF8isG1Bx0NWvGaFGFvoj3nK5ZzGfrhvlEyDFEI7ib++p9hbqtrzEs7CDqku+AmPqULUp8ZdXPBhCLBWaqybc94vV7hclcDyYljKchciC0h+/ina/ZVeon6wChgmlQCVZeupS X-MS-Exchange-AntiSpam-MessageData: zDQWJ+RLSxSo9LpogKEVPsFqh9FdNp5f5dqor+gTO2l+UreebpkE1QI2YIF+a2K6aGiwKITBkoX0vTZIgpsk9ohUK9SYCvWsf6HZyNUCn2/srgSqg6MoFAJZxTGDrGPr3WXY/D30Kk8I/pDeczV+6EDVbOSz0icA+P1KFaCmNHkKr3NZzDsPqSJIdvbVCVyRMO4VBxGfFtjx7lbjatsrcQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: d13fdabe-3178-4e5b-de34-08d7da1c3ec0 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Apr 2020 11:18:34.5949 (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: fB35TiumVJRehIa9Miof3aCvUtWzt5hrYjnw1G3KIERx6xgnH8EE2Z4ESKPzJXzjXHwjFYUJc9MXCjTp0+RF0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB3860 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller In wfx_update_filtering(), filter_ies is never modified. So, make it constant. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx_mib.c | 4 ++-- drivers/staging/wfx/hif_tx_mib.h | 4 ++-- drivers/staging/wfx/sta.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c index 5bca1e06995f..ac534406144c 100644 --- a/drivers/staging/wfx/hif_tx_mib.c +++ b/drivers/staging/wfx/hif_tx_mib.c @@ -102,8 +102,8 @@ int hif_set_rx_filter(struct wfx_vif *wvif, &val, sizeof(val)); } -int hif_set_beacon_filter_table(struct wfx_vif *wvif, - int tbl_len, struct hif_ie_table_entry *tbl) +int hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, + const struct hif_ie_table_entry *tbl) { int ret; struct hif_mib_bcn_filter_table *val; diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h index 77dedda0465e..0f8b3bd9f14e 100644 --- a/drivers/staging/wfx/hif_tx_mib.h +++ b/drivers/staging/wfx/hif_tx_mib.h @@ -25,8 +25,8 @@ int hif_get_counters_table(struct wfx_dev *wdev, int hif_set_macaddr(struct wfx_vif *wvif, u8 *mac); int hif_set_rx_filter(struct wfx_vif *wvif, bool filter_bssid, bool fwd_probe_req); -int hif_set_beacon_filter_table(struct wfx_vif *wvif, - int tbl_len, struct hif_ie_table_entry *tbl); +int hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, + const struct hif_ie_table_entry *tbl); int hif_beacon_filter_control(struct wfx_vif *wvif, int enable, int beacon_count); int hif_set_operational_mode(struct wfx_dev *wdev, enum hif_op_power_mode mode); diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index c250b117a138..4d5dbfc24f52 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -148,7 +148,7 @@ void wfx_update_filtering(struct wfx_vif *wvif) int bf_enable; int bf_count; int n_filter_ies; - struct hif_ie_table_entry filter_ies[] = { + const struct hif_ie_table_entry filter_ies[] = { { .ie_id = WLAN_EID_VENDOR_SPECIFIC, .has_changed = 1,