From patchwork Wed Sep 27 16:32:53 2023 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: 145642 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp2977174vqu; Wed, 27 Sep 2023 17:06:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFX9szocez4yDqJlAPJowF10Yj60TnVHBCAsqmVtEJar7J3B7tP2+mORmbZbBZdAc2pw1hF X-Received: by 2002:a67:f1c5:0:b0:44e:98d8:c62e with SMTP id v5-20020a67f1c5000000b0044e98d8c62emr3681838vsm.33.1695859617107; Wed, 27 Sep 2023 17:06:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1695859617; cv=pass; d=google.com; s=arc-20160816; b=Me+ftxeJRwHYjML7sNfQ3/uMu373u1EtEdkO63rViNcSSbq7RFQyXewML8a6Q5FEbp bgkLgG2OH5m4JqGe9L6qhIPAWSbaQ7bpz7vYmUcf6iTIip6LbPkXZHq0y9CnkC2T6IBW FYY5e7AN/tIdT7wBkblSwljI/OZ4ID+5OCx7gIw1zeOcd05+zgBpK/3rJX152L8CCAGo k9kutZVBlxsglH1Mfto9qrpNtsMcNYWRXxYh1wejfx313xkRdQvvhpM+BjqfwJutS0mw e4jFDB+eVa3BoYIkFheA6hf5qUM5cWejLILJEluGJOna4oHpbtaZiGYPVx8M35SkzRL1 VmqA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=n4d8aGNrGVWl5jnWEQiq+LEGrvdAMc1Dqh0Q/+W4ZM0=; fh=l0GbbulFVEGIByrdVk2PDAYC0467jisoj0AJEvNmoTE=; b=NFTUflKTmp+zRVnUyWxQ/a2PSNOEbedLASeSB2+Lx/aMbNRbA/XQahCYqA0lNr6C9u m90p0s+nupCxuVmzNeUVy2KY6zXASaF9whV58ImGgTR7A0VqyrYpIt/+2LB1Oyi2WpNn 5neH9q2J2PtxK3LSOIrxMbBw7wQW89sadjPi3Btj+giIC978WciFGDLaLIb6T233vS3J U7FhKrlJd0CMQ8eGiR+yPA2PrHgaL9KbP5soU3lDMpj196l7J4dUHlD9nhneBT61hNjd wnm3KpE8oyA0Luo7p9UHZP395zk3PQ/27+0HNX8kDGixVQTV1bpqIjE/hoCBUS6fiIP7 ikqw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@silabs.onmicrosoft.com header.s=selector2-silabs-onmicrosoft-com header.b=llobKuD9; arc=pass (i=1 spf=pass spfdomain=silabs.com dkim=pass dkdomain=silabs.com dmarc=pass fromdomain=silabs.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=silabs.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id u20-20020a634714000000b0058556b59229si2807487pga.1.2023.09.27.17.06.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 17:06:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@silabs.onmicrosoft.com header.s=selector2-silabs-onmicrosoft-com header.b=llobKuD9; arc=pass (i=1 spf=pass spfdomain=silabs.com dkim=pass dkdomain=silabs.com dmarc=pass fromdomain=silabs.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=silabs.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 05B6D821AD88; Wed, 27 Sep 2023 09:34:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232050AbjI0Qdp (ORCPT + 19 others); Wed, 27 Sep 2023 12:33:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231861AbjI0Qdk (ORCPT ); Wed, 27 Sep 2023 12:33:40 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2088.outbound.protection.outlook.com [40.107.237.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15250FB; Wed, 27 Sep 2023 09:33:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DDmhIeCnsj/CZVQfuGpig6c07e24aYc1av/S7yps6PmMhNvtFOPF5Vt9h6x7wG6EU9usj2E1DKY4YALbZ79ENWZa8zT7zVjfqVzZh+5uc7Wbjd1xg5RB+vzNXLiczHqKH1Ky8rd8WokTuC532XHP29kTDPdIIIEspm9qNcL8wUeDoLbe8i5JsefjPhEkIlW9iZf5pj5IvofKQ9q6nBPDELXgleCYueJrxj1yCrmFlahgzXzpki1h3v8T5INWj8s/j1MbQEnim6xvtTdmN29bL5sUeFpoDllNLA6SB2DESQmLTuiTj7NygAfdpuo0cbUGBZ14XqU9ZpN4R2WEw8M9iA== 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=n4d8aGNrGVWl5jnWEQiq+LEGrvdAMc1Dqh0Q/+W4ZM0=; b=YeZGXlMjO3nHmg6pCrny9nSMaiocIz8bv/0pTGOpz74mM8H8nLnIYmIHO6t6DFWosyFnZTNGZX1DC4pFkcoZFHCnu9e9QRDQqu1e5bDyrJDwJpxgFWcAjp9q267u4tdUk4gx/ZwRid/XMqTgDyda5Mqz3vrOYlsbed4Rq3/WHlXCyYMuihXZp8NbsrgjKB48jU7Pnnu0UsjReprjTrf8Yrp9uBLrwxo1LFWPDbtOUlzVec8gHJgOM9YCB6yY6lqXial/PgRK5GNAxYXiQ9GJcoOGjpIHzSv0QhDdjBKne5OkYMXR+Oo1rD9qHzS4Dd4R5a1rwRohpSJxH/xMuDtmwg== 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=n4d8aGNrGVWl5jnWEQiq+LEGrvdAMc1Dqh0Q/+W4ZM0=; b=llobKuD98Yl0fF4wXHm2hoWeU6niu7sqNCvTieNzh/qWYAWprSmj60j8AmFYYgpz9UbG3hti//cZ8EZXIaRsuyzAqNeJ4GagvxBOlGH5hWTqxxW7+5H2L5Me2xcL/lm8tP7Q1cwu0swCNVCOz3pHPPVaFmxzcVWjNtVkWMAokPs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from IA1PR11MB7773.namprd11.prod.outlook.com (2603:10b6:208:3f0::21) by CO1PR11MB5041.namprd11.prod.outlook.com (2603:10b6:303:90::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Wed, 27 Sep 2023 16:33:23 +0000 Received: from IA1PR11MB7773.namprd11.prod.outlook.com ([fe80::d6c8:4cb6:2594:d8f3]) by IA1PR11MB7773.namprd11.prod.outlook.com ([fe80::d6c8:4cb6:2594:d8f3%4]) with mapi id 15.20.6813.027; Wed, 27 Sep 2023 16:33:23 +0000 From: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= To: Kalle Valo Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH v2 5/9] wifi: wfx: add placeholders for remain_on_channel feature Date: Wed, 27 Sep 2023 18:32:53 +0200 Message-Id: <20230927163257.568496-6-jerome.pouiller@silabs.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230927163257.568496-1-jerome.pouiller@silabs.com> References: <20230927163257.568496-1-jerome.pouiller@silabs.com> X-ClientProxiedBy: DS7PR06CA0052.namprd06.prod.outlook.com (2603:10b6:8:54::30) To IA1PR11MB7773.namprd11.prod.outlook.com (2603:10b6:208:3f0::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR11MB7773:EE_|CO1PR11MB5041:EE_ X-MS-Office365-Filtering-Correlation-Id: 888293cc-2bd1-425b-0db7-08dbbf7777d3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e7pZLZT+GOeqwF8OBpbP+hi48vwggqwMmTiWdH0G+lXvnR14lFl9dyTO0z/7z24UZkGTDK1epQWVdK8Mi/4ApsIhK0PSiDWWXctz+4WXJePBgdS/kRDSMqL4BjE87n3700QEUe6ooJnZYvJJc/VasNEIPOy798kfCat04MSa6ivfqrEfBCyh8JfYswJagcD7bEBCYogu/9SH2Rh5lodBmtcSz1vRHBsEbLFy5Z+kYA4fBbFeYE2Lj2TdPeu4m/xWy7+O226USCKkspKh+8kyJPzbpXgDAitFjpvkDCl28eSQqgo/qbb3wYkBJ6gzgwR6xDDNfxIe21CyTTCR9Fwm/exyhY52+WYIcRS0hy30pNG6LCYkwXu7EH4ViR1+qxBoM5myc1URXzldfTO+6AsxQ4HwTL3JN7UoJdatRY2nZqfztlT5a/DBPQ6xLG9eMtHDxgBIXJP5r//bbgKj6tMvofGji34R1ipRX8ha/ZtOjYbCmdI4wPPrHy6stFbFq+wLjkhx7L4syZ3VIrhtXcjQcM1TsJO+K0GCO737cWfzv6/UZc38QJWPyT8k4/fV3UtB X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA1PR11MB7773.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(136003)(346002)(39850400004)(396003)(366004)(230922051799003)(1800799009)(186009)(451199024)(6506007)(107886003)(66556008)(66476007)(6666004)(1076003)(86362001)(6486002)(52116002)(6512007)(478600001)(38100700002)(2906002)(5660300002)(316002)(6916009)(36756003)(8936002)(8676002)(2616005)(66946007)(4326008)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?JXw+BalRUcDGhe5+rhojDqqY0G9G?= =?utf-8?q?ffZsQ86h5h6xyzTzZoAu4vPPCBQ/CX8Tq3APrTStefu0Cda3v7r+9YULFqZS+G9LK?= =?utf-8?q?Nj6yaay2G64m7hAd03yMLPeX8rmKtgGz0fFUm3sAC1o3Jk1VyCSV5AUOrZSdx/hh+?= =?utf-8?q?eLbvKanbfmxGCjsvslfTHmDlMk2AMyJaDefSMJbm8PStkcdh8Kt7TJZEf/iqARmtv?= =?utf-8?q?8tgTucE5jkwjUkB6oblglDmOdrMqmMjkv2jmnP9FJlrdqPRR7q8ZO615euA2Ccvvo?= =?utf-8?q?RMwwWeiqp0ROcWygg00MCMy1fs7Q/o4uwr9W7nw9QU8B3JuK2D0oGJf9456eBr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z/I5UPy6mu1D6pQNCxOH7plx8k7jggMy+8Z+IxTWSq5Is98huH?= =?utf-8?q?zHaBx5IquFVKwGSVHsIUGGktbHBq3NWjC85WqOCM9O/2K1FgQgim+Ccgwae0ioyHF?= =?utf-8?q?5u8xbBBiZd0AUI3y0vsl64QAMz9bC5Okk/UPV/g4JUzNsJsRrH+v1zpMiq8kFBXnu?= =?utf-8?q?Xbi9inpNg4SKdsiTKyYnXcKwdqvrMsa5GQEts2D5v18DDDc379V795fEbtRr0pcJX?= =?utf-8?q?t0rHrjUImo93MWbdkA0JctgQaWr13Q/CGwnV0a+lXL5/JSJyphNs8UsGg38lALZq1?= =?utf-8?q?mm40q4A+34e4uCOfo5rDrpK27KBmHFCvQoTDq2NPrT5eckLCv8ppLH4IZmMfEowe4?= =?utf-8?q?YzxMAA3QgLF?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 888293cc-2bd1-425b-0db7-08dbbf7777d3 X-MS-Exchange-CrossTenant-AuthSource: IA1PR11MB7773.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2023 16:33:23.7662 (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: oOd4TEOqk69XRUve+iecX+Y0BGx73BO1jojFv7QkYwilUU+Djqab1rLawOAKIOZ42Tc/VQdh/Sv9vMcitoMv6g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB5041 X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FORGED_SPF_HELO,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 27 Sep 2023 09:34:01 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778237693723326053 X-GMAIL-MSGID: 1778237693723326053 First step to implement remain_on_channel. Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/main.c | 3 +++ drivers/net/wireless/silabs/wfx/scan.c | 12 ++++++++++++ drivers/net/wireless/silabs/wfx/scan.h | 5 +++++ 3 files changed, 20 insertions(+) diff --git a/drivers/net/wireless/silabs/wfx/main.c b/drivers/net/wireless/silabs/wfx/main.c index ede822d771aaf..31f6e0d3dc089 100644 --- a/drivers/net/wireless/silabs/wfx/main.c +++ b/drivers/net/wireless/silabs/wfx/main.c @@ -151,6 +151,8 @@ static const struct ieee80211_ops wfx_ops = { .change_chanctx = wfx_change_chanctx, .assign_vif_chanctx = wfx_assign_vif_chanctx, .unassign_vif_chanctx = wfx_unassign_vif_chanctx, + .remain_on_channel = wfx_remain_on_channel, + .cancel_remain_on_channel = wfx_cancel_remain_on_channel, }; bool wfx_api_older_than(struct wfx_dev *wdev, int major, int minor) @@ -288,6 +290,7 @@ struct wfx_dev *wfx_init_common(struct device *dev, const struct wfx_platform_da hw->wiphy->features |= NL80211_FEATURE_AP_SCAN; hw->wiphy->flags |= WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD; hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD; + hw->wiphy->max_remain_on_channel_duration = 5000; hw->wiphy->max_ap_assoc_sta = HIF_LINK_ID_MAX; hw->wiphy->max_scan_ssids = 2; hw->wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN; diff --git a/drivers/net/wireless/silabs/wfx/scan.c b/drivers/net/wireless/silabs/wfx/scan.c index 16f619ed22e00..51338fd43ae4f 100644 --- a/drivers/net/wireless/silabs/wfx/scan.c +++ b/drivers/net/wireless/silabs/wfx/scan.c @@ -145,3 +145,15 @@ void wfx_scan_complete(struct wfx_vif *wvif, int nb_chan_done) wvif->scan_nb_chan_done = nb_chan_done; complete(&wvif->scan_complete); } + +int wfx_remain_on_channel(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + struct ieee80211_channel *chan, int duration, + enum ieee80211_roc_type type) +{ + return 0; +} + +int wfx_cancel_remain_on_channel(struct ieee80211_hw *hw, struct ieee80211_vif *vif) +{ + return 0; +} diff --git a/drivers/net/wireless/silabs/wfx/scan.h b/drivers/net/wireless/silabs/wfx/scan.h index 78e3b984f375c..2f8361769303e 100644 --- a/drivers/net/wireless/silabs/wfx/scan.h +++ b/drivers/net/wireless/silabs/wfx/scan.h @@ -19,4 +19,9 @@ int wfx_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, void wfx_cancel_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif); void wfx_scan_complete(struct wfx_vif *wvif, int nb_chan_done); +int wfx_remain_on_channel(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + struct ieee80211_channel *chan, int duration, + enum ieee80211_roc_type type); +int wfx_cancel_remain_on_channel(struct ieee80211_hw *hw, struct ieee80211_vif *vif); + #endif