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 59204C433FE for ; Tue, 11 Jan 2022 17:16:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344071AbiAKRQC (ORCPT ); Tue, 11 Jan 2022 12:16:02 -0500 Received: from mail-co1nam11on2074.outbound.protection.outlook.com ([40.107.220.74]:39233 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1344069AbiAKRP1 (ORCPT ); Tue, 11 Jan 2022 12:15:27 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SpOSxtRj+fgSSrIlSC4Im1iEhWyt2MCmbVxhSDTZ7D8Y/zh0Uh8Y+iwkOv8GzcsOx+WnsMV/OS4jeZnfZKzaRaVvBUF7XzQDPNfwM1MUx5o9hKMObpxzJjRoUeXI069pBOEBrNyUUT+AXVkltd9XrQXL/g0MOwZWK1F1rf9IuD+dHyjayuYY9Qt4Y49CxK2uZYUehUpkai/qNKIbuFSY/UCwF5Gl0TGE14RaC/YOprGw71xQcO2YSd2+mRRh9wAVfIE+vebaiumrOa6xCo5fy7uhv9nsGpfZ+UjE/IQ4yWSZj4P1P/fVbvuBvcgC3BjrzFiIkqZCQ1aqnBLa5QxGyg== 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=j9h0zA7BZD91wuRETbxelKSdy5XxdmI3rjzlFKTtFEg=; b=Z0FtIS/1z/PPIlh0lszDq4umFqveFO566K9gVnG6GQzkUC7x01Ur4bGarVTLEEqNcxlNqV9DMxwaOchGmdAYw1p+9K+/sdRfcpmrECqYbfijo1Ez1CKkdqvwnd1jaoZCuiORIb0GpCws7AGqjHGT+OQ+ulR1gE5Pz6fdRN5Z4CYuTx1/gG5suwjT1b/zhJH0pX4TVHLvDbG3GWEBdyXhtsD+ohC8wG4H87e8pIo5sXgLzVI15lfghMlB+NCJXMR6QZkohUFuE7srCtwcOnhZKu7YFlgvn3asTmqCznOmdI09mr2q3CyD/sG4vl91Fy7Aj4s0vM+gnjuZ964Pl8D//A== 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=j9h0zA7BZD91wuRETbxelKSdy5XxdmI3rjzlFKTtFEg=; b=i1Pbzb/inYxUQO2WZo+FS/Uokwu5NdDaD4t1b1Gvs7QY89cJJZU+JlOVyVXqSmVNVeWMskkhUb5IxGukvCu+6K8ZEa7Xi2E6a6EE79/g17EGzBZjYJqF7+u8+E0b5iK8K82OjKLfnH4H9Q7yM+YVgTSFLTsri+IEsozgnfjVmxo= 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 PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.11; Tue, 11 Jan 2022 17:15:25 +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:25 +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 15/24] wfx: add hif_rx.c/hif_rx.h Date: Tue, 11 Jan 2022 18:14:15 +0100 Message-Id: <20220111171424.862764-16-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: 16a027b1-44a8-4084-6d9a-08d9d525f4fb X-MS-TrafficTypeDiagnostic: PH0PR11MB5657:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1332; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1cjyTKj/S0Hd2WLDFkkEE2a1jFNYjYoxjHN2wYAytArayA8lQGrjqLGjXDvEfvj5nS9NEfbUYekniGizAjAY3fI7jbUWvFqVa50LmONacolHU12FTzSXeC2HoSRYsrkM/WVS8vVYgFKrWze2tI39mAbDtjN2m3zWiMNDo+o1DowXy0BjfsWUwrrX2h4Cn43A2x3PQ/jn2rSBvrcBTjoVPzUOIkWta1umD/54xrrxsvQacVCaHLBMxewKFvWeOXWz7sQWCKjxTYck4MqzfH8fQq4fUmxg89q416WOixuejBrmJ4ehQ8ks0QVtQIF7Mg6qur9CZLmndnDfky5DNwqc+2XVEPjuxCJh1o9qdHx6nNuzIgRQwvBeIJqgTJJd4YNMmneTlXS1Xymqi20ZBHrX+Ni1tWo3r5oaCwZa/3VFob/nSFBf1sU0pt21nFr1u2/JeVRPI2o2+e/1A32G3uBfzfeut4ZwQ+ib6PI+0Km/NlppBBx2TNlwb6NuvBGbxkSaD7c7ouzt9W9XI3iVDZGzAT4oQxzoKrahYzQirNjmlv8kZXoo8HqmLTVUe0c7eaImmnfraPzG7E+2lYzi8rBchKI7jzbsibs+EV80TDe5kegsa8cNW7qwRy6kuSGxX5xR99toxiNQ4LLCmZZFXLzmcw== 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)(6506007)(66574015)(86362001)(5660300002)(8936002)(7416002)(6916009)(8676002)(83380400001)(1076003)(6486002)(36756003)(38100700002)(186003)(66946007)(6666004)(2616005)(4326008)(2906002)(316002)(107886003)(66556008)(66476007)(54906003)(6512007)(508600001)(30864003)(52116002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MGpGelQ3YmhoVDVYUWpqNDNjNUtFQWFsblBwMDFsZm0ycW93QWxqR0J3Y2hZ?= =?utf-8?B?ZjFNcTlsdnVkSksvenVHQ1BWRzFWQU1DVC96Ykkxc0JBenBzWE9sdDdQeFhM?= =?utf-8?B?RDZOT3FJYzBMSzNPdzNQS0dVcmtIU1Y3cDB3UXowTGFicDdqWkNhc2ZQVUFL?= =?utf-8?B?dFVCQ0pHR3BZZVhaSkRoaU40My9jWnFvRHFJWWgxQ0V0WENVa3gzbT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FhdzVDQTZUTTZQdit1ZEZiMlBZbi90VmYyeFJiam5x?= =?utf-8?B?RCszLytiL2RqdlRJcndXMWd5YnZOZ2MzV0tPVmM5T2ZIcXZVSWpwVFZlSTZU?= =?utf-8?B?TStiQ1ZxS2MrMzVuU3RFcmxIVndLUXlCMlJpZVJKQkVnTlQrWFpvTno1Smx6?= =?utf-8?B?dElQUVduamFwZkFhZ0lNYm1GZXdnTUlwM3lsZ05XUyt3b3ZRU0VGRmhzTXJx?= =?utf-8?Q?5FrqlejJbgQMnvuEDCAMfh3iCQUjhM6ySY5HzPwgfQ=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 16a027b1-44a8-4084-6d9a-08d9d525f4fb 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:25.2759 (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: UHWHP1XFjVnGtWKRm8cTds1wap02inWqVVRuHBa9HCWsUv2vbX7HlQcpwApXNSRDVrT/WgwrB9pHeUvfUez0Xw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5657 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogSsOpcsO0bWUgUG91aWxsZXIgPGplcm9tZS5wb3VpbGxlckBzaWxhYnMuY29tPgoKU2ln bmVkLW9mZi1ieTogSsOpcsO0bWUgUG91aWxsZXIgPGplcm9tZS5wb3VpbGxlckBzaWxhYnMuY29t PgotLS0KIGRyaXZlcnMvbmV0L3dpcmVsZXNzL3NpbGFicy93ZngvaGlmX3J4LmMgfCAzOTIgKysr KysrKysrKysrKysrKysrKysr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