From patchwork Mon Aug 7 15:05:38 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: 712334 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 0CE9CC04A6A for ; Mon, 7 Aug 2023 15:06:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230144AbjHGPGS (ORCPT ); Mon, 7 Aug 2023 11:06:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229931AbjHGPGN (ORCPT ); Mon, 7 Aug 2023 11:06:13 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2081.outbound.protection.outlook.com [40.107.223.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6237C10FC; Mon, 7 Aug 2023 08:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PzCcEyT16T6qKpkqIEF3jv9eGsa7Ds4ifP1fbNavFSpTax0JOW6WL9hkleu0TWPb2+zMOVhhvkPL20l+xhL8yBPACmPKGLQh6zMoPNj0nRX3yPrUDvewzXYr+qAR+wtukKp5hnCIEmzzY/3WAt2DHlzZ+xP7vbF4Y6dxqtxcbnFgd/tunIKXCR5ZmhJ1QF9eB1LKvGt5zXohWCxRtzleQNKnrLljCTO0u4VLIbOpRHJ9O3sSGFG07aeJN5b4UUEpFsOHOXSeYo1NiKDSmiHjLKWS9DwHxxi+Ty7MgGm9njtuVy8rnKFj3DRGCLLEqZET20iLNqNQKb2c84xb0c95mA== 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=norDEW8Hxm6C7u81b2eY1C5/61vShbjHMSmIeYSui2Q=; b=V6nHNkMW4/M7p7XSmgW9H9IOLwdtN+qRgWmkhy3Ekv8ncvUVyF9aQVBQYccoJWxP7SbEvlCHZtM4Ac/beXj5eB5CQkOO880lZs5VrHK5OP4cnzMnC7qxo4PHqymatQpeyT+OhcYwjl0VCEBaE+10f74zGJzVsiWJSnMGPHSJEWOG6ATvhmrWblaH5pyghqj/Q2g7Df3FhQ9x1rI5XbX1HSFs68rt8NvIn5O+uKMYbXmmz0td8vBfC3RS40THGRysA1GxMHU8gcmHgB0vejL8rhEbE51+D+0MZL4xSOsHwcdVsGH0JMt9Ftg2tuypx2MFrQYkoNtiTmq9FHxDK/YgVA== 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=norDEW8Hxm6C7u81b2eY1C5/61vShbjHMSmIeYSui2Q=; b=KVqy0aduMVkI9nDgww4LTggRX1O/zOz9OZmWiP4+LNCmEw2NT3bLO3hMbRjMrWpKk5GvG4DwbIcYa3Fqipf6LE5bxlz6TFGEBAEbN5sVkJ5flCntP8knU8slABRJg9Si2APbvM2yean92aBXyR10oK++N1zFyKwAStTh+uDNgB8= 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 SN7PR11MB7590.namprd11.prod.outlook.com (2603:10b6:806:348::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27; Mon, 7 Aug 2023 15:06:08 +0000 Received: from IA1PR11MB7773.namprd11.prod.outlook.com ([fe80::14b1:be6e:19a3:2eca]) by IA1PR11MB7773.namprd11.prod.outlook.com ([fe80::14b1:be6e:19a3:2eca%6]) with mapi id 15.20.6652.026; Mon, 7 Aug 2023 15:06:08 +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 5/9] wifi: wfx: add placeholders for remain_on_channel feature Date: Mon, 7 Aug 2023 17:05:38 +0200 Message-Id: <20230807150542.247801-6-jerome.pouiller@silabs.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230807150542.247801-1-jerome.pouiller@silabs.com> References: <20230807150542.247801-1-jerome.pouiller@silabs.com> X-ClientProxiedBy: PR0P264CA0252.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100::24) To IA1PR11MB7773.namprd11.prod.outlook.com (2603:10b6:208:3f0::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR11MB7773:EE_|SN7PR11MB7590:EE_ X-MS-Office365-Filtering-Correlation-Id: 1d66e59c-821f-430c-ca6a-08db9757d423 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2IkcFdRV2xFzeg7sWZCxUb9iJZqRr4D2uleMGUjPiol4n8e3Tpf/PUcDu/mJ48yJBLh0zV1LqnggNQ8sxyHBVtLzMTa7tgJpdFyXIFrAjlVULL5OlzE7LIvBjMPGPjwlavB9aSzl8wVleq3GtbnQBpXQOloYfJoSUQIHVJWaPtDgogwGD9GZgM8mhGmQqL9n4C8VR7dx9+vyrxXQ2DwoPf+gS0l8AYvEIv/vItXNPFHvwwvM5sCilgHHjV/zqDLCzUka7wfpQ2OgdYY49VVrqrOy1RMnR+poooMwbfXL0vJe9mJwVYqssBzAuyFVwT3R5yMVSeOdfPnirNwxM9boOOQdFpeiYmZftKZLfrzOgdIVof2uEYM1W75BWZaqeHaIeoS2NLPo208aFMUeBl3HBQKLEfcpz2F/N1ifi0Hc83F6hfMOETWEpHAd5adl1uECnz7yvj9tzyhHK6nMKw28Rz3Nzxz6iICJh4juIviAPaJ4HE5G/z43QJqou1SvfRK9LoxNkeJTbmRpfirq70pJxkT63YTIs1H99Q5A9tUwYJm/4ekWjadHIZ8EndB/8Njd8bQ+i/PHie7irqlXRypxgZFGH4rWMdiVKzUwP2IreD78xyujr/6dmPiuy9QsIyHl 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:(13230028)(136003)(39850400004)(376002)(346002)(396003)(366004)(451199021)(1800799003)(186006)(2906002)(4326008)(6916009)(66556008)(66476007)(66946007)(6486002)(52116002)(6666004)(5660300002)(41300700001)(8936002)(316002)(8676002)(38350700002)(38100700002)(2616005)(478600001)(36756003)(107886003)(26005)(6506007)(1076003)(86362001)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?vOWFTk/EP6YdtY2NXdqRdw9SdYHZ?= =?utf-8?q?xI/mOIM6YtmBQbgNvME68bB6myYXi57AXojQ1C3ZYPwQCCh+ue/G7563U+L8uDZLW?= =?utf-8?q?ZQDdB5jf79+szPjOd6JynRBRMDTxAdq/OlSaE7kX0jzjJ77zPxVD262Rzk4riRdPu?= =?utf-8?q?zUjD3W+uUzcQw1NH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mPLF3UwS1MpWQXj4ds2VKs9117kNBhcnuu7VGKv7WAHfN?= =?utf-8?q?vMYLKm+aatZgd7F22eLZlkFPrQ24Pw4ZMcLmc89vJj4lwdw0fOTmR3HJ+J1EbfekP?= =?utf-8?q?mqVmTBZ9BGk/m9/9yzc2VJ0DMK3hNfQoJQyRP70mwODIEM0kaJCvpJyWaUqxv21nj?= =?utf-8?q?5hPmcSOZBL66O/9HA+Fbecy/Sg09vX9etmuQnjAvGL1f6ypuV5N5G37ZBjRmExhHS?= =?utf-8?q?yODtdWzWU9qXHa3nSP22PRFtjss3Vue6GVZt7+FVxuv9O9KkvTXl+bHUGithKCssJ?= =?utf-8?q?GqaKHyO1+w3y08JN7HPjJvXaD9rAfxZ+pSNRT+7O9mSiZwPDhWlndxO6Frk70dmN+?= =?utf-8?q?WZOZvqPii8+jsM+FwgMDQuxuJeAukd5LXw0p5+ZDOHmzf2BFL3dwroCrB+XktILg7?= =?utf-8?q?hYy/N8oGRoPVEQC2Uns36eA/spZSEAuY/+06vuyOEg54R7Zh+TyjIyl+nIZ4dpkpQ?= =?utf-8?q?/V3HZePbRufa?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d66e59c-821f-430c-ca6a-08db9757d423 X-MS-Exchange-CrossTenant-AuthSource: IA1PR11MB7773.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2023 15:06:08.1092 (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: 3Sky6aDTnJCttxZ+QArkIF2kvrhqdy8SbgATw7ZxGqGvtTDnrnDKG9KbO/CUPr3sw3RoEsP1KAPtGzQnmcHIMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB7590 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 0b50f7058bbbc..a0906d7d026e0 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