From patchwork Wed Oct 4 17:28:36 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: 13409096 X-Patchwork-Delegate: kvalo@adurom.com 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 C3BC9E7C4E8 for ; Wed, 4 Oct 2023 17:29:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243679AbjJDR3F (ORCPT ); Wed, 4 Oct 2023 13:29:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233422AbjJDR3E (ORCPT ); Wed, 4 Oct 2023 13:29:04 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2054.outbound.protection.outlook.com [40.107.94.54]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E515ADD; Wed, 4 Oct 2023 10:29:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eC8Mj/yusLcHCQSL6L4QF8AEV+HIVbuMnKOTK8G7RFKoqlJFBOWW5SOHsaYGGvm1PCSAzxs/MtlhLPl8lc5Yc2ZGv3ZLyFjYH6WBRa1wpfoJf0DKaE6vUD4o5KBKKTE+0Y5TQyqM4eCXgckyG5GNho6Dlt5b8quPa2n8IYV2I4WlFoE3Kp49CpxbhQBnjYCQVcNokYdlc7fzxCRbfAlpZuulqvORTalVL9huw1uQ6hK6Q+TmOTyYN/kkZEHcCzZWxNhsl0XbazatlJQLieOUedjHDv0TuSG8fzgFYDAvEGLLc0yc8shgNjMBJDsTg4VZ85RcN/rXa5lhfkT7sYbdkg== 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=eZHHQ7z+gYAqzUaomMkt2aUcFnqsR1wYgwonnDaioow=; b=P6PieRKs61IcaoFbBjyhO3VkLAikYeJHplHJXp69ieFsmzJldk27g5w5QUxdOhsmlayJPP4/jKrG7JpPaJQPJ9S59gBR9YR/JLsgHNOs3xjPCotKmNv+gc0cpRn4SCaqg6MddS4PKDrLe/dCwxfA+jgZ91f5qwWFJreMpcSEcTCeXw+edUF2MCqftUCXKweWHr8OPbYjrey1yBM4+cScMfFUSOS0wL7zx2S4u95J1HucBFs8Sje5GReQyfoFItvl0ThnSJBYrsEzchGsEHKFMtpHwmTSK5Du25LK1O1EuB3AfuDrI+H0Y9RB0qSf1SDHa9RdiZ4FEtBkVC5EkWE36Q== 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=eZHHQ7z+gYAqzUaomMkt2aUcFnqsR1wYgwonnDaioow=; b=NDxc9jFnFw6CtuMBpluxOmJNX8m9GByfEkqvUY9qf11WoHdjCu1hT9H45d9a1mkEb2MDMi3TDmcssSAa+Vi5ILFyRF68MNRNsQ8YGu5NRtebERXoH64W02K1AfXHesSUt7/GQoT6iPMhJlajDDdVMQRrLuBdClDzCiABxKsdPHY= 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 PH7PR11MB5982.namprd11.prod.outlook.com (2603:10b6:510:1e1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.34; Wed, 4 Oct 2023 17:28:56 +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.6838.030; Wed, 4 Oct 2023 17:28:56 +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 v3 1/8] wifi: wfx: fix power_save setting when AP is stopped Date: Wed, 4 Oct 2023 19:28:36 +0200 Message-Id: <20231004172843.195332-2-jerome.pouiller@silabs.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231004172843.195332-1-jerome.pouiller@silabs.com> References: <20231004172843.195332-1-jerome.pouiller@silabs.com> X-ClientProxiedBy: DS7PR03CA0305.namprd03.prod.outlook.com (2603:10b6:8:2b::25) To IA1PR11MB7773.namprd11.prod.outlook.com (2603:10b6:208:3f0::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR11MB7773:EE_|PH7PR11MB5982:EE_ X-MS-Office365-Filtering-Correlation-Id: a36ddfe4-d6a1-4e5a-d0ae-08dbc4ff6320 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oZMGXU/vrOHpFcWkJ7CVAgTVxDPIw3837BRbWbkbQ1N/rvPSYdD0Z8bwFfjSxYDgJAvBX6pn2deN92De3Y7SJSYkGeCNWYSNLZ9SXwzXZK0DGl8IZ8IQKOAgXpJaZO8jGMHNivxpmm4LmKzZM1957qCxRJ/thZYfDuCpfxMlJjZ4MjiOWL81mUgJ7Ya3qI3cR0soLDYhjPcpoccv3Ijlm/AUCqFY6ZtbOTqTXVcGxngAqu1yBQPiVLI4QleCZQPk+7eza4GQPTxADniUFuibUVngKg33u10K8ZqFe2MP9HIqmFz49ncgx6OptF4wbleb6S3kvb5zbZ9ZHnS9BzdF14zvzQ4H8cpb4FocOZXL6eLoP1fjp82Le414BzFnvucNMWu8D1XZeeKkHJd9d19P09XnQsgJ/4pkORI6r4+CEo0WbDg8gouJWpZeqTvN+9V7gGRzgV+PzscFL7T8pGNK6nYZgcwbuBqRefHdiFSm1PAHoyFHPITXt8rRieevmkBUaR477GdzGtaSBsQF2Bw9ifVBeQ3mBuEM5JMdY6E3vZTNHmViwk5tQP7rPsrjG3MN 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)(366004)(346002)(39850400004)(396003)(230922051799003)(451199024)(186009)(64100799003)(1800799009)(6486002)(36756003)(6512007)(38100700002)(6666004)(52116002)(86362001)(478600001)(6506007)(66556008)(66946007)(66476007)(316002)(6916009)(41300700001)(2616005)(107886003)(1076003)(8936002)(4326008)(8676002)(66574015)(5660300002)(83380400001)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?UKKxxmIjVKZgkhZ8wkAIoHD9WO14?= =?utf-8?q?I82h6p1pYqPY2QPZziqQc7eZ1FWZkkbZjqDXgVpRBGizcRKATgU8LX9A1ZlwjezjO?= =?utf-8?q?StiHCovqeZMKmhAdAEWKRMRsc5WelBVy0JA0WEU2Ipb8SYFFSnUmH8tzXaZyuOC0r?= =?utf-8?q?COJNVwK5gyh1XnKfYi5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n3VsAY2/rnIWAfL82XGch2T4ZxFZTA99TMPWd9VQ?= =?utf-8?q?1dC94TSmNeuyliHIf5C7U8ob/AM8v6j7Bny0dVMTZAkfSQJOQN0ZFKKxHePnngU9W?= =?utf-8?q?tX0e0IIkfFPoPjTODc9gyBGgz7kjFfCMUiKs0F2SrTED/zBjsg2OX82cVIDGHWkFz?= =?utf-8?q?rPFxQj6ZwWGXjrAoI6QdDIQAc9tDLW1OiY01c1ytDNIa+OFEkVvxVllZtqBZtpEqX?= =?utf-8?q?PLoQFUUokJh+FT2tlNXLS4YNFwL/3vHniqwzGVmPs6EYOso+QlIvJlHLIiEdh7i1e?= =?utf-8?q?QtOcv4Z0a13mFbmG628BM6WwhNEPD2aajn/wRRx9cd5+L0PIsbzMsJENRQ2Uj6hfw?= =?utf-8?q?5I0cXGic5B/5KPdy1kfzzN8zLJt1PxwPZKHz28Denm/lhG97EelRfVZonteGmyJT2?= =?utf-8?q?vFp4rpaH+PbDm33mVNkFgmIp3gKl2zFlxJTKJLUASTWd2TBKxtlpNMviKCs/A6kAr?= =?utf-8?q?iirjx3Iguq7XQQb9xQROCguUD121AH3YSI2uzwCiUP8AA0jaBs20NaCs0WjZLOLMN?= =?utf-8?q?nZcWT0qfbKv?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: a36ddfe4-d6a1-4e5a-d0ae-08dbc4ff6320 X-MS-Exchange-CrossTenant-AuthSource: IA1PR11MB7773.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2023 17:28:56.4059 (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: LQ3vP+cMnFKxBa3U9T9m5MtkAHgk2RNYMh2qSRQdh9FPlMdVnvbsrmkTEHaVVx2exAHEZP4/82+nd0Ntde9q9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB5982 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The WF200 allow to start two network interfaces (one AP, one station) on two different channels. Since magic does not exist, it only works if the station interface enables power save. Thus, the driver detects this case and enforce power save as necessary. This patch fixes the case where the AP interface is stopped and it is no more necessary to enforce power saving on the station interface. Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/sta.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/silabs/wfx/sta.c b/drivers/net/wireless/silabs/wfx/sta.c index 626dfb4b7a55d..9c0a11c277e97 100644 --- a/drivers/net/wireless/silabs/wfx/sta.c +++ b/drivers/net/wireless/silabs/wfx/sta.c @@ -402,7 +402,12 @@ void wfx_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_bss_conf *link_conf) { struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; + struct wfx_dev *wdev = wvif->wdev; + wvif = NULL; + while ((wvif = wvif_iterate(wdev, wvif)) != NULL) + wfx_update_pm(wvif); + wvif = (struct wfx_vif *)vif->drv_priv; wfx_reset(wvif); }