All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Wilhelm <alexander.wilhelm@westermo.com>
To: Chen-Yu Tsai <wens@kernel.org>
Cc: linux-wireless@vger.kernel.org,
	wireless-regdb@lists.infradead.org,
	Johannes Berg <johannes@sipsolutions.net>
Subject: Re: wireless-regdb: Wrong ETSI tranmit power without TPC
Date: Fri, 16 May 2025 11:14:09 +0200	[thread overview]
Message-ID: <aCcB4XtVG8TZdaie@FUE-ALEWI-WINX> (raw)
In-Reply-To: <CAGb2v676sXN_eC9s6_2a6k2ACzf3n5jBgY_id22ruoz+Zb-Jaw@mail.gmail.com>

Am Fri, May 16, 2025 at 04:15:40PM +0800 schrieb Chen-Yu Tsai:
> On Thu, May 8, 2025 at 1:25 AM Alexander Wilhelm
> <alexander.wilhelm@westermo.com> wrote:
> >
> > Hello devs,
> >
> > please correct me if I'm wrong. Since TPC is not used, the EU Rules dictates to
> > decrease the transmit power by 3 dBm on some sub-bands. For the most of the EU
> > countries the mW instead of dBm is used. Therefore they are halved (e.g for
> > Germany (DE) in commit 81d251dda3985e1088bd89f5d9f565e63ba5a30f). The problem is
> > that the values are then converted to dBm and rounded down and result in a wrong
> > supported value. Take a look at example (Germany again):
> >
> > country DE: DFS-ETSI
> >     (2400 - 2483.5 @ 40), (100 mW)
> >     (5150 - 5250 @ 80), (200 mW), NO-OUTDOOR, AUTO-BW, wmmrule=ETSI
> >     (5250 - 5350 @ 80), (100 mW), NO-OUTDOOR, DFS, AUTO-BW, wmmrule=ETSI
> >     (5470 - 5725 @ 160), (500 mW), DFS, wmmrule=ETSI
> >     # short range devices (ETSI EN 300 440-1)
> >     (5725 - 5875 @ 80), (25 mW)
> >     # WiFi 6E
> >     (5945 - 6425 @ 320), (23), NO-OUTDOOR, wmmrule=ETSI
> >     # 60 GHz band channels 1-4 (ETSI EN 302 567)
> >     (57000 - 66000 @ 2160), (40)
> >
> > For the frequencies 5250 - 5350 the power of 100 mW results it 20 dBm. Correct.
> > The frequencies 5470 - 5725 have a power of 500 mW. It results in 26 dBm. But I
> > believe 27 dBm are allowed. For the frequncies 5725 - 5875 the value of 25 mW is
> > also dictated. I'm not sure if I should expect 14 dBm, but I get 13 dBm.
> 
> Are you reading the converted numbers from the system, not the database
> text file?

From the system itself. I'm using the 'iw phy info' tool.

Regards
Alexander Wilhelm

> 
> > Is there inconsistencies between dBm/mW conversions? Please give me a feedback.
> 
> 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.
> 
> Or, if we understand 3 dBm reduction to be halving the power, 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.
> 
> 
> Thanks
> ChenYu

      parent reply	other threads:[~2025-05-16  9:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-06 13:13 wireless-regdb: Wrong ETSI tranmit power without TPC Alexander Wilhelm
2025-05-16  8:15 ` Chen-Yu Tsai
2025-05-16  8:26   ` Johannes Berg
2025-05-16  8:38   ` Johannes Berg
2025-05-16  8:39     ` Johannes Berg
2025-05-16  9:22     ` Alexander Wilhelm
2025-05-16  9:29       ` Johannes Berg
2025-05-16  9:14   ` Alexander Wilhelm [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aCcB4XtVG8TZdaie@FUE-ALEWI-WINX \
    --to=alexander.wilhelm@westermo.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=wens@kernel.org \
    --cc=wireless-regdb@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.