From patchwork Fri Sep 10 16:05:03 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: 509044 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, 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 D92E8C433FE for ; Fri, 10 Sep 2021 16:08:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C5A5B611F2 for ; Fri, 10 Sep 2021 16:08:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233363AbhIJQJW (ORCPT ); Fri, 10 Sep 2021 12:09:22 -0400 Received: from mail-dm6nam11on2085.outbound.protection.outlook.com ([40.107.223.85]:5600 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231389AbhIJQIV (ORCPT ); Fri, 10 Sep 2021 12:08:21 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nbTQ8UdV5bYKJANB+ZTpyUrqusP3AQSdqoHa1Sl0k8DlNlyrhODKNvn4adYp889LdybV97on3H6WQ52Niv/BP14YMQ47ZFt9lX3G+Z8Jt7qJpyYSEhAOYm9FwOW6Yf56ThsBijGEnGG4c1KLwKYOUY+pnr2VmHqNBgEs+BQM+6eA/1Zhh6OsTzbnuRWED341fGzSpVAManhjie2FZNdomn1iDV1iUwxT3Kwdcp/NW+97ns3VydkdeWEpSIyQus7PBN3pNi2Z8Ee2ZoFKS9i6qZeCi0oYT/wYyT3asNLT9BIccMpIiCmG+ETHgjVSyO6Y97M77Fk+sTreqh0vGIE6sA== 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=xsUUtMkFWtWrY3otxSBJQqe+VKNKELAgz0g8V67SD4c=; b=NNchf6pc76pAtdlcr14a303E4YMwHvS9p1f2ZdGyGomceQk9bind3703nR0fzMi9Ail27d3kp2dKsYT9CiRJCf4ApnYxGj282kjgCtwHLgBt+wSws+o63wY59Qf2nPilvhXvIKN1tMnpbKBpBeBCfmk8gF3mcBExc4pgDfXDjtBUbGSZcqFCjcoD+J+ocw7o5HjFgdLCBmmxuPwdneAALN5DXvnjvRnlyMlYb/KjGbHCZlRkqPymna77ThRMQDOHI2HNf5IX/lT5Loit7fSInIjmLqEm8rvcKUD+ewJEcYSYeXDoo3c7sesjkw1dIWO0VklZjoMGIcxUyMzHLNIriw== 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=xsUUtMkFWtWrY3otxSBJQqe+VKNKELAgz0g8V67SD4c=; b=mQCwt8HYOfq77gxUaG8nv86p3yuLZRWc7V5u6iG8ZQ3/IRSJlY4Jzv28fg7sDNRyyYBD8HKqsfEWyLKwrjGLUTU99xRWRRNooENJaeQomEbFHaOKoKm/c1gwrjGEYXIcLjUyMW914Gv300L66v+kwDVXUZSHHudF5dOV+eyCTNs= 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 SA2PR11MB5099.namprd11.prod.outlook.com (2603:10b6:806:f9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.17; Fri, 10 Sep 2021 16:07:00 +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; Fri, 10 Sep 2021 16:07:00 +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 30/31] staging: wfx: explain the purpose of wfx_send_pds() Date: Fri, 10 Sep 2021 18:05:03 +0200 Message-Id: <20210910160504.1794332-31-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210910160504.1794332-1-Jerome.Pouiller@silabs.com> References: <20210910160504.1794332-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SN4PR0601CA0006.namprd06.prod.outlook.com (2603:10b6:803:2f::16) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (2a01:e34:ecb5:66a0:9876:e1d7:65be:d294) by SN4PR0601CA0006.namprd06.prod.outlook.com (2603:10b6:803:2f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.15 via Frontend Transport; Fri, 10 Sep 2021 16:06:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 58f66a6e-a142-4705-7c30-08d97474f331 X-MS-TrafficTypeDiagnostic: SA2PR11MB5099: 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: uzInxpSqy4hP95NE1rzU7UCqGCIfvwRfYXss2BbiN5alG6zDmaHjTQYJD8y1eZePoSfGMqfX55C5t35mmR7XrXWgBD0SB3HLdF9jDqgcdCcQTjNioRGanYfVzdV+I6Svag4cXCnRxpnFufaoNrpAXyRTqyhbUStcoNm4843opyrabL1eIHgqkpQeCv21FImwTn5hA1gEAmlMp12cj00EbYSZHjkL0UbimqENy8gyuNfI3C3ax2qJNBQHwwSMeUlVG/1GiWoz/9uQAIWjbnAbylgDgZTVayo6hhvjGfRJaa03uY/Ao5rIbJkokZmXkDpTSjyJyyoHmBCgp3FOgL2tMXiWVcJOsZt6IhL9yOcBUyrehIg3b7CdQPAUSiGDREdhEHtvRz+ebUbrTN4dTHHS1Fp4vX/BJZ0Ut7fJG/FIU9MN9X8CbbbN6SQs758yyfj2wp0FDt9OA8OnxiYskAK+MH4QkDYKHFwQwNPNSfAN/RribBUVSZ4Uf6b8P9bK+rn6rxdIgsqFV2dTqTtRaRj04JWd5vnkWIQBUh9IuHZZ17uXhIjt/HpF60mR6IzkFVPTOwBMoPNq5jS2E4pujh2/cwwJcq2JN4P5aO+sDruzGw1mrTDvTaO+p57d2pVcIZ+WWD189CZDsN66MsDMqbk2og== 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:(366004)(376002)(39850400004)(396003)(136003)(346002)(83380400001)(316002)(66556008)(2906002)(6666004)(6486002)(86362001)(66946007)(54906003)(36756003)(1076003)(5660300002)(38100700002)(186003)(8936002)(66574015)(2616005)(4326008)(8676002)(66476007)(478600001)(52116002)(7696005)(107886003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?g2b8I3mu6VsWQ9xtR/w38BfEW?= =?utf-8?q?gF2aU5fBWOuk9gscvrNHH5b8vudtmzjnjqrkZLLVNfibbKxQJWA6I1OS?= =?utf-8?q?nNI3se+jZNYx9LTBlVT+obJDLZNeJKEhLfTvK8T74HXia/FV01B7rJQY?= =?utf-8?q?fgmq8f4q451v2FKuwesu7Q/0EieQ1YyBnZYHeGVqOIKtyn8twWyxYXtq?= =?utf-8?q?pIUrgN1Jo3FjdyXbFk67mrfi1L6sW+T7pbxlKI/bXf+V/FyPMyAFCEK2?= =?utf-8?q?gSacu+6qw6pptYRGfMArCIg/7LFb9R+uET6AqyZRciAnXeURaJNwQ5l+?= =?utf-8?q?7cmetrK1p/ROxsPm9+zDr6kRAIa0LQJwrp5YCX4h8OdWCjwMBbkN8QDv?= =?utf-8?q?99irXZrT4YA60NgOgcnz9IHOZzCdv04y9H3WhMvGdbn96c61ARxaAqC8?= =?utf-8?q?QqAVytbY73lbwP8dimAWXQ6BIswRWxhFfPENsLtWsBj6LkmuVAh5zAoS?= =?utf-8?q?EiiSki+aTw97EcliN6VVEcn4I0U9UtaC2KfQx6gzqPQqgbpKgn/pWSdX?= =?utf-8?q?c2xfHPpQm9c7v8bmubhs43p/t6dKRR4mNOAu/vxDvi/XC+vc9yBlvpI/?= =?utf-8?q?n2pmlCIkIjS02zd3t3B2wv8zZrlRANSqEDEgbdKmbQU1xTrjgdndCpIW?= =?utf-8?q?/2lqmrEiM7VGg4jHa/GFK0BVQE1MpdjTWXNihFjpLlfn3SsuAjxf4y9I?= =?utf-8?q?sVRWLfQjG8zwh68xg/vXE9a5OhJqxTz4gHYKivJeThuCrzYxUhwrwQf6?= =?utf-8?q?OH4uSSlDlu6oaMNCa017L0JmMV+tNYFn5+8XmRD0hYi2zRoXK4EkydQ1?= =?utf-8?q?+13oFkUpgsFiukWD2GvXwdTlg1aVXwSPfPdPqm1ws6a20vhdXj7zDa1/?= =?utf-8?q?jDu+zTofQNa9H4sPcjoctuLUTO/fttkd18FsJn9gobiHahk8ax/ovRg+?= =?utf-8?q?+Z5vcbR7oOwcHLfKy+Y7kGj1gzX2kK6Html/Vp94pa14HUZXJK9lralm?= =?utf-8?q?TqPK4V/UTO62LlMLzDGAZ9aq3OH8rqedivKjkp1kDqN4t3WVuA/mwkyd?= =?utf-8?q?JAjFh1EaZVASuJoGupXhIxcxCoXrzKkRiuu2a8W527TQc/WNXZ14K0Af?= =?utf-8?q?n0/5+mEG7nPVgRYrm2wjnTqiV40jM8byOiEJw0VyUyA2zHHoVlYv5Fui?= =?utf-8?q?XwkVxjzie85CKj9HbEo4LHq3Ji6bKAX3TVaozd3N2aIEyghDkHy+KeOV?= =?utf-8?q?tTxIOt82I1KOt0MAs4I+lXaX5tbbrGFetVhIc9Vqc5564yhXYtdumMdh?= =?utf-8?q?hnX6JHVB/A6nbDC2ScipXMQSLO1ZZ8w1OHz4lEq8fRBY79C5xlQDEqYP?= =?utf-8?q?DjWGJtCB7ilywkoQgnrK4AA8ihWtgwPxreBRgA91Dqi5tCk4aZi36tYM?= =?utf-8?q?Ck7RP9aT6Lhfia/RXYYvYi0adnHLVJsZufduvt7?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58f66a6e-a142-4705-7c30-08d97474f331 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2021 16:06:29.7998 (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: PaurAW7MHoFdlTyNGOCyjgxNI+jl8qpJ5qUz4Wziq8myRpmohg5m9KV1wJxLsDpaskALia/xxc0FBvtHtGbMYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5099 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 83292544b10a..4386e9957ee6 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;