Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2501265rdb; Wed, 4 Oct 2023 03:18:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG6A3YRGuaRP7/Ju2z1gC+bm16O0JImaAxDgEeDuizEDz7QkjEE7yrhIaW5MgTUJ2vR6SjI X-Received: by 2002:a9d:6e0a:0:b0:6b7:52ce:ff38 with SMTP id e10-20020a9d6e0a000000b006b752ceff38mr1778310otr.16.1696414691791; Wed, 04 Oct 2023 03:18:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696414691; cv=none; d=google.com; s=arc-20160816; b=K9EtHI73CZAZsFORWHTTyiDmYDOPrCiSqDqLtLak5H+wiNmHnocjENG6StGtbXswGv sLCAbK0VQeYQfCgr2ZzbEjMEtAcyLe+CAZSjxc+lZmb/YPtWOLgpoxiujsS/B8KOHkyy DHN9EI69QvUOBQ2gGJO2yOFuP/Pp1G/ltKJ4r8JW3gR9U/o2/KaQ9RALmd6+Wgv16exg 49+yaboV8mPT/VJzvrlPYFYUg+Ub1fGq+K21HFYWk1aP47Jxj6zCsieMvNp6QcqoOswA kRSOgWIdmftstQs6kBTKNbIt8Emzd9TDiK0VMyWYS5phvFQaCu5kGVuZVrYNi3/tqTFI ZUyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=+XH9pAj8pYqT+4P8XzJz87c+MCNAtZcU4Tbbwe1He40=; fh=yVi30reTSgFzfmixtgn22zItbSuOLWmn/PO64C2v6dc=; b=xji7ApqCy8n4fsOWRvfitxedun1Ccm5xILXSE7o1HEzXR+ZEE5FL8d9G6rkZpx50tm FvSz+b1QSvcohtiIrHslyvJ0xVHvmaiKGuhSk40PFUZcvAmwiwO8NBjvUPm5swnj5Aqh 98dM59liJdgQy1qNYa7Kkh1kP1NE/e+9a1qnTSApRF3r9pHsqH43/eEb1fCq27uqBVR2 s0mEYafIKG/97asAWEoHEQWOKUVipBoz1iOOBVpupFoZtzS5EMLaNpfaOkeXd9Lx6e82 sqcDm+03uIgTRVfIPZH5tNiSAHyzt+jrCzwBzLf4/Rep3JwmdJORL2+bD2zuL6nEn9Tb p3Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sBRnBYY1; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id q27-20020a635c1b000000b0057808a9b0besi3200469pgb.664.2023.10.04.03.18.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 03:18:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sBRnBYY1; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 3A3118093413; Wed, 4 Oct 2023 03:18:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242090AbjJDKSA (ORCPT + 53 others); Wed, 4 Oct 2023 06:18:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232895AbjJDKR7 (ORCPT ); Wed, 4 Oct 2023 06:17:59 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B370C90; Wed, 4 Oct 2023 03:17:56 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93E87C433C8; Wed, 4 Oct 2023 10:17:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696414676; bh=j4zQEj6l4C9JbR2fWIyArESVjilnZfkBsOS/xgac0Ug=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=sBRnBYY1Tgj3ZgtQlK6BmWY3dmdqjSbKOMfI7OpdL+cQxdiuhS9Ad5a1RsTNp2ipZ af4N6ls+NtTqcOaVI965joWeTQWX21oaFlBwaqFJam3k9EyTqoXbIz6PIMJvyqqc+o sNpR3smBQzZJnluLcctKEPmC8+GFd5BDetv6G6JkqlJ3+O0+488u2GoGOQGe8arg9k JgschOAetOrAeAEGlv/rirTgX8H8Hk0gWfj9ow3fuIkW70bVwBjycjdfsG5beWFU7+ 67Jvos90NzVSQTk/DNrOMYzUG/iYqFEEpWgIhiyblGQf2AJpspFZ5cmkAkLTRf9JPp y9oAnM/X5P9AQ== From: Kalle Valo To: =?utf-8?B?SsOpcsO0bWU=?= Pouiller Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/9] wifi: wfx: fix power_save setting when AP is stopped References: <20230927163257.568496-1-jerome.pouiller@silabs.com> <20230927163257.568496-2-jerome.pouiller@silabs.com> Date: Wed, 04 Oct 2023 13:20:12 +0300 In-Reply-To: <20230927163257.568496-2-jerome.pouiller@silabs.com> (=?utf-8?B?IkrDqXLDtG1l?= Pouiller"'s message of "Wed, 27 Sep 2023 18:32:49 +0200") Message-ID: <87ttr6heoz.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 04 Oct 2023 03:18:09 -0700 (PDT) J=C3=A9r=C3=B4me Pouiller writes: > 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=C3=A9r=C3=B4me 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 iee= e80211_vif *vif, > struct ieee80211_bss_conf *link_conf) > { > struct wfx_vif *wvif =3D (struct wfx_vif *)vif->drv_priv; > + struct wfx_dev *wdev =3D wvif->wdev; >=20=20 > + wvif =3D NULL; > + while ((wvif =3D wvif_iterate(wdev, wvif)) !=3D NULL) > + wfx_update_pm(wvif); Isn't the assignment of wvif to NULL unnecessary as in the next line we assign it to again? --=20 https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatc= hes