Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1057959rdb; Tue, 30 Jan 2024 06:53:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IE4bB0MOzZcFSRLob5QyaRzXMK78Qci7eqBcKE9vDSn1jDfFRpRn5WZ6J7yIlYK+o/8PXZZ X-Received: by 2002:a05:6402:2550:b0:55e:de86:65d7 with SMTP id l16-20020a056402255000b0055ede8665d7mr5718196edb.31.1706626417599; Tue, 30 Jan 2024 06:53:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706626417; cv=pass; d=google.com; s=arc-20160816; b=k5W5thCHyKMRpwlBSq15ow1FGgvnWlOyibBhSURFJtnJx2HXi5YSOY8Tu3P2nUBSvC LeyHbSjN87JCddGSde6M195bZc8KWyuGVnuZ3nI1zW71/UGxzff8qJiHx+xIOffjq5F8 v92DXkONiDZfHfcgMU+s94mBvz+kCdwJoSIJu+CFP46H6X0JR3oUaN4knao3mnjbOWnA ULGsAXAs3/ifxFmHM3boOYEju+Ophyq9KCgm5MRGmOVOJCfCGvLL1+oBu6q84LQYlPca 5edrLZ0nejx+aQmFRJVVr/fhwQajCcDkl9e8P9WpCcTbeZyW1K4mP5zRpP3zuhVeCozs qqgA== 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:to :from:subject:message-id:dkim-signature; bh=0idZGBrT3HF/DBP2MgyE1pB5hmO3uh8NTuXoURb9APE=; fh=n/mI+AtTHxSUsCt0nDWyl2zmk+iUanE1Fkx9dl3Y8Ds=; b=eumg7tg/tExrozFcf7S7w8h3QFuIYrJHU1K+5e0PFWHYtx0v/UW0DKpQdvBE2cOWPn LdorlBLpjX88SI0kIkiR9vXYVA1RO7hKCC/2PTLbYp5fvYXjOL2cSf72nUNDVEJFBbED iKP2wAFEzI9rwh/CLmIAeMKRB5qk9mf+ZSg3w9HB4i1vhkq/Tz1uPLXkizYB32RbNE6l p7TnlLGHTqDAHLT2NkROoCxXBd2C2GOIvbSgcSpscoD2j1JYlTt54Rdh6SRIvA71OS58 pEe1l6C+E0RFjsQ+W/Vp2jVeCj/Z0gfwpa/otoBuO8IWytrwwfXDhBZueOuvhYGRaeOp XlaA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=mItYBJKM; 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-2824-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2824-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net X-Forwarded-Encrypted: i=1; AJvYcCW4utt6Nu/ABV6g6ld8etqTc3Rz8SQYzK+q17oiuBIZ3Hgdou8T4pmUxl16ECwbI19GzTlPkocVFVRgsdLQtSEOcnRIIaqFzRjifivHoA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id x7-20020a50d607000000b0055eb2559d41si3741528edi.35.2024.01.30.06.53.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 06:53:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2824-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=mItYBJKM; 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-2824-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2824-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 54AA41F2A035 for ; Tue, 30 Jan 2024 14:53:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 387FC7CF35; Tue, 30 Jan 2024 14:53:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="mItYBJKM" 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 5C7E77CF3C for ; Tue, 30 Jan 2024 14:53:15 +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=1706626403; cv=none; b=F5MCfqtn+11pNDOAAuTav7u3fthLDraiV2EqkNdQEHkAckObZilSVQGfIv3fFHQNctsZSjas5MncGT0PHOaTRZdB+Nk6zOMFgE9WH8n7Ldrar03gCqIo/qU/j3YoKo/IOygh0Fmf2QHUsVgxVOWR5MMtbeiONk8wygUHj7li/dA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706626403; c=relaxed/simple; bh=uP0FSXlIJxBq/QMS86PWcDLYYFjOEQaYt5me3se8YGI=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References: Content-Type:MIME-Version; b=OkjP/OKkGdcfi6jqyURBAOGhNVenBx1JPeBT7Y0MEGmL3sd+w+z3YgFy8giW1kCG3Uok/x8z9xIrcnDsetG5ruGk3GRAouFozG+VrWgXglFFLVeNpDfSwOQtFI9awYh9H64aeC8H7l9j5h2LcTu475aZIoZX+OmUX0jUJgZQsRc= 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=mItYBJKM; 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:To:From:Subject:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=0idZGBrT3HF/DBP2MgyE1pB5hmO3uh8NTuXoURb9APE=; t=1706626395; x=1707835995; b=mItYBJKMlxMvAwUf5p26/oByc2NapsTRxxHSVLw6mXAM6cO Oz0jja/XZksq3QzmSHL5qdQ5vRaZJqCzCvgUxiY61/MyAj4iCMIKarUN6vWEd95G0UvlSLc/MwLmK UoML2iuRiNXVphPeZTl0QTEunt8MO1WMjHPa5dEmshTqyI7XGy6+x5pKicrTr9L9ZQf0h0UneGYLU Uupp9sQIqXQ8i9WHVEXb5FkxWDmQvc9aDBg2vBLZUyBcSq+iUcfpNXSDDBPgtinC2vPKbY49CrGPW ZpUsZtJXmBYi+vrv+G2U/mitt5VYNKUemT4AHiM0DHaSzkghhm1KEI7HXz+6BKWA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rUpU7-000000066ia-2drN; Tue, 30 Jan 2024 15:53:12 +0100 Message-ID: Subject: Re: [PATCH] wifi: mac80211: allow CSA to same channel From: Johannes Berg To: Aditya Kumar Singh , linux-wireless@vger.kernel.org Date: Tue, 30 Jan 2024 15:53:10 +0100 In-Reply-To: References: <20240129203544.ef7258d5790d.Idafe22e41621757458d4960659b9621853f7104d@changeid> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3 (3.50.3-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-01-30 at 20:14 +0530, Aditya Kumar Singh wrote: > On 1/30/24 01:05, Johannes Berg wrote: > > From: Johannes Berg > >=20 > > This could be used e.g. for temporarily sending quiet > > (mode=3D1 in CSA/ECSA), or updating bandwidth. This is >=20 > I know the intent here (from the other thread), but using the phrase _or= =20 > updating bandwidth_ is probably not correct since currently without this= =20 > change also, just changing the bandwidth is possible, isn't it? Err, yes, indeed... bad commit message. > Also, bringing a part of the discussion we had in the other thread - >=20 > >>> I'm thinking about removing that identical() check entirely - you > >>> might want to switch to the same channel with quiet=3D1. At least fo= r > >>> testing that'd be really useful, and I don't think it really serves > >>> any purpose to forbid it. > > > >> Yeah, we can do. But is there any actual use case? Also, what if some > >> notorious user space application simply sends NL command without even > >> quiet=3D1? There should be some check I guess? > > > > I'm not sure we care much about a broken userspace application running > > with root privileges breaking something here? :-) > > > > And at least for testing it's very useful to be able to do that. Agree > > that identical channel and quiet=3D=3D0 doesn't make _sense_, but even > > then I'm not sure there's a lot of value in not permitting it. With > > quiet=3D=3D1 at least it does make some sense still though, and we're > > currently not allowing it, hence my patch (to be able to test > > scenarios like that we saw elsewhere.) >=20 > Agreed to your point. So in that case, should we skip the identical=20 > check only when quiet=3D1? We could, though I even now have a test (not posted yet) that's using this, but I could rewrite it to actually switch bandwidth. I'm just not sure it's worth the extra complexity? What are we actually saving ourselves from by doing it? Clearly we have to handle this case, and whether or not it's quiet shouldn't really matter to the underlying code? IOW, yeah, do have that information so we could just add !params->block_tx && to the condition, but I'm not really sure what the value in that would be, other than some kind of accurate reflecting of how we think today CSA should be used? But now that I think about it, Jouni mentioned yesterday that REVme D5.0 is getting language to allow capability changes during CSA, so that'd be another thing to check for, you might (eventually) want to actually do a CSA to the same channel to change capabilities, without quiet? Anyway, even without that, I think the check doesn't really help for anything. I'm not convinced the kernel needs to enforce a rule that "userspace doesn't do something useless"? From a kernel POV it doesn't matter if you can do it or not. johannes