From patchwork Mon Aug 7 15:05:34 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: 132218 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp1564294vqr; Mon, 7 Aug 2023 09:27:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE8Cs3cFa4WIN5UF/UEOhCHqcFTr8EXNAWsxCqoW27fu3UldeRbKAloYhycopbkNtz+Cp4z X-Received: by 2002:a05:6a00:150b:b0:64c:4f2f:a235 with SMTP id q11-20020a056a00150b00b0064c4f2fa235mr13047212pfu.30.1691425636181; Mon, 07 Aug 2023 09:27:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1691425636; cv=pass; d=google.com; s=arc-20160816; b=Y+f9sE0lUmt3NsAPCAsbdyLOvgLFnsYueT2dq1YeHsTM2o5Xw3q3UoL0EMJuRw0L0d 5BDdOJhUro7hSqvn6CeMDWv2YS9xTc1ZOTY1Xz9yPdCTf/GZzXbvziCsfQRMRFkhcN4b hbBflgF2dx6t1FrSgWCMsDmECJujBRVw1lHJngUq3dR9sZek9GSL3CVd/OxLlb3R6uxY AHL3XD7gSUMChJO62r5bogBsqRmNfkM48KEaaLBMnr19YX83DnQiobL5nukhTf8ShcFF jnaEIHR5NPP2r2OBSXCeBbfD2WAeQbWUBB9X+6CPKf81OOODs0tZUqW0J2yRmCe6lzJl jjrA== 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=R02y5uDMP4DY2FFVtqTykV0XgTnZxfANfWvLa88n9rs=; fh=JxyQ9cOxFJCXit3b6bV33e45OVX7DLo5Wt+gwsJ5HK0=; b=Rew396uxDotRfA/zVA2j5rE4cynbgUSSmge+xsJQ5RbjWmlgAiQyfkYnBuOKSvDhrm 3QMF4AL8Qv96N5JsfDcJH7gUuVWY3F/+29+dTKN4s3GRYxAtCZ8o7lZbFPqYIZbjtwhh bCGYz6F2heRKRYjs1iBsEXvNnWfJhukeu4VE1KcDXURduadRMekBkFlDH13bOIA8vhtD iE0+NHjLveKTwqPDMihuMKN0+TLCVsOSSTxBbomx5WMwK19UnS3gxmft/G63rmD3/Wuu wvdLF5KhBLIvKRgwb+kjk8CnRjkp/0Al58JgQXIxthm8H7TaskXKIBRXxGnYgw3DvSwt +Q5w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@silabs.onmicrosoft.com header.s=selector2-silabs-onmicrosoft-com header.b=jHCddxcK; 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::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z19-20020a63e113000000b00564beb61465si5181685pgh.264.2023.08.07.09.27.02; Mon, 07 Aug 2023 09:27:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@silabs.onmicrosoft.com header.s=selector2-silabs-onmicrosoft-com header.b=jHCddxcK; 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::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=silabs.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229483AbjHGPGT (ORCPT + 99 others); Mon, 7 Aug 2023 11:06:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229560AbjHGPGL (ORCPT ); Mon, 7 Aug 2023 11:06:11 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2041.outbound.protection.outlook.com [40.107.223.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E692910FC; Mon, 7 Aug 2023 08:06:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hxxqZjtiBPu5/sBdS7p+fEP6KiOZF0ietmGWKfe+LICEPGW17kXlQMjLK/8zc/sb6zMzURJJTSVlebs0B5kLtp8XjTDaczSbOksF5WEbU32Tca46AavF7Rhi7+zrHj8J0WWr21rRPaLzmUzzDGukaPyuPmMJsycJqYaOEKaRYpwSGI/x4mlN5gVQ4UbuwvsF39ohLUYs+z0Mi+GcmNQStl6WW2Nm7pV1tU92AWtJAQfP9YJLADx9SkChpCCMb0cFUNe1LraK/OgZYUVp+hHpeSoR5AcDefrKUytsga/P0OOq1otfzu6/Foj5YMVsV6rjbuvXexQeh2ELrGOf5B0RoA== 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=R02y5uDMP4DY2FFVtqTykV0XgTnZxfANfWvLa88n9rs=; b=lJMX1nC8l9+YJnuyzStcDGWXaZuLCP/1Kzji1A7IwfPEPX/66hav7DwCHKfLd5clbNOCD6J+VFGnIsGf5T9fY6AthAEqZSWKY9lqcGbOgdtz8Bl61fNMfFOH5MxLAppL0/6jeKAxvpoWS8PzZUfZ6UjSFABuniwgkiB15D3Q7fFlRf8/8F+MQ/HJWh19596rUsWNLMmm2s41Rc/zkJPzz2XhPBAGn6F5RmapBe2wOHnVvSRncWWpxIp3eXnCy7EZZVBrUbv3u6qS08DoruJppyy3vrmi31lMCBHb5HSlE9vy6uWkXCKAZXwISYLZRAK21kmKdVy8WWblou4Qp8YVRg== 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=R02y5uDMP4DY2FFVtqTykV0XgTnZxfANfWvLa88n9rs=; b=jHCddxcK+zjwrUMJYsivZR8mFEHUPP64SKM4ZK2rITsYoNrf1wzCnhAbpvrJSPM6ADaG5X47IioeS2WmGA7LXLCq/Y0GF2nhsnIaznufVi2d74XSP8j2fJeeZrWia7pTSR9sFOQ/3QzF1q/W5wlXtm/tEPF+5boxnKjlEiB6Q3Q= 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:04 +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:04 +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 1/9] wifi: wfx: fix power_save setting when AP is stopped Date: Mon, 7 Aug 2023 17:05:34 +0200 Message-Id: <20230807150542.247801-2-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: dafce701-c166-440f-7069-08db9757d1f3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hmBf4j51R+Tsv2XqmA+UZXsUgMrTSEY2L3+PCnSG/sfhsZsFjHZuP9DwJ2rmYzELiwXYtAmdGTk9zFXi6hscPffi2PYqGlWcrCydosDkYf7mV40b6bB7Pwc5Byfd6dPwOhrtzGn1ILvBovJqQs+zET1DFz691qx5/ZkJ/QkKfNOryUWeT4/yf04sHxD5zS9tnrkfLPMNQKM0ca271OBBzWjb2Q+nP7hdK5LL44dzNCv6U5ohQCJIfWvPN2pzbBkE9RO2bJy955rUkhnRJpnDmXY8VOlS0UrDDs9pWjf+3il7ZfWJJBaXytycm6h72iqgki008WU6NBIIgFSt9E/ohtP+La/vVASBgRZJOLBPNWvonoTzoGIizGx59B/VgIptJVKbrmktGT/vJ+pPqMdsv4tveL0IjZhsePTq7lzOUAyA9nu60vhCDnxmxrI0e0m+8I26yYXd+QC6jGftAGo0+WZBLbat7+kdO0cXYwrpSVU2/z/FhpzUWNNUUJmeUcB4fkff5v59W1q9VsDGJDFln2+glWd7JFtlh0q3TNUCggNweKUwQuqEMquwmuvzP4YrY3DGAg0ayK+wT6LFYbzbWTsJlFwrcijRwGk5nsyypkNOOzcNC+WPMEw7btTOqjb4 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)(66574015)(83380400001)(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?wXh7sAmBQ+yIYqVwYxujbipgkwDm?= =?utf-8?q?nMvopKcPq8bHC+gFgVY2QptauWx7Y9CIkMWib/oInkTfLjFemI7Le7WFAvUUb/i2/?= =?utf-8?q?Wdf5j0XTqegLp9oJexDXLHPwVnLNXcMXy7NaxfQnevRGxI2J0tFXAktP+sk/LICcB?= =?utf-8?q?hu6hSK0KkU77JuliXgmjKK/tKUJLG9a73UEAo1O2j3cvEi0HPu+PRg9jjKme6311K?= =?utf-8?q?ba6HEJjM7QV3is+KWefwG9zkEKtn+ZKgQLVFJTsSfntokeGHeV11dAIPV248w9cs6?= =?utf-8?q?umtW1Wv5X/Q7eWsoBPJc8Cw/VIVD4sooycAodXL3wa+jW+i4PyqQtowvycS+oZyLL?= =?utf-8?q?BNeaPTb0BnygWk2q9I1xhwGkOls/J69pVQTaYPLXMPH99ic01XLmdWOF3f1ZL5O20?= =?utf-8?q?pcP2N4yS2FPYREUEBu1KyxilgBdVvYOsUcdacK4Eacqf902JCJSav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Vp4oBTIwkl5MtQBoPbA?= =?utf-8?q?VSW1zVYbD81NC8hjp+cg3b32QLK8pwCTnS+IVscOB7UrCF2+r/BykMlqhkGp5kCfp?= =?utf-8?q?mDv9aXOgRNAtrfurEeBQ1OXEUb3xSu1eJ4OSKcZy1oRATgzOQqk6H1F+QcRkcYmxS?= =?utf-8?q?3CbpFMhDjvLDZaZoIe46HWVMOSI6VtJwuzrxuLD8mKf3utqRm4R1iUoGyv/RioCU5?= =?utf-8?q?Hu9jHNimDfOE?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: dafce701-c166-440f-7069-08db9757d1f3 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:04.4766 (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: zQewpjr55PXpADGYK0Lnhdv80ev2eOzcaafc1Ul1+ihm1EROImGtwlyc6tpXa4XNFcjhxEVOvsQaylxKF4f5cg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB7590 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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773588328019323331 X-GMAIL-MSGID: 1773588328019323331 The WF200 allows 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); }