From patchwork Tue Dec 17 16:14:26 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: 1211551 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=silabs.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="ZwzI5KSR"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 47ck0v356kz9sNH for ; Wed, 18 Dec 2019 03:21:35 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728275AbfLQQOb (ORCPT ); Tue, 17 Dec 2019 11:14:31 -0500 Received: from mail-eopbgr770078.outbound.protection.outlook.com ([40.107.77.78]:1089 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726858AbfLQQOb (ORCPT ); Tue, 17 Dec 2019 11:14:31 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZiMDn/mexsqYSGj6CjGhRXzj6bPaOZP2RbJpMZpMMPMCYwb5D45lP8POMNhjufz+/oRepYBgQ8WP8aYnXF/EERQeCttiK4xnY+lXYsgVNWkNpRCm7ihvvsXVEXqx96fpCEQ+yh+KDUkwlG9i5WnhlR2/30czokkVSIj+gSaaRiV9O+5r+dT0Cq98Z5xfUXJq9JHD+JdYtaYILvbkMu8IhiAryyBqvs5aJBOJCd0OOOO23Vs7XTkck/B2q7Y8M28OdAoT3H5CGVQdiI4mVnCoZFZTYXTXDWlzfEQnslwkVZ2+JWCxVcm4hz4T6HuZgowji4P0JVdDCTG5J7GQ902rOw== 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=G9sf6uxYBqVnhHIwr4AEGVfLgcNH20xLFhJFPAO+Tvo=; b=cOO9DgzhhOXIKJJbTNoS0FLBGm/ZJs7ANwbv3eq39ZlMJ24JnhHKwACsYAWyyP4kdWIkldwGsbU0faeWpOv/mXCmeDTIZ5gOkzyuk2AbBrdH0Cp2xsobHGmjCB49DubaMggCpMEHEh68u2Kqz+p52hAlNKp4rjW+Kft5ft4q/pso9R8xW3wXY+8ArT6rDiWRKfAdM86tiUl/SYjIu/SHsWYSmp5N5tkQdFky1Wk1wwYtIAH8P+BDntgo0SDBtiDYWWVzHcAls2jVw97oYSIi7isYHuxaaWh8J1jZ4oSA4yTc3U1qGaJEh5YLLVISvu22qJ1gcdD8/hHv1Z+enjfK6Q== 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=G9sf6uxYBqVnhHIwr4AEGVfLgcNH20xLFhJFPAO+Tvo=; b=ZwzI5KSRwLx/uUp1bQgRIzqfBFhQb0PU2c0SCIkw1RNA+eLJN7D3VDXIB9Q/HfLg2j2RLme2Yh9/pAqL8n5VC6ghIdWotsQhNYwZdSZ4Zn5LyNjYBTHLfHVP8k0uQ69NX3UsQ6G+6/LknYxlv1dpFTbeRAM+7/zh+PilGbQVl8w= Received: from MN2PR11MB4063.namprd11.prod.outlook.com (10.255.180.22) by MN2PR11MB3678.namprd11.prod.outlook.com (20.178.254.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.16; Tue, 17 Dec 2019 16:14:26 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::f46c:e5b4:2a85:f0bf]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::f46c:e5b4:2a85:f0bf%4]) with mapi id 15.20.2538.019; Tue, 17 Dec 2019 16:14:26 +0000 From: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= 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?SsOpcsO0bWUgUG91?= =?utf-8?q?iller?= Subject: [PATCH v2 00/55] Improve wfx driver Thread-Topic: [PATCH v2 00/55] Improve wfx driver Thread-Index: AQHVtPUN97auvOsN5kugh2/rPbsjIw== Date: Tue, 17 Dec 2019 16:14:26 +0000 Message-ID: <20191217161318.31402-1-Jerome.Pouiller@silabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: PR0P264CA0174.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100:1c::18) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.24.0 x-originating-ip: [37.71.187.125] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0434cd04-502c-4932-d222-08d7830c2fdc x-ms-traffictypediagnostic: MN2PR11MB3678: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-forefront-prvs: 02543CD7CD x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(396003)(39840400004)(366004)(136003)(53754006)(43544003)(199004)(189003)(6512007)(66574012)(1076003)(478600001)(86362001)(8936002)(110136005)(316002)(2616005)(26005)(6506007)(5660300002)(36756003)(6486002)(66946007)(66476007)(66556008)(64756008)(66446008)(71200400001)(52116002)(85182001)(81166006)(81156014)(8676002)(54906003)(107886003)(2906002)(4326008)(186003)(85202003); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR11MB3678; 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: BCL:0; x-microsoft-antispam-message-info: Pjj+jeG9A5ypTwgTkk1Ny8nrX6VPGI/0mpKmeDp4hAx9k+Wn/n/37ABZBPxioXkDtVSp2KdRalvtghn6bWhsyZ6jqbnfFejKNyeFbui/u/H1BNPTHE4ISg8KcUzb7dw734ibq+m6z29+lA5nYX+/S4ZHrCC3rtw/ESQF+GJVTVM38mNRhKZ6J6QZMam06YER9TFcu1RGEKGLGvcGxQNM9Peyaq6biofUewc/712yx9uFF4YuKbJx2wgRHV360ID+GSiHXZf23entaoyMkdrbZzrJc2I1BH/Ibv5F5K0bg307vuaxo7MEOU6CrtIbs/Kb8E1WG2grooicHLAe0k7tmo/Faz/c3cSw1GeDypxNRFYQ9W7MGbioJck8Aw9TMEjzuf7hHOFgrD5Ifr1FrjzEyTl23rV+4+tIQXcks/Pk4fTQp7ZceF+eSg1NPw6JYnIiNeM5fStVkK2KVsFIamwx7BuEC1K8vhHEazJCXneULPYSf89Q4nt5N/pT25FQ1gv0jmZbJVRykJ/nRA/I43rH2A== Content-ID: <27B5DEA8D623804783FD0D8FE69D1801@namprd11.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0434cd04-502c-4932-d222-08d7830c2fdc X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Dec 2019 16:14:26.5019 (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: WEFvtyiybsu1YoG+/WS9JLlRdf6IUKd9EppEU6QQJJznc0jaQ5rtAWjmQDKuy4ewotV/Do7YdJ91jBumG2Tw2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3678 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Hello all, This pull request continue to clean up the wfx driver. It can be more or less divided in four parts: - 0001 to 0009 fix some issues (should be included in 5.5?) - 0010 to 0028 mostly contains cosmetics changes - 0029 to 0043 re-work power save (in station mode) and QoS - 0044 to 0054 re-work the scan process The last patch updates the TODO with a more precise list. I included references to discussions I have had on mailing lists, in order to not forget them. I started the first items of the list and I hope to be able to send another (smaller) pull request in 2-3 weeks. This series also try clarify the overall architecture: ,------------------------------------. | mac80211 | `------------------------------------' ,------------+-----------+-----------. | sta | | | | scan | | | | main | | | +------------+ data_tx | | | key | | data_rx | | hif_tx_mib | queue | | | hif_tx | | | | hif_rx | | | | hif_api_* | | | +------------+-----------+-----------+--------. | bh | fwio | | secure_link | | +------------------------------------+--------+ | hwio | +---------------------------------------------+ | bus_sdio | | bus_spi | | hwbus | `---------------------------------------------' ,---------------------------------------------. | sdio/spi | +---------------------------------------------+ | hardware | `---------------------------------------------' It try to make a clear separation between functions that take care of hardware communication (hif_*) and functions that work with mac80211 (sta.c and scan.c). v2: - Fix line ends - Update TODO with Felix idea - Add architecture schematics in cover letter Jérôme Pouiller (55): staging: wfx: fix the cache of rate policies on interface reset staging: wfx: fix case of lack of tx_retry_policies staging: wfx: fix counter overflow staging: wfx: use boolean appropriately staging: wfx: firmware does not support more than 32 total retries staging: wfx: fix rate control handling staging: wfx: ensure that retry policy always fallbacks to MCS0 / 1Mbps staging: wfx: detect race condition in WEP authentication staging: wfx: fix hif_set_mfp() with big endian hosts staging: wfx: fix wrong error message staging: wfx: increase SPI bus frequency limit staging: wfx: don't print useless error messages staging: wfx: avoid double warning when no more tx policy are available staging: wfx: improve error message on unexpected confirmation staging: wfx: take advantage of IS_ERR_OR_NULL() staging: wfx: uniformize naming rule staging: wfx: use meaningful names for CFG_BYTE_ORDER_* staging: wfx: remove useless include staging: wfx: simplify variable assignment staging: wfx: make conditions easier to read staging: wfx: ensure that traces never modify arguments staging: wfx: ensure that received hif messages are never modified staging: wfx: fix typo in "num_of_ssi_ds" staging: wfx: fix typo in "num_i_es" staging: wfx: fix name of struct hif_req_start_scan_alt staging: wfx: improve API of hif_req_join->infrastructure_bss_mode staging: wfx: better naming for hif_req_join->short_preamble staging: wfx: better naming for hif_mib_set_association_mode->greenfield staging: wfx: simplify handling of tx_lock in wfx_do_join() staging: wfx: firmware already handle powersave mode during scan staging: wfx: declare wfx_set_pm() static staging: wfx: drop useless argument from wfx_set_pm() staging: wfx: remove redundant test while calling wfx_update_pm() staging: wfx: drop unnecessary wvif->powersave_mode staging: wfx: do not try to save call to hif_set_pm() staging: wfx: fix pm_mode timeout staging: wfx: simplify wfx_conf_tx() staging: wfx: prefer a bitmask instead of an array of boolean staging: wfx: simplify hif_set_uapsd_info() usage staging: wfx: simplify hif_set_pm() usage staging: wfx: drop struct wfx_edca_params staging: wfx: remove unnecessary EDCA initialisation staging: wfx: simplify hif_set_edca_queue_params() usage staging: wfx: hif_scan() never fails staging: wfx: device already handle sleep mode during scan staging: wfx: drop useless wfx_scan_complete() staging: wfx: simplify hif_scan() usage staging: wfx: introduce update_probe_tmpl() staging: wfx: simplify hif_set_template_frame() usage staging: wfx: rewrite wfx_hw_scan() staging: wfx: workaround bug with "iw scan" staging: wfx: delayed_unjoin cannot happen staging: wfx: delayed_link_loss cannot happen staging: wfx: implement cancel_hw_scan() staging: wfx: update TODO drivers/staging/wfx/TODO | 81 +++++-- drivers/staging/wfx/bh.c | 3 +- drivers/staging/wfx/bus_spi.c | 9 +- drivers/staging/wfx/data_rx.c | 8 +- drivers/staging/wfx/data_rx.h | 4 +- drivers/staging/wfx/data_tx.c | 40 +++- drivers/staging/wfx/data_tx.h | 7 +- drivers/staging/wfx/fwio.c | 28 +-- drivers/staging/wfx/hif_api_cmd.h | 32 +-- drivers/staging/wfx/hif_api_mib.h | 13 +- drivers/staging/wfx/hif_rx.c | 103 +++++---- drivers/staging/wfx/hif_tx.c | 109 +++++---- drivers/staging/wfx/hif_tx.h | 17 +- drivers/staging/wfx/hif_tx_mib.h | 27 ++- drivers/staging/wfx/hwio.h | 15 +- drivers/staging/wfx/main.c | 5 +- drivers/staging/wfx/queue.c | 9 +- drivers/staging/wfx/scan.c | 323 +++++++-------------------- drivers/staging/wfx/scan.h | 25 +-- drivers/staging/wfx/secure_link.h | 8 +- drivers/staging/wfx/sta.c | 353 ++++++++---------------------- drivers/staging/wfx/sta.h | 9 +- drivers/staging/wfx/traces.h | 14 +- drivers/staging/wfx/wfx.h | 18 +- 24 files changed, 509 insertions(+), 751 deletions(-)