From patchwork Mon Sep 13 13:02:01 2021 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: 511485 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=-21.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, MSGID_FROM_MTA_HEADER, 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 77BBCC433F5 for ; Mon, 13 Sep 2021 13:05:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 612A96101B for ; Mon, 13 Sep 2021 13:05:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240308AbhIMNGb (ORCPT ); Mon, 13 Sep 2021 09:06:31 -0400 Received: from mail-dm6nam10on2073.outbound.protection.outlook.com ([40.107.93.73]:38187 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239407AbhIMNFe (ORCPT ); Mon, 13 Sep 2021 09:05:34 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kjg/uT50Iuat96GPpHZOSvIbScmksuZ5Dif5nWZU1VUOrAdPhuJednKzghBvNwXYP5NcWXPMl1P9/8uh44jmJyDUXC43dV/cFS/9YLtYtQZ9wg3r07Hm/S8FsyZZ0eboE4cTAo6vihwPZWSh5tDjXJR6uDKXix5jy6H1Dsx+FCHiyif9rBW7msy7yx0tEDQ/adeEuxe/l8CYFlbRSIlfJmu3xdW7YV0HCl9YMFSN153zLIXjhu/YV8apBPJZgqZIkh/jeKmED7HebLmqfH9TASosi8YoA04kCdCtWzQ8PSbmhPGUj4TqqCkSmI8JPMfzYzurQDiFydBcfcalaP1vUA== 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; bh=E/S/HshNlV98QsA4x8RNmUx1uBUgniC0pQCXSc86G7U=; b=M82md4Bs0P4RAa7kz6+1d/31plZ3waTPYPQljM0t+s9lsLRkJiEEeJCTyeiipu+OtPoKFVSvWmM4LmEfy76rAHn7q+2Ej67pb+d9gBo4Tp4yQpem8O17j1sR4vnC7lZPasSwOywo48ih1lq5J1fHNA3lSw07kk9/LBg1Uxuhn2bBvYr2QkS+odnsP0PagNsH5qGbs/8emB9t/URo2Qsuu7NfQfDIyGjSnt5LvFFB8qbDwsBmf/QJaOZfYALboRoU67tiGXrfHpL75FSOLeC9xyr6nLLwLPKl45JBVKEYSzPHlTZnloWE+LTp31sk217bi0KM4hUmI3AZS430TkuLDg== 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=E/S/HshNlV98QsA4x8RNmUx1uBUgniC0pQCXSc86G7U=; b=cISOXSPgOfSVQOmYnRFYCBJoasJ67orPOVzwx7s5dGlaBbM7Pa+lZj3U8FtYYmeDS29dBVB0xMJ+3wzSMkfikk9GgKcpbsIiCq1ShyCGSOLrGJ0Z7LnbEoxdwUqpq1scIRWwo/ejyTxy+cbALrrKCIHAw6Uxpx0aqcx77xNqBZM= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB3502.namprd11.prod.outlook.com (2603:10b6:805:da::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:03:14 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:03:14 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH v3 30/32] staging: wfx: explain the purpose of wfx_send_pds() Date: Mon, 13 Sep 2021 15:02:01 +0200 Message-Id: <20210913130203.1903622-31-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:03:12 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 89ce0699-15fd-4f1f-ebc0-08d976b6d877 X-MS-TrafficTypeDiagnostic: SN6PR11MB3502: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sehRm7WLFrPUDhR9iSH6tDX9ks9+sKnih/yrhPOtYZN1WUg+rr3roNmABc580anyk3lgZ0hSPzbxk6MrYfnV8DT+kz2NvNMRUIyffAMnnzRpW0CNCjbjyAlNYWqCAKPEBOCMPUAaFmjc2E2d9x350TQphAwq18x/QYr0sZoFCsJ9YpPe8HhNkR9pngCK8LCnJNH2652WPsAatUeBFvBErQ8H6tAAZdpxuIrUh5Mh4qVnoaQI7Kt9xVLLhrPAwsB0HLeTd607H4bAHBC0V3LgkNOJ7zT0RIs13tWP614c+UUKugPmUzwCRTm7l1oGhAmMJIjZz2x1zFSnGXkwEcu01I5SLOPZTbMGS6blX2rChabRGKi2Gw5Hfru6FGIF9II+Eoj6g/ChsRttj8elymHebRPUbaCK57qr6Ios9m1GSgRW/DSS1+wMqIS5A1/CDX0xOpx0bnY8lv/xNdIgifTlPbFnrS1RNi0DzAV/YJk/406eGTbFT3lqyFAKEZvdpYOkwLo3L9bqFb3fXuEQ1nbItsAqVfClBUcpL9RE/dinLhCqkWVqwmJKsCIh5sz8Pa5gzzFXyVwa1XiMXP03wPNnIaQZjjkXOR1WI7yebGXkuT5sM8X5Do88kzN4oaUvDkqzKXhsGKix/xzLwO50EUCQMhWCRZqJEb1gvvhCyGbVhy3us9OyYFRzsqE7qTs3ciBIhdl7l4Fn90KQz6nsRzETdA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39850400004)(136003)(396003)(376002)(346002)(366004)(6666004)(316002)(66476007)(8676002)(186003)(7696005)(52116002)(66946007)(26005)(4326008)(66556008)(2906002)(54906003)(107886003)(6486002)(2616005)(478600001)(1076003)(36756003)(5660300002)(66574015)(956004)(8936002)(86362001)(38100700002)(38350700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?FoCec8lJM0fcbWOPha1Vj+K5i?= =?utf-8?q?z6Ds6tnyf1lFDaD2tO8J9LmUheGkIJzb79Id2YpClROXQ2jfCk19M9tg?= =?utf-8?q?sw5Q3/ZCHiLb3d2He+fX7S1OxxX8MdvY71eB7OsMQuPa95ojUlbr0y4S?= =?utf-8?q?M/N/IgWRXlQBXdE6F0drK6XQ0FkK+ff/hStGkx9cadZ6v7kgc0usHuLq?= =?utf-8?q?9asV1NcwguK3SMZ/dQ00TAI2hW7GjK07lV3GByvKySE9sTUpBaHjf9od?= =?utf-8?q?0OIji3aVlksll+FdxzZAHlWI8r2rdHcWFfePWB6Ol5F1Z4Jj6z6C2x3f?= =?utf-8?q?dccGstTWTYGhlRQos04a5zFOUcHlEZ8/V1MEON41YCUaMp5z2AQ+Svdt?= =?utf-8?q?WMMFjegoJRRL2yYULjjsM302NxX76lfCo7LkOVApo13ErhcKgF9KRory?= =?utf-8?q?HhvABfwVAl+lRAcWorWu70Dd26xvNHi7eNq2H8DbnuECHdO94WbHRQ4x?= =?utf-8?q?dYitdSFsN4pzQpuZSw2OTDuAmEXdG2nBHik9S4cxJS0OLwZm5PlHZeFK?= =?utf-8?q?7CzAz9fIhqUdOJtdwGjngVt382MaTKHGpUqlpclxqMNTvJIHaRUznxqA?= =?utf-8?q?lS9UAX7ukUWK2RpDZVNRDw4bwT+hz+AVgnhcnNRpUBK1KB+Z/J8uIFeC?= =?utf-8?q?Xr5QTuTPD0b8CyACQicqE8ViULcFddiV7ULdndFBTfqBUAPsB+2JCbPL?= =?utf-8?q?R4V3/bt+p2mQ5GZzGyOvFtqB8WwEHCrDH+Sbd2A90m8GGFhB3NM+WxNe?= =?utf-8?q?kxSQL10OubHL261/0tJKYhVSY4FAX5Men6RMy2l1oQluf+wKENF+vXQS?= =?utf-8?q?IH+bCDHO5U0wrR+nv6b3wmpSf3ySZ+QyZRnHIpQ9TRuDaWgdxwEQa3Qv?= =?utf-8?q?4YE7SCxuOlUQnt5dqW2irNnnBpA/YKQ7vAEoVqoTZ6gvtEwG/GBd0h1O?= =?utf-8?q?wl4MsR1eE72VUWCcmIqQuGDYt8gNRQ6mFnd0aLHZMowRZ0d8eUYhnxqx?= =?utf-8?q?nsWmU8jmTG6WUXcIa2z9U1By01GgqKvumpQ98bTkVyprRzTUYDNZglGs?= =?utf-8?q?WbgLdu2fNn7vX7CO2kHdz8xxU4PUhh82zrz4Xyx1vUDw07NmbVClDtDf?= =?utf-8?q?gEXTT98Ir/pVU2sIVXjBDNhG7CwfjN5LSzEcoP/WxYkak/H9gt7C1ItB?= =?utf-8?q?GDuqkX5RIcvOA5afSmqFMHFEFCH3c+OSp3W1Dc2ry59xZOeR9Nni9U4N?= =?utf-8?q?8S68vo5LzarhiiekKFzG2/fIt+yxWho6AfpTsgzSDpS5HAzkbn9IW70m?= =?utf-8?q?Wtsqy5X/qHitL4UDcmu8iKOsNafxCGyJse8qB1JPJJJkkS9FO9Ij8mbk?= =?utf-8?q?XRky/3ecvFzpt8K6oGSByMdU8D619zh?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 89ce0699-15fd-4f1f-ebc0-08d976b6d877 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:03:13.8698 (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: 9F6XgrK+zMixYTf5KR+4yGvipRLv700n8KZWx2TnufZIfFiY6WB5Eud3yfOx24//CLSgTIGQob+PTBViwAtrHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3502 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller On first look, the goal of wfx_send_pds() is not obvious. A small explanation is welcomed. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index e5e852ddf9c3..858d778cc589 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -163,7 +163,20 @@ bool wfx_api_older_than(struct wfx_dev *wdev, int major, int minor) return false; } -/* NOTE: wfx_send_pds() destroy buf */ +/* The device needs data about the antenna configuration. This information in + * provided by PDS (Platform Data Set, this is the wording used in WF200 + * documentation) files. For hardware integrators, the full process to create + * PDS files is described here: + * https:github.com/SiliconLabs/wfx-firmware/blob/master/PDS/README.md + * + * So this function aims to send PDS to the device. However, the PDS file is + * often bigger than Rx buffers of the chip, so it has to be sent in multiple + * parts. + * + * In add, the PDS data cannot be split anywhere. The PDS files contains tree + * structures. Braces are used to enter/leave a level of the tree (in a JSON + * fashion). PDS files can only been split between root nodes. + */ int wfx_send_pds(struct wfx_dev *wdev, u8 *buf, size_t len) { int ret;