From patchwork Tue May 12 15:03:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 215633 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 C50FFC54E8D for ; Tue, 12 May 2020 15:04:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9CF96206D3 for ; Tue, 12 May 2020 15:04:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="pbeDTkFh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730229AbgELPEh (ORCPT ); Tue, 12 May 2020 11:04:37 -0400 Received: from mail-bn8nam12on2076.outbound.protection.outlook.com ([40.107.237.76]:45896 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726168AbgELPEh (ORCPT ); Tue, 12 May 2020 11:04:37 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IfzbvjdmsAeG3sofhSptv0CZHJQRGU6N+bsYxJ02twj0im/R6CdSquGcjT4eseE80/8LfbdtgdrV/jzOf6X8EDE213nmnxTziDqSscsbX6n76rnVqEm4XMHlifY8Vz175d1cAhWi/Ek33jSjuqPMdt7Oy57pHLtZFEeIfo/xVNtjuhMt8T84mu1d4A3M0HWb0mZNpIrK3TnDpN30gcWeVKq+l9N02YQsPhAheCCSgVII/nj6lrIjo0Ls2Gz40Rz9bLzWWNCujA+Y5t5LuXJCG37oX8v0BWcfndtIeMaES1e/XyBAfwKrNm3i6MJfp9GUXTKZ17r/9TYZpKGqVVDcTA== 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=dLvwQCxO37v7iAmh1fvS0eGmeMBOk0SXPpt0XYO6wB5rvfOo5L48ve01w9hf3o3bLxUujHN61S2RkA5eKyPDsshlKDn0mNGSjBYdWMZMg6ST2KEiVlKQ5/5nkmCrSp6F9ZPH8yympvZeByTbmnafh8FbROLRkhKVqXKj4kiAQpcfoPQgseQXTo3HW+3klZtQpaBYE6+aX6PnutuBsQh16LVekUOsS060My/K28SNB7hd7+g4mlvDLKiZPWHKlx/TyumlKKkfL2NbAvZoP3TeN0A42OnWvg7afuQ2eneF24Wv15uKS1L6XDwPP4T+Ti3tmDWHI9kvKNR5ZkzPUgZ8ZQ== 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=pbeDTkFhY1OEwuBv8Ha8GInmmG7sSFx8a/Lk4mILIV8ZfOrEuapjscabRQZXGvLPo4KNCk8q36DQB4DRDhakn0E012x0ncwMjIzMXDMc8Pzf+DvJozxdHhgQSC+hUqupKUQ4ppfg8ijxPhABgexkMzqI5LdkYHoQM7bM6i6CzSg= 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 MWHPR11MB1741.namprd11.prod.outlook.com (2603:10b6:300:10d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.34; Tue, 12 May 2020 15:04:32 +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; Tue, 12 May 2020 15:04: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 v2 01/17] staging: wfx: fix use of cpu_to_le32 instead of le32_to_cpu Date: Tue, 12 May 2020 17:03:58 +0200 Message-Id: <20200512150414.267198-2-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> References: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) 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 DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20 via Frontend Transport; Tue, 12 May 2020 15:04:30 +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: b02287c3-2bda-4962-42e9-08d7f685c684 X-MS-TrafficTypeDiagnostic: MWHPR11MB1741: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:595; X-Forefront-PRVS: 0401647B7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xQ6OvbYvP0pFhC6TgMyccESL2tdL0Ivzr+ZXzysgJcH0kqxP5ITAT3cexBeRFPu/OD/se+y5zyB/TQGtCtXuNGYUin0Uxjj+H/45gsfci7CEVZxXrefE18oALg4ax2h4dD6nbmdtL7u5QFWTf3Hh7FkLwV6NZfi3siDrdvf7WMCMghf7bAtMmMbVruRS2FnNzxwdhmcK82QW4E7AWy4QQbiM4EuYD/wUJVgKhlNKqe6pRUtD8Onw/25NgHv+RwLxvkgz4HtKhr1ctNyFIcFYBkjkRWMIFuBCPMmZ6UfKzgC+cgJvkPDorElQlA5VmL4qwhSTOI6/nfu3PmCdMJqC5V+79543kTjZjgQMMZyPuGgZg4PQauRY9YOqmdPlv7QZE/pZLcV344p9PcGbJTkugz7NKWIn/3k7jKeRaPT/fLGFDWVk7zyN84rrSLQt/yt8D3sg/t3ta/mEH+W1wyftChu0UAQrqwMra1owCIlpMaZpXmGBtHturRG4XXI3zijQPiAY37HylxFt/n/dq9o7uA== 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:(396003)(366004)(376002)(39860400002)(346002)(136003)(33430700001)(54906003)(107886003)(4744005)(478600001)(8676002)(5660300002)(316002)(1076003)(956004)(8936002)(2616005)(186003)(2906002)(7696005)(86362001)(4326008)(52116002)(6666004)(6486002)(66476007)(66574014)(26005)(66946007)(66556008)(33440700001)(16526019)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: N0TB7E3AILoSBOwuqxJEQk350MDZRhABZs4XdnLqIkEFYxzyHMtouQFlOFq4BnovWSqil9aXRuOcAfuMDmzcJxjbYY98VvY2lewn5k1FezZnEOEROPXo8BpeIlhRmHOW55VrTJDWL1bHbBNGnNOC1YS/TrkvB75rscxSjaaSb+QuUZr6PbB2EA1WMmB+8UMTN6qvEDpig0FzFtCaMzFSDojICzsUbbP/KeBgZB2bYCWydaaB3RmoZVIp2Ua3SsAwn9XXKEu7FmjMMg+H0JuAUSHn2O4xAE3ytkMsgTZxc/T8AsWvpWqTEPH8HO4/EUJIkaIuBuS6N4jiikVwzVN+dSXKnzNXcEAVr/1GPMYcNXIIvVXpEmhstEQBhrFLax4SgksBMHcj6bOXXS62jxDRPvAxrnmuDSaGPZ7t4xY3Wx8kPx2Kbxu3i9l5YRbeOPYzwCdDTPBYFd0fT9k5TESD372QEAhwVi5jmbMX6BQD7Is= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: b02287c3-2bda-4962-42e9-08d7f685c684 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2020 15:04:32.0153 (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: +lpIHa+OS9mGijIMwbPfZUr92Ig42O0Ofp0kWg9iRLGUBY1iN9KAyADVT+gKjAjmTm2TGsuYY0g3RMLpKSCcDg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1741 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@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 Tue May 12 15:03:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 215625 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 B93A8C54E8D for ; Tue, 12 May 2020 15:06:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 93580206D6 for ; Tue, 12 May 2020 15:06:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="jq2coVjQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730457AbgELPEk (ORCPT ); Tue, 12 May 2020 11:04:40 -0400 Received: from mail-bn8nam12on2076.outbound.protection.outlook.com ([40.107.237.76]:45896 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726055AbgELPEj (ORCPT ); Tue, 12 May 2020 11:04:39 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O67J/5PVovseDMEpIDi1+twMPHMoekSfSntrC4YMSBrXPAb/u9A03J5yS0P2RsGxXxOt4mmHYZPtt5gCZJ0cKOn4A+nJ6ZvHjGQ/S9EU8pR92wxh7LkxiCUyX7nQGNqzTWaXPTBiOCLTtukaE2iBJNAkHB3c5folgGVqC4CS9rHwIaGBul9RxbJ+mLuTiX317/odwAUFSLH41Ii+f6tY4n8alLBufpCdUQqwxA+pJE5dTrd03Fpc2ce4kBmYu4hb10nfkk8ryLsA2fZHKZ1lUhMotouRZptWEmjYvUXu55RvBFq3ThLt65K8ErUCBR8Roq3fXhUpC74JohcvznPakA== 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=7W9J6xx50RVl9zf/gu8v/A2L1KffHWgqaGOXqplNmJE=; b=Sd2H1AJnlCJ9ESr4wLHWKIYH+PebWxYAgAkNwk8TGNohQO7ff5gEd6j5+JnOSNM05iyem4cH7VajU4TuO0QSgroOXIRFRXux4nwdwhwB+YZyuSgf+E12Rk48No/Pr6bu1B52rpfQIYAU0ZamX31MNGVaE0fksFfyRQrVKyY0zivt5fIR6g1fP4rhiUyxyE4SgMJ76BEoI7tS9LAWDwq+FoMbeftL1KAp9PyDtY6xmO4ALeJJJmJBJpvsFcCNu954AoadkqABlUvdI3AXh+ABA7bMUQoi4S4//naRt9kYuthittwA/NxUeC3qDm1jkdZoxzR9pQtKtmlvPugKhI5sdw== 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=7W9J6xx50RVl9zf/gu8v/A2L1KffHWgqaGOXqplNmJE=; b=jq2coVjQcBwEF5Fih+3ci/V8PE2LnMybfAK8YuZPoSHI2X9YkdXN+DGYIIizbkLTdND8vzUHZ73NsL01CC8kkl0oG2c1e0qzkkX4xaa6CH3J6Qy9zw/FDfhMnUsmSnqhV5XyB+PlBLJ/3NwT4rbkse+1K+8Jmq4FKe6ggQmqRFY= 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 MWHPR11MB1741.namprd11.prod.outlook.com (2603:10b6:300:10d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.34; Tue, 12 May 2020 15:04:34 +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; Tue, 12 May 2020 15:04: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 v2 02/17] staging: wfx: take advantage of le32_to_cpup() Date: Tue, 12 May 2020 17:03:59 +0200 Message-Id: <20200512150414.267198-3-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> References: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) 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 DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20 via Frontend Transport; Tue, 12 May 2020 15:04:32 +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: b0f0e563-af29-4388-8596-08d7f685c7b6 X-MS-TrafficTypeDiagnostic: MWHPR11MB1741: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2150; X-Forefront-PRVS: 0401647B7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rVGj7UMFNfV9+EVSvOsEs4LTmauQGYCoGk81Yeb6iP2FUXdgrkv0SfTSZh4INz9Gn+cN8uP3JQgRJwC30HqA+MTCD3U9dkjWoEJ7EIU7pEOtBnxnSCr7+358sxTMCVvGR3EXLP+JolRaUSkpdgJexxEX0VqZkZrh2qQGog0SH5Co+/xeKLUJGnlyrz2ZFunbf9BpK3rbnYOZp9ENblR9tYy6+0MHMIU3VhHh5dPAst0n8m8kRQuN3+YabRbj087i4Yg+2t3MsgOAdmEhCDJ/HUQGKZFNG2ikfqBBQ0/J58La4/XTeOcf9WFoAMMfDKfXihCS29UQqmG3CgwH76Iid+EaMp932OnCarkNkRtqlznfaMi2iC5yI1hJZyyXs0XYW8bEFM9XsH06fSoDCRRWNCzTcymXtC1V+h78ZGvUdQ1D2wnzYgde66/YvlXvZETOBwf+R0gB7JxnasSnOi73u2WoRcVE8Z3PZqUVaDHxvEFUCA/JRVuPilvdjP1h0KgiXFf5XcFPVg+7tfOuPbYNBg== 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:(396003)(366004)(376002)(39860400002)(346002)(136003)(33430700001)(54906003)(107886003)(4744005)(478600001)(8676002)(5660300002)(316002)(1076003)(956004)(8936002)(2616005)(186003)(2906002)(7696005)(86362001)(4326008)(52116002)(6666004)(6486002)(66476007)(66574014)(26005)(66946007)(66556008)(33440700001)(16526019)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: OIIwmBQNINzITxmMcdq73yJ25L4sYXXYhhhQq8MoYLtY9shuf/fMaLUqYxMdXnjtcQfUz+KIneCrBy8fLArLWE5lOtMWIiOLyDjlfFagfWW/XGndSiC7wEII1PgJlDznBfdO5tu+Jp3BzgQB4zbDBid7QAXHpd1ikSjdp+k+eeRTSK+MAqotKBfhRqM86V5NU/EW/qhw4bBTB8AS60DN6n0WX+3MceewKWsynM+/tqCcnCPC7FeunUJLf4weZKGdE3Rx4AhdirK2hS8TwKrY+k50k8bIuOEEzyUDoMRFl6zy4bHV7z6nKoQ38gMUF7isCTUXFN32uKnPYswWUE/arlSUCaWzxVYOL6LAqOHwjjy2zMDYD0v1Vs8UGjqA9v33VVQsfl/0EQ0nxyHaySCN7uMlmWp0bW7y34tAOgqKDOK+8foyfWCzYYEhTrMfCg1r9HmIruO/WRWfqIaY4+tpiuzLvktuAhPzeJ8vCKgQOkU= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: b0f0e563-af29-4388-8596-08d7f685c7b6 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2020 15:04:33.9914 (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: GYsDZ/tQt+bWVgzazm4g3ycsq80OdDNOAHS13O5ON9Ht5JkQ59765udkGjWaKTw7J52HG99jO1eScofHfjiwQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1741 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller le32_to_cpu(*x) can be advantageously converted in le32_to_cpup(x). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index ac4ec4f30496..83c3fdbb10fa 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -22,7 +22,7 @@ static int hif_generic_confirm(struct wfx_dev *wdev, const struct hif_msg *hif, const void *buf) { // All confirm messages start with status - int status = le32_to_cpu(*((__le32 *) buf)); + int status = le32_to_cpup((__le32 *)buf); int cmd = hif->id; int len = hif->len - 4; // drop header From patchwork Tue May 12 15:04:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 215632 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, 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 718B1C54E4A for ; Tue, 12 May 2020 15:04:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 47C212082E for ; Tue, 12 May 2020 15:04: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="jnUZVjAJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726055AbgELPEv (ORCPT ); Tue, 12 May 2020 11:04:51 -0400 Received: from mail-bn8nam12on2076.outbound.protection.outlook.com ([40.107.237.76]:45896 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726168AbgELPEs (ORCPT ); Tue, 12 May 2020 11:04:48 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aSdsgPOWEvufnSyxNmR8KkInYndb8xWZllP7sBz0Bjvb48NOCGMwO/QQhGn0LIHIxYTsZ6JZN4xT1cSwlHGd6u4uYqB5Zrkko4dkiPlfMMDQf3/HCO73BJppB9Y0bhzIoy2P6XyiP8c2Qj15Y/I04w/LHSmrxGj8VFAY6X4bOgjmJZvo7PakXP+yiSdVEnRAUdXmX5sO7afstdPW1C5o3B6ZI8SiVK2w3EqR5mmBnksLAAXlHbk6DqjZ3c3M+k+ZgTdDPlL35fIgB/ZoaIgpje5jmaYSmsL4/fxGVAJ91mRjMmjNI+3C05FD1RyajvHGZD5QE2HQ9Fr1xJMKY0WsfA== 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=AEXy55pmjEp6LuWI/5Y8hfjIGMAA70jo5RF8VvTo5Rx1UaYaDQNJNBDxIk2FUnyyfQ9Z0krRmd9gpRwtXabujmgUdC3g4GpKlZI8S1WRESloDC5/+iLgXRat8Vn5kdwDzSO4LeHpOjIMfC4HjVdPXS0k6eRIR4+19cTe2I51SiMaZ6ymqxgSJSuT5CMXXClw+YGCscXlgInRb/m0BkE8u16c0fQmBrqQNxXjJZQg3dzz/5wlQ+NWDEoEVDi3k66HFfemLaWiXBbdxUXE6/3wJix3X7QvE5WGqjJd9+z/GaZqCrO3DMzpfE+X8h3s4YbDbb2xAoE+1UNaO+zFt4YOzQ== 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=jnUZVjAJ9L8I6wRekqiptSLmQEihFhp9jZBxXgUP7IrQdmf1Kd9/eQPNThTbpJ/KUUUs0GYUEZ31JV7B2gzxgqT+nkui9TYR0G5qQYuQ0rnXW3XFYcbDFGwTgsHurDHTSRIIgE1ZkoUW8Z+NxRuzrnm2VH2KGsc9Xr1Cfdq+rrw= 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 MWHPR11MB1741.namprd11.prod.outlook.com (2603:10b6:300:10d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.34; Tue, 12 May 2020 15:04:40 +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; Tue, 12 May 2020 15:04:40 +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 v2 05/17] staging: wfx: fix output of rx_stats on big endian hosts Date: Tue, 12 May 2020 17:04:02 +0200 Message-Id: <20200512150414.267198-6-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> References: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) 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 DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20 via Frontend Transport; Tue, 12 May 2020 15:04:38 +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: d29f5e09-9661-4cd7-bb0b-08d7f685cb36 X-MS-TrafficTypeDiagnostic: MWHPR11MB1741: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:339; X-Forefront-PRVS: 0401647B7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8Sj7ehGfJwg1deZiPSLBLQqHPmkeVDIq99Fy2HXmoXTjN7U2R4+47HmOCEfLsWDO2i+qBKk4yLu3wDkIrfwq6jb3Ft2csPR7Jq8TN/u3Q9lXAv2gFMN2aUagLgFOzj9nk5EqCG7CmOx2mYW1Ep8UkCNE2qA4XizpzuUPyjH1vFCbFmSmdtbRWmg6uSqFGjUpPu5CLOKeF9Z9bVDNMa30PZsRnLoaWXdUAazLquklpNKW9b3nEQl9y3YRUt/6j+nWvEY86nj0Suj6fuxaG7kksanqysoYSSxMWKQihJGAMP+ygS79/2rGdyVv/VWfVFqDgU+Y+5Ef1iJ6GH2J28kdsNPXJIh7FR8tTIZpW6HCmAzvkV6DrRT2SS4QGp9jeZcuOFWdPfB5nb0QLe0eEBxpzwfMnQkstbboJpHwoal4AhpmjC6cbNIUWIsdfcxk1e3pY2mRt71JI4yB+wVb94KkVP5rLeBHrVMbWhbq0mRyKgeHw2XZB2Ke+GLskTC7LIdD3x1knom996y/buNxHaTXww== 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:(396003)(366004)(376002)(39860400002)(346002)(136003)(33430700001)(54906003)(107886003)(478600001)(8676002)(5660300002)(316002)(1076003)(956004)(8936002)(2616005)(186003)(2906002)(7696005)(86362001)(4326008)(52116002)(6666004)(6486002)(66476007)(66574014)(26005)(66946007)(66556008)(33440700001)(16526019)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 6ojtYiK/oD/v5MoaUzGYcTxON6cFloKwHwa+LbJPpFqNWHtCd/wVGf91RZwCo9LJa9KuvfbCAI8lmko/O3fTztSjJFkyik6PkjRPJ3Dkct1GMMX3Gwtr0YIZ19IHcOhSJHpnP3g2pyOkfi0nLVWKL7cOFQ3U6DkDeDA0L9esZJhW+t66EHyJFeDKET6srP62cdg51+Yeht5X0sIuPoF9Cc/oWpayKSMzmMx3/fuwJ0E+BCdLFNDkYV3/3oUUoLcKOfr3ACYzVDFs8Kb5YYiOukaVn/svRv8BlHTEfCiqwFn+230lKIuzaLSVNtpyJEmhE89fq3nJO15GFjUeN1KNIx7KO0kMZ4nJytTNWH0Rbahl/bWQd45pxLROpHJG2RDqKuto+9XU2KQ4fnJG2bjweoGLYDC+UyqBnDNXftMMFaGW90rWArmXXILzlVl1zbXTWo7zphCPKOnfoZfrB/zcXqZAEb9DnztZ7dA8F7pr2SM= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: d29f5e09-9661-4cd7-bb0b-08d7f685cb36 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2020 15:04:39.8978 (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: ivdpbbHyLD4Brp5wqjyrN0veiql6iSk71NrQAg5BZYFVK1oNMZT96U+vKTRuzRQ9atSSbOrFvVCtfTCqXaqcCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1741 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The 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 Tue May 12 15:04:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 215626 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, 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 D536DC54E4A for ; Tue, 12 May 2020 15:06:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ACBDB206D6 for ; Tue, 12 May 2020 15:06:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="POBDwHtw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730640AbgELPEy (ORCPT ); Tue, 12 May 2020 11:04:54 -0400 Received: from mail-bn8nam12on2076.outbound.protection.outlook.com ([40.107.237.76]:45896 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730014AbgELPEx (ORCPT ); Tue, 12 May 2020 11:04:53 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CQ8LR9Wxzylc+ZlVTScLFQR/3GkLyexqMj+JQZ0iBrnxTCsKl8ytN3dTpV4H8xYa1JtdBJK+FsXnNPAIy3VJ8oqa7S/QU4uYBXLl2mfno1/bomaYCXz7m6RaUnYesuW9G9WcEniCLJH4uclgBTstl2ipaa9uQ99j0vBePwe/BIqZXEPlIJDQJmx//i3tX9rrovLfuM0O6nQ+XWh+YdiCG7zRUmuWsXToZmH4tWrbAIIzvyN2Y8SjJQKbWKY6c4po7TQ+sH6T6t9dZi9dtG62EL9zcBelCMbHOTTkBbMDpQ6fXOpJA7ltyD1oxF3qpsGi+OFdchWLZS5MBvHLqtiTrA== 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=BsrqIiAK3fP6Rj2M8OowayKr2IPJCkCcjynA6nrf4EFu+E79LZYLccBupShhG7VARXG0A4WBtJMQSDZY0KckybuH2t7zm871MEQ/iAdy4dynQsVXUBtoiqleJPKf3i0mgUcXT5Mgx1yywGtzKW5S3Z7uU0j+8/apx14oOABHC/c7z0WZVN7vwIeDn33vCE1/gL7pRGk1J8h7PcMHdlNz7AZCmXogam5V8Y/KE5gKimZkznJ4lHNjdPA2oWJked7OAUbVQ4Vw25kRi9+HV0oS7JPWVTUD9+X8RwtJqDKfmHLTP4AM/9v1ZRtjm1Gd9LiFMjV5HtN2v2sxO51L6vj3Rg== 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=POBDwHtwW9YOeOkVclDKJORgnxa3dYSVkTrvQVdCWRLD4jQeDX9o9DyXC4hTxbfQJ+tOLmhETg9zzlO0xQu+IFPw490dbWCMIUIsFmd12gfxlTAs1FkX6RGxMdhCjByC6wcia0qDY8zpBt4s/73TdBQOhGNd4+WVHKZAx8SNsh8= 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 MWHPR11MB1741.namprd11.prod.outlook.com (2603:10b6:300:10d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.34; Tue, 12 May 2020 15:04:42 +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; Tue, 12 May 2020 15:04:42 +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 v2 06/17] staging: wfx: fix endianness of fields media_delay and tx_queue_delay Date: Tue, 12 May 2020 17:04:03 +0200 Message-Id: <20200512150414.267198-7-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> References: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) 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 DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20 via Frontend Transport; Tue, 12 May 2020 15:04:40 +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: 358d58a5-fc04-4a41-2932-08d7f685cc67 X-MS-TrafficTypeDiagnostic: MWHPR11MB1741: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:660; X-Forefront-PRVS: 0401647B7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DkvCq8jaRN+MnzxAoGN1mRwaoJNccfdqMFQiOd3LX0A5k+3xdONdeQ+ttt/iKh5Anckf0s9tk/YGmtvrR7UNqf3Df9ajh8Xl9+tiweZrwBBlKqvl5MOFVW37RHNeiSHGxO7pLqMZ/3nnal6dXt1IJ4YBm5X+/JNkswYYmE5O62U8/rm7UAu/unGhZ/KEvYGh770iWZFmrfJFj/WBueV/0iEKoBPos7/6wPFq77QtgKpBlP4+6QnAl1MjLh+LL2SpnVb7tKafSgYCgLvJOsXHBM9DpoJwPYTp3njsyiiO/z4kOe3pBw8b0BCuTjhbbns9zrOfqrugtQxeIt1/FnrWCWCHZpi9r+/NxO/29zaciNexXdjkvT68gf0VLQxpGrjvWJhCIwsSWpAWwnIDlcxMTzAmhOSeovD/wWAiPns7QlzKasQ+2RI/+mbeWjIALKAgoEZcpBcpqPUshAiBFMcTarqicBW0HervySUI5FmnlLk/QOL5fl3JSxVP7cdEDWA54I6pPNiCSs1pKT2yUzlUZg== 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:(396003)(366004)(376002)(39860400002)(346002)(136003)(33430700001)(54906003)(107886003)(478600001)(8676002)(5660300002)(316002)(1076003)(956004)(8936002)(2616005)(186003)(2906002)(7696005)(86362001)(4326008)(52116002)(6666004)(6486002)(66476007)(66574014)(26005)(66946007)(66556008)(33440700001)(16526019)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: a/zbgdRfl769uim8e47pd3oPgEyBbeqy5ORUUfBq/ii0wbpEpjn+l10uEQnm5iGVh7NLmVx8p4Xu3qa46B9w4hT7glSn7biGjPzJOWykQNsrUhruykqSD5sMPAKrA9qcgqWfC425glO92jYH70lEkKh+MDzs3KTK3qX2ROGRfJVrls2WyxtvxhfhIKYt7r+J4UDY3w2ada/nnKiruOOCVH64zMjkadKOtW0ugoTfaKeYZ7I6FjKiTpj/kVWUqOLtNVMqu/9rxFh6gzp2gmc/KaMafGY8HhFaYreedRGpJ9vYQ7J4vOnUSoTX85D/WwHPCZzfC1+bSTddQ1rBd5dFGzjGeAzt4AH6RAUU4CgznJfDaGDogwwOk4TZdzksPS0Ks0/BVTm7jf/Qn1qrDHKh5nUlqusPdr+d+cmExIfGILhASj3jlJXDB/WEmQjN0BrRwAFtMYNWWC86WnNGwb4u63RVWtsfw2mHrmBT1nvbnBE= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 358d58a5-fc04-4a41-2932-08d7f685cc67 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2020 15:04:41.8749 (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: S6/5EhbQQdSjxJWpNNMG2GkeBDtbDJgBkLEhvO8coMHI+OUCnIL6gxXUM7SPrVbb/4XpYvHgHyGg/qH1d8uztw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1741 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The 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 Tue May 12 15:04:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 215627 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, 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 57F0EC54E8E for ; Tue, 12 May 2020 15:06:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3142220673 for ; Tue, 12 May 2020 15:06:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="cYUiiCGA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730739AbgELPFE (ORCPT ); Tue, 12 May 2020 11:05:04 -0400 Received: from mail-eopbgr770072.outbound.protection.outlook.com ([40.107.77.72]:30085 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726168AbgELPFD (ORCPT ); Tue, 12 May 2020 11:05:03 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GomczdWaa9Vm5omdaMzMG2+kDjzdeS2CYvoCGZ7IeslIzZ06axF/nGmzGj7zMFrclaHZfe7ZV58+DNsH73c1AQIMDnI3yAbnh0HIunzDfFfJEY0HgcVZsrw4WK2bVx3TwdeV1+kn+WiW1/cIdVWdSPOdBPuTvOH8Y5ajKywiBGBDKUtmtj15V8SbQs8I6HRJ5LcxwQyZ90U8xpRQIEDl+G5figT62OY/bA+j72JVUaH1JLEV7pbzBXj1xFiX2cDEighCIvZ7YYl60GUH7PEuhxRWgjoNLR8E1kZnB6dowOoredNfcIN1dmDQc0yEKWjntayG6WVTn877rN58f6S/5Q== 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=SiHzjbQC60mvHdWcUniblOCWDW26H6c4CVNNPD0GgzatTiy1s+opHLwL/svboLeSTl1t2h0FH1CllfgSCvY9Jd2Q7TivmzNPoTdMVBHsdYzJ5mfmRcoZ/0vXSFce1p1DWTYA/FRB6eZ6gcZLWY4wlTMV+Zjpm2mrO/Ag4L2DP2f1BmyE1FGjxQbiHZEhpEaBiyO4BRDjEFhd9P6vOpUlAlMy1FM31Hw51NtiIJ0yZBO5v4zitoIHbzPf/2MtrsmjR8pYs8wjG8OoKlHklHW/LzpgdJANuC+mYsCIqnf3S3m+5xI2ar8SVSbhf4MjxK/0LDtholkak2/fU1UIwFg7oA== 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=cYUiiCGACVm/nuYkJOOWhvz36WtxZZ1gL351txwLVy3KfO4u4zi6cFc1CNERDfKWce6VskUq4aCldQQcfj0iRg6PT0ix56Rn5zlCzREH/SikafN0l+qVo9D9vcENZb6ivWwfcl4kzkk4S3/ShibP6aky3GF5gs3qQ8VCwGZCwHI= 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 MWHPR11MB1741.namprd11.prod.outlook.com (2603:10b6:300:10d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.34; Tue, 12 May 2020 15:04:48 +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; Tue, 12 May 2020 15:04:47 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH v2 09/17] staging: wfx: fix access to le32 attribute 'event_id' Date: Tue, 12 May 2020 17:04:06 +0200 Message-Id: <20200512150414.267198-10-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> References: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) 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 DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20 via Frontend Transport; Tue, 12 May 2020 15:04:46 +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: 5f5db97e-4558-4364-b9ee-08d7f685cfe1 X-MS-TrafficTypeDiagnostic: MWHPR11MB1741: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2331; X-Forefront-PRVS: 0401647B7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4unEOn39GUeZrOKCSF27EunVVe3wQhjUIZRI6Jt8c71CieyhEWCGnBLlAZ/F1gI+m4R5kca8vZplgUTGV6iqP3d/efNEji+XHlBIfg5tOBFPeJ8nAmIWeV1QYvTQcP5/cO4UFgWvDMTBCzT3dC2LJc80ECEX8zxsEqUizb1UFZyeWvbijZsFJDAaY/XgTlPNwStZYiZfJ8ehmXnv0EJnNWdBadWRWtAwljUbJbvXMCBkklvQ87A94RzdNZ7af1ZaLOyoWuV+HNWf8WRXXG8mCWZTf4UqXZSieluEBB2bepvvwKxV9d6MRW2YA8M+itHS9vjZqsqFnyDWQsq/wTJt7fVPrZw47A2zHigf7Ygk1e5h8CHyah1QVfAbg9uqtIKaaLCqPQs/dEcdVmsCav0f1tDoZT31VfjdD4Qv11SQyaVR0GL0QMPWoHAZ/4Bic3AhX5EVqxAW4Ou0FiUpnulPotHudoTTQ1MRLIiXtdd72g3Sr64BaeOJSctaGIfgP8hqqo2Q87F1XcZ1S95adyHt8Q== 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:(396003)(366004)(376002)(39860400002)(346002)(136003)(33430700001)(54906003)(107886003)(478600001)(8676002)(5660300002)(316002)(1076003)(956004)(8936002)(2616005)(186003)(2906002)(7696005)(86362001)(4326008)(52116002)(6666004)(6486002)(66476007)(66574014)(26005)(66946007)(66556008)(33440700001)(16526019)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 0H39U8S7l+1dWHoeghI2yyb6+2YzQzFRR7w/TvoAKVJm36RY0NIS1CVS6oglL+YPMBGJww815iBHyHFXYWu6KCpNWWhhdpsVTl3Gdo0498QRlqrsbAp17LYCCc/UYiADB3R7jFf9IDXffztdbhx4Rx26DR+YLkvjE6S/sgAq7yNOPMRFeKu/ZqoHvyMQIZy0AJbNpU9SxSd7BZAXOHlTMZ+4brIx4WxtXIHo+d0jmFVsaVKrMUqVwAo6/vu02DNr0hsu4XUdWP9U+ls6O93qkbIO936AORdviXs5Jx0Xx9AhqC+EYbex52FubHXCm5jzVoX4vfBtnv2aatT9yguDlx/LOkl2tfdw0b8LM4x8RBqgkV24+UGbG3SgPdgo3U6ENaP4dOV2cU/5S8FOhksQBmaqX1JBCOmvvGEg/oguLOKoFe9aNwZ+WRjBX3QAm69zs28gFAl4RCZ3EWt1aHCWShObgPKDHZ7nmfB3wPfDf98= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5f5db97e-4558-4364-b9ee-08d7f685cfe1 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2020 15:04:47.7583 (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: gpiRRffPWpFmh5hjo70BlBPz4Y6rOArdjC9A5TxsWGmeRm/1XaqjewWRDoaNU5ysR3c6I0/z0bXeMfv3MjduAA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1741 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The 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 Tue May 12 15:04:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 215631 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, 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 1AF9EC54E92 for ; Tue, 12 May 2020 15:05:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA9132078A for ; Tue, 12 May 2020 15:05: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="AEnYhqK4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730718AbgELPFE (ORCPT ); Tue, 12 May 2020 11:05:04 -0400 Received: from mail-eopbgr770070.outbound.protection.outlook.com ([40.107.77.70]:42722 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730672AbgELPFD (ORCPT ); Tue, 12 May 2020 11:05:03 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jovbiyyYnjX5sfVYc+dEr//WQIl+JDGIA4gRPGTlX3hBxxeuJmoCDSqMPue18S60CNPnFJEEyMm/1hTyfOkF/pbS3cjyv68sRevYREY9Wd9H3b6B/MB/HXDBMh9Tt70WPUahzNZi40eYLP05sOeX1yujOuGGYVT9GeWwRHM81Zgk7GMdnKfsuxywyGhU8hDoaTVy6oaaeE5TlAZgdZHCMkNDwUOJRS9pvXnRSGKg6nHmchCsO0HnY504IaofEXOKMlaEkFzQ5vJDmeGsYsljMyzV6CZd3j7kFMme+HsFTm0rUcZfA7u+4zsltRw1Npy0wCIAdOrZt2TXJeKpWDposg== 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=oI/DhH4fBt3A4e7oWC1BLu1KntnSyvisNHV7S63/qEtc+PZvdUGZFO6xAfovJcmlO2R31NoqvFlptbLemDJppAnFnQXQ2IUrR/zrk5xdEQ5rFt2BeUgIPQ1Qjm+80Sg36NQBuFtPVRM1qkgBwlCPdOXFSJSFxUHCU+S48voiuEtO33amXCtS/H6cz1J9nGVBSVSESkf0veNmN8pwvTsgRY6LwVgGLEw2+i9G+V30XpPvzNhJ61HFt4XcndQhdNDY2oUh3yD0NGF+DTZnYs0fae4/gGBFJ1EVMRpZBiHlvcOl1qd4SdTj7iQ5Vasxiz+cIgz8wwkRFl2AMmZZb7YHkw== 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=AEnYhqK4DBGRg/uTwYAfuNtRJxLeTXExhSzx89YPt6RauDmLVwC+5UKzllQRMmfgyXzBBwGsidqxAFjHMVPJnMqzVDFbiKgQzympzmypD7tkWcU2PgeCT0XIpH85R+Rk/qmOJVWR1AGPt5je43zFegbrG8/9f68QGidf8AAbU10= 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 MWHPR11MB1741.namprd11.prod.outlook.com (2603:10b6:300:10d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.34; Tue, 12 May 2020 15:04:50 +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; Tue, 12 May 2020 15:04:49 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH v2 10/17] staging: wfx: fix access to le32 attribute 'indication_type' Date: Tue, 12 May 2020 17:04:07 +0200 Message-Id: <20200512150414.267198-11-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> References: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) 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 DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20 via Frontend Transport; Tue, 12 May 2020 15:04:48 +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: 82900a7d-de16-4419-2c2b-08d7f685d119 X-MS-TrafficTypeDiagnostic: MWHPR11MB1741: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1850; X-Forefront-PRVS: 0401647B7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ykHRJvZi+fA41GeTeBJDXNuc/Aa55qljNtlGPKCfAjIWfpyihDrRa/9xaK6I7suWEn7pDFnlEIxsOP9OcaPsr5B50OcMQPPMj6Q6wlJ9bW1nYBIx0F0xgPcSTSfUtJiyxfPKuFK4LPd1wkAcUOI6BgyQKFNgS/QONiqjdwXV60yGOUwPw4DImkQ6sT4P2EYP9iNOPKNMtSZGjZhqXhPVMnBmyCN2Tui/NA1pVVDVGSlEsJ6ChOeFXkrGRQwP0AFkOtjzGZMzsPFUL9OPPEPfKoYX004rfhPCQN8s/hIFHfygpCxhGUQVJ/+ei0iVyqOwxAYVGRy69tAJbRtMAflIOksJrYDRK+qdiYyZ4570BQneWc4pPvjTmXyLUPhVJq4SGGkcTXvXOR3MBBX//8IxtbrVmL3xOd4DHoQJwWej1Qjm/Q15HyCK7CYnkNexRj/vu/oWwU+lZEP/heomhll3ewRhsDRQcHW6JRSWKrKE1RpKM3lyZO4xdm7Rex6zAZkBEZEv6D3npD4zVshD3DRuJg== 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:(396003)(366004)(376002)(39860400002)(346002)(136003)(33430700001)(54906003)(107886003)(478600001)(8676002)(5660300002)(316002)(1076003)(956004)(8936002)(2616005)(186003)(2906002)(7696005)(86362001)(4326008)(52116002)(6666004)(6486002)(66476007)(66574014)(26005)(66946007)(66556008)(33440700001)(16526019)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: P1hWNEBheIbnM4DdqREeXk8+XyWj911gwggpmE0k6HVf/8m5/FpqJ6UqMwUnB1+m9I4UhjZwz3D3lEnkEzOfVoPHMm8DKXZckVLXsg3Ud975MSKAlvtjv+UnFhSm/DBGMJDfj4pcP0992JHOdBGQx7VRrmAmIzV0gqnnBQReBLG3nDB3W3cHHEOBmT9Z7iHbf26iMmDDeycw68wQ8yZa9Yx/FIIZ5CyOqbkhp6IVZQ9ZXkcI4lKFeIqMobt1e6cHeEPwNGuxuCdjcyskkkfs8nNAlGJxZriXmJ7yI5TGNatsVv7YxOSe+w0kpdUIDD241bTdPa4vzgHfJOGH3rN/w16CaLAaahYjMkgtMs4wVg/le1/mvFg6KhN/aR2rH7lZ4LYTCYo/SCQS1QL8TOE5dyDqPiELOlMahyX2IbLIdcR3CNpip4MmtFUNQXNJZayIxjfltLzQQQxpYgCzBE+O6og2w//dmNMBV+mutKWbknE= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82900a7d-de16-4419-2c2b-08d7f685d119 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2020 15:04:49.8114 (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: f9RzM5UTtVWsTF2vJzOGXpMOmWDmH7R7Kq9Vi4FXKbbk74KmRhbpP+YJ3dVwfNkaO2ScoTN+R76JIRLmcPduAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1741 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The 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 Tue May 12 15:04:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 215629 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, 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 E3BF0C54E8D for ; Tue, 12 May 2020 15:05:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AFC59206F5 for ; Tue, 12 May 2020 15:05:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="psdtIU7E" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730899AbgELPFd (ORCPT ); Tue, 12 May 2020 11:05:33 -0400 Received: from mail-eopbgr770072.outbound.protection.outlook.com ([40.107.77.72]:30085 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730765AbgELPFK (ORCPT ); Tue, 12 May 2020 11:05:10 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AYNIuaRI51r454dFzUiRjW/9fcdBMvgxFYwF8C4MBJOXgLglzR78YdyCMl7TftWzqSyACQG45CLBS6RE1ZrDjvOgUKs2QS6WaIULSZli/VZzYfr3qXos1gwdbKcNUMDwg6u2mBjp/yHeU9qLYC9IIThv8nnYl/BdijupPI8yi8DSZw2Zn0Nq2PJW9grxblkQTrMPWuKIGIGGZ6QrTrWSDuSiQXrlX1T2coa/R/heB9oXHmDX2kJ0P5qEJX64HohOV9FKk5K90ErF0DhuASaVcfBrq6/UOMrQbaRGZ+nkQsJwi9ln/Nyf9obf9wSIjxAqFodagdjCZbov61x8DxkDYg== 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=0/SJiSfZy1QndJxgGImEhJVLxdKnpmd4Thu57aLvZ40=; b=Bf/gT3Qkff6Jb4ezF+OCdAmP2/Ksm6tGNpB0FqRD6/PqWv/wd6yfaUYZb29vCWzLRFYvYdB1Gr2jOSDQM/g6ICGSr+LoeNL6pQouIuFyjQ7FWQY/JgtuwgPMCTyhKsffJXohk1UmarZFWJxVvpVT6GIX0JAVkYqppU8XyNJ0Qw7rgeSx5Mv3gbl/ttn/kgxA7CL4dwyMhufDa/UJ6wD3eT/yJ1VvFs8jm1vG42fmsVFDZ5chIMOLTVU0VoQvlc3A2aAJDPCOpjDfV8pJHh3bWlo6i/kcL4F4w9cRYDk/oPyV7fj94AmF+Pr569fnG8i6X0VdUYNJ2Rh3PzZhoQUA7w== 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=0/SJiSfZy1QndJxgGImEhJVLxdKnpmd4Thu57aLvZ40=; b=psdtIU7EodxKQKhpGclF0SDy/s1ZJH7XoGZgkaNlOeNuXkjcSA4TdiiAhYV9pMor/Pk7w0O4tIs3eWxumkLuNimu5nt3CXubArwlfM4fEnlx5N4lDgpeevjrihGR0rjN2IhP8U1A/MceDG5l2LacRWmKzk3d6oiBL2kiekQ3UVU= 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 MWHPR11MB1741.namprd11.prod.outlook.com (2603:10b6:300:10d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.34; Tue, 12 May 2020 15:04:58 +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; Tue, 12 May 2020 15:04: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 v2 14/17] staging: wfx: fix endianness of the field 'status' Date: Tue, 12 May 2020 17:04:11 +0200 Message-Id: <20200512150414.267198-15-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> References: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) 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 DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20 via Frontend Transport; Tue, 12 May 2020 15:04:56 +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: 03ac6675-d66f-4e96-a397-08d7f685d5dd X-MS-TrafficTypeDiagnostic: MWHPR11MB1741: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:217; X-Forefront-PRVS: 0401647B7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: niAQaqnY72v+L36cKBb7K+U2DCmUKIXSc0qsku7U+N4n1aGMHXfJVUQBRn8LwtSXzvLC30KIGTCYoF+ZHzP7acKLV5pZi0kA5tDXoJuqqlhWm8hLHlK680NK+UT2OIMnZcHiF45NK0ZUXrVXblfBGUPJg1C+zaeM4ssexhQ6fCh78IkvNF6z/RC0n4pPz1CqMfrC0PpjC/Qfa1DE1APUAmnd2gqi2s5usrNN2KWlHJRGDft2AG5My5jdUlLI9l5nFkxy9cS3GCuM/S2f6bDexFrSaH70+meCSn6tObSyX7Ov3xf7sACFRvkjGo6igQqruutmkBFROemagEe15pa1Wb+JDHS0ERt9WC5AmWcT/wIV4bSIUXMqbO3I2sDEA2lLptDRz9kx1k1PChUqSXxhlSLN++5w7yX7tnMboGf5Yh863uNNJ1ezuDsdGwl7KalOygu0X6OtfhDHaM7t/I4SJSZTImS+kgogWLKP8g2meiGbIW9JLgd4+h7PcJbftijzlqfQM83ieya5hwn4zfh6Og== 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:(396003)(366004)(376002)(39860400002)(346002)(136003)(33430700001)(54906003)(107886003)(478600001)(8676002)(5660300002)(316002)(1076003)(956004)(8936002)(2616005)(186003)(2906002)(7696005)(86362001)(4326008)(52116002)(6666004)(6486002)(66476007)(66574014)(26005)(66946007)(66556008)(33440700001)(16526019)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: icsNB8wlLJ//Rvpk8EXARqs4MDczaiC+zfm4bCDe36ElYdkqu2JVW8X42q9ljo+q7jobghAmpQMBYMkPbTY7/kvfhwpgjMXpSfasMJbrLJxmCGZdHpzPU1onVZSvFTYiiH2uQkBV6B7twJ2A3q3eB2cBpELUznCU4QzhluoDYzrch8r33LTgmKLxkFcOJ6sURYKVopwcY13rgVznV2N01ItMh4kortS7sIXV9/TN5pbvz4e9QeMv0XXi96cbTTYud2gtryjEES8Uy5h6MEMNFsy0lOIHydWeqtqbVIBVfFluPvKuyNEW49gPq3Y7UTwKtg378044VO63MF/OlJjzuHB9RIQgzgi2QWHfHNn0FfnrGvgyTJJktgNGYzl3NFFaJLpDNbQabgzEzis/WRyzLumr710+dCBY81Igshyy5iICBViqKyXDQteh2x+bW1HgSI43LYnUSxtTwztqpeWH+Dd+pPFJPGISj1lJ9KKypgM= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03ac6675-d66f-4e96-a397-08d7f685d5dd X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2020 15:04:57.8468 (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: zgg68bYcwL5Zyaadnvw6UjUY1HXZTpXkoVMV0A/AmUc14MfLHacYLPnaVMQpalMjrxR3YQUNEJfxL5Mj5nKQrg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1741 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The field 'status' appears in most of structs returned by the hardware. This field is encoded as little endian. Sparse complains this field is not always correctly accessed: drivers/staging/wfx/data_rx.c:53:16: warning: restricted __le32 degrades to integer drivers/staging/wfx/data_rx.c:84:16: warning: restricted __le32 degrades to integer drivers/staging/wfx/data_tx.c:526:24: warning: restricted __le32 degrades to integer drivers/staging/wfx/data_tx.c:569:23: warning: restricted __le32 degrades to integer drivers/staging/wfx/hif_rx.c:128:33: warning: restricted __le32 degrades to integer drivers/staging/wfx/./traces.h:401:1: warning: restricted __le32 degrades to integer drivers/staging/wfx/./traces.h:401:1: warning: restricted __le32 degrades to integer In most of cases, this field is only compared with HIF_STATUS values. Finally, it is more convenient to solve the problem by defining the HIF_STATUS values directly in little endian. It is also the right time to make some clean up in the HIF_STATUS names. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_rx.c | 4 +-- drivers/staging/wfx/data_tx.c | 4 +-- drivers/staging/wfx/hif_api_cmd.h | 16 ------------ drivers/staging/wfx/hif_api_general.h | 36 ++++++++++++++++----------- drivers/staging/wfx/hif_rx.c | 2 +- drivers/staging/wfx/hif_tx.c | 4 +-- drivers/staging/wfx/main.c | 2 +- drivers/staging/wfx/traces.h | 2 +- 8 files changed, 30 insertions(+), 40 deletions(-) diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c index c3b3edae3420..0e959ebc38b5 100644 --- a/drivers/staging/wfx/data_rx.c +++ b/drivers/staging/wfx/data_rx.c @@ -49,7 +49,7 @@ static int wfx_drop_encrypt_data(struct wfx_dev *wdev, } /* Firmware strips ICV in case of MIC failure. */ - if (arg->status == HIF_STATUS_MICFAILURE) + if (arg->status == HIF_STATUS_RX_FAIL_MIC) icv_len = 0; if (skb->len < hdrlen + iv_len + icv_len) { @@ -79,7 +79,7 @@ void wfx_rx_cb(struct wfx_vif *wvif, ieee80211_is_beacon(frame->frame_control))) goto drop; - if (arg->status == HIF_STATUS_MICFAILURE) + if (arg->status == HIF_STATUS_RX_FAIL_MIC) hdr->flag |= RX_FLAG_MMIC_ERROR; else if (arg->status) goto drop; diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 014fa36c8f78..4a2910897b6f 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -528,7 +528,7 @@ void wfx_tx_confirm_cb(struct wfx_vif *wvif, const struct hif_cnf_tx *arg) if (rate->idx < 0) break; if (tx_count < rate->count && - arg->status == HIF_STATUS_RETRY_EXCEEDED && + arg->status == HIF_STATUS_TX_FAIL_RETRIES && arg->ack_failures) dev_dbg(wvif->wdev->dev, "all retries were not consumed: %d != %d\n", @@ -568,7 +568,7 @@ void wfx_tx_confirm_cb(struct wfx_vif *wvif, const struct hif_cnf_tx *arg) tx_info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED; else tx_info->flags |= IEEE80211_TX_STAT_ACK; - } else if (arg->status == HIF_REQUEUE) { + } else if (arg->status == HIF_STATUS_TX_FAIL_REQUEUE) { WARN(!arg->tx_result_flags.requeue, "incoherent status and result_flags"); if (tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) { diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index bb8c57291f74..d76722bff7ee 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -66,22 +66,6 @@ union hif_commands_ids { enum hif_indications_ids indication; }; -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 -}; - struct hif_reset_flags { u8 reset_stat:1; u8 reset_all_int:1; diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index 995752b9f168..f5abd8174706 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -67,21 +67,27 @@ enum hif_general_indications_ids { HIF_IND_ID_SL_EXCHANGE_PUB_KEYS = 0xe5 }; -enum hif_hi_status { - HI_STATUS_SUCCESS = 0x0000, - HI_STATUS_FAILURE = 0x0001, - HI_INVALID_PARAMETER = 0x0002, - HI_STATUS_GPIO_WARNING = 0x0003, - HI_ERROR_UNSUPPORTED_MSG_ID = 0x0004, - SL_MAC_KEY_STATUS_SUCCESS = 0x005A, - SL_MAC_KEY_STATUS_FAILED_KEY_ALREADY_BURNED = 0x006B, - SL_MAC_KEY_STATUS_FAILED_RAM_MODE_NOT_ALLOWED = 0x007C, - SL_MAC_KEY_STATUS_FAILED_UNKNOWN_MODE = 0x008D, - SL_PUB_KEY_EXCHANGE_STATUS_SUCCESS = 0x009E, - SL_PUB_KEY_EXCHANGE_STATUS_FAILED = 0x00AF, - PREVENT_ROLLBACK_CNF_SUCCESS = 0x1234, - PREVENT_ROLLBACK_CNF_WRONG_MAGIC_WORD = 0x1256 -}; +#define HIF_STATUS_SUCCESS (cpu_to_le32(0x0000)) +#define HIF_STATUS_FAIL (cpu_to_le32(0x0001)) +#define HIF_STATUS_INVALID_PARAMETER (cpu_to_le32(0x0002)) +#define HIF_STATUS_WARNING (cpu_to_le32(0x0003)) +#define HIF_STATUS_UNKNOWN_REQUEST (cpu_to_le32(0x0004)) +#define HIF_STATUS_RX_FAIL_DECRYPT (cpu_to_le32(0x0010)) +#define HIF_STATUS_RX_FAIL_MIC (cpu_to_le32(0x0011)) +#define HIF_STATUS_RX_FAIL_NO_KEY (cpu_to_le32(0x0012)) +#define HIF_STATUS_TX_FAIL_RETRIES (cpu_to_le32(0x0013)) +#define HIF_STATUS_TX_FAIL_TIMEOUT (cpu_to_le32(0x0014)) +#define HIF_STATUS_TX_FAIL_REQUEUE (cpu_to_le32(0x0015)) +#define HIF_STATUS_REFUSED (cpu_to_le32(0x0016)) +#define HIF_STATUS_BUSY (cpu_to_le32(0x0017)) +#define HIF_STATUS_SLK_SET_KEY_SUCCESS (cpu_to_le32(0x005A)) +#define HIF_STATUS_SLK_SET_KEY_ALREADY_BURNED (cpu_to_le32(0x006B)) +#define HIF_STATUS_SLK_SET_KEY_DISALLOWED_MODE (cpu_to_le32(0x007C)) +#define HIF_STATUS_SLK_SET_KEY_UNKNOWN_MODE (cpu_to_le32(0x008D)) +#define HIF_STATUS_SLK_NEGO_SUCCESS (cpu_to_le32(0x009E)) +#define HIF_STATUS_SLK_NEGO_FAILED (cpu_to_le32(0x00AF)) +#define HIF_STATUS_ROLLBACK_SUCCESS (cpu_to_le32(0x1234)) +#define HIF_STATUS_ROLLBACK_FAIL (cpu_to_le32(0x1256)) enum hif_api_rate_index { API_RATE_INDEX_B_1MBPS = 0, diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 36132909a6ae..88466063cc42 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -127,7 +127,7 @@ static int hif_keys_indication(struct wfx_dev *wdev, u8 pubkey[API_NCP_PUB_KEY_SIZE]; // SL_PUB_KEY_EXCHANGE_STATUS_SUCCESS is used by legacy secure link - if (body->status && body->status != SL_PUB_KEY_EXCHANGE_STATUS_SUCCESS) + if (body->status && body->status != HIF_STATUS_SLK_NEGO_SUCCESS) dev_warn(wdev->dev, "secure link negociation error\n"); memcpy(pubkey, body->ncp_pub_key, sizeof(pubkey)); memreverse(pubkey, sizeof(pubkey)); diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 490a9de54faf..bb776ee6689c 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -511,7 +511,7 @@ int hif_sl_send_pub_keys(struct wfx_dev *wdev, ret = wfx_cmd_send(wdev, hif, NULL, 0, false); kfree(hif); // Compatibility with legacy secure link - if (ret == SL_PUB_KEY_EXCHANGE_STATUS_SUCCESS) + if (ret == le32_to_cpu(HIF_STATUS_SLK_NEGO_SUCCESS)) ret = 0; return ret; } @@ -542,7 +542,7 @@ int hif_sl_set_mac_key(struct wfx_dev *wdev, const u8 *slk_key, int destination) ret = wfx_cmd_send(wdev, hif, NULL, 0, false); kfree(hif); // Compatibility with legacy secure link - if (ret == SL_MAC_KEY_STATUS_SUCCESS) + if (ret == le32_to_cpu(HIF_STATUS_SLK_SET_KEY_SUCCESS)) ret = 0; return ret; } diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 25d70ebe9933..d4e69c663f5a 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -229,7 +229,7 @@ int wfx_send_pds(struct wfx_dev *wdev, u8 *buf, size_t len) buf[i] = '}'; ret = hif_configuration(wdev, buf + start, i - start + 1); - if (ret == HIF_STATUS_FAILURE) { + if (ret > 0) { dev_err(wdev->dev, "PDS bytes %d to %d: invalid data (unsupported options?)\n", start, i); return -EINVAL; } diff --git a/drivers/staging/wfx/traces.h b/drivers/staging/wfx/traces.h index 7298fb948f56..c10ac92b8eb3 100644 --- a/drivers/staging/wfx/traces.h +++ b/drivers/staging/wfx/traces.h @@ -414,7 +414,7 @@ TRACE_EVENT(tx_stats, __entry->flags |= 0x10; if (tx_cnf->status) __entry->flags |= 0x20; - if (tx_cnf->status == HIF_REQUEUE) + if (tx_cnf->status == HIF_STATUS_TX_FAIL_REQUEUE) __entry->flags |= 0x40; ), TP_printk("packet ID: %08x, rate policy: %s %d|%d %d|%d %d|%d %d|%d -> %d attempt, Delays media/queue/total: %4dus/%4dus/%4dus", From patchwork Tue May 12 15:04:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 215628 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, 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 49361C54E4A for ; Tue, 12 May 2020 15:05:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 22B6720673 for ; Tue, 12 May 2020 15:05:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="OXSel2DH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730947AbgELPFs (ORCPT ); Tue, 12 May 2020 11:05:48 -0400 Received: from mail-eopbgr770072.outbound.protection.outlook.com ([40.107.77.72]:30085 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730810AbgELPFr (ORCPT ); Tue, 12 May 2020 11:05:47 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BfPrq+eyU8R3NwI0g9r+qXB1z9ks087Moh7kZJZgoyChlHj4102ofG0s5QQxB6SE0+EkANgmO6BfvwI8yu39GJkHszMWQzYJ/xvlorMf1ZjpU4vq06/KzQXQn92f+Anr7igjTEVidMIraBIRemxoNqnheS4VpRTRvwVjjp8meNUdkAE4h9U4/ooK37zOgHErAWSHtN+3dAd7JZ7ppsxnfUBijvX+qzyn/oKcqD06OG48U4nKd7tjpuKNLxzPWnJHvpSVtDSnG9pG+TcvEkwn004iovQG56cnHUsbPVRTPCgvPr3Jw7JBoJ4MHLlY20Jg32XShQe+o80NnSzURxz4Yg== 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=gvk01yBSZvjjbUeqrdSRgg3+2379A0GJFL5pDAE7ps8=; b=lZ9zgKS/sRUJEb1sUwWonV1NosmUYepX1uU6GQk+qaj12esTI4PqU7CFb+hTgU56FLe7JR2HuCwcWhRZmZ6hsZbFeTVBGd44HdBxqYGIhTlAu7E4YudWCcuE2jYrJL+PGOqFWAGHIItZLmSY6cXl9DMhxpYBcqJPzcM6ZrfZl3SMsJzjGjs47xE51salxygpD9uiXTJqzyiT0vO45v0QhlSG8a5hIpC3PH9loSN/ltLZpJ5Yx4nWq1OU/Q/m0PIGAX8VnQGv2DcTbJjPNeY14a+LTt9Kb66xkZ/Iefk/u3SsVcxiu1xu9W/N7SijByGL+6lRoZmjov622FKvXZaVxA== 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=gvk01yBSZvjjbUeqrdSRgg3+2379A0GJFL5pDAE7ps8=; b=OXSel2DH6OA2MSSwXgLOZWasiFJ3p4b2NcP+K7p9eiQpUten9He6sEE0o0pEArU9FyPtG8oITusrUwDq/UbfYsY3qh5i1wZFfyxbIXFq4FszVvuxyejLSeYky8fIfJtJRnb+2T+xmzwQHNZJ20o90nKmxjYDwr8nqDGkGzn+LvE= 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 MWHPR11MB1741.namprd11.prod.outlook.com (2603:10b6:300:10d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.34; Tue, 12 May 2020 15:05:03 +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; Tue, 12 May 2020 15:05: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 v2 16/17] staging: wfx: fix endianness of the field 'channel_number' Date: Tue, 12 May 2020 17:04:13 +0200 Message-Id: <20200512150414.267198-17-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> References: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) 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 DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20 via Frontend Transport; Tue, 12 May 2020 15:05:00 +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: 32b6b1da-8318-4daf-3e06-08d7f685d853 X-MS-TrafficTypeDiagnostic: MWHPR11MB1741: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 0401647B7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nmEXj89pX0n9IlkNThvMbcaEASELwm2qDy6wRpcHclC93Eg0q/7slIt7OrlGidMQ1XZSrcyCKTYxs8BVnQSKlt/WPi9rdiFaATY3MXNhNd+McjtU8dIOwW2WKajQ/+lbOIf0E11zSHcYXOaUmPTCVX0MCbxMYEpm/d4GU2j8h4Mc95EP8a6dhxKZ3cOP8xmYhEOSD3nPGo2IPAxVYhLVgnAqOcUj4ljlxah1qMGxG2LUZnyYxjTnPr9WiXtyPhWUBT4/fGBpQt8XL2M4+Mp9D+FBV0fR0O6n+Nb8Ke00qpYIDOjn1kYfFSQMLnGEhZHNqUo+iRcwNjwMGzoamuuAa/RuxUxCH2eW/AE9Bi2p4NJTQFZo07LSOw0nQOUrrVeT1prDc9y0ISpQxcQBIGiakghpRDbRcQRz9oFGQuzRGiCW+hvljrgNHJFXfnhF4k5Tz2Lbo7pD00eTwOkmS/RLhZkSwUgXbAf5RL4R3ILu98rNg5d20oHboWzDmTaUoIYDyddzT1UHGyGjiSEoo0oq3Q== 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:(396003)(366004)(376002)(39860400002)(346002)(136003)(33430700001)(54906003)(107886003)(478600001)(8676002)(5660300002)(316002)(1076003)(956004)(8936002)(2616005)(186003)(2906002)(7696005)(86362001)(4326008)(52116002)(6666004)(6486002)(66476007)(66574014)(26005)(66946007)(66556008)(33440700001)(16526019)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: h7Q7Q8a1sbzT+RGaIDJpFtl8GFD2KAg9xKDIOlHByWEcktPFuCA+z8+Ab2gXutpcLAAhNCoMHEhw4Gm0HPlgTbOlzvxIywWfwhoOVP8libpy7XE/99ni4Y4mf0ehG1xcSH17eENqEWEGcvb0QlRHhjkE9wRdRg7TYWETLICjNq9pcZM8WkZSLZ4p3qtB8EifxhiDCeAppUvr29NQujn+jLGYkcCh1GYWcUrzNO94utNGHzp+Tvnwy/qW2cr6YlXZNnP0LQs0cyyF5I1gVRKSrb1kTZHeAzW16ujI+JORyT4v6g4Up6LwzOrnRIrjAhPk6CgkfDNr2e0IM8j3dpI3s1C6RWgulbWNyLLlll5bD04AXh5nC2inx0uJZeAg1Iyn6DuESSszSmqfNCiryv6ZOwLYnd5xAMJ6DDdApgjsOMlGWyC/1w/v0tGGpT2h5NY0+NABZIa2trc2WPccV/eCzvvVqQmYOmOUtU+tzb1cke8= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 32b6b1da-8318-4daf-3e06-08d7f685d853 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2020 15:05:01.9410 (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: 6B7DrXQSeR1pV7ca6Jl1roBs//5+P2kJQfoQMcPWOoGN7h6Fib7g5JeI48H07U8IRYne5mSkKJ50AEcvw0PCxw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1741 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The field 'channel_number' from the structs hif_ind_rx and hif_req_start is a __le32. Sparse complains this field is not always correctly accessed: drivers/staging/wfx/data_rx.c:95:55: warning: incorrect type in argument 1 (different base types) drivers/staging/wfx/data_rx.c:95:55: expected int chan drivers/staging/wfx/data_rx.c:95:55: got restricted __le16 const [usertype] channel_number However, the value of channel_number cannot be greater than 14 (this device only support 2.4Ghz band). 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/hif_api_cmd.h | 15 +++++++++------ drivers/staging/wfx/hif_tx.c | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 8c48477e8797..21cde19cff75 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -321,7 +321,8 @@ struct hif_rx_flags { struct hif_ind_rx { __le32 status; - __le16 channel_number; + u8 channel_number; + u8 reserved; u8 rxed_rate; u8 rcpi_rssi; struct hif_rx_flags rx_flags; @@ -356,7 +357,8 @@ struct hif_req_join { u8 infrastructure_bss_mode:1; u8 reserved1:7; u8 band; - __le16 channel_number; + u8 channel_number; + u8 reserved; u8 bssid[ETH_ALEN]; __le16 atim_window; u8 short_preamble:1; @@ -421,13 +423,14 @@ struct hif_ind_set_pm_mode_cmpl { struct hif_req_start { u8 mode; u8 band; - __le16 channel_number; - __le32 reserved1; + u8 channel_number; + u8 reserved1; + __le32 reserved2; __le32 beacon_interval; u8 dtim_period; u8 short_preamble:1; - u8 reserved2:7; - u8 reserved3; + u8 reserved3:7; + u8 reserved4; u8 ssid_length; u8 ssid[HIF_API_SSID_SIZE]; __le32 basic_rate_set; diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index bb776ee6689c..7f459719e7b4 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -309,7 +309,7 @@ int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, body->probe_for_join = 0; else body->probe_for_join = 1; - body->channel_number = cpu_to_le16(channel->hw_value); + body->channel_number = channel->hw_value; body->beacon_interval = cpu_to_le32(conf->beacon_int); body->basic_rate_set = cpu_to_le32(wfx_rate_mask_to_hw(wvif->wdev, conf->basic_rates)); @@ -435,7 +435,7 @@ int hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, WARN_ON(!conf->beacon_int); body->dtim_period = conf->dtim_period; body->short_preamble = conf->use_short_preamble; - body->channel_number = cpu_to_le16(channel->hw_value); + body->channel_number = channel->hw_value; body->beacon_interval = cpu_to_le32(conf->beacon_int); body->basic_rate_set = cpu_to_le32(wfx_rate_mask_to_hw(wvif->wdev, conf->basic_rates)); From patchwork Tue May 12 15:04: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: 215630 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, 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 D5C04C54E8D for ; Tue, 12 May 2020 15:05:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A953220673 for ; Tue, 12 May 2020 15:05:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="XaU2FYpw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730848AbgELPFR (ORCPT ); Tue, 12 May 2020 11:05:17 -0400 Received: from mail-eopbgr770070.outbound.protection.outlook.com ([40.107.77.70]:42722 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730823AbgELPFO (ORCPT ); Tue, 12 May 2020 11:05:14 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IsxvJOcYA2Gsg2ge+rqKmIGfRYl2DqguNh+QVPg0tjyadq/5c/+JJoEtyqHQEdJgu6mQQTBAJPEPEtMKO29b7VT8ajQ41NDBlJNCgN9gL0CLcqhfuLvhahnDiYG/VMd1X23nOspHxi/rysIYE3mM3gfabpiyDQ/5siKjtH9Oy1hTNJ7q9vQmMSKKP/UT+EwQUWHWLVmuLduLb6C1MWP/FVK/UCiPXPBxMoGG5WbF6XnMcrzVMsePzmA2Inpc/2EOo2NM0xQzQuvonK7mtKtRAjGN7EGlDfikghX/AAPa094PA/i0SwmZNSev6MduA/lAXqILDSxffE7bMGZd9xWXTA== 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=SpMM8alvGmeAUxFHJvumn0bgCmx2i/b0YpDFKiFqHIYy9+Gvj/QhajQBxC8yHBjH94DrqRYtqOJhrPO/bWhUU2WlsS6N7H+B7JdXzahSl3kLN1cgZkitCzpRm85RGeF5R5m7vkTAXpBIB+HNQcMnsz72CjhrVcUsYtWy/dB+eGZw9iv7zBsnNY/A6aO9TVkPW2S1Hz0sYhl39+DSoD7ebfed+ELDE7zZ7wg3DZM/4wwoHG+7HzkK7pWHHeYhCUB0Xy82knycAOfmqRv/2F45kONdpVlow6ypmQwEXQWiX+cf38oNOQp0WDJavCmV4LLxYnGcv9SddoLifkUALOLt2Q== 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=XaU2FYpwLu4RS/DNvqNf6ktv9KfmAUH/DjTC/SuvsYt27d9yexEzUmBC0Fys6ow35GdUTOx3Y/9JOIychrAFjq5vp714T51ADj4+9CXrJseG5nwjXt0AK/4UZCHkSa7OgsQHAkdAT54BaemMaxDFLp/2p07VNEAviwcVEWsG760= 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 MWHPR11MB1741.namprd11.prod.outlook.com (2603:10b6:300:10d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.34; Tue, 12 May 2020 15:05: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; Tue, 12 May 2020 15:05:04 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH v2 17/17] staging: wfx: update TODO Date: Tue, 12 May 2020 17:04:14 +0200 Message-Id: <20200512150414.267198-18-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> References: <20200512150414.267198-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) 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 DM5PR1101CA0003.namprd11.prod.outlook.com (2603:10b6:4:4c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20 via Frontend Transport; Tue, 12 May 2020 15:05:02 +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: ee5b2f05-2bb8-455d-f11f-08d7f685d990 X-MS-TrafficTypeDiagnostic: MWHPR11MB1741: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 0401647B7F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LI0s+fQVIve+mQxUdw4WVpbowfP157vTPR1MWKIC29vAAgsAqc5ecLnvzLT/02T43MUWtvCCXLZiYniPZDLSVjF0qhNnvWsv8JEMyqlm8mnygnvYoCQSI2sMFPLs85GlYVxtsR3O3Smd3MmhnVI/+mmTTaW/fzcnV850xr0c7efJIBm8fzTo7CCE+UoxlF57QNHBCKdhetTnqI5B52DUEaILsnJ3hfV60Oai58Mwjwqcwevi+QV585J99+Tr/fJxVXydXqZBrRD+yY9Z4JxLiKMUcq+f8YSVFFgXJ0rC56RlOhqhurBiGnFDiASQ71zO+YpaLm2FyMaX6vFKqfIXOQz47+rixSlahUo3wGvxPQ7Av2hE8x9zQQgJzDm/STe+EPhofFixskT3+xLS+WVM+tJCC02uhy0GIMQKlU3iLg9wJA2ovCjAxscB7tFzEjm3sf39QsWL6craMHirIH8Z4LqKm4jp+VSYKriB4fp7j6zzs+SRxGNKjCsceaa0Mx5cMbrZtozEqLEqGy6dYlCHNnfoEBEBHYDN/uTOGPOcEf+BVkd0LH1Om4N9RxCKmPS+z51do72N04fhXPmt09erTSHB8qzfPXzpY8cJPLw36qU= 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:(396003)(366004)(376002)(39860400002)(346002)(136003)(33430700001)(54906003)(107886003)(478600001)(8676002)(5660300002)(966005)(316002)(1076003)(956004)(8936002)(2616005)(186003)(2906002)(7696005)(86362001)(15650500001)(4326008)(52116002)(6666004)(6486002)(66476007)(66574014)(26005)(66946007)(66556008)(33440700001)(16526019)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: R7A3UtH8QDH47mIQWxQrqTHNXrp6S8UTmh7rIwtKbkoNMGSV+yE4gnQ9+cOOPXkg1C/cEOiIQcqgzvSBH20E2eC5v39JnsEFUxfASJG1+OY9HJNKN49HmcYy1qWRsVVip38qfOQ1nOOxx3LnpYAwlkeWwpRSmjpYOj6hpgQwuyPFOPX4viiXc5n37GvNApD6qoTu4IhKWOxyJG87utmZyLwYkWvXBOnXUKIvSYyCqXgNBq3xtKo+eHisLacHgeMDYGLTX2bl+hNTO3YoB5KD6CpcWVerT2CEnez080MMujAmOuTYRL06OuaCJ+r8sZCzgrDoAFE7iKZAktuDOfL0G7TTg3bMb8qk2WWhwsNaO31ucUTj9Pi5Vsf8bS36fACpDMoSiC0a+k5IRWkhCmyn87wdwcyhelTIFz9NXS13HWbWyx5R+PIgsZDbbJnHNfXKTavv/gApSBtsElSSIOv1oncAlmvdLuyafaendVgajc8= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee5b2f05-2bb8-455d-f11f-08d7f685d990 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2020 15:05:03.9621 (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: 6BDFjX5ZkBTsSLyEtviN5ZaqDJvC//nZJKDWaSE4aECQbvJTjlR/+1/S5txgHNtRjEojg4AQu8aqarU/6l2CoA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1741 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@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.