Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3753444rdb; Thu, 14 Sep 2023 01:12:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGfQPjNW/LrNZK0fDGmEgcyWNpoW7WOfMf/wLHo5Edc+Fqi76R8MysVB/ZCBcn9r80v1KkJ X-Received: by 2002:a05:6358:52d4:b0:134:e964:134c with SMTP id z20-20020a05635852d400b00134e964134cmr5709394rwz.11.1694679153840; Thu, 14 Sep 2023 01:12:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694679153; cv=none; d=google.com; s=arc-20160816; b=fnX/jFdKydm8CWtKe3Vpelo4FgM1cPbU301uF83/3mPc5m0vpiYy9xVQLSZp2WFXZ7 J2AU8BcsFixeOleDW9qCKKEDKJDY5GiFPX0XGKByYnF7OiC4XNlHuoyig5kJGlvENhbB jZ10CQt3x/plqifxJb3vNRgJt2O+ti8+i27Slo9fddo/DsnKIXD1XQ7u9AMDh/MmETAO oK9p2bv8AmLD6TgJ1zfvtMUHZYIBikRCmITAPRJRB0NymsHgP35UKElOinEPkAZxtE/+ Fp74cDWbmpkc5PATswbp3FWGXuKkF/wkl/UUOo9eqGgmdKuRHQbPcbzYTM6ggcKjmi2R /UYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=7Ouu/OFTHZYOeIna0cKrHiyeWcjYkLwXQViorNeFews=; fh=AC5CS1xHyJQYbVc8tG0C4k6U/K4dRBu4dxJkJUHoKVk=; b=pSQSoOypIsHDjAgyziRy6MjM0aehAnBobAOZRgpNtjZHNA2HHbNZ5ECo1Rq8FlzIal gthmgsY/yjc/yWBdrriNenhAo/YEvrCWqzUI55a6cuor45gwlTcLi8qZ4NAW8ERC7SEm ubIqxhOlUu6SSg+ReuljFKtPVto8/mS2If3TBAkIn5AJ2CkPQH9Zytefe7MNLWmzPwFG NKYZa8pMarp5Tph0gqbYG6bhOI1Yn10+2417cmMZXTCtjQCk9a911ZdMUWJFf/AwRtfS 5LCraAb1Y4Bn+Z0cFue8m1Rn8bTausd4iXVUWOHsf12vjyaJ1BMUJnwridVmLWixpAFl 03gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=rf9ThMBi; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id n125-20020a632783000000b005776adde96csi1044335pgn.403.2023.09.14.01.12.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 01:12:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=rf9ThMBi; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 4BBA680BB98E; Thu, 14 Sep 2023 00:18:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231670AbjINHSV (ORCPT + 57 others); Thu, 14 Sep 2023 03:18:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232721AbjINHSU (ORCPT ); Thu, 14 Sep 2023 03:18:20 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C189E66 for ; Thu, 14 Sep 2023 00:18:16 -0700 (PDT) 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=7Ouu/OFTHZYOeIna0cKrHiyeWcjYkLwXQViorNeFews=; t=1694675896; x=1695885496; b=rf9ThMBifoV7exgSxzHtipTbM2h6iF16t4IGh0VA91Dz8N+ QzPHNEvm6gtNCSXWtD/Ha6TT72Ixva9kIl1VwrwObJ8egGU3gb/FonOiWylAbW2JTmurkzSuUHZ8M ZDwoiCgZ8TfSiWC9+DWABVz6UZXAobv2AjVB0PiZfNUZj6MB+ZCqrwM80Oiu1f6LksS4VNqInJuu8 QmxNFUBgRFwdCPWZCtAsUFM6qpvNPh0lQ0b8ggV+c6JtzkLl1UCN4uHwZiEE3LhPZz1PuCzWnopYL 3klpbJkNR3ccs7mvn1/JtcXi2hMODo9VmDZD7Vu/uOA4VSbKf10FCobLA6LHo0Jg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1qggc9-00Gin3-2M; Thu, 14 Sep 2023 09:18:13 +0200 Message-ID: Subject: Re: [PATCH v3 2/9] wifi: cfg80211: save Power Spectral Density (PSD) of the regulatory rule From: Johannes Berg To: Wen Gong , Aditya Kumar Singh Cc: linux-wireless@vger.kernel.org, Jeff Johnson Date: Thu, 14 Sep 2023 09:18:12 +0200 In-Reply-To: References: <20230315132904.31779-1-quic_adisi@quicinc.com> <20230315132904.31779-3-quic_adisi@quicinc.com> <4cb3e92530d3f4db3b414e2a7536a0f01b765c4d.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-malware-bazaar: not-scanned 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 (fry.vger.email [0.0.0.0]); Thu, 14 Sep 2023 00:18:18 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email On Thu, 2023-09-14 at 11:45 +0800, Wen Gong wrote: > On 9/13/2023 10:58 PM, Johannes Berg wrote: > > On Wed, 2023-03-15 at 18:58 +0530, Aditya Kumar Singh wrote: > >=20 > > > @@ -8650,6 +8660,14 @@ static int parse_reg_rule(struct nlattr *tb[], > > > =20 > > > reg_rule->flags =3D nla_get_u32(tb[NL80211_ATTR_REG_RULE_FLAGS]); > > > =20 > > > + if (reg_rule->flags & NL80211_RRF_PSD) { > > > + if (!tb[NL80211_ATTR_POWER_RULE_PSD]) > > > + return -EINVAL; > > > + > > > + reg_rule->psd =3D > > > + nla_get_s8(tb[NL80211_ATTR_POWER_RULE_PSD]); > > > + } > > Wait ... I'm not sure why we've been adding stuff to this recently, but > > anyway, this part should only be used by CRDA which is deprecated > > anyway? > >=20 > > So I'd say we shouldn't touch any of the code under #ifdef > > CONFIG_CFG80211_CRDA_SUPPORT any more since CRDA will not continue to > > developed with any updates here. > >=20 > > johannes > Oh, I will remove the change in parse_reg_rule() in next version, because > you asked me to add change in 2=20 > functions(nl80211_put_regdom()/nl80211_msg_put_channel()) > below, but I added change in one more function(parse_reg_rule()). >=20 Yes, we should have visibility on the output - but I don't think we ever expect the input to carry it this way via nl80211 since that's long deprecated in favour of the kernel loading it as a 'firmware' file. johannes