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: 727592 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 E956BE82CB0 for ; Wed, 27 Sep 2023 16:33:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231985AbjI0Qdn (ORCPT ); Wed, 27 Sep 2023 12:33:43 -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?= =?ut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szgkFNsoXl0rId+Iwo36T6DZOZB9x8SFVeCtGi3LAVf?= =?utf-8?q?cPNFe9xyl0fkAoTSENeNsEvfqXj53qnpygZBPrVXsGqkmKofqA2rOy091SA+1Co6C?= =?utf-8?q?ugK0Akl1s5W+gn2z/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 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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