From patchwork Mon May 11 15:49:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 219467 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.7 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, 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 200D1C47255 for ; Mon, 11 May 2020 15:49:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ED096206D7 for ; Mon, 11 May 2020 15:49: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="TWm7wSw0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730416AbgEKPtv (ORCPT ); Mon, 11 May 2020 11:49:51 -0400 Received: from mail-mw2nam12on2062.outbound.protection.outlook.com ([40.107.244.62]:10442 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728089AbgEKPtt (ORCPT ); Mon, 11 May 2020 11:49:49 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nTXov7FWMvgSnf3ii3KMWJkZj9l+HmE31FeV9W4Dwx2tqGY0wmYee2O0te9gQLEGeC5lWHRdINOgJLtkdKb8//AfzoHfe91HLggt+GmbBlHiM/alQgB438mOaoPCrq3e6ouLr+UEer6cmua2YpGjULTPI4btIzSRAO/9rqvf+MdtDrny5SmvMiuEtImGaoS8V2VtUjqFAR1a8uUsg6+Pj+E08ohjfwiGzsT/oaAck7+NSOBuyNXDluRev/qaRAXNhYFFuAg5ttdbkrz9vHWHF55VD0xdQJrf2S98IqfPEGOxJetxJgKEEkB+OoPiqmDQcOOXBnry3RUDf+jxhTuqUw== 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=IExWWVHKF2XqSi+Sp12AMWU3WVMr+CLo4qZB9OwghaE=; b=oapNInFvGn1U0hlz0dEsj8n1uPKOq3Fep1/XGlGWr3GlA1d7E+AG4D+8AbK0WJlTgUUNV5g9SZRM/z/OkhRXDq6IV0esqgI5lyDj5k682qbfI/0k+OfM2SH+g7QKTKlTZqQB/Bs7sS7sQRfdgDQY4NdNUwhDLxpuvVULFzZOpZUxezauuVvvSmGXtGNMmvXFeIh0nkPos3b8WUaWLkOAvE11i4yxwN6rtweyI7Y/xbuUNW0XkMnI99sinQaRO+yDgbvkNuJfnB4JQz4uq+ELdwnvrd/5rraGDICzK8yGTf0xGJhk27k9F8TrV3F4ozQN1NKSZY4hKo2REMZdxgMlzw== 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=IExWWVHKF2XqSi+Sp12AMWU3WVMr+CLo4qZB9OwghaE=; b=TWm7wSw0ust0tFIqFLVhd6hnfMMqjQTWUFIlTaW/YWl5JnfwQL5bJ3lXO1yDRZk09NEFSACCokwywPLNDpTPkwW+YVgjDezTh5Zgz39cnnlUOTIcxRhYm6m5ujiQBuyyiSLDpUforW9BT1V8JjUTpCAUId+p2RXGtF5OcISPVU8= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1968.namprd11.prod.outlook.com (2603:10b6:300:113::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26; Mon, 11 May 2020 15:49:46 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da%5]) with mapi id 15.20.2979.033; Mon, 11 May 2020 15:49:46 +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/17] staging: wfx: fix use of cpu_to_le32 instead of le32_to_cpu Date: Mon, 11 May 2020 17:49:14 +0200 Message-Id: <20200511154930.190212-2-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> References: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (82.67.86.106) by SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.2 via Frontend Transport; Mon, 11 May 2020 15:49:44 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [82.67.86.106] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dd44173f-bb72-430b-e469-08d7f5c2ee22 X-MS-TrafficTypeDiagnostic: MWHPR11MB1968: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:595; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rHATkri2wqZWY2qyiAZkUGoFIBqP0agxxxLygnaFAEqWTLsSZTWOLBonNAdoUgaoujOU9H8khh3NNs2UTWt56MOF3nLVVtH7m06g/Mu4rXfsFm3Tjb3eayIBEbSpgeVDIJkK1tGMMmvZReHTnfsm4UtfhD07jylLY09vTMuo57uHcSCwttFdaHocGJy70PbmdldZqQbQiY/WiztKBkvQ7To/0In9a8uMM1F0pugst4bVRYLBlo/OZAfqa6KNMysJ5RJBVJnb/QeNHRvDW7/TX96xYZE1nePSByEQw7B0p9TNU3+PWAUmNg9wqT8oEJN9jYWqB7FnQp3uZwoQGXm8dk4/LFiPISM7HrIpHK8rRwc3pRGloSAtDr5QvSXiUT3QjgF+PSNcWGBYQREz3L5pvcffmF9nVc3wVrj4Ei8IXj1lzvbsMtdT57oTm9uM1N37n2Hf01qHfdOwg8BQrCyFYaBUwTDRNWymAdTK9sElYrSSw9YoTjO8pSeuk2a/uhVbkhR5eXzJ1oGjHLb4K8I8Vg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(39850400004)(346002)(136003)(396003)(376002)(366004)(33430700001)(186003)(52116002)(86362001)(316002)(5660300002)(7696005)(6486002)(33440700001)(478600001)(54906003)(6666004)(4326008)(107886003)(66574014)(36756003)(16526019)(26005)(8936002)(956004)(2616005)(8676002)(1076003)(66476007)(66946007)(66556008)(4744005)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: n4T0EIo36DyHjFsmeph39YAIauAQgTQLFGWBknHB6GGyYV+WOszOlJW6YBaBI8q7GEK9Lif+lU+nKqv95z++BTsj3RxETlT/u0wDSrHjQ5QnCQ7nbDUoIncC7Rntowv5mpsvzo1wXmZ7XGXTA9XkZZnCGBsLvZaY3hkTtubWLqJRHjAbQcMI+wI0BOzShuBqqJZmgml5juKbFZsYlxpsSSnvz9x97JRstgDmzmAeI+1YJERB5YVsXrz9Dn2tL6jYf+GksfFVmwzBplBsEw1N09MvT34l7kynpSAb2QPRY9VOtQSNPiNVbI9kQl9Zh0LETPzxFNUpvyBDWamm7FVjnK04k9pSCgZA3T/imwc6O3Di9W4SSqfD1QgwfBLRavcepYdH3HdcQiJ4yywRho5QU06cAVWgAwrM8cDSlF8Mh0tmAFm733J+5Vq2tICuYJhqY1yAOWHuGU9E2FrsKMr6qDrAKqhVPksWAGYCsOFPSHo= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: dd44173f-bb72-430b-e469-08d7f5c2ee22 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 15:49:46.6817 (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: R59VFl99BoLFAGCdeU46BZ1HBtJPu+sUbVFUmvbWpkB5B7v+MjYARlBQnY102+wGrGxx6iGxhMpFd2UtpPQvog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1968 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Sparse detected that le32_to_cpu should be used instead of cpu_to_le32. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hwio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/hwio.c b/drivers/staging/wfx/hwio.c index d878cb3e84fc..777217cdf9a7 100644 --- a/drivers/staging/wfx/hwio.c +++ b/drivers/staging/wfx/hwio.c @@ -205,7 +205,7 @@ static int indirect_read32_locked(struct wfx_dev *wdev, int reg, return -ENOMEM; wdev->hwbus_ops->lock(wdev->hwbus_priv); ret = indirect_read(wdev, reg, addr, tmp, sizeof(u32)); - *val = cpu_to_le32(*tmp); + *val = le32_to_cpu(*tmp); _trace_io_ind_read32(reg, addr, *val); wdev->hwbus_ops->unlock(wdev->hwbus_priv); kfree(tmp); From patchwork Mon May 11 15:49:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 219466 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.7 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, 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 8A798C47255 for ; Mon, 11 May 2020 15:50:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 622BE206D7 for ; Mon, 11 May 2020 15:50:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="RSge3H3L" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730556AbgEKPuD (ORCPT ); Mon, 11 May 2020 11:50:03 -0400 Received: from mail-mw2nam12on2062.outbound.protection.outlook.com ([40.107.244.62]:10442 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730453AbgEKPtx (ORCPT ); Mon, 11 May 2020 11:49:53 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FjGDyIlt5PZogRTy1g9Tt0HgUcLORMv4zmHHbTrx4LpKVEXx3CUxWThJxXxtENSn1908kLPPtkMa7wUgvqfMHu8G7QJzXo8rdcBOZlODSOCFpU5mQX9l4BJrZ8hMWinoIBRd1RZuGEap5O47S5SB7JBVekvyrfgPBhdiCBYNil1JUoMmtRAHn6m2qZOlH1Y6VQHkOhXYy23l0KYBjxTjQtjx1O/T1cZsKTYLpies2z3hyvfvlw0Cqjt/MWAL9YF7izL8OxNkpL1czYTJsxqyIBp8fe9b/6D/4NzwCUTZtX4txTeUQHpX2AagVlwLYyqj3/9EwxgwAZm7bX0Jhi9q2A== 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=+EkGpEd85h4vR2Ni4US7JJOSHnUAz2lbZZenwSq/nkY=; b=WL0k6bxk71f0gMlbR2FKIfgb/MUypEJSPPrpUVjmLuYEFq7X6+NhzNh+W5YhimCSHYKYA1KHKMj1AIqFywg60WPKrjkKFSbe9yHf3Nfi4GjG8ym8D3rO4PfVy7kNmdi3P38i5qsFIxlmgaAgTPqVF9GGAvOdgQ/NDCpvvpedFq8MaViXtC8mlGwsZljs6kkbK0bM5ZLeSYl9tCHcFsneyTNP6qnJ5G1S58oliXvGg6PeegxjvP14j2AguO4AVWZs3ijZr0GirJS/HD7GP5ifg+wiUdrKMteFK7peSK95gmiAI4FR8usH56BFaalCeQ0Aw6dbExrRr7PdClLTHFcF7Q== 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=+EkGpEd85h4vR2Ni4US7JJOSHnUAz2lbZZenwSq/nkY=; b=RSge3H3LRJTu7rUt1lpIp4H47TnVInx6IQgz9YlUFbZql1obLV9jdgucDn0UEQSBa4eo49QDUsnrhH8RfnXSTKzJytkPQbYfQnpsdZQDMLFEYRYJ7clYEMCaTBIbO5thJxIQV0SK0nvqJmHk0fOd0GAz/ijceV+0yhkydM2jQw0= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1968.namprd11.prod.outlook.com (2603:10b6:300:113::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26; Mon, 11 May 2020 15:49:51 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da%5]) with mapi id 15.20.2979.033; Mon, 11 May 2020 15:49:51 +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/17] staging: wfx: fix cast operator Date: Mon, 11 May 2020 17:49:16 +0200 Message-Id: <20200511154930.190212-4-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> References: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (82.67.86.106) by SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.2 via Frontend Transport; Mon, 11 May 2020 15:49:49 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [82.67.86.106] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 52b0ec6e-52c6-4e84-8f82-08d7f5c2f0ab X-MS-TrafficTypeDiagnostic: MWHPR11MB1968: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2399; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cw9TZMIPlvqeGwfUIr6hCqqwqJNWgqtm2Gi/7YX8HRKdUmuDgMoYrCp6stS0lVM9f8nXWi5ONGywS3nZT7P92ZUqKhLLGdOBMNER/glt0yWlV6iPwxPUNn4X1tZ5DdrSVfQ1XNVmbzNUZSl+fhfTo1AY2Cpal19hbQNiQ9Hlh/tR0XZ2TWx+nEqQXe6CztFnPC+7LeoG7lno5XaoWwo1usiYIk83SmIbAhLxMaXS665nQIpB6AvYxEFG3hPp3MpnQ3Au3HM0sfyQNNiJzEIQCtI4kJ1/63AgS0+JZuyV6GLyQoLXjLDbl9mgP0m3HxU/okr4sgzlJboCjJm7+2D3DvGdsfUWgBFThODzAydqgzfYXXEKeydFwdNGhVHKHUBYtMnFpIYp8qceBfVyRwBrrbkdAh+ALYyqSlkdR8d7D1rmSBRj7lTE0tZydqoi+qzeZYZ80/gi1IEzS9aeeqsVMAdRkdFLFEq4fwkVnslVzUQL9AXcYISizEXwgctouAUylCBbmYi/NlcnbtwWXdZbYw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(39850400004)(346002)(136003)(396003)(376002)(366004)(33430700001)(186003)(52116002)(86362001)(316002)(5660300002)(7696005)(6486002)(33440700001)(478600001)(54906003)(6666004)(4326008)(107886003)(36756003)(16526019)(26005)(8936002)(956004)(2616005)(8676002)(1076003)(66476007)(66946007)(66556008)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: DI0Ykxo9OXBVfoOImVa2kwPKXcKf5+rSUrrU9o2LdMdalcBZekv/DVimhhqm4ineRc0jbbI0tkq7PcegDzpRDta5CvLOLBivviIzUhnuoOs969x52VW6Dj6zL0q7hhaWNwDzpLv7+RmKFbxCpAtar28d36Fitq9d7GojTkHe20AhVXQwzhpNV7seHYhzvClf4usq0bZpUKCRhdugj9aerzjFLImCJRaJcep3vYaYbnXbNmU/mT5e2jJhAosXl6oFQIyOf+mquHNMOwZ8BbfmYN6RNN3bld2aJtKGmGEUq0SzM2Ppf/WnzOBsYJMbjHAXquKfWeKxMdZnGWUmd1RcTjHQ5f3e8Sr75x4Rj92UtWqjAnhlwev3DhwU0Q2Hb7PFJzA6oHj/lafW5uvY4yunWhS9O1tYXyuCgbCqTAcTcvYreFKvUplD6P0njt9Scat7kzKxBsgj/UjWsM7tWUigjNhkmKAF3uyQeJU0/DIS8NM= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 52b0ec6e-52c6-4e84-8f82-08d7f5c2f0ab X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 15:49:50.9279 (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: 9sCLXY6M3wolpKTPTXEA/UbyB0ceDTzBRDMQ8pyBbi832RnCQKiGSiKeNmkQF6pzQgRgScvJSlYrxhPx7GcQfA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1968 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Sparse detects that le16_to_cpup() expects a __le16 * as argument. Change the cast operator to be compliant with sparse. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 2 +- drivers/staging/wfx/traces.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index 2572fbcf1a33..55724e4295c4 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -70,7 +70,7 @@ static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) if (wfx_data_read(wdev, skb->data, alloc_len)) goto err; - piggyback = le16_to_cpup((u16 *)(skb->data + alloc_len - 2)); + piggyback = le16_to_cpup((__le16 *)(skb->data + alloc_len - 2)); _trace_piggyback(piggyback, false); hif = (struct hif_msg *)skb->data; diff --git a/drivers/staging/wfx/traces.h b/drivers/staging/wfx/traces.h index bb9f7e9e7d21..c78c46b1c990 100644 --- a/drivers/staging/wfx/traces.h +++ b/drivers/staging/wfx/traces.h @@ -184,7 +184,7 @@ DECLARE_EVENT_CLASS(hif_data, if (!is_recv && (__entry->msg_id == HIF_REQ_ID_READ_MIB || __entry->msg_id == HIF_REQ_ID_WRITE_MIB)) { - __entry->mib = le16_to_cpup((u16 *) hif->body); + __entry->mib = le16_to_cpup((__le16 *)hif->body); header_len = 4; } else { __entry->mib = -1; From patchwork Mon May 11 15:49:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 219459 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.7 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, 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 8D6D3C47255 for ; Mon, 11 May 2020 15:51:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6709F206DB for ; Mon, 11 May 2020 15:51:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="XbKHY8+J" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730801AbgEKPvi (ORCPT ); Mon, 11 May 2020 11:51:38 -0400 Received: from mail-mw2nam12on2062.outbound.protection.outlook.com ([40.107.244.62]:10442 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726687AbgEKPuB (ORCPT ); Mon, 11 May 2020 11:50:01 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fpmAOMO7aTGca2MXgrBjUHg7x/ffmIDGbGPB++NEuqu3jNxOlVK5sbzOYkI5Ev0n9P92Zz6uMzLHnyMSsCriFTDQbx8fUS41GTyfcqx8GUXOIqan+8ORupQsaQpdtf5OKUuXHkDRyNOfwyI1AXlWZ98zE3849ZXtNin5pLqVgIwQddQg8uYA/WWF+NzqHyheWtXxpDNQDHfH7PFhUcatPB3JV4w+ECz4HExLLwS4jPwLOkBRTT9Zj+piO0vzHkw4u9pU0cp0tQfeOKRbpW5ftVKwp94nwxYK1wV+lt0IG4lYHoCTSkbgbez83DF1tIK5JQjRuk2Mk2gRmz00eEeJfg== 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=Q94uY3wIDAIJbStr9gu9gHlUoS5rWPgP9Bsj/iZkXP4=; b=epBE1kciHwXmym6xGqAbE5i2fdsuqZXm9PItDfpAM4BLXF1OWbL7Tmc3i63XlF6cY/wtN5AgTiLuV2M8y7KDedklbd6Dqp4MgarRU4P6u7w/E/0fMr8wLQFG4BYB2HmTEAUPcWQ2YTtjsRoe/ALO6HeciHj8N0l+WvStYyixtc5No9i5nySjXrM1rFoq8WQnhOM/kTk4j0TgerFeUN5dYoWnWJj7l/NeOEfauSwOkrpFUtwXvoqUY0lzg4apgDpU2ppbtc4UXdDBPpsqWyh6AjKENbqvT1pI39qWnHZCCkRV3RqfDbmjZYDUcWVB4jwKFvhy494aMIxH4BAPJtztyA== 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=Q94uY3wIDAIJbStr9gu9gHlUoS5rWPgP9Bsj/iZkXP4=; b=XbKHY8+JaIv3QCUpsbwo7Z/CVXk5UPSyYKIh/jQkmqL9wwc01rhLZEe5honf1A/KERizKuM2BClA//YBQZ6I8XpKNbbWhWVKks9Ty4PaaajbXnc7RYo8xKW6q6DUPH1QuNKwV8ArCvLZG5Xtpi5CiPFn7IFA/W7cOax/VbaAWa8= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1968.namprd11.prod.outlook.com (2603:10b6:300:113::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26; Mon, 11 May 2020 15:49:55 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da%5]) with mapi id 15.20.2979.033; Mon, 11 May 2020 15:49:55 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 05/17] staging: wfx: fix output of rx_stats on big endian hosts Date: Mon, 11 May 2020 17:49:18 +0200 Message-Id: <20200511154930.190212-6-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> References: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (82.67.86.106) by SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.2 via Frontend Transport; Mon, 11 May 2020 15:49:53 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [82.67.86.106] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 19d212c8-81cf-4553-db22-08d7f5c2f332 X-MS-TrafficTypeDiagnostic: MWHPR11MB1968: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:339; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5a3JDhFbB53BHdIi+W/XdJbJ77PWNSBqf3jN9r6lHWd26gLd8maZf5F9HjP/yI3+eiAVIXjxmVAxvtEnGvHaAJC7aDdpITwS+kyh14pgDylhxdKZv84nYqGC6hgJAP+EnnHvVcyAVQvTVP649+Z34h2hxY5Wnk9IeLdHM6kyTz9VujFhzHVoGdffY7hAgCTYqNhpM/mb6zkjVG4Z00eU9XGxh2dEu3aVUdOyR6ZnDyxghVlUtp9fMTmFRrxzcXf2+FmgUrhh6UC2KZH5hsRNtRZ5+DKNTuKNL3913n1rJzI444DVPxAoATYvlfaR+ee0j/4IigZaNrPfHllSpDZ7AHZrawnOTqJOAW9OT0HbbWaf0LIcfM3pRRaoGkfm4uXAeiAwXx0xzm+8BXPShcsbIgARkD5/pNoGHNfkoZmbRbt4PiP9cmQnxpi2fpDJYf3zpVaQpy9J/fd6fBWDGJKCiK4o746JoCdyow1aO8kxNPzQPYJFwSgva23+DlJvJXE6f43YFpdDwVBubaskRJ8oVQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(39850400004)(346002)(136003)(396003)(376002)(366004)(33430700001)(186003)(52116002)(86362001)(316002)(5660300002)(7696005)(6486002)(33440700001)(478600001)(54906003)(6666004)(4326008)(107886003)(66574014)(36756003)(16526019)(26005)(8936002)(956004)(2616005)(8676002)(1076003)(66476007)(66946007)(66556008)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: pAcGrC/zLoRa7wiJ4cPea55oy1sa2w94inHy5LmamKfwO42J5bhQXysjkf6LmK0lZrke3OACrAw0q+HvNPbGpBgrIjGUmnubPJRLpduQ+hqITSeDLjHVavOKGvsKHde69BKzM/Fr7dYxuV/GtLkEAJJ77XmJ0vnHSBTVE7cQ6uqlakiOnYsrjnvDciZLK8a6kye5bPj+SOyr4m27whOQ0XKzYx2SMf22M1fGst9iNepCpSIjjM16pR/29QCUzF0TIE392Yoy5ONQcBwifFVX+E6TneIXEcFvUjM39A8Ut6V3vsC9IlmAYx/GkNnFqC0daO58SbfWmDZNPIbgdxuPzctc2TpzC+HSHxljteKAqnnDqkIES1iHynvUuSzEqFdZ5WMEdXWmhkqVFBnUdWqVrQ8CGBV/P4ltDAT0GHDGrrnm5ZrKfDyRJyvXkExVQi37rFiStzNyweHfNgs0kSKdvVLI8293fUpHhlMZX4Zmr6M= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 19d212c8-81cf-4553-db22-08d7f5c2f332 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 15:49:55.1740 (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: XqSy2d1Fa8hekHvoJsrV3wwQL51xm4ZZlJdvNTBJK/46sbxGeLwA7IzMf0BZ6K7FXyZvqZ8yYw2Km7wZFcU2EA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1968 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The struct hif_rx_stats contains only little endian values. Thus, it is necessary to fix byte ordering before to use them. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/debug.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c index 2fae6c913b01..846a0b29f8c9 100644 --- a/drivers/staging/wfx/debug.c +++ b/drivers/staging/wfx/debug.c @@ -155,7 +155,7 @@ static int wfx_rx_stats_show(struct seq_file *seq, void *v) mutex_lock(&wdev->rx_stats_lock); seq_printf(seq, "Timestamp: %dus\n", st->date); seq_printf(seq, "Low power clock: frequency %uHz, external %s\n", - st->pwr_clk_freq, + le32_to_cpu(st->pwr_clk_freq), st->is_ext_pwr_clk ? "yes" : "no"); seq_printf(seq, "Num. of frames: %d, PER (x10e4): %d, Throughput: %dKbps/s\n", @@ -165,9 +165,12 @@ static int wfx_rx_stats_show(struct seq_file *seq, void *v) for (i = 0; i < ARRAY_SIZE(channel_names); i++) { if (channel_names[i]) seq_printf(seq, "%5s %8d %8d %8d %8d %8d\n", - channel_names[i], st->nb_rx_by_rate[i], - st->per[i], st->rssi[i] / 100, - st->snr[i] / 100, st->cfo[i]); + channel_names[i], + le32_to_cpu(st->nb_rx_by_rate[i]), + le16_to_cpu(st->per[i]), + (s16)le16_to_cpu(st->rssi[i]) / 100, + (s16)le16_to_cpu(st->snr[i]) / 100, + (s16)le16_to_cpu(st->cfo[i])); } mutex_unlock(&wdev->rx_stats_lock); From patchwork Mon May 11 15:49:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 219460 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.7 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, 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 4A31AC47255 for ; Mon, 11 May 2020 15:51:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2036F206DB for ; Mon, 11 May 2020 15:51:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="DiAmqAUE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730783AbgEKPvU (ORCPT ); Mon, 11 May 2020 11:51:20 -0400 Received: from mail-mw2nam12on2062.outbound.protection.outlook.com ([40.107.244.62]:10442 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730542AbgEKPuD (ORCPT ); Mon, 11 May 2020 11:50:03 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b7YGYjXp9t051nHpTkY1XEoIBWhb4M4XIKIyU7Pv/FF6OvSketRqxmGQ74C0Kg7xFkoVXUTyFVVTA1qYJn2QjNayMtAEdgCPFR0TvGMrTJImatPW0Qf1YHdbZaSCPcL5oHqN4PMnzX6eC24h8hioNQfxh9ZP2/AcMw+QkWMkIpQ3WHbykx3RgdqFyWCYwjH8JbrzaW7gEMzUVS5shZ92pxsPm7HysbaDEpP/iw6Vd+5IwR6OCZfsGCv9w39wiKmODAe0Z1+RGKKjJ2S7Yk9kjdOeUbsaHmsZ/8iGfvMcl4srZfp0EsTRrXLvXmgz0kaieuS8ZU6+LilJNAZvDhHu5w== 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=/IBOowGZWGLX/ya4+8HPPpCjBwLQmsN5qAwxVw+Vu+o=; b=XwDoMGRTE7mrIAuh74dWqGIyC4QR7qTFLntP3cLlKD3QWMeViQBxeLBTq1Rquc73x3bSwojOLniSUXrDUZ7ZLX7FMwqWWcE8bw4YG3c3wpYX2QrLXoxq+OCGp5M+ULORUoJ9DUkBX78mRBNV7eI3JN8J9jwZ2xIripTJdrJDNEVKvLIcZLNgM7P1cp+Kbb6Y0IssBiOkwmK/LS7mxc3gT+F2H7Qy75mvolMxkef/6Siz2yzux37eCrHAIDH7uFVI61Z66guzHXflcgu43xqPzqsGlPIvysQhC2ZyXgymPFNxN7N9z+n8WtzitB8fDvr7ilUI0Nac1hXmrJ3gz2O/VA== 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=/IBOowGZWGLX/ya4+8HPPpCjBwLQmsN5qAwxVw+Vu+o=; b=DiAmqAUE/tGktOAADn1ZwRNuZrz+Zzt3Df2QvnCLWH9QvKdyaeQnxiYM3PDh/9U4inosfFj+Q8ps5/sTiXJ9G5FarObUSSOQN8vvwjEP8ngPEGUkO6NTzo10EYvr5Dp34C5sUjss1YnfT9vYmetEOS+THXw6k5sY3hL5Zz+AKTU= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1968.namprd11.prod.outlook.com (2603:10b6:300:113::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26; Mon, 11 May 2020 15:49:57 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da%5]) with mapi id 15.20.2979.033; Mon, 11 May 2020 15:49:57 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 06/17] staging: wfx: fix endianness of fields media_delay and tx_queue_delay Date: Mon, 11 May 2020 17:49:19 +0200 Message-Id: <20200511154930.190212-7-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> References: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (82.67.86.106) by SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.2 via Frontend Transport; Mon, 11 May 2020 15:49:55 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [82.67.86.106] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7ebd07f5-2dc0-4c3b-caa6-08d7f5c2f478 X-MS-TrafficTypeDiagnostic: MWHPR11MB1968: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:660; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x2ZKS0ZDZ6fXVyVevW56HJhA0O6RnP8B7z+sTehKH/nsh5Hq+WarjmmK9NfrxwJ3LNo8tcA9rlFl1Uqzjyt4RPx0CDPTNQozIhH6GKuzbAmYxJRM5Vt+34DBHK3i1So3k+Ja82nyJR1gQKmNlXj9DbubQ9V3p1RxdWdLBKCF8VR8GVKn0UYkVTt+fnMFm9f6W5u5+U1sVf/TIWTtU4SkdTB8kumf4mzM4RyHlxyep82XgSVM/QKJBJr5KA9lzCvrmV0KIxB5+hc+fIjPwcmYjcA0or7z1v3mTWhAFWCYUZMcGyg+WEtKcc3gCWNPvEi24aSgQuFZUFUBzyrDqQDdX2HhET3dnKd43JQVrBfL87Bu2zPDqTkAp+H24ctCSABSnGaLMREv+vmP1OYH1Bemt8IavvbszNZ0HKTZp3g1KsJCCyK9O4ESmNRkTAdYADrwTAv8yTdDRoHaBeTykE4wtPgA4WXga1eA8rtYrxxrFXGZmUGjBNPAVF1JXMSpnQ+QzHcgbMAoj6M0XMZBrDlAOw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(39850400004)(346002)(136003)(396003)(376002)(366004)(33430700001)(186003)(52116002)(86362001)(316002)(5660300002)(7696005)(6486002)(33440700001)(478600001)(54906003)(6666004)(4326008)(107886003)(66574014)(36756003)(16526019)(26005)(8936002)(956004)(2616005)(8676002)(1076003)(66476007)(66946007)(66556008)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: IQ1yaaP6+zUMchLAxMCkiJw+IqALaHKztdZUwUZESiQu4NhW5dUcP2hfEb9EM91QZy46MOQxz1M/lUVm89zx4faLWkSg73amwtbp2mpjHC2BZrHtnSpQGZOQ+qQkNWrUsep72qA8fFETmuCy6VBMph3aPA6/30nxzVEm9XzN0scd4RlNk252HYbuO+CDlHxygKcUgpbjNxIO/ou3noaAQj7fReBo+1WdBOm6+SZXl7TbCziFE6zbDxIEMgXwc9G5hy/cRhIumV7zJQoEtZkIZk0vzv9Dc2sn7uGbbw2fQ/h4A/0Pv4caNq9rwghtHrJvX1CsXr+T+g8rqwNUpIjCkeqM97PDMknwwqokrLBKkZynMwH5Q5Gpqz3AcLLj9mOcaa+rU135AgTsRsOdv2sHr5WY7Vouv5UTHMvJmVIK5SzFfGAf6AF5ZHztSV9El5aKkLQ2SSR+DK0T/UJ/qpm6jHI7XySnGPd1olBsKNhs/WM= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ebd07f5-2dc0-4c3b-caa6-08d7f5c2f478 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 15:49:57.3300 (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: XEXj2CQdjTckyJpV8BpOzRvg0tmevapPmq1lwqcuvVvVudDrWGJErIv87xsvPjoA89oFNE22fVRdDw9IwGH67Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1968 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The struct hif_cnf_tx contains only little endian values. Thus, it is necessary to fix byte ordering before to use them. Especially, sparse detected wrong access to fields media_delay and tx_queue_delay. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 3 ++- drivers/staging/wfx/traces.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index f64149ab0484..014fa36c8f78 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -562,7 +562,8 @@ void wfx_tx_confirm_cb(struct wfx_vif *wvif, const struct hif_cnf_tx *arg) if (!arg->status) { tx_info->status.tx_time = - arg->media_delay - arg->tx_queue_delay; + le32_to_cpu(arg->media_delay) - + le32_to_cpu(arg->tx_queue_delay); if (tx_info->flags & IEEE80211_TX_CTL_NO_ACK) tx_info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED; else diff --git a/drivers/staging/wfx/traces.h b/drivers/staging/wfx/traces.h index c78c46b1c990..959a0d31bf4e 100644 --- a/drivers/staging/wfx/traces.h +++ b/drivers/staging/wfx/traces.h @@ -387,8 +387,8 @@ TRACE_EVENT(tx_stats, int i; __entry->pkt_id = tx_cnf->packet_id; - __entry->delay_media = tx_cnf->media_delay; - __entry->delay_queue = tx_cnf->tx_queue_delay; + __entry->delay_media = le32_to_cpu(tx_cnf->media_delay); + __entry->delay_queue = le32_to_cpu(tx_cnf->tx_queue_delay); __entry->delay_fw = delay; __entry->ack_failures = tx_cnf->ack_failures; if (!tx_cnf->status || __entry->ack_failures) From patchwork Mon May 11 15:49:22 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: 219461 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.7 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, 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 C8D78C54E8F for ; Mon, 11 May 2020 15:51:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A898A206DB for ; Mon, 11 May 2020 15:51:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="LqtQqBEw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730644AbgEKPuN (ORCPT ); Mon, 11 May 2020 11:50:13 -0400 Received: from mail-mw2nam12on2062.outbound.protection.outlook.com ([40.107.244.62]:10442 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730610AbgEKPuK (ORCPT ); Mon, 11 May 2020 11:50:10 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l4T5a4TPQjdKXa/UggiSqLvTa1Q9kQ2KUndvUvPNyICNxiGrkKS5bXypfno8aEqwcGPgwSsLb2U4A0fviP9ohWmFqqYqDLxXYaHkvBHuJc0WZyFvlcvLWC4hwQb4nUFa47MuCM7taef5ltMOMmoyJHQ1egRDWp4aaX2FreqNMrNxrcQs/w25ELFYwdtklX8gDzpC7KJ8VhrreSiE3wOSOlHqDsY5aEibBZeB5mnMDez50+oi+o4jGKfHnC5NKRup/yvzXGvSzn4cD7TM+SixEsdfivGJFPPFO7KJyr9O+B73cvE4xTfPAqDimuYH63dMBExhaMfkGwlCdyPBr8q76A== 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=Xt3E2OZVeFnb8bWFymkk46zKKa9H026w3su1lI1HuKI=; b=ihSo3+3hX3EkKOWlganB/mhyXrldf9ElXob+z6YdyhPMArpzet04B5ggM0Ibx9jq9zRvGo6LljHlwN8FK8+Gl7x9/dUHxN9m5jK0v3wkebne+YJ4phVxSIYLMmD8hQWD8n3URwyYV6M6thSKq59BYhpVI2e+BumGk0xudSYnlh8/x76agqgw2GiefjmuMUEm3XM6oYgw9Vow4fomtHyGjm9rhonLsPq2mh/aaiv6U0m2uh2j5cBSGlclN+a9xF9v6yPy5v5Pkyil59yZr/FAWzMktwnrUzejX6MoftdPaYAQDAI22Or/Al34VFDsu48HvOQ8Ktr2MFmJyDmTD3837g== 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=Xt3E2OZVeFnb8bWFymkk46zKKa9H026w3su1lI1HuKI=; b=LqtQqBEwtIvF58AzOKpPbMIrBVQnFOPHF5qgT/Wb69cTZ71ZfsRQsU5+crFVWFBlnZMCa8u2bPTleDsN/k6nUHu/6915reWNkq698vkJXDGFG56+/uOxlJTL5fy0SH86o1ECSWCBpe7HEwT/n5TyjR0hFEg4gM8s1KDQ1+zbbrU= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1968.namprd11.prod.outlook.com (2603:10b6:300:113::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26; Mon, 11 May 2020 15:50:04 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da%5]) with mapi id 15.20.2979.033; Mon, 11 May 2020 15:50:03 +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/17] staging: wfx: fix access to le32 attribute 'event_id' Date: Mon, 11 May 2020 17:49:22 +0200 Message-Id: <20200511154930.190212-10-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> References: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (82.67.86.106) by SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.2 via Frontend Transport; Mon, 11 May 2020 15:50:01 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [82.67.86.106] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 45edf3fc-7bc9-411c-a1a3-08d7f5c2f84f X-MS-TrafficTypeDiagnostic: MWHPR11MB1968: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2331; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JNkIkl3NeiRXulrps/JJdGL/pbfbahCfnV9X2Yy0kNzT0l2KypOlgzKxMw1dH50iTq3Q0d4Wu3VH63WTeU6dBliCLf1jjBFIwcuMU51Lx6o3aBRx/BrmRBk4EsGWuZf+mpfLmh561EYWqPKzMvXH0VYiPeWNdTyN6t5BSpmtJIkuZK9GkA2dFWUiN37S3S+O/JEoqgataYwY1pw0LqeT6ByU5lyyS6wmXjNMf3Bz7Gj/JXT8QHSNM2osRc3jx+7F/y4pQuc0hpo+1W3eO6nZN41EWIiXkbIyz/OZnMnSo0zavMXRX35c6Tj9FpTxh8SJwapcCDb3dT3Ee6koAouoYmiToFQhWTqExFJmXHrtJG7E0UJn0uEWVyMxAR4lqAERIBnqqj44QWMkt97tIxsp8BCMHEs3jpJCk1kwPh9UI5n+RpKrUCgN7TUzxIcYXmScIj+tr/vBABvJsvRt67QIRKuMwBn5umJinkDorzzTCJ/fu6v3+uPr0JjFqOHlTDL1r6Z7CVcIAi/cdo/FQ20CSw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(39850400004)(346002)(136003)(396003)(376002)(366004)(33430700001)(186003)(52116002)(86362001)(316002)(5660300002)(7696005)(6486002)(33440700001)(478600001)(54906003)(6666004)(4326008)(107886003)(66574014)(36756003)(16526019)(26005)(8936002)(956004)(2616005)(8676002)(1076003)(66476007)(66946007)(66556008)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: LqBmWiZcP+hM2KsFYyrt1TT9o0G9DjQQe6yCZkDsvhCiGt0+DAtnF5h+r91WuAd2zDoSdJlgoznLSmOydKYJA6EnYjno8Vsduu+XpJM0sYo/jiuHMFl6OfSZaa2UYVUL8rwjtGN8hyPIMPHoL3/6haWN+SXUp6VUWDgS6NPH0sqxKM0ELrr5SJS1TpZuiQXqIm/ZAqIzIu2JoGuYye2jbUH/i9bl48bCm7yaEyZ+RV81nbHuEd05c2kJxYBipQk7jTf4UtA9ajyuffHWKPb69QBYyUo77S2QWlA2oucQCdnrbCTO84IK/2x/24hquk7zskiLd7lJEtA8ZLpipmQGOpBx3/1TLhOKKFykOj1+4+sRlDrSW9uaPi8F1j2kg1oab9SSujQBjFtyAzklH+pFi+uzbVFpHimff4K1ujABLQJs1cZill8vqsD3OyZBL77pKtP7y0J+XG1ndJe2SmQ/FXzOZrRR3wJgQ0vayg/juEQ= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 45edf3fc-7bc9-411c-a1a3-08d7f5c2f84f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 15:50:03.7612 (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: R/GTqtj8JecA6YXKLxK0N6TY4vIKu3+HEORSpwhsmh/HcbFfPkOOcxfyxGmXFepBXB1RzjEHUsUmp5Lg2RbvIg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1968 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The attribute event_id is little-endian. We have to take to the endianness when we access it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_rx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 87d5107a7757..966315edbab8 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -158,6 +158,7 @@ static int hif_event_indication(struct wfx_dev *wdev, { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); const struct hif_ind_event *body = buf; + int type = le32_to_cpu(body->event_id); int cause; if (!wvif) { @@ -165,7 +166,7 @@ static int hif_event_indication(struct wfx_dev *wdev, return 0; } - switch (body->event_id) { + switch (type) { case HIF_EVENT_IND_RCPI_RSSI: wfx_event_report_rssi(wvif, body->event_data.rcpi_rssi); break; @@ -187,7 +188,7 @@ static int hif_event_indication(struct wfx_dev *wdev, break; default: dev_warn(wdev->dev, "unhandled event indication: %.2x\n", - body->event_id); + type); break; } return 0; From patchwork Mon May 11 15:49:23 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: 219465 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.7 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, 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 ECE81C47255 for ; Mon, 11 May 2020 15:50:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB23A206D7 for ; Mon, 11 May 2020 15:50:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="aSXGO1y3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730661AbgEKPuO (ORCPT ); Mon, 11 May 2020 11:50:14 -0400 Received: from mail-mw2nam12on2062.outbound.protection.outlook.com ([40.107.244.62]:10442 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730632AbgEKPuN (ORCPT ); Mon, 11 May 2020 11:50:13 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a+H2Ml6W4qHY2IwA9fhT1pxI64ZUkfM75udC1y4LY5FprUJwOEDlXNHQ1rAfzwm3EQJteEH0EPduegl9JAVsJYk0RYYw9WZcmHDHmCYqR/3VsbQkp/Q5b+S87Q/ewLg7fInCyu6JuY335wx+Jpx1RFeMX+3maedLrofa7pbC3B59B/G2feoGMtI8Z/w69R0TDQwSvwZqInleR3YDfdG/5a8Vf4LJ09sc+1HPPusiy2Cn+Bs59BGo/94fi/HgjpDRxdduC0C/ma+wDwtczZ4H5R+A3m0Ec4oN5ro8OlzZU17jYPwCa7X2/bP/xK9Be7O7qU10OJorra86J/0akpjXCg== 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=NkzghTDCsqoKkN2RTocV98XMJiCXurzeGJcUFs2XUWs=; b=cbsUKprzXhFVpBC0EL4/KOOXplGMcqjlSOKcrG6iQrZoTo64zm19ASBgbHklzBSbR/MMyI814cII/vBkKihBKGM+q5W0e/D56FnD9U3T7j9IsT1Tu7aU7h0iCZxCHCG/qar37efvRuYt0Wfg4sZ9bs37A6vCrCAo2ZCu/xj5BUeIb6+A6HHSgQ2OkkHqNHf6qXXYzfI3X5hl/UcBUxfM32Ivjxs8Tlvw5PUG41nTOuJlrdO04mGfHevKD1xcb4GpuzbF+nsOo+R4WkGLmUY1p2/6MNK1ldibBYFfKyKmpUoajKx1gnHbtJ93Oqrsus0dqXzNKSkeC6v/wbrBJSKSYQ== 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=NkzghTDCsqoKkN2RTocV98XMJiCXurzeGJcUFs2XUWs=; b=aSXGO1y33LD/8uWfAHluzr4vafNeqWWAMXVels4ZJjedEGh7uDrNxX+qp03xZxlQLvMN7zsYmEylkfM77OMm7yyy0OKiiR0phdpesVyzhrjk3jmx2GPI7Ih+sCUMKcVgRsVsWNelTB13lPwJa3ynIeeJ1z6FK8SsmdFkLsVoebk= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1968.namprd11.prod.outlook.com (2603:10b6:300:113::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26; Mon, 11 May 2020 15:50:06 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da%5]) with mapi id 15.20.2979.033; Mon, 11 May 2020 15:50:06 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 10/17] staging: wfx: fix access to le32 attribute 'indication_type' Date: Mon, 11 May 2020 17:49:23 +0200 Message-Id: <20200511154930.190212-11-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> References: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (82.67.86.106) by SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.2 via Frontend Transport; Mon, 11 May 2020 15:50:04 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [82.67.86.106] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8bf73410-0d10-420d-2073-08d7f5c2f993 X-MS-TrafficTypeDiagnostic: MWHPR11MB1968: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1850; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1r8v55+MJVQWEFel2GBnLa7b3G7ylhaH4X+QE/Id2kqtt+cG7F+QAnduHCZR2tHKVpKjFpYwrjQQj2pyYy4jikN6ErF8cC+JamKKsGzcVEhOCUl4O8m31CwSyyk8BB520+6GEXbOWBSw3mAsl4CP4Vlhr1o+E2nrY+x6zjdfadFDgUY0IYzicnryiZZt5xe726S4vzP/tG3V/lCZb9+i5ypUg7XDXFWolfoestE5VUBw+TSX/MGQtpiS+HGkhPTWlS3yUSXZy5s2Ggj3Do8cyOC/TFldv6HcLFU2X84dvGXa7H/MqTdI/P0D9mmzoztnysn/jYlI9h6ctslhruNIxFnexPZ19omjiVtIfmaC/DDBzPg22cDGIb/8ttFXBRsOrN5FguhfKEKFByzZBcNjRouctCzMiJfyRrZO9ZkTaNaufxrVIFwAdHmKymPmdn3DmMCQkAWk/Y4tKRedNmJ6xrVC1gkvif34ZQCBxL0l0zGb2cVljQxz6MtpNHcMavOwU8kKDVfMnzVtRivUr0SJ/g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(39850400004)(346002)(136003)(396003)(376002)(366004)(33430700001)(186003)(52116002)(86362001)(316002)(5660300002)(7696005)(6486002)(33440700001)(478600001)(54906003)(6666004)(4326008)(107886003)(66574014)(36756003)(16526019)(26005)(8936002)(956004)(2616005)(8676002)(1076003)(66476007)(66946007)(66556008)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: cwtcq3NXHTwZkHpz3JWXP9n0Ih4q3qq0/eU5qBVMfYCb9dLn+GdZLT4QWpi76cseWt5Xmou/Xs7sC6OWaqe7x6u0ILrJ7TT4nH6L8VJfWpYMQ/0Z48oMSF4KEYvthsXVHPJqlMXj4x+ocLgXHOMpmWFbgzVkjhlYyiweHLGvx4zEcxkPGSvb72/5HQW0ilf2ElCYsdAYwjqCRI4LotwEKreXy2q52W0AYtLePMIIHM+3J8z8a/Z5uVQCdAN2AypCgulLqNuZ+n9e0N7OYVpKvUqwz0iwykYpYGwicEXkXrXmr9+pTwj2sOjCqHtgF07xGuUb+s374Hrk77hu9ulizukMdvixu9SE5ye/Wl7Pr5UDzQdXAMBzq/QqjIyer/fFb5pZVjBemFvi6NHj8Xtg8rHsKXZaPGMIwf4TtN7eYl0KDgDiDshnIYHjqGB5uY+Ek61KRPnaLrdw1cDQSWZ6XqI0zET4//kVOrTG7ibY7WQ= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8bf73410-0d10-420d-2073-08d7f5c2f993 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 15:50:05.8602 (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: O03P8vlpgvOrnvpkC+p3dlKqhZLmJlqx8Fdf3Daj/RHypCd8Vyc81JC6z79pqtlxy7OehZedkdWA18pBPfso4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1968 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The attribute indication_type is little-endian. We have to take to the endianness when we access it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_rx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 966315edbab8..fca9df620ad9 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -259,8 +259,9 @@ static int hif_generic_indication(struct wfx_dev *wdev, const struct hif_msg *hif, const void *buf) { const struct hif_ind_generic *body = buf; + int type = le32_to_cpu(body->indication_type); - switch (body->indication_type) { + switch (type) { case HIF_GENERIC_INDICATION_TYPE_RAW: return 0; case HIF_GENERIC_INDICATION_TYPE_STRING: @@ -278,9 +279,8 @@ static int hif_generic_indication(struct wfx_dev *wdev, mutex_unlock(&wdev->rx_stats_lock); return 0; default: - dev_err(wdev->dev, - "generic_indication: unknown indication type: %#.8x\n", - body->indication_type); + dev_err(wdev->dev, "generic_indication: unknown indication type: %#.8x\n", + type); return -EIO; } } From patchwork Mon May 11 15:49:26 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: 219464 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.7 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, 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 38067C54E91 for ; Mon, 11 May 2020 15:50:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0ED91206DB for ; Mon, 11 May 2020 15:50:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="VNaxzE40" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730696AbgEKPu0 (ORCPT ); Mon, 11 May 2020 11:50:26 -0400 Received: from mail-mw2nam12on2062.outbound.protection.outlook.com ([40.107.244.62]:10442 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730648AbgEKPuX (ORCPT ); Mon, 11 May 2020 11:50:23 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iqqlr3ksIwJvkPAcJa328TivnfWX5PqSvkQ1wxBQ16FsYZRJMqVLg5mmtJ0kblkP1Ry9UomY2zMu7m9Lj3PuuMvfS3bgw4WjM/LpwHMPF3yTPFJqNBAJOzlO2ciSx0DKdhcCzyWoJejQcRWOteQpuEQN6Jbj1LLzQnAKuViIFILaAhz7Bfn/JaUVfI1RCGW1iCyN/U5rV7fwBwkg59t1JMsZNJz3dsc7aRl8vVbS7dlQW3Ik/E8d3icQcNn7WC7edXuSD7IwOq6cEq2pHwcDPkfUi5wtc89l1YZnYKtUkjI90vdn2w6BhvSnJlSZN8SM/ycuYIan3KUQxYoWAgXFfQ== 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=3LQYkPoc0RQAR5LzTUVWy0B2tnXgQEhlr7F3BHwJCcM=; b=DHahhZ7py4KHddAtE5/cXXVCUU5CQGKGjGNxHnmdw37UnPcF7ABj+W8pLQudtq7midVobESxjuAaYCfu6fTzAoapKjLhBSg1Hkfsh2yu7ZVJ9f2goTJTaMd5HDuVkeD8xDLPqz6r9Ejixwg9DkA6b797bK8R8IwuFOhkftUia21Xlygwqo5JiHW7oNUihIrn2O35JOv3OHZ/HpWKOXEP9Zhr8eGXacQnQbgdAkltwnny1O4HAx+YQSzF+ZbfnBIrV8JIukGuFGQREFlRO9n0YmfMAk+sCNtVcvBp1xO7kv3OrsN4EAWrHXI/VZcdfr9rSWZ6dSoAGnYecvGjSvLcmw== 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=3LQYkPoc0RQAR5LzTUVWy0B2tnXgQEhlr7F3BHwJCcM=; b=VNaxzE40mG45cfAyNXI+uHQzcdABcKHMx0yy1J0O9/lgO/W9LYRu0wm22PTj+YaaNo90Naj+Dll7FpoPNrMLkDgx1U7KKtZLLghkOSCzq/K5ElFE1laO7X69dWk+niMgmx68w2tpqQ/wkB8rThcA2IC3aSZNFu+1JvsVtITSDyA= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1968.namprd11.prod.outlook.com (2603:10b6:300:113::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26; Mon, 11 May 2020 15:50:12 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da%5]) with mapi id 15.20.2979.033; Mon, 11 May 2020 15:50:12 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 13/17] staging: wfx: fix endianness of the field 'len' Date: Mon, 11 May 2020 17:49:26 +0200 Message-Id: <20200511154930.190212-14-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> References: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (82.67.86.106) by SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.2 via Frontend Transport; Mon, 11 May 2020 15:50:10 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [82.67.86.106] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eba1d5b8-b836-41fc-5b9b-08d7f5c2fd60 X-MS-TrafficTypeDiagnostic: MWHPR11MB1968: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:262; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: otkoD0oN7zSie20PriKkequBtKH+blYy7Lk98JPYljkR6mGhgbY22IhwndUvY+9+8Zji6YBBT20G2sYgZRn4F3RfF8CgHYwaUx6OA9J7Onu4FplAy1m3MsE0ZgVOHI9KIU5qpfq8oj8TcWklBUf6ELVS14ox1mOt7NOiywQwKR5uZELfsG9yLoa+SPlgIF2uKovdXP4vkY9bMkOqX9lGuo1+rSgU0Vzyj6uCmfOFiviLDAikty4MtTxemUXpQ68tNHmjW6xLomqOOPxnA1zcOv/KJx1iht5HQfo50au6ljrGQ1X+L2PI77t5Ezaby8wVSvF/zLAAH+PAC6YaIFQR8ugsye4YT8NXo9SyyiTu6Waj2CH58EaPirR6KUMpV4wivEWxshEKqPK/LRI3SMsXlT4BFGgV1Oa0KGGoWJCnAclJ4ixGNHIVZ9whM5z7X9tomfykIzttBSq/m32PaNIKE4biBWWX+lSZvKDGAD3l1/4FX43CMabl4QqTquVtW7oSpQgNwLynQulAmkS2lwaLlA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(39850400004)(346002)(136003)(396003)(376002)(366004)(33430700001)(186003)(52116002)(86362001)(316002)(5660300002)(7696005)(6486002)(33440700001)(478600001)(54906003)(6666004)(4326008)(107886003)(66574014)(36756003)(16526019)(26005)(8936002)(956004)(2616005)(8676002)(1076003)(66476007)(66946007)(66556008)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 9Of47LK5+xfzG5RsBH9QlMWnbolxZh9tZ4RasTQLG1CW5B7+f9+wdoc0bvmueACjor2O/NZVN3av7/RxjypSmKLtadzbgPkqjV2OipxWGa6cpz9pQ7nSntJFolZ24Vq7jxo3dD6Hngw7ibaItuXMrifD1wSj78SlWmPHjyEBNQmCRg0SxKB3f9FEJSznPN6Nj/qkVjaSAuuG1/dL7DwYNvMA8wIHjoT/0Rzl3jM1lwqmtvTwuBVPFWeiG1URzAz+124oDMJXwLdyzahKxJETMiV4094o+vSFuEFfIZSDCN1bd1ax2xQIYk9ezD2qTfdQABBitXiced+mNTC0a2ys7ZpWaJNizffijyQdW4+1WdU4z88m/mPRhW8ozB4vnUxKWs7qE6hUtVASYB0Z7ZRobWhOZvJxCqOvBpDYQu/P42eoNmtvsLJJmUfKDFy8NAhSP/ZG3Tf3EEfB5Ag1iy7DyzZMlXRSJ07qljP5Jt85uzI= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: eba1d5b8-b836-41fc-5b9b-08d7f5c2fd60 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 15:50:12.2614 (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: zXqIwIHk+pxXxQJTzl9Ng3h4C+XggEcZI+dfhnA3542HVU/y7IqiM5Aft3jy4J7941LdTNVfn3wwvksraCcUMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1968 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The struct hif_msg is received from the hardware. So, it declared as little endian. However, it is also accessed from many places in the driver. Sparse complains about that: drivers/staging/wfx/bh.c:88:32: warning: restricted __le16 degrades to integer drivers/staging/wfx/bh.c:88:32: warning: restricted __le16 degrades to integer drivers/staging/wfx/bh.c:93:32: warning: restricted __le16 degrades to integer drivers/staging/wfx/bh.c:93:32: warning: cast to restricted __le16 drivers/staging/wfx/bh.c:93:32: warning: restricted __le16 degrades to integer drivers/staging/wfx/bh.c:121:25: warning: incorrect type in argument 2 (different base types) drivers/staging/wfx/bh.c:121:25: expected unsigned int len drivers/staging/wfx/bh.c:121:25: got restricted __le16 [usertype] len drivers/staging/wfx/hif_rx.c:27:22: warning: restricted __le16 degrades to integer drivers/staging/wfx/hif_rx.c:347:39: warning: incorrect type in argument 7 (different base types) drivers/staging/wfx/hif_rx.c:347:39: expected unsigned int [usertype] len drivers/staging/wfx/hif_rx.c:347:39: got restricted __le16 const [usertype] len drivers/staging/wfx/hif_rx.c:365:39: warning: incorrect type in argument 7 (different base types) drivers/staging/wfx/hif_rx.c:365:39: expected unsigned int [usertype] len drivers/staging/wfx/hif_rx.c:365:39: got restricted __le16 const [usertype] len drivers/staging/wfx/./traces.h:195:1: warning: incorrect type in assignment (different base types) drivers/staging/wfx/./traces.h:195:1: expected int msg_len drivers/staging/wfx/./traces.h:195:1: got restricted __le16 const [usertype] len drivers/staging/wfx/./traces.h:195:1: warning: incorrect type in assignment (different base types) drivers/staging/wfx/./traces.h:195:1: expected int msg_len drivers/staging/wfx/./traces.h:195:1: got restricted __le16 const [usertype] len drivers/staging/wfx/debug.c:319:20: warning: restricted __le16 degrades to integer drivers/staging/wfx/secure_link.c:85:27: warning: restricted __le16 degrades to integer drivers/staging/wfx/secure_link.c:85:27: warning: restricted __le16 degrades to integer In order to make Sparse happy and to keep access from the driver easy, this patch declare 'len' with native endianness. On reception of hardware data, this patch takes care to do byte-swap and keep Sparse happy. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 7 ++++--- drivers/staging/wfx/data_tx.c | 2 +- drivers/staging/wfx/hif_api_general.h | 8 ++++++-- drivers/staging/wfx/hif_tx.c | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index 55724e4295c4..0355b1a1c4bb 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -74,6 +74,7 @@ static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) _trace_piggyback(piggyback, false); hif = (struct hif_msg *)skb->data; + le16_to_cpus((__le16 *)&hif->len); WARN(hif->encrypted & 0x1, "unsupported encryption type"); if (hif->encrypted == 0x2) { if (wfx_sl_decode(wdev, (void *)hif)) { @@ -84,12 +85,11 @@ static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) // piggyback is probably correct. return piggyback; } - le16_to_cpus(&hif->len); + le16_to_cpus((__le16 *)&hif->len); computed_len = round_up(hif->len - sizeof(hif->len), 16) + sizeof(struct hif_sl_msg) + sizeof(struct hif_sl_tag); } else { - le16_to_cpus(&hif->len); computed_len = round_up(hif->len, 2); } if (computed_len != read_len) { @@ -172,7 +172,7 @@ static void tx_helper(struct wfx_dev *wdev, struct hif_msg *hif) int ret; void *data; bool is_encrypted = false; - size_t len = le16_to_cpu(hif->len); + size_t len = hif->len; WARN(len < sizeof(*hif), "try to send corrupted data"); @@ -199,6 +199,7 @@ static void tx_helper(struct wfx_dev *wdev, struct hif_msg *hif) WARN(len > wdev->hw_caps.size_inp_ch_buf, "%s: request exceed WFx capability: %zu > %d\n", __func__, len, wdev->hw_caps.size_inp_ch_buf); + cpu_to_le16s(((struct hif_msg *)data)->len); len = wdev->hwbus_ops->align_size(wdev->hwbus_priv, len); ret = wfx_data_write(wdev, data, len); if (ret) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 014fa36c8f78..84656d1a6278 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -384,7 +384,7 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, skb_push(skb, wmsg_len); memset(skb->data, 0, wmsg_len); hif_msg = (struct hif_msg *)skb->data; - hif_msg->len = cpu_to_le16(skb->len); + hif_msg->len = skb->len; hif_msg->id = HIF_REQ_ID_TX; hif_msg->interface = wvif->id; if (skb->len > wvif->wdev->hw_caps.size_inp_ch_buf) { diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index 995752b9f168..a359ae76511a 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -23,7 +23,10 @@ #define HIF_COUNTER_MAX 7 struct hif_msg { - __le16 len; + // len is in fact little endian. However, it is widely used in the + // driver, so we declare it in native byte order and we reorder just + // before/after send/receive it (see bh.c). + u16 len; u8 id; u8 reserved:1; u8 interface:2; @@ -277,7 +280,8 @@ struct hif_sl_msg_hdr { struct hif_sl_msg { struct hif_sl_msg_hdr hdr; - __le16 len; + // Same note than struct hif_msg + u16 len; u8 payload[]; } __packed; diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 490a9de54faf..6c6618197b91 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -33,7 +33,7 @@ static void wfx_fill_header(struct hif_msg *hif, int if_id, WARN(size > 0xFFF, "requested buffer is too large: %zu bytes", size); WARN(if_id > 0x3, "invalid interface ID %d", if_id); - hif->len = cpu_to_le16(size + 4); + hif->len = size + 4; hif->id = cmd; hif->interface = if_id; } From patchwork Mon May 11 15:49:28 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: 219463 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.7 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, 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 AFB0EC54E8F for ; Mon, 11 May 2020 15:50:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8AF83206D7 for ; Mon, 11 May 2020 15:50:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="gt4rOxA3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730727AbgEKPue (ORCPT ); Mon, 11 May 2020 11:50:34 -0400 Received: from mail-mw2nam12on2062.outbound.protection.outlook.com ([40.107.244.62]:17760 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730648AbgEKPub (ORCPT ); Mon, 11 May 2020 11:50:31 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nqb4b0a2psl1D3aT7R2hHB6AVCUOfdTqjqoMT4e9TXcwkQsGD2rv2oa5A0SyAr6t6w+PYzfakdWLFVdqc5up5GGjYkN6mG2M9FnosmtX82j/UDmzotY+29JJXuQPvsq9z3IkK2abqx16WgdPrfZRfYmaYQsjaXi+GBoD9FjyvgeneZqCP73J2r9gej60TSUJPIfFSSUBl3KrGMoNvBVq/oSRFE1lXRvcZE6wNyXb2PVbn/5hSKi+95QKIt6vPhnCJH3J0vEtuIUgWPuD4/m0SLeMKYVyNmc1IhrsD64Nkj8OFqZ7INlQc9RGlqz90mgPFC7CL50CquU5imcur9tjeA== 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=z4srQK29dX43wzsCF0du08S6OvPn/4KroWPMEV0cAqI=; b=GlbTfVoiRCL6U4m+ZeyoXYfgPDzMEg7vQ7MnfVxoRJcOL024vkBiyPHo7R4qdDIF49IUtCFZlCyBT+WufdRWMpCSX8/YRRNjZK+68JAk+58DnsasUmn4pwJEXfvTReR6dA6zZ8sjDSpp30AQbyqbkXodFRzUlKTkDymQiNHRqikdaO2SvUBSFCnmskj83pSlYUO5aJn9v1VgkZK/L+azFNTubJ2H6ONYWBabGN3dzuku5+3wu0tUj/khwjW7P1fXRKoZQGI0wNJxQXQeI6/1c/B222gfnjKVX7BnJOJE7yGy/k5XdeYEsNHpVIX/oPD+ljgmqGQzjzcvaBhdD+j8vQ== 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=z4srQK29dX43wzsCF0du08S6OvPn/4KroWPMEV0cAqI=; b=gt4rOxA3MnZWw82fybematDgF6P0Q74dZfhELfg4yigmwRFdnFHWdCPQt/2/glOhjzOqSVBOs236s4bqQi5YInAhOV4tXIWFfC/zqwh19t+5ccW9LLoqkRZZf0AgXHTOG+FkzJM5WLByRYg8vHndjTgi3LhFXRfbbZhHmxAT0fs= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1968.namprd11.prod.outlook.com (2603:10b6:300:113::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26; Mon, 11 May 2020 15:50:16 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da%5]) with mapi id 15.20.2979.033; Mon, 11 May 2020 15:50:16 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 15/17] staging: wfx: fix endianness of the field 'num_tx_confs' Date: Mon, 11 May 2020 17:49:28 +0200 Message-Id: <20200511154930.190212-16-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> References: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (82.67.86.106) by SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.2 via Frontend Transport; Mon, 11 May 2020 15:50:14 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [82.67.86.106] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e219ba86-6697-47bd-7b1b-08d7f5c2fffb X-MS-TrafficTypeDiagnostic: MWHPR11MB1968: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4125; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qFQr4vMjnFVJC1itz3HKfhIMZUR6jjmk8j38Cssw0umAMN/df6IgNXnQ/XDQ7e8B9si6YBSMXu8zGTGRyfHUtUe4YsvF0/Q5R19PhfnB4S2CEuKPxzLjBHZYr8odFxyzkF20fyYR5DhOTbwCVkaz+ZEu3seuly2tY8QeZou4qTljQJPNyen7SdnTeh0QReLTXUtcErqC3z5BpBPbQf9OhHUxfPPIu6/K8NzPRO5M3qGeZIiwEsCj8nw9v5hnh9hU3MkRDp98z+ng97d5sfrwXLSvmKQe2NZ6zoGIHxD3WH2ZHLF9QvHPUJ92M/AqnE6wTbXCwtqoOqbTCMkajxYIRYdoKy9SVsLA9VDALVmAQmSWhdqSd7OBiufzB11nRQ2WGnTP6jIaqB6JQ4XjxGhdyut6+H+zZ75t9/ipeNwQqyBscl4YhtuLXa+EdguLIHgt86aQy22U7+lpXpaMrGPLPNkuAogWNhNU/T9wwFysM5ckOZbWPBWAW+PBPUDuvPe6csNvaqBSh7u4O54+a4WUsw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(39850400004)(346002)(136003)(396003)(376002)(366004)(33430700001)(186003)(52116002)(86362001)(316002)(5660300002)(7696005)(6486002)(33440700001)(478600001)(54906003)(6666004)(4326008)(107886003)(66574014)(36756003)(16526019)(26005)(8936002)(956004)(2616005)(8676002)(1076003)(66476007)(66946007)(66556008)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: x6If8Oe++0PsdYNBs4DROztM9P5o/Al3ZDC4yF+/av2UrbfNyhnmwke5YOsY25UqG9FOQHK14sD+GXSfyWMe9DplUhQ+lJJUHUBNmWIBvbJC5YpnkHbLv9wckrxt0E1CZg4QHdL4EaoFjFqHCeZc1EAis6YbmP1vcGjvsUwn9SPXI4Vly8DyOBYprwUj+a4OUQ1TjaP56FqFnghWf5lDNA7DKv6Et86esPuMeRa/wgu5lJqQGUn/2wd/c09Q6oDGtuIfZ4QCBoE/7WLNJgk1Gsw8BUCzPlun2BTN9C8GnDJJMJ0JOQd4FQikx94JeGn43sJZrUmcCVN9UsIvyGQmVkKq54exwWkDnYVl/I4oOj4yrtpjnv5Z9jy587Khxkz7jdRyb8ZgSSbgi7S7/Mu9+YpYooLdx4ss/7QZ9w0EBbXX34Klf8EDHRry9gNSt25If4ZjgdrBdIbGw0+gfhM7YsJcl5qjKK7oZT1J+d1yB+0= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: e219ba86-6697-47bd-7b1b-08d7f5c2fffb X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 15:50:16.6194 (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: 529S+q03yB8wAxt7H8Wrz+TAOls2GKpyBGZgrXG9U5CLmwXTzNmNTuF/OOWQgnnJPSFr5qNSd8gdyxzLSLQbYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1968 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The field 'num_tx_confs' from the struct hif_cnf_multi_transmit is a __le32. Sparse complains this field is not always correctly accessed: drivers/staging/wfx/hif_rx.c:82:9: warning: restricted __le32 degrades to integer drivers/staging/wfx/hif_rx.c:87:29: warning: restricted __le32 degrades to integer However, the value of num_tx_confs cannot be greater than 15. So, we only have to access to the least significant byte. It is finally easier to declare it as an array of bytes and only access to the first one. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 2 +- drivers/staging/wfx/hif_api_cmd.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index 0355b1a1c4bb..574b1f553af3 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -103,7 +103,7 @@ static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) if (!(hif->id & HIF_ID_IS_INDICATION)) { (*is_cnf)++; if (hif->id == HIF_CNF_ID_MULTI_TRANSMIT) - release_count = le32_to_cpu(((struct hif_cnf_multi_transmit *)hif->body)->num_tx_confs); + release_count = ((struct hif_cnf_multi_transmit *)hif->body)->num_tx_confs; else release_count = 1; WARN(wdev->hif.tx_buffers_used < release_count, "corrupted buffer counter"); diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index d76722bff7ee..8c48477e8797 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -280,7 +280,8 @@ struct hif_cnf_tx { } __packed; struct hif_cnf_multi_transmit { - __le32 num_tx_confs; + u8 num_tx_confs; + u8 reserved[3]; struct hif_cnf_tx tx_conf_payload[]; } __packed; From patchwork Mon May 11 15:49:30 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: 219462 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.7 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, 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 28A7AC54E8E for ; Mon, 11 May 2020 15:50:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0116A206D7 for ; Mon, 11 May 2020 15:50:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="oDE+VGiH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730764AbgEKPuq (ORCPT ); Mon, 11 May 2020 11:50:46 -0400 Received: from mail-mw2nam12on2062.outbound.protection.outlook.com ([40.107.244.62]:17760 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730648AbgEKPui (ORCPT ); Mon, 11 May 2020 11:50:38 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bs/aVAgZv9VqwODNdXkkcW924ZsbFuOkboNRkkN8WMGZk1lM/Is1aEG+p2C/5OhJYYwnk83sNmRRjovxeT9uRNQJOripFff17t3B0Y7epTIPV6zJWVn+uiZlAwnAnHxzmyJvaAFtx3Pd2g4VzwRMn99qsb7bPkqAD/yHTuAwhYhzT4gaxzj5yOJVztzrQA9hrexPRiw2EqLnM5W2WMwabI8ACEyVWlghiX+rija8zX2iSmIjiJ/TO5PPxgVvaMkYjm2KTx7Dz1TiRdhWUTuEnfVh0mrwbdGsrv+qVUEfHJSHKe7CyAsTVb42rprr3SUPnQiQeMIGvlqTW5XU3/gUOw== 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=iT/OMJBcfsRkPe6vAx1P07qFqYJx6s8Pt4Ip2IXw6Ic=; b=g+gvNdrbD/OipuIxaXAd7HPzcHRo5jXZNbwFXYundMP40TfQbsOYUGi86LnfXJh7+LMoEbFkIo+EAzaNcIg90TcDc8BalHZiv4PFhggC082Yx3AcGt3NkKayr9Kj5RiZ37cJJUtGOtvED6+T+uuz3DyTVE/CtquAuwZyoxTBEdfX8HzJMgOy28OiZkOj4RnIxcGcVwuQvzrFQ0MDcksPxKY8d0ysblxV9nxF73ey+SLYMS3q3TuwGCxfNy1b7DdJa2E1U7/IEkd2VW+EMe5MiKHM/LYPD/1GRXTXn8lhs50Nr9jStJn6gmeCRS2oNhJVBgvmGL05n1wParlueNmYCw== 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=iT/OMJBcfsRkPe6vAx1P07qFqYJx6s8Pt4Ip2IXw6Ic=; b=oDE+VGiHC0w1Uj+B9WVLDSvcbRXgO6fhFn/gBCAPApJHnOh554VjW2GcZZgtifBrWwF0bCTGfLW98E/htVGhxldsrLwSXJqH1sEm6YnbfrnlL6igrRXL+lhXsy7Px3gNHuo9NEA2dJzCDdahAd5AF4FLsrD4N0sSeumF3x3CxzI= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1968.namprd11.prod.outlook.com (2603:10b6:300:113::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26; Mon, 11 May 2020 15:50:21 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::e055:3e6d:ff4:56da%5]) with mapi id 15.20.2979.033; Mon, 11 May 2020 15:50:21 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 17/17] staging: wfx: update TODO Date: Mon, 11 May 2020 17:49:30 +0200 Message-Id: <20200511154930.190212-18-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> References: <20200511154930.190212-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (82.67.86.106) by SN6PR2101CA0026.namprd21.prod.outlook.com (2603:10b6:805:106::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.2 via Frontend Transport; Mon, 11 May 2020 15:50:19 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [82.67.86.106] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c7692626-b90f-4fed-8a01-08d7f5c30283 X-MS-TrafficTypeDiagnostic: MWHPR11MB1968: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 04004D94E2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: n2VCt/2IJYavhsazcLKJF0P+cFbP0Ek6kfmq6/r8Da/qhtsE7lxX/KppV/k2w/atz36CFh9yCRZv4EEpmWuZqyvrOPRflpeTqdSlNLvMBY5PY5dOadFL+iMJld7afi4XJXOEIRjiykxVeMWp19n+p0vufC3NhgnHoLIpO8KaijiDpc5EsfQqGOCwtzQfQjJSZ6jshx7xBb5euDfaI6WlK7G+Pzc7iTugUsdHhXLrJjxvZsGfLEXNsFl83lMZJ7NO81fok5RbaC7btOBRFDfJUxiQxvODA1KFbMfiE6R978TAgPuyte8h8qcjDO7ZFrSJ7z9PouRgaQc5nppzYYxjderTBRx0K6GPJRYIyOSz69WyoqvMwroOnfuQYQvNd+so4iAEETD+td36batsJgwXIuFi02va7F1DtIZq6KQ98hb31vfhQ82f1iWimsDmJ6bQtcgLgLttC48LPiFd8j4bEf+DYvrEQDFPzLmQBshi7okhvVcjxoHpAwmzeG/DDhV5E5A2vZeER7MdTWdHLuJg343ubIk29ZbYVoL5+S8Sl2OX2gH0Kk7v/SOEPxzdpFm1Qysjns9oc/jtICWGG4DboV7beiiovOJdV+RehasEdyI= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(39850400004)(346002)(136003)(396003)(376002)(366004)(33430700001)(186003)(52116002)(86362001)(316002)(5660300002)(7696005)(6486002)(33440700001)(478600001)(54906003)(6666004)(4326008)(107886003)(66574014)(36756003)(16526019)(26005)(15650500001)(8936002)(956004)(2616005)(8676002)(1076003)(66476007)(66946007)(966005)(66556008)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: wXcEZIaYbKYHeapouqHpJDPlxtG63wGOGsCqA4IgVLSm9bzBwi8mBXiRQfzh3lOrrV4xsCJOWpnZyI4er/mZ09XAi95fcKpRVmw6ZyqB9dcI73yluuGNdqnDJkFSJaeM3FPmOBCoLWKn0xxAcvhnaKWmnnx94Xnpgkt46LLL/+AozfLC0Br7wHPjjouBQyYIqYHc9rJtLxvrdG6f8HCTA77TLCCDrSXqMfMTtZkHnaeHOohDu4HH2ihgESy4leOavI9H+xpSDUdhBUqgj+lpGPISB19oo+03d8PCC/+i/qwCpBPMF8wosLhEZ5wl2bgSt7wLWVCe6HgiJP3xLLBD14R7W32k/gG7zxU46lmn2jT2MPTLXKWCl+rJW7T491WdqgvwGUYbn6HTDvWa1m4bmWMDn8RQAx+Y/ujXBz8hK5awAKzjzQ9zJocKsq5wJh43mH6J4aMmFeSKjtqs9JG/4jqokWKawcEXIqfbnij/N2c= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7692626-b90f-4fed-8a01-08d7f5c30283 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2020 15:50:20.8796 (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: Vq26kolM0H+KiHNKi5hDNJJSRLBS0u7xZhOyLT9DrMqktMicV/i2BYmdWeNQvwV7/dnjx+NfWK8Yinr3030MNA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1968 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Update the TODO list associated to the wfx driver with the last progresses. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/TODO | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/drivers/staging/wfx/TODO b/drivers/staging/wfx/TODO index fca3332e42ce..42bf36d43970 100644 --- a/drivers/staging/wfx/TODO +++ b/drivers/staging/wfx/TODO @@ -3,32 +3,13 @@ staging directory. - The HIF API is not yet clean enough. - - Fix support for big endian architectures. See: - https://lore.kernel.org/lkml/20191111202852.GX26530@ZenIV.linux.org.uk - - - The pointers returned by allocation functions are always checked. - - The code that check the corectness of received message (in rx_helper()) can be improved. See: https://lore.kernel.org/driverdev-devel/2302785.6C7ODC2LYm@pc-42/ - - Support for SDIO with external IRQ is broken. - - As suggested by Felix, rate control could be improved following this idea: https://lore.kernel.org/lkml/3099559.gv3Q75KnN1@pc-42/ - - When driver is about to loose BSS, it forge its own Null Func request (see - wfx_cqm_bssloss_sm()). It should use mechanism provided by mac80211. - - - Monitoring mode is not implemented despite being mandatory by mac80211. - - - The "state" field from wfx_vif should be replaced by "vif->type". - - - It seems that wfx_upload_keys() is useless. - - - "event_queue" from wfx_vif seems overkill. These event are rare and they - probably could be handled in a simpler fashion. - - Feature called "secure link" should be either developed (using kernel crypto API) or dropped.