From mboxrd@z Thu Jan 1 00:00:00 1970 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 E59921FECB1 for ; Fri, 16 May 2025 08:26:35 +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=1747383997; cv=none; b=tkjK9O+qlOrLr4jG4Ypiav8X4/hOR8YREnh+70o+t2xSfiX+nD5pczNTWx00WeFWaVbXAAadHw2PIcrLipF+r6qB9P/3RV6uUC1WV5X4HSNogqrMdKwQDwQymlaCBLsVsQdF3TxKXMAI85nFxREOwjxKl/lDOEBR20PHRXo+YOo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747383997; c=relaxed/simple; bh=Vqk4oEVinCOlFI/uJi49DuXA/NTBNXt8lD6a8yPWOgI=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=oSTiWw02wlCJWI2fKM9WDWyx9ZCOOBGY9yaYGA1sWJyvuj8MO5EbLcOhx0J5wcUH2riOhqknejALeT7TVn5eNK5xTAV3arvSoDpPu97kwzd/+1Jo+jQba6OAKGAYDvqtkli/bmOkrrA2z58mnDNJCNPQie3PKkdiCqi3KEqTewI= 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=gqB8t9VH; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="gqB8t9VH" 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=Vqk4oEVinCOlFI/uJi49DuXA/NTBNXt8lD6a8yPWOgI=; t=1747383996; x=1748593596; b=gqB8t9VHSldtTG7as+BUd5LYPf78zsBVHBNK4RSUU2I48VW 9pleZ135zNHaS9JULZi4EBdWPsRySQEJs0hgQHw+tCaxHJA/he2pKGM7kIYJ3Ot37xwWg9ExLqD5U R1JlubkmGfzJ23UE18dimu/XGCct2LwTHDa6XHABE3zioDcJH7FxwJSS9hshDXQ1OGg4qd5T6Shpg dxM7NeuIxhcsGYrstdUPmmIcMB9uOjuAuvb+n+5e850u5OncqXoigek+1g21IZqRNmo0ENsXnVLpu ezSOkPnZGNWmrkSvYG+UZ++2pNip38zSrQZu352fPiQmeV7WdkieLBMsmtSaHmXA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.98.1) (envelope-from ) id 1uFqOm-0000000E5Zb-2UWt; Fri, 16 May 2025 10:26:32 +0200 Message-ID: Subject: Re: wireless-regdb: Wrong ETSI tranmit power without TPC From: Johannes Berg To: wens@kernel.org, Alexander Wilhelm Cc: linux-wireless@vger.kernel.org, wireless-regdb@lists.infradead.org Date: Fri, 16 May 2025 10:26:30 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.3 (3.54.3-1.fc41) 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 Fri, 2025-05-16 at 16:15 +0800, Chen-Yu Tsai wrote: > The conversions don't always produce round numbers, and since we can't le= t > the system exceed the _actual_ limit, the values can only be rounded down= . > For example, 500 mW converts to roughly 26.9897 dBm. We can't use 27 dBm, > since if the system outputs at 26.999 dBm, it would be in violation of > the rules. While technically true, I'd think it's probably hard to even measure that accurately, 27 dBm is 501.187 mW? > Or, if we understand 3 dBm reduction to be halving the power, That's fairly precise, a factor of 0.501. > we could > fix up any rules that "have their base limit in mW and were converted to > dBm to apply the reduction" be rewritten in mW with the numbers halved. > That would require someone to go through the entries though. But if > the rules are already written in mW, and what you observe is the kernel > rounding down the numbers, then perhaps the kernel may need to support > both units. I don't think _drivers_ (or firmware) would support both units, so that'd just shift the rounding issue elsewhere? Though I think in some places we use "mBm" instead of dBm? But then we also just convert to dBm in many places so that'd likely not make it any better. johannes