Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1527989lqe; Mon, 8 Apr 2024 11:25:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJummvuaL4cy4U7TC49uqiX/uIh3/5jWAM8jsbL0rOyofhdojZL9MJj18M7x0BnAUy8cWI4GlvjHvx4trPhvMKaY49cz5VPcJfzt51fQ== X-Google-Smtp-Source: AGHT+IEH1ZHLhms0LEnDGIbH1NII6Bux2fQYSMhPdG7iiUYBldYG/QGXDC4wiS6qTyMrVGJCs955 X-Received: by 2002:ac8:5a81:0:b0:430:c5c3:c64a with SMTP id c1-20020ac85a81000000b00430c5c3c64amr10652950qtc.5.1712600747583; Mon, 08 Apr 2024 11:25:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712600747; cv=pass; d=google.com; s=arc-20160816; b=VkRXP6epjDKhgr9QrEYRdMw2t0bAVj31mMNSvVfBNibqvK/Vb3mNV5yuD5ZmH+nFQ4 wMY6I3aYQyKEHaiG10q5byrUbIy6g36RTr4P3RW0OG+T5xCu/JOKJZT8TviwsAun8NVg RmuEo9NysAT8xKtyaFgOjPYPce4rYX+TqwT4brMvYK7N3T2GL+QAP2eVObDqVRycN/m4 OyCTNACC0i7uzM1nQFZ6MYd7pO8HlfcbKcQADt1IXIUfYTQZZOZJX1KftcSHvQg9W2qR MklTnpET7w3ISHQMuy9hwWZ8eDnlaW+5Lp0YMeyQX8VB9vVT/9KJNB5TNCvdaZKohPXm Xsyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=k2upalmWZ47sm344cEgbc/l4mZiDYCyFPZzcpJM614Q=; fh=4SrCcE3hVxx+PEsQm9IxT0H864x6lul+qhVp+ErPjGQ=; b=0UGIeo55S1RnJs1+eTvV78QefBCT9BPAqnqJVhQXw4LVeoIeVMNND4Wqqype+ZLEp4 1lAzVJFprHMybxAMon0nK6nUdI+7xuMXTdnrHU4vWQoinBCQwcBWT7uAVN/QrRgg/UjI 6j+iRs7knV4YFr1H1pmV3fjFOaoXpsTpBpiu2JeylOpO1WqvZo7LpQTDGp2zzhjDtdhU GvheGUXLTV5xCNe/XOXz+XCL+sc5lPW0CmkaaT9O9ZgqmBWXUeujlxLetJza9aoREnum 7e5eWbWkXqmHd84gY5QecTZosMqIOdp1uJzXQxhlcWcVDcooqcjnpyqQfUmPpXWtFtM0 2q5g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=TUOcW3Rb; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-5976-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5976-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c10-20020a05622a058a00b00432d8430ef0si8799927qtb.566.2024.04.08.11.25.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 11:25:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-5976-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=TUOcW3Rb; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-5976-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5976-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1408B1C23CC2 for ; Mon, 8 Apr 2024 18:25:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B2BF014387B; Mon, 8 Apr 2024 18:25:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="TUOcW3Rb" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C497625753 for ; Mon, 8 Apr 2024 18:25:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712600744; cv=none; b=C7PTgOZ/ObYPaB6VTH4xOTjmb/dadKfa/4D6DIVw1v/1ISUQzVQTZcpgJsHzFdpAnZcLUN3jrE2mhJqr/JAYQpv5G0OKYSd5F5YaqIk9ZE2/u0e/PcUmPQSh7gGXxH4rNCMbc6obOZtKhmugCyj4CkjLPTyZgdnKwEFUafFLTvc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712600744; c=relaxed/simple; bh=Q5m5h3quhuSrxH08rhRroOZt0p0cTu5ndrZDFbeUdoA=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=MbUDPztm66uwMR5qlBIolzzLAZwQLmqsxVM6KeO8NPTXk0wUxdVBbZ7RcsWiabyeeAO1Nivd9Cam70jCDzYNtcChRYlKx7jvikIwv97pXRePcUdXoNKgpAOniUGYsIH2pDckzqAFM0ruqC1Fs+UHJXnB6+YnAz2dCUy+zVafoik= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=TUOcW3Rb; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=k2upalmWZ47sm344cEgbc/l4mZiDYCyFPZzcpJM614Q=; t=1712600741; x=1713810341; b=TUOcW3Rb+dlbs0r52eNhT3cH4w6nsonZqeVKOxMX+Cq2AAV yXWnAfbRVI/Gp5bwl25iBi01AiK8btVwLuCYlHZe9z+GttnhN4GGFUtvnBcGNUZAPLR13AM2XNZ6D ySVyXcLAN8FRi/Ueq9n7vCy2Py+XryYh0EOMrGvsJfD0sgCfW9Irqc3JKFyzNqksW0F/qMxK/HUVe U5OzM9APZq8o0tDt6kAtSFgVakGXsAXayccVdq4XO9jt7zpbr8njzQ83+u3ajHykkWXIzSKEPrUKK I5ly63Gqdmgh9RJYfNb/CTig6it14sFxk6te5IDaIOwxp4pqCxjthNTzwp112XkQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rttgX-0000000GQAW-0OdJ; Mon, 08 Apr 2024 20:25:37 +0200 Message-ID: Subject: Re: [PATCH] wifi: mac80211: handle sdata->u.ap.active flag with MLO From: Johannes Berg To: Aditya Kumar Singh Cc: linux-wireless@vger.kernel.org Date: Mon, 08 Apr 2024 20:25:36 +0200 In-Reply-To: <20240326151141.3824454-1-quic_adisi@quicinc.com> References: <20240326151141.3824454-1-quic_adisi@quicinc.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned On Tue, 2024-03-26 at 20:41 +0530, Aditya Kumar Singh wrote: > @@ -1232,7 +1256,9 @@ ieee80211_assign_beacon(struct ieee80211_sub_if_dat= a *sdata, > } > =20 > rcu_assign_pointer(link->u.ap.beacon, new); > - sdata->u.ap.active =3D true; > + > + if (ieee80211_num_beaconing_links(sdata) <=3D 1) > + sdata->u.ap.active =3D true; I don't understand this change. Neither the <=3D 1 really, nor the fact that you actually _make_ this change. > @@ -1486,7 +1488,10 @@ static int ieee80211_start_ap(struct wiphy *wiphy,= struct net_device *dev, > if (old) > kfree_rcu(old, rcu_head); > RCU_INIT_POINTER(link->u.ap.beacon, NULL); > - sdata->u.ap.active =3D false; > + > + if (!ieee80211_num_beaconing_links(sdata)) > + sdata->u.ap.active =3D false; =3D=3D 0 maybe? Or maybe we should just save/restore the value instead? > list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) > netif_carrier_off(vlan->dev); > =20 > - if (ieee80211_num_beaconing_links(sdata) <=3D 1) Unrelated, but it looks like the VLAN netif_carrier_off() handling above is also wrong and should really go into this if block as well. johannes