From patchwork Thu Sep 19 14:25:36 2019 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: 11152711 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2CD1C14ED for ; Thu, 19 Sep 2019 14:28:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EBF8D21928 for ; Thu, 19 Sep 2019 14:28:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="LUus651N" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731819AbfISOZl (ORCPT ); Thu, 19 Sep 2019 10:25:41 -0400 Received: from mail-eopbgr780041.outbound.protection.outlook.com ([40.107.78.41]:35720 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728423AbfISOZk (ORCPT ); Thu, 19 Sep 2019 10:25:40 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z2tLEnPziQK6Fda/13VQUzHbOs1KURuPK4P6SVQxiwxL7Kfoyq1ALfbvM8WZL3IfVR85b/mJbpwfDL+4Z0Jn/3UJwQ3/Qf4skTsX42XjUn//EQCUc4WLl5N4IwyfOtqF6vkb/vChC2zlgISYn8IaN7MvqdBUz0PakXE2AzobOJlFbTc8PKPiHtf/9yiLwfWvbvtdwZiRd6lj2R1rBaVr+xBk5mzb0zsWoDQZWj638mKIHteXD8KEn/i5jaEMhVSK683zZTJILbKHDZ0RC7uIjlwVWb6yVyZJoR2xBZ7SuUzdrmg/VAuXPvKDILXBRZPOzzaQvZQXToYQfq8lsWI5bQ== 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=mrMAxLeH44wsc1ipniv3KSDptUYOWCXIf2YeBFo/Ufg=; b=NOr0LN/vh2XUWppdnLX9jQ4yGNYuJ5u5kZYiBC52VFIE0ttGuIIUDM2hQAP1RS3mtDecjEzBpyWB34Dum3aY4b+aeAtOCIbePEzd1Uxtjr+N1dhGDDL5MzqVXmJw7go2abAq3XF7iGnyhpXX1N29tywtaeUd16tW0UqGrPfpQIBmv4281j4IBoaf9qOI61k2SEM/M/pEypgvgOQSEbxfRYx+GO2Gq8kV5Ff/U8fdhaqbHoCsLu4XbqDpePkxDpeDkZAzGmgjj5l/C3JXXnr1STUsC6XvGWsf5vcpviCZQYhyxQKECTSiMunA5e2e5T8YYMU94N4a5jYoiW9icqfAhw== 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=mrMAxLeH44wsc1ipniv3KSDptUYOWCXIf2YeBFo/Ufg=; b=LUus651NHY4xK/7DeABYdYjHbcjc6ALK1fFixeiYGJW5sKThPbSYy5NaFii6/az/Nwy2RhGwhbFDHHcdg7HqGRTLw18q89OGcQNHBIbWBii2JXrETC1ZbMr3Vg1Z9kuNb2/uFF4nuFzhrZN14laNK6fPjVnYNCLwiA62hK2eaE4= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (20.179.149.217) by MN2PR11MB4207.namprd11.prod.outlook.com (52.135.37.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2263.24; Thu, 19 Sep 2019 14:25:36 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::45dc:e073:4446:4bf8]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::45dc:e073:4446:4bf8%3]) with mapi id 15.20.2263.023; Thu, 19 Sep 2019 14:25:36 +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" , David Le Goff , Jerome Pouiller Subject: [PATCH v3 00/20] Add support for Silicon Labs WiFi chip WF200 and further Thread-Topic: [PATCH v3 00/20] Add support for Silicon Labs WiFi chip WF200 and further Thread-Index: AQHVbvYaVMseyOoAZk6B2geifQVszw== Date: Thu, 19 Sep 2019 14:25:36 +0000 Message-ID: <20190919142527.31797-1-Jerome.Pouiller@silabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; x-originating-ip: [37.71.187.125] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 89cf2286-935a-4d75-6f1b-08d73d0d3d07 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600167)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:MN2PR11MB4207; x-ms-traffictypediagnostic: MN2PR11MB4207: x-ms-exchange-purlcount: 2 x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2089; x-forefront-prvs: 016572D96D x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6029001)(346002)(376002)(39850400004)(366004)(396003)(136003)(199004)(189003)(53754006)(2501003)(71200400001)(71190400001)(99286004)(4326008)(478600001)(25786009)(6512007)(6306002)(107886003)(3846002)(6116002)(14444005)(14454004)(256004)(6486002)(2906002)(1076003)(966005)(86362001)(6436002)(66574012)(2616005)(476003)(26005)(316002)(36756003)(8676002)(81166006)(81156014)(54906003)(110136005)(8936002)(102836004)(186003)(5660300002)(7736002)(305945005)(91956017)(66066001)(66946007)(6506007)(486006)(76116006)(66476007)(66446008)(64756008)(66556008);DIR:OUT;SFP:1101;SCL:1;SRVR:MN2PR11MB4207;H:MN2PR11MB4063.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Wu5rMKC9mf+eKfjoe/5u7eaa+65KctIups8lhWsfxUPecKUui9DMUPUM8Dki2QNzSlkUba7mDLryqjoILZAhMOYqp3kj7FhbqW0+ktpDM85+1VH+CAbeWhiuYYwtJ+n5vD5C7urlU4RenHcal6mI2KOVQUQkFc0yE/LMcdf//+kYy6VEvv5pAjwawgv4NCD5sDQnheClpkffM2GNm7y0dRxQ/aAkws1FOeHW+SA9zq9gKPNskcq8oP0Qcy4ToAsgA2f50r5sOFNu6oz2MmGqixAtI2o95ShIBSqbQeJYXG2ZQ3gRz0MeA/F/HQTgElibquHT7kub8W/OTWVYg7973xA3ffPw+DN57BeUI7n7Av2wuEXGmL+P9x3owhhtHjMVJXmnwiiHfn8eOa+jP70389UeMzaTY1oOpNzZX3P6YeA= Content-ID: <6966CA64D6350A46BC61593A4062DE39@namprd11.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 89cf2286-935a-4d75-6f1b-08d73d0d3d07 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Sep 2019 14:25:36.1642 (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: 8PEyc0pQMJfmCRcMQCFi5if3qGhz0a1iuDyeluljmpLf+m7Glqzy5ctPXz2cGZpjYaW9EzVBtwjPKoVgVBTM0g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4207 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Hello all, This series add support for Silicon Labs WiFi chip WF200 and further: https://www.silabs.com/documents/public/data-sheets/wf200-datasheet.pdf This driver is an export from: https://github.com/SiliconLabs/wfx-linux-driver/ I squashed all commits from github (it definitely does not make sense to import history). Then I split it in comprehensible (at least try to be) commits. I hope it will help readers to understand driver architecture. IMHO, firsts commits are clean enough to be reviewed. Things get more difficult when I introduce mac8011 API. I tried to extract important parts like Rx/Tx process but, big and complex patches seem unavoidable in this part. Architecture itself is described in commit messages. The series below is aligned on version 2.3.1 on github. If compare this series with github, you will find traditional differences between external and a in-tree driver: Documentation, build infrastructure, compatibility with older kernel revisions, etc... In add, I dropped all code in CONFIG_WFX_SECURE_LINK. Indeed, "Secure Link" feature depends on mbedtls and I don't think to pull mbedtls in kernel is an option (see "TODO" file in first commit). v3: - Fill commit log of patches 18, 19 and 20 v2: - Add TODO file (and dropped todo list from cover letter) - Drop code relative to compatibility with older kernels Jérôme Pouiller (20): staging: wfx: add infrastructure for new driver staging: wfx: add support for I/O access staging: wfx: add I/O API staging: wfx: add tracepoints for I/O access staging: wfx: load firmware staging: wfx: import HIF API headers staging: wfx: add IRQ handling staging: wfx: add tracepoints for HIF staging: wfx: add support for start-up indication staging: wfx: instantiate mac80211 data staging: wfx: allow to send commands to chip staging: wfx: add HIF commands helpers staging: wfx: introduce "secure link" staging: wfx: setup initial chip configuration staging: wfx: add debug files and trace debug events staging: wfx: allow to send 802.11 frames staging: wfx: allow to receive 802.11 frames staging: wfx: allow to scan networks staging: wfx: implement 802.11 key handling staging: wfx: implement the rest of mac80211 API MAINTAINERS | 5 + drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + .../bindings/net/wireless/siliabs,wfx.txt | 97 + drivers/staging/wfx/Kconfig | 7 + drivers/staging/wfx/Makefile | 24 + drivers/staging/wfx/TODO | 20 + drivers/staging/wfx/bh.c | 316 ++++ drivers/staging/wfx/bh.h | 32 + drivers/staging/wfx/bus.h | 34 + drivers/staging/wfx/bus_sdio.c | 268 +++ drivers/staging/wfx/bus_spi.c | 264 +++ drivers/staging/wfx/data_rx.c | 208 +++ drivers/staging/wfx/data_rx.h | 18 + drivers/staging/wfx/data_tx.c | 799 ++++++++ drivers/staging/wfx/data_tx.h | 93 + drivers/staging/wfx/debug.c | 305 +++ drivers/staging/wfx/debug.h | 19 + drivers/staging/wfx/fwio.c | 387 ++++ drivers/staging/wfx/fwio.h | 15 + drivers/staging/wfx/hif_api_cmd.h | 681 +++++++ drivers/staging/wfx/hif_api_general.h | 437 +++++ drivers/staging/wfx/hif_api_mib.h | 558 ++++++ drivers/staging/wfx/hif_rx.c | 336 ++++ drivers/staging/wfx/hif_rx.h | 18 + drivers/staging/wfx/hif_tx.c | 470 +++++ drivers/staging/wfx/hif_tx.h | 67 + drivers/staging/wfx/hif_tx_mib.h | 281 +++ drivers/staging/wfx/hwio.c | 338 ++++ drivers/staging/wfx/hwio.h | 75 + drivers/staging/wfx/key.c | 258 +++ drivers/staging/wfx/key.h | 22 + drivers/staging/wfx/main.c | 500 +++++ drivers/staging/wfx/main.h | 48 + drivers/staging/wfx/queue.c | 606 ++++++ drivers/staging/wfx/queue.h | 59 + drivers/staging/wfx/scan.c | 289 +++ drivers/staging/wfx/scan.h | 42 + drivers/staging/wfx/secure_link.h | 46 + drivers/staging/wfx/sta.c | 1643 +++++++++++++++++ drivers/staging/wfx/sta.h | 101 + drivers/staging/wfx/traces.h | 434 +++++ drivers/staging/wfx/wfx.h | 204 ++ drivers/staging/wfx/wfx_version.h | 3 + 44 files changed, 10430 insertions(+) create mode 100644 drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/siliabs,wfx.txt create mode 100644 drivers/staging/wfx/Kconfig create mode 100644 drivers/staging/wfx/Makefile create mode 100644 drivers/staging/wfx/TODO create mode 100644 drivers/staging/wfx/bh.c create mode 100644 drivers/staging/wfx/bh.h create mode 100644 drivers/staging/wfx/bus.h create mode 100644 drivers/staging/wfx/bus_sdio.c create mode 100644 drivers/staging/wfx/bus_spi.c create mode 100644 drivers/staging/wfx/data_rx.c create mode 100644 drivers/staging/wfx/data_rx.h create mode 100644 drivers/staging/wfx/data_tx.c create mode 100644 drivers/staging/wfx/data_tx.h create mode 100644 drivers/staging/wfx/debug.c create mode 100644 drivers/staging/wfx/debug.h create mode 100644 drivers/staging/wfx/fwio.c create mode 100644 drivers/staging/wfx/fwio.h create mode 100644 drivers/staging/wfx/hif_api_cmd.h create mode 100644 drivers/staging/wfx/hif_api_general.h create mode 100644 drivers/staging/wfx/hif_api_mib.h create mode 100644 drivers/staging/wfx/hif_rx.c create mode 100644 drivers/staging/wfx/hif_rx.h create mode 100644 drivers/staging/wfx/hif_tx.c create mode 100644 drivers/staging/wfx/hif_tx.h create mode 100644 drivers/staging/wfx/hif_tx_mib.h create mode 100644 drivers/staging/wfx/hwio.c create mode 100644 drivers/staging/wfx/hwio.h create mode 100644 drivers/staging/wfx/key.c create mode 100644 drivers/staging/wfx/key.h create mode 100644 drivers/staging/wfx/main.c create mode 100644 drivers/staging/wfx/main.h create mode 100644 drivers/staging/wfx/queue.c create mode 100644 drivers/staging/wfx/queue.h create mode 100644 drivers/staging/wfx/scan.c create mode 100644 drivers/staging/wfx/scan.h create mode 100644 drivers/staging/wfx/secure_link.h create mode 100644 drivers/staging/wfx/sta.c create mode 100644 drivers/staging/wfx/sta.h create mode 100644 drivers/staging/wfx/traces.h create mode 100644 drivers/staging/wfx/wfx.h create mode 100644 drivers/staging/wfx/wfx_version.h