From owner-freebsd-wireless@freebsd.org Tue Jul 21 19:59:00 2020 Return-Path: Delivered-To: freebsd-wireless@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7694366258 for ; Tue, 21 Jul 2020 19:59:00 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ultimatedns.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BB8Yc2SdKz48T2 for ; Tue, 21 Jul 2020 19:58:59 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by udns.ultimatedns.net (8.15.2/8.15.2) with ESMTPS id 06LJx29w020155 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 21 Jul 2020 12:59:09 -0700 (PDT) (envelope-from bsd-lists@BSDforge.com) X-Mailer: Cypht MIME-Version: 1.0 In-Reply-To: From: Chris Reply-To: bsd-lists@BSDforge.com To: , freebsd-wireless Subject: Re: regdomain.xml Date: Tue, 21 Jul 2020 12:59:09 -0700 Message-Id: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4BB8Yc2SdKz48T2 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:11404, ipnet:24.113.0.0/16, country:US]; local_wl_ip(0.00)[24.113.41.81] X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2020 19:59:00 -0000 On Tue, 21 Jul 2020 09:02:07 -0700 Adrian Chadd adrian=2Echadd@gmail=2Ecom said > hi! >=20 > On Tue, 21 Jul 2020 at 02:06, Aaron wrote: >=20 > > Howdy FreeBSD wireless mailing list, > > > > Looking to help, only item on this list > > (https://wiki=2Efreebsd=2Eorg/WiFi/TodoStuff) I'm competent to address is > > "net80211 regulatory"=2E I read the "regdomain" manpage =2E=2E=2E no help ther= e=2E > > >=20 > Yeah, it's =2E=2E=2Eold=2E :-0 >=20 >=20 > > > > My assumptions: > > > > * the data you're looking to clean up/update/refactor is > > "/etc/regdomain=2Exml"=2E > > * you have some idea what you want this file to look like afterwards > > (an example would be very helpful) > > * the information you want added is available somewhere (FCC site, > > IEEE site, =2E=2E=2E) > > >=20 > Luckily we can just use what's in the linux regulatory domain tables > because they've already done the work of scouring the regulatory sites fo= r > their information :-) >=20 >=20 > > > > If my assumptions are correct and no-one's already doing it, my > > questions are: > > > > * the regulatory database is indexed by SKU, rather than by country=2E > > So adding a new _country_ is actually rather annoyingly difficult=2E > > o There's a section that links to , so either > > someone's already done the work here or I need this item explai= ned=2E > > >=20 > The file is organised per-SKU; 'rd' is regulatory domain, not country=2E >=20 > * Change the regulatory database code to be indexed by something that > > isn't hard-coded, and have the "regulatory domain entry index" map > > _to_ an SKU where needed=2E > > o "regulatory database code" meaning ? > > o Since SKU in this context is not a Stock Keeping Unit =2E=2E=2E > > definition please? > > >=20 > it /is/ stock keeping unit=2E Ok, so! >=20 > This database is an XML representation of the Atheros regulatory database= =2E > You can find that in sys/dev/ath/ath_hal/ah_regdomain/ or something simil= ar > under ath_hal=2E > It's organised per-SKU because the Atheros parts are kinda organised that > way=2E Eg, there are multiple japan codes because the japan rules state tha= t > older hardware doesn't need to work with newer rules, but newer hardware > does=2E So each respin of the japan regdomain rules created a new SKU=2E >=20 >=20 > * This lets me do useful things like _update the regulatory database_=2E=2E > > o When you refer to the "regulatory database", do you just mean > > "/etc/regdomain=2Exml"? And what updates are you trying to do > > that are currently difficult? > > >=20 > Well, it's a pain to update things :-) Eg, if I wanted to update the US I= 'd > have to go update all the FCC domains that the US can use=2E FCC is FCC > without DFS channels; FCC3 is FCC with DFS channels=2E It's just a lot of > work=2E >=20 > * extend it to support new frequency ranges (60GHZ, VHF white spaces); > > in KHz settings rather than MHz increments; > > o Current s are in MHz, not hard to change them to KHz=2E > > Would obviously impact every program that reads the file =2E=2E=2E > > o If I understand correctly, adding new freq ranges is just data > > entry=2E If so, is there a link to the new frequency ranges you > > want added? > > >=20 > Whatever's in the linux regdomain database would be a good start=2E >=20 >=20 > > * add VHT flags and 80/80+80/160MHz wide channel widths=2E > > o More data entry=2E Link to the data you want added? > > >=20 > I've added it for FCC=2E You can see what work it was just to add them ther= e=2E > :-) >=20 >=20 > > If having me add data, refactor, change hierarchy, etc=2E is helpful let > > me know=2E If it sounds like there'll be too much handholding, no hard > > feelings=2E >=20 >=20 > I'm sure we can help out :-) >=20 > So, I'd really like to figure out how to simplify the regdomain=2Exml file=2E > But - we should come up with a firm plan first=2E Luckily this IS basically > all userland work=2E :-) >=20 +1 for the offer to dig in, Aaron! > What do others think? What should we do? I vote for recreating it as a CSV file=2E Would then be easier to work with and easy to convert to other formats -- json/xml/=2E=2E=2E You asked=2E ;-) >=20 >=20 >=20 > -adrian --Chris