From owner-freebsd-wireless@freebsd.org Tue Jul 21 16:02:26 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 20A973605AA for ; Tue, 21 Jul 2020 16:02:26 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BB3Jc6PF3z3ZDV for ; Tue, 21 Jul 2020 16:02:24 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-qv1-xf30.google.com with SMTP id el4so9527943qvb.13 for ; Tue, 21 Jul 2020 09:02:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=C/1fo5sLTBvAwYqi3IQGuiOgEUPEY+bIpHsIzWcEQj0=; b=bciaG3X+ZRuRwmmCBJUdMq6IIqrkEbqA0TnwCQQISWyjsv2ZyMwlwrd4y8xdgYqvkv NK4CAxtVgqWl8IAQc82ws3MwKEmELDzgKCeed8qjzo8IjguX/3okFV8jT9F6ieP7bkiv 7AdsFET5IHrIJe+NCwaOIUpBjyEhDWZoVVxDAvPs+C80TN7rjNv7KHpojqosBJsryErX bzrgGBmDXIQKLdvuW0RrZDJFAsGu+pIf33Yj+usRMSJZ0mTSL4XZa0xYti9d24wLobMa G862sbb5SCSQkC96Iqh1+DVKuKUI3+O4gLCZgWifoFKiNEfAI5MYNXyAjJfzEsc8+2kF COGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=C/1fo5sLTBvAwYqi3IQGuiOgEUPEY+bIpHsIzWcEQj0=; b=n3LHvNO+I6FOlAQYrMhPTc51AlW8e1vR4HyZvxgBBrzdwlF8pouwlTmIKu7j1/BM21 8VUvqRDRjKnBfEdXvnAoNDLCFwFZSb7+nUed/C7CwzY2914+rovFV3M71L7ENgKoMyN3 vDUrR53HGijHuShCkBWzf6K72j27iHGFoCiWm7gWtHacK+PLscJkApmxLjeKvUNMjmO9 fcKAqXhN0sspqvRDA3V7ZpwF4S6Sm6i47OaDLgYuaHARjWicFqokAcvzHmGw83xqWUFO rl4pdHlSug24s2AA7Bf4cJmGaYSFXp1FCg5pq97/UFkJ8JNTb40i5vAu7UBpfFdRMKxG gW5g== X-Gm-Message-State: AOAM532oFexBxvE1LeAC1jHNL2os1+2f7V8oIXqHEkVsK8ViZZbXiMkN 73hFB1/9duCUOhcb1SWJz1ozfEreYPUkS08pcCOwgcaq X-Google-Smtp-Source: ABdhPJwR70MlJd+orIzOhZ230A5tGX/xscXxGPOxF8goh1tOQmua+khrp8loXh9CT+srgsn8yg/TNVfze7r+CkTo4V0= X-Received: by 2002:a0c:e1c3:: with SMTP id v3mr26403148qvl.209.1595347339354; Tue, 21 Jul 2020 09:02:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Adrian Chadd Date: Tue, 21 Jul 2020 09:02:07 -0700 Message-ID: Subject: Re: regdomain.xml To: Aaron Cc: "freebsd-wireless@freebsd.org" X-Rspamd-Queue-Id: 4BB3Jc6PF3z3ZDV X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=bciaG3X+; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of adrianchadd@gmail.com designates 2607:f8b0:4864:20::f30 as permitted sender) smtp.mailfrom=adrianchadd@gmail.com X-Spamd-Result: default: False [-2.99 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.02)[-1.023]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.08)[0.084]; NEURAL_HAM_LONG(-1.06)[-1.055]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-wireless@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f30:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 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 16:02:26 -0000 hi! On Tue, 21 Jul 2020 at 02:06, Aaron wrote: > Howdy FreeBSD wireless mailing list, > > Looking to help, only item on this list > (https://wiki.freebsd.org/WiFi/TodoStuff) I'm competent to address is > "net80211 regulatory". I read the "regdomain" manpage ... no help there. > Yeah, it's ...old. :-0 > > My assumptions: > > * the data you're looking to clean up/update/refactor is > "/etc/regdomain.xml". > * 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, ...) > 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 for their information :-) > > 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. > So adding a new _country_ is actually rather annoyingly difficult. > o There's a section that links to , so either > someone's already done the work here or I need this item explained. > The file is organised per-SKU; 'rd' is regulatory domain, not country. * 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. > o "regulatory database code" meaning ? > o Since SKU in this context is not a Stock Keeping Unit ... > definition please? > it /is/ stock keeping unit. Ok, so! This database is an XML representation of the Atheros regulatory database. You can find that in sys/dev/ath/ath_hal/ah_regdomain/ or something similar under ath_hal. It's organised per-SKU because the Atheros parts are kinda organised that way. Eg, there are multiple japan codes because the japan rules state that older hardware doesn't need to work with newer rules, but newer hardware does. So each respin of the japan regdomain rules created a new SKU. * This lets me do useful things like _update the regulatory database_.. > o When you refer to the "regulatory database", do you just mean > "/etc/regdomain.xml"? And what updates are you trying to do > that are currently difficult? > 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. FCC is FCC without DFS channels; FCC3 is FCC with DFS channels. It's just a lot of work. * 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. > Would obviously impact every program that reads the file ... > o If I understand correctly, adding new freq ranges is just data > entry. If so, is there a link to the new frequency ranges you > want added? > Whatever's in the linux regdomain database would be a good start. > * add VHT flags and 80/80+80/160MHz wide channel widths. > o More data entry. Link to the data you want added? > I've added it for FCC. You can see what work it was just to add them there. :-) > If having me add data, refactor, change hierarchy, etc. is helpful let > me know. If it sounds like there'll be too much handholding, no hard > feelings. I'm sure we can help out :-) So, I'd really like to figure out how to simplify the regdomain.xml file. But - we should come up with a firm plan first. Luckily this IS basically all userland work. :-) What do others think? What should we do? -adrian