From patchwork Wed Sep 27 16:32:49 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: 727594 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 3D451E82CB0 for ; Wed, 27 Sep 2023 16:33:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231858AbjI0Qd1 (ORCPT ); Wed, 27 Sep 2023 12:33:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231718AbjI0Qd0 (ORCPT ); Wed, 27 Sep 2023 12:33:26 -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 CC9F5DD; Wed, 27 Sep 2023 09:33:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TodTi8vC8FmITG7x8GcfpPO9nXh6wc8EEaCDRclbymxtq12ngfjHsIXtAMgLhOS/SOqrLZhcsCpVAcP/N8kuB2G0uNh0MSM3zEokzMTi3HZsEl3mWV1UtzJ3EaL3lStXkJagchmR97yb/6SuV1Yl8HUuU/X0Io6qwicKnVxPvZp9txHS/kawlHFTUnPNVzwoeiha9lDmamZWlt/dizIdShmYREUraocRi7uJXt+yWWmPDnQBKFUgujsjr9GEqrlheIC7FT6hXUEI5l7tO+WQ2wkeKxIrORy3KOvHxSrc/UGrDssKPobX6oF3U9Og77sidQ/to2Sv76ntIv3ELl42CA== 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=jn0Oa40vDUH1BmfdOMafSax5cinFd0xoDFgdYmXeBaLWjAJT4ca9Y8LqCVLPuJ1ImDRbuN1zbHH+XYd0N+LtWEFBH56Esd/whhfbd+7NdupcDG/DSnXxwRqEdiO8kJfzT/MPp8czir+4kJ1WpYfuRVOwv7cnQyKNhk0bZh4xWnTJeK3BwISepA2s/gYIMurttq/pF/1JYK2b2sB9GZF4QiheEwgbxXJ6L5GYPHeaktWB9ri3kDqaLYowNTGD5cPMWiqG9HgEebX5Z/W2O2cWrLEJ9LldCRsaMC0i8MAIdG49IsM7p5JEA8yp3556aHkdLJ2TcP7snDAPm57yhgWkRg== 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=S8Er7HnjR21uemIgvxdgJ0mwB9EwiflQ+/XYiOlRNR6fKHoEcTbT006n4rRNuP8AUKEUu3QwTq1DC2BRPuBXpTptAiaBvThDuyfI/A8cXQLjNPg4MjguhpYe3fFA4En1jZwuuQ1x6ONWv2Q3lu+8xS0oeFwSLD50P/qLuu490Ds= 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:21 +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:21 +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 1/9] wifi: wfx: fix power_save setting when AP is stopped Date: Wed, 27 Sep 2023 18:32:49 +0200 Message-Id: <20230927163257.568496-2-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: 1f486f14-5dc9-407b-912e-08dbbf777484 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KFNxBwVHILwZVF66zAQbUUyE5OgjZCU1iRHw6u+p2renmUvKY3+mNHR9rIzy4YvJnPLFmkv+auYkJbjqi4xVHbFAfGZEoSQ6zXtk6qtagQCUSfremixz4g59b50WuDnZEQ0IyV9SVIDZyXB3mZH5GWySpw9nJlcMhyXs7Z/aw+8bHce3KijUUpeM34SKZIovhz5wkVv4rfmYe8EG5aJbISvoiCvnfxiIAf63UFLMcL7ylV6eC+I8V1lzb+qg6vAfBEeGWXA9EPAlVncl8NAdIzNbrISPxFfiY803/2C8vBKL9u7dTPJ0XyrDX+DYPEktLU2lCkte2K+14basANCX7aRbC365zq71/qQfmVKwe6XJzq4ql4H84coyoKdmY2rf2g6gBrsi0798PJRsULrG8qfXKxCvRFQTI1kmcXqItke2nGRC2fcbr3OHt9HFgLaE4RLYp0ZHq2iIfyWQif7FZ2v6mZAHWKQDwBB4eveomY0+cafYuZX4qKNqhoV1+yFM18ZbM9Zfe6yzRy8JryVvK934VxEj1dJPgYlesLMvZIsPLGVluSu8cjzcbvTfNSWS 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)(66574015)(66556008)(66476007)(6666004)(1076003)(86362001)(6486002)(52116002)(6512007)(478600001)(38100700002)(2906002)(83380400001)(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?gzRGCntxMy63iTbhDn2zWk2MsZMx?= =?utf-8?q?C3p44kLuZbGhdsPDu+2amxuTf36L6QlrZiahLeo6hh8WfgBLFtv+uRlA3kjoKzTLc?= =?utf-8?q?RCDzPAEfeZjjyUg/4rAUq/E6ZRauq+WpeylwfDGw3183tL/rh1DbnSvyCd4KGrqGX?= =?utf-8?q?i+HlMZ0bAWyP/k6FfJjvNXUP9hQpIcKnAvNiqRrUwmB/aYyNPkdTFmayScO082Svi?= =?utf-8?q?B8McL6p3HG9la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daychZT/RUHDwDBB0Xw9IxhIrPejPofT1HZSMIFx1jGk?= =?utf-8?q?BPaJUliLQXTTxBjR3CCz2EVNp6aGrLDFmSwqcK9JUVCGWmfAKRiz1fWKH3T3q0KcC?= =?utf-8?q?c93QZ8rEm9DJcGNdBsWeDe7O4RCeHS/tpnnpFXinftlgp2WfnJ1AZepPKgJGYILDb?= =?utf-8?q?CRfonZ03VSNB3oTjos9+qawDNAzPEJljsfrzDaKnqP+KEbxKBGHqbbo/JYi8muNc5?= =?utf-8?q?xrOZCHZye6jSI3IvRNOo3pcaQayQeSnEhzL1MbD55Gf8oahVd78AwlIGcBipPx32f?= =?utf-8?q?bsNil56Fud3SG/Qaza5z9AUvHP5YGOftQkZDhwL/qZfr70CSn1FkmIMHo+6wZQVF+?= =?utf-8?q?56+HL25gmf7FZa+7Lq5I6ppNoq94oa46kq9uR/+Zm2mro0MoYqx7j+cRL7r5Xa8ML?= =?utf-8?q?g6RTHXOHcZa3sg1jKShaPzBi+deYQ7tUak/BLrhVT4ta3JMCUXR3ruZQZHQGIuLtY?= =?utf-8?q?r+MAsydM+tw?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1f486f14-5dc9-407b-912e-08dbbf777484 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:18.2400 (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: RH5MRTGMwR+/rFeFlvTtEexIqpxrAjG1lxg/8PyKk0Qodfg0G8Be8CRgOo/T1KYKEdmNKADaqdHvNSWsy+ohWg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB5041 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); }