From patchwork Tue May 26 17:18:11 2020 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: 1298246 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; 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.a=rsa-sha256 header.s=selector2-silabs-onmicrosoft-com header.b=MhHidx4s; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 49Wgfd5cZdz9sSk for ; Wed, 27 May 2020 03:18:49 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729791AbgEZRSp (ORCPT ); Tue, 26 May 2020 13:18:45 -0400 Received: from mail-bn8nam11on2083.outbound.protection.outlook.com ([40.107.236.83]:48578 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728581AbgEZRSo (ORCPT ); Tue, 26 May 2020 13:18:44 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jZ7jRKeQIPwDD49H8jJxC0pdiEsuDWBrAPkDWGxMTRzcYuzr+mL+GiRVPlgRIVeIcKuVEAEGSc0QFTigfCvueeq4n217leOSWt8xCYB7Zh6AP+++SLFi/QaTEi/RSkdB66gFKc3SukbCvzhn+pqfdEpHdnsbqzGPjtzzYmJBiP0pskGuxkC9TxWNwvXUbTqefDha3Ur09EMqwddaer4onBGAb4+rNalAoEvVs26NmwEUGns9fdfmN6DnaYX58hdNCbF6LPqWRAb4NkFyDS0xzV82vYb0vihW8puvRB4jbCk+tZL6W24Q18/s5No2WwZDquz1GNrO5XMfJKT1z6XuaQ== 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=I87+MWHXtycnXkRi2eJFfGUqbFHWv7rsORNkmVr73/Q=; b=HFWjlgjogZbz4SYOmPZummaqNkTOitmJEAz4RzcFHHkodbmplrAp7rzZQFKfQHHl9+5qKRwQazycvQy2rkkDWtR/rGuvkWYOyeElob9Z6aO78Y61Yyrm2gDxcLK5vCFNNgR9NS+WiRv28B2HCKTk4HNZ92+y9iRBhES38geu92H5KU4WLeioqVN5rOanoKwV2LondHSCA1BdCWDJbzh6QviQVX8jAlNI8ghDVduHkt9KMd/sq4mDRbFHXt8d2csKzGAWUdgK/dArv2V5B8sRx9ktUBp9QmYHvIcG6EqtHdojhr4TFHs1EaLjzZLQgYq441UgiRCQAppmRX4PlND53w== 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=I87+MWHXtycnXkRi2eJFfGUqbFHWv7rsORNkmVr73/Q=; b=MhHidx4sCDNGITPOsNP8jmsVeNhv8SJb/By7R0uWD1EMpPjodJ+EpEUx1DFiSYBxv2tk/MWRLuaaBlxL3BfhlqVKlFikVIhkf87BMv8gc8ke0kE0f1QHOgHLEWgpoH7eYeshq5cJg3TrfbaPD3Mh6s3r2dFTYzkFvhAcJbHQ/pY= 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 SN6PR11MB2750.namprd11.prod.outlook.com (2603:10b6:805:54::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3021.25; Tue, 26 May 2020 17:18:40 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::c504:2d66:a8f7:2336]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::c504:2d66:a8f7:2336%7]) with mapi id 15.20.3021.029; Tue, 26 May 2020 17:18:40 +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 00/10] staging: wfx: introduce nl80211 vendor extensions Date: Tue, 26 May 2020 19:18:11 +0200 Message-Id: <20200526171821.934581-1-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.26.2 X-ClientProxiedBy: PR1PR01CA0007.eurprd01.prod.exchangelabs.com (2603:10a6:102::20) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by PR1PR01CA0007.eurprd01.prod.exchangelabs.com (2603:10a6:102::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3045.17 via Frontend Transport; Tue, 26 May 2020 17:18:39 +0000 X-Mailer: git-send-email 2.26.2 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 654d54cf-7dbd-4bcf-7905-08d80198d595 X-MS-TrafficTypeDiagnostic: SN6PR11MB2750: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3044; X-Forefront-PRVS: 041517DFAB X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IXPkD1b1BGLitrC+6p8OJfGsZAgYEZ6sDo5rTJxq9c1GLsHJuZba516WiSilV00gAYIC5IynjwHnfhbS7PBF6c6Y8wwh4L9XC0VZct/pZf5HFvLY7T8RcaCb/A61eSFYYtr7IQ15zrhBD2U9Qc+b+8obQRHsreFiSBnmABo5Kdhk3t5ItUrfG53AHrojwVOOXsxryC7n0bMs0XXsu7OsXGjLWHrySAOr4NEwwjOyNbWcrpcjbJgj9vKOojbhJ5n8tbcfyKz6iNpIszYsVlDQP9qfSNPrt20omBFbwVl3E0RxeWaDvRYYJVeHFfp9RJrw 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;SFTY:;SFS:(396003)(376002)(366004)(39860400002)(136003)(346002)(4326008)(6512007)(316002)(8676002)(8936002)(2616005)(6486002)(2906002)(107886003)(1076003)(86362001)(6666004)(186003)(16526019)(5660300002)(66574014)(36756003)(54906003)(66556008)(478600001)(8886007)(6506007)(66946007)(66476007)(52116002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: vm7Z/fqHNt8wN8TIfTwI0eCP5nNmDFgy+byB07xGZ/P8horXFPmKWWmuXRGMPbYbn2KZX6aOlt6l1ZpnI4ARkHQOJx+uFb6G69mMGrjOGhHcoQZYFeclLyRH4+xcDZ4XYLUdFN2uN48EnTAJBWESOF18RI2CLcT2sQ0+qHffp66R/T4Is1PF+bYxJUYBEM0WEnCLV6hjedCDQu4+ww2MFzcaf4TRn25sgUsahdyaYSz6CiTFwakXH4/3C7COGTkF5AXax1asH61qgGwNnTCd7Not7mrClvEi4l9hh1/SC3ne+gr7yH1PVsqiH2s+nzfljjkyzVjX1XGIqzD2/0WvN9Y2lDbMTWkwZSQsd8TpnQBJxygN/fpDgrbn7kObo7UywmfCE8wMksh2WKVdsDfu6XmES5eaUkqmYjbv9B2zHk0VE54/JKNBhyYJn6HLtwUMayfNorImNCH1NG/7DRtFKNOSp3ZDmGz5FZInvT/+3xSpP0zY3nZu4Lh1f3/qJFF8DJvKfuqV5S+twQoLfiSu+rqGYnYKSo2zgnWjIft95t8= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 654d54cf-7dbd-4bcf-7905-08d80198d595 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 May 2020 17:18:40.5133 (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: RL9svmceryRQcPBRyzD9d0NxF90Br9h/xKx+aQkaUDJdlaftQmzhWvdqI4UfvE2qn0XG9xBFXf6rJcgJgR8okA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2750 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Hello, This series introduces some nl80211 vendor extensions to the wfx driver. This series may lead to some discussions: 1. Patch 7 allows to change the dynamic PS timeout. I have found an API in wext (cfg80211_wext_siwpower()) that do more or less the same thing. However, I have not found any equivalent in nl80211. Is it expected or this API should be ported to nl80211? 2. The device The device allows to do Packet Traffic Arbitration (PTA or also Coex). This feature allows the device to communicate with another RF device in order to share the access to the RF. The patch 9 provides a way to configure that. However, I think that this chip is not the only one to provide this feature. Maybe a standard way to change these parameters should be provided? 3. For these vendor extensions, I have used the new policy introduced by the commit 901bb989185516 ("nl80211: require and validate vendor command policy"). However, it seems that my version of 'iw' is not able to follow this new policy (it does not pack the netlink attributes into a NLA_NESTED). I could develop a tool specifically for that API, but it is not very handy. So, in patch 10, I have also introduced an API for compatibility with iw. Any comments about this? Jérôme Pouiller (10): staging: wfx: drop unused variable staging: wfx: do not declare variables inside loops staging: wfx: drop unused function wfx_pending_requeue() staging: wfx: add support for tx_power_loop staging: wfx: retrieve the PS status from the vif staging: wfx: split wfx_get_ps_timeout() from wfx_update_pm() staging: wfx: add support for set/get ps_timeout staging: wfx: allow to burn prevent rollback bit staging: wfx: allow to set PTA settings staging: wfx: allow to run nl80211 vendor commands with 'iw' drivers/staging/wfx/Makefile | 3 +- drivers/staging/wfx/data_tx.c | 11 +- drivers/staging/wfx/debug.c | 26 +++++ drivers/staging/wfx/hif_api_general.h | 67 +++++++++++- drivers/staging/wfx/hif_rx.c | 7 ++ drivers/staging/wfx/hif_tx.c | 64 ++++++++++++ drivers/staging/wfx/hif_tx.h | 6 ++ drivers/staging/wfx/main.c | 6 ++ drivers/staging/wfx/nl80211_vendor.c | 143 ++++++++++++++++++++++++++ drivers/staging/wfx/nl80211_vendor.h | 93 +++++++++++++++++ drivers/staging/wfx/queue.c | 13 --- drivers/staging/wfx/queue.h | 1 - drivers/staging/wfx/sta.c | 56 ++++++---- drivers/staging/wfx/sta.h | 2 + drivers/staging/wfx/wfx.h | 7 ++ 15 files changed, 459 insertions(+), 46 deletions(-) create mode 100644 drivers/staging/wfx/nl80211_vendor.c create mode 100644 drivers/staging/wfx/nl80211_vendor.h