Re: wireless-regdb: Wrong ETSI tranmit power without TPC

Johannes Berg <[email protected]> Fri, 16 May 2025 10:26:30 +0200
Newsgroups org.infradead.lists.wireless-regdb,org.kernel.vger.linux-wireless
Message-ID <[email protected]>
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 let
> 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