regdomain.xml - Linux wireless-regdb

Aaron notjanedeere at gmail.com
Wed Jul 22 04:00:49 UTC 2020


On 7/21/2020 11:39 PM, Adrian Chadd wrote:
> On Tue, 21 Jul 2020 at 20:36, Aaron <notjanedeere at gmail.com 
> <mailto:notjanedeere at gmail.com>> wrote:
>
>     Still working on my mailing list etiquette ...
>
>     On 7/21/2020 11:11 PM, Adrian Chadd wrote:
>
>     > On Tue, 21 Jul 2020 at 20:03, Aaron <notjanedeere at gmail.com
>     <mailto:notjanedeere at gmail.com>
>     > <mailto:notjanedeere at gmail.com <mailto:notjanedeere at gmail.com>>>
>     wrote:
>     >
>     >     On 7/21/2020 10:53 PM, Adrian Chadd wrote:
>     >     > As a data source yes, but I'd /love/ ours to be more
>     structured.
>     >     > Parsing the wireless-regdb format is ... lol.
>     >     >
>     >     >
>     >     > -a
>     >     Fair enough.  This data also has a 1:1 mapping between
>     country and
>     >     regulatory domain.  You mentioned Atheros earlier, is this
>     1:many
>     >     country:rd mapping necessary or just an artifact of how they
>     coded
>     >     things?
>     >
>     >
>     > I mean, both are true. For atheros hardware we do that already
>     in the
>     > driver; and for other NICs that need local weird channel/sku
>     bits they
>     > can implement themselves. :-)
>     >
>     >
>     >
>     > -adrian
>     >
>     >     _______________________________________________
>     > freebsd-wireless at freebsd.org
>     <mailto:freebsd-wireless at freebsd.org>
>     <mailto:freebsd-wireless at freebsd.org
>     <mailto:freebsd-wireless at freebsd.org>>
>     >     mailing list
>     > https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
>     >     To unsubscribe, send any mail to
>     >     "freebsd-wireless-unsubscribe at freebsd.org
>     <mailto:freebsd-wireless-unsubscribe at freebsd.org>
>     >     <mailto:freebsd-wireless-unsubscribe at freebsd.org
>     <mailto:freebsd-wireless-unsubscribe at freebsd.org>>"
>     >
>     So Atheros and the Japanese are on their own.  In that case, the data
>     that's needed is ... what's already in the wireless-regdb file? 
>     You've got: 
>
>
>       * Country
>       * Regulatory domain name (albeit only FCC, ETSI and JP), /which
>     isn't
>         actually used for anything!/  The details for each country are
>         stored directly, there's no referring to the regulatory
>     domains at all.
>
>
> They're used for DFS modules which need to know which DFS regulatory 
> domain one needs. :-)
>
>       * Frequencies and channel widths.
>       * TX power (in db OR mW, if that needs to be normalised someone's
>         going to have to supply me with a reference or a formula)
>
>
> As you'll discover, the challenge is that there can be multiple ways 
> to skin the regulatory power limits felines. For we should stick to 
> what net80211 already does;  which is just tx power in 1/2 dBm increments.

Not an issue, found the formula, apparently conversion between mW and db 
is dead simple.  Reference here: 
https://www.rapidtables.com/convert/power/mW_to_dBm.html

Hypothetical case:  We have a 300mW transmit power limit, which converts 
to ~24.77db.  Since this is a regulatory restriction, do we round that 
down to 24.5 or up to 25?  What if it was 24.95, 24.5 or 25?  Since it's 
a maximum power restriction I'm guessing we always round down.

>       * Flags.  Once the data's parsed we can get a complete list of
>     these.
>
> Right.
>
>     Is there anything else needed?  And given that each country is a
>     self-contained dataset, what do we need the regulatory domain name
>     for
>     beyond a label?
>
> DFS is the main consumer for now.

The wireless-regdb only has three domains listed.  The regdomain.xml 
seems to have more detail, although I'm not sure how much of that is 
Atheros leftovers.  Is there a list of country:domain with more detail?

Here's the list I got out of regdomain.xml:

      rd {'id': 'debug'}
      rd {'id': 'fcc'}
      rd {'id': 'fcc3'}
      rd {'id': 'fcc4'}
      rd {'id': 'japan'}
      rd {'id': 'etsi'}
      rd {'id': 'etsi2'}
      rd {'id': 'etsi3'}
      rd {'id': 'apac'}
      rd {'id': 'apac2'}
      rd {'id': 'apac3'}
      rd {'id': 'korea'}
      rd {'id': 'row'}
      rd {'id': 'none'}
      rd {'id': 'sr9'}
      rd {'id': 'xr9'}
      rd {'id': 'gz901'}
      rd {'id': 'xc900m'}



More information about the freebsd-wireless mailing list