Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87FA2C433EF for ; Tue, 11 Jan 2022 17:16:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344029AbiAKRQf (ORCPT ); Tue, 11 Jan 2022 12:16:35 -0500 Received: from mail-bn7nam10on2045.outbound.protection.outlook.com ([40.107.92.45]:52705 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1343989AbiAKRPq (ORCPT ); Tue, 11 Jan 2022 12:15:46 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jq9reMzrJrPJWi0NLvn8lPJqxzt7xr9jDkXsXnBK/Uq2VL8KHIYDIZgTSDVnWGKj1njy6i/d+QGVr2PfUZ+1U689c1XzFXcJqPKRp1x1/655cdTQORepq3WgTL+qtICQDzBMzt4Z2FuCx3ezR3D8aQfq2dlsO1U8Qg2kzqM4q1X1mVqlxNzZJgAxmdMgDKbChNPkVug1m5OJEky97Ii8kVzSpW9MWKk+tYC8cbvOxzvAM2wZuzz+lGvAJvJwX+I5FTdoT1stb69Za4hehZdNA4mlr5zyKpnY+FvP4Ab1KVTQ1dVmsOCGZH4S64zIv7jSkyVtxwwpYE9bZA9ZBDmLzA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=X1cR2BtYV8qIgaXe/OsSh91spBngEHgNdC/46S3ZZms=; b=OOSwhb3yOqclMSI4cY5S61nMhxCG9OhQqK9FdUPNJmz3RjsVTkBT99vwSXKg2wnx3K+ks2n6d6I0SQzIOr0fkRT1rluVLkmd9/Ogu+IWCVVzv2z2x+H+XCXpcU4jefLF2U2oSPirPIZ5I52I2L+JRmaZwrWXgnsngDLevzLdAlOo16rAV/twjtFkUtIm4UMe7Qa9IosyZlofqZ0yDwX5v8DFaO+3uJJoRsBfHoFzsisiFtcrNRqHt7ezWSmzae2bbTeactKWTZmp6auQ7LQ3Cf1wNjdEpcqq9gOPWcD+AshWGacz8Y55dbv7wrArLzPWg5AHF8fhGp1Nwh4nSmyMWQ== 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=X1cR2BtYV8qIgaXe/OsSh91spBngEHgNdC/46S3ZZms=; b=qKK3Q07TeVKJsciHlLEzxFl5O1FEqSuJKMUN6l7nWyCX5/P/rDkSqT862xb0/KoNgfUkBBernuOkg+A1+O8oPk3sVQRmkeJT7nv3SmnJyxMK+TyHrj0cuWQfgLCo6SdispB+sOQHrklMkOi+S1mHS5p72nCwQvz9YkDERodS274= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by PH0PR11MB5609.namprd11.prod.outlook.com (2603:10b6:510:e0::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.9; Tue, 11 Jan 2022 17:15:20 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%6]) with mapi id 15.20.4867.012; Tue, 11 Jan 2022 17:15:20 +0000 From: Jerome Pouiller To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Kalle Valo Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "David S . Miller" , devicetree@vger.kernel.org, Rob Herring , linux-mmc@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= , Ulf Hansson , =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Subject: [PATCH v9 13/24] wfx: add hif_tx*.c/hif_tx*.h Date: Tue, 11 Jan 2022 18:14:13 +0100 Message-Id: <20220111171424.862764-14-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220111171424.862764-1-Jerome.Pouiller@silabs.com> References: <20220111171424.862764-1-Jerome.Pouiller@silabs.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-ClientProxiedBy: SN1PR12CA0099.namprd12.prod.outlook.com (2603:10b6:802:21::34) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f25653c3-31b7-4b8e-c869-08d9d525f1e5 X-MS-TrafficTypeDiagnostic: PH0PR11MB5609:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:21; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ULfO4AdT/+UVYshoac8ySCrunRNnD+fiUuO9nWqDxNNTwW9al6+ah2yjOJVnAiDwwAZwVaLWLH9x804Ouo8M3JWD91sL0y9f5VkAQFj9R58CQVCJ5FfzReRR2kHN6YoslrQKcYyH0P21J2p3TbdEMZoriwFg/f4ydhOasTg/AgcposeO/pHuF7wFeyNxdha90d3bMewk3ogfm69jqgPPGdkxj2Tz0f36tcx9tfKvr9z3DTlpywKGQIOrNnxERPml6QocCaRFdw3oi2O44dRTYqL1rYV1WrgdmALMh2Sa2xaQmY6tAaxOsXVOVoVQi2yHMGhLpgHLvy00Fv2coqsuLfXhvckxvARYbfdtZ3D5ZRUYydcYGWlNj0+wkMdcUHl305TFs6jYB2dOvkxBmqqzAkSdaifx2E8qOh1NmX7pMIGXD09YwM5QU3zKc7lDx2+FVSEMw4KqeNfPWltUOIC5XE1W4D0W2lyUONQWfK6gU1+X4+ZJ5MkNLjnxaILdwjR5r6x0fzyY99Gc2jgMhr+In8euDcCUSynIqpFqyO98gtUhhGJmFCUbt8xonUNUazNapeR+ckuLU9vrxfUeHpCWgdxzaCTgc9PQwtkeqpTKxMPYpzV26vT/ZPLBf8S9B+DPNIetCUEg1U1GGlxjbHr/Hw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB5657.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(5660300002)(8676002)(36756003)(38100700002)(186003)(7416002)(66476007)(54906003)(6486002)(6916009)(6512007)(4326008)(508600001)(107886003)(66946007)(6666004)(2616005)(1076003)(8936002)(66556008)(86362001)(2906002)(6506007)(52116002)(66574015)(316002)(83380400001)(30864003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NEdOQk1ialBzdmZKUDZPYkFZejY0VzhxVHREdkthM0FKYXJmY3JNVVpROExx?= =?utf-8?B?U2dsUllGQTRIY1ovZGpxcVlRK0pWQTAvVzN1R0NVMEQrOHlFbUlIQUoxbUZY?= =?utf-8?B?cHBDa2ZsTldJYWk0TTk1WXNxaVpCOFRxZWovRGM1eEIxUFpEMUdNUEpNR3g3?= =?utf-8?B?aUhQSnBpRG9LRkRBSG4yWlNmVGRUN2MzTlY2bFpIVUkrSnJKZGZnajJ6N1dQ?= =?utf-8?B?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S9kczh6a09BYU5PR0ZmWnZqRHJnRzNt?= =?utf-8?B?VWwzNnpBbnI2T0NsblZLTkxKTzBuYlExb2djcnBUMjg1WEdyajhudTRacXUx?= =?utf-8?B?bUdWaXpheVZuYjJrcHdHSlVobzU2ZFZUazVLb2tSenZkOVdNUVdvUWhUTWgv?= =?utf-8?B?Wkt5SStMUStzYW5rMlVlZTcyNHl4YUhzWmRvOVoxb25mKzlXNERzS3lSNjg0?= =?utf-8?Q?95EIDQoLIIa8gE7yfNiRLzooSgHJX0UDEWhRyxUNvM=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: f25653c3-31b7-4b8e-c869-08d9d525f1e5 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2022 17:15:20.1947 (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: Sg47NqexAA6kHHsn5vJz1ZZ1CYqea7Bku9H0tT0iX3M1l1ZVFfmlVapeHvFgKcRbyk3UmxrBlj7acQ3YpF4WzQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5609 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogSsOpcsO0bWUgUG91aWxsZXIgPGplcm9tZS5wb3VpbGxlckBzaWxhYnMuY29tPgoKU2ln bmVkLW9mZi1ieTogSsOpcsO0bWUgUG91aWxsZXIgPGplcm9tZS5wb3VpbGxlckBzaWxhYnMuY29t PgotLS0KIGRyaXZlcnMvbmV0L3dpcmVsZXNzL3NpbGFicy93ZngvaGlmX3R4LmMgICAgIHwgNDky ICsrKysrKysrKysrKysrKysrKysKIGRyaXZlcnMv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