From owner-freebsd-wireless@freebsd.org Tue Jul 21 21:52:14 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 0A20436959B for ; Tue, 21 Jul 2020 21:52:14 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (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 4BBC4D6PFDz4K0h for ; Tue, 21 Jul 2020 21:52:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-qt1-f171.google.com with SMTP id a32so351918qtb.5 for ; Tue, 21 Jul 2020 14:52:12 -0700 (PDT) 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=mdvbjPK3EzRPIrCYbSNi2xRJY0+ElqIDSJ/703kRelE=; b=R7YcHt4tbQfDO9QV2UbxD4A3RhFvooxZWwKUPvjH9qnNZTC/biOK0308B5GF9Crq4k K3Yy3CC2bBx5ucco678WYT4w0I83zqAfnMB4Z08Un01+w/zLDTeEHbFjt2HpPP0rsvbn fdIUCGQNdr+jnsGAlILYGGVHUoYPeqieONfxNu0df+3gOHkoMD0p/OP67YE4v1R1/LWc nnPAwgz2W3+OswzfItHXf++DbHMacbnk8qfmVcgIsTqUPzwZ1ftfjA8x5LDA+wRxD0Hp NDcdzO7gIw/knMjFRjycFLvJtJz4vH3HYJfI7YMxSbpSqGNGyGfTsjUGOEIl+rnHIP9w UqSQ== X-Gm-Message-State: AOAM532syhsU48U5pcuPkiOJIojVn/yAWksNzvRxp38A/YfoAuzr5lwj Pk+6DjBIZgBLnTtLAs5HIMfsX96wRkUUTiAxqYJqLQ== X-Google-Smtp-Source: ABdhPJwbfLl+Oi9Xx2eVc9y6s6dMdwDg5YCd2u4+vJlg8d6FpxvWAgaa0cdCuv4UaItTz2pL660R9AgXgySEmmCgV9c= X-Received: by 2002:ac8:1788:: with SMTP id o8mr2357142qtj.330.1595368332130; Tue, 21 Jul 2020 14:52:12 -0700 (PDT) MIME-Version: 1.0 References: <7a0f5e2c-a9e2-a476-6d99-f4591211bbe5@gmail.com> <31f9101a-1892-ea26-a5ed-460023e1c0f6@gmail.com> In-Reply-To: <31f9101a-1892-ea26-a5ed-460023e1c0f6@gmail.com> From: Adrian Chadd Date: Tue, 21 Jul 2020 14:52:00 -0700 Message-ID: Subject: Re: regdomain.xml To: Aaron Cc: freebsd-wireless X-Rspamd-Queue-Id: 4BBC4D6PFDz4K0h X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of adrianchadd@gmail.com designates 209.85.160.171 as permitted sender) smtp.mailfrom=adrianchadd@gmail.com X-Spamd-Result: default: False [-2.19 / 15.00]; FROM_NEQ_ENVFROM(0.00)[adrian@freebsd.org,adrianchadd@gmail.com]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.01)[-1.010]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-wireless@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.25)[-0.254]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[209.85.160.171:from]; NEURAL_HAM_MEDIUM(-0.92)[-0.922]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[adrian@freebsd.org,adrianchadd@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.160.171:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TAGGED_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] 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 21:52:14 -0000 On Tue, 21 Jul 2020 at 14:48, Aaron wrote: > On 7/21/2020 5:41 PM, Adrian Chadd wrote: > > (cc'ing the list again, hehe :-) > On Tue, 21 Jul 2020 at 14:35, Aaron wrote: > >> On 7/21/2020 5:33 PM, Adrian Chadd wrote: >> > Ok. Please do dig into it. >> >> Do try to treat the regdomain code as a black box - input is "what >> regulatory domain do we want" and the output is "a list of channels and >> properties of those channels that we currently program into net80211." >> Hopefully we don't have to change the net80211 channel API! >> >> This is the sort of information I'm looking for! So far all I'm looking >> at is an XML file. Where would I find the "regdomain code"? >> > > (We really should write a page in the wiki about regdomain stuff.) > > So, here's my suggestion: > > * get freebsd with a supported wifi card > * look at what happens when you type "ifconfig wlan0 create wlandev XXX"; > and then "ifconfig wlan0 regdomain FCC3" > * .. see what it does with the channel programming in src/sbin/ifconfig/ > and src/lib/lib80211/ > * Also 'ifconfig wlan0 list sta" and "ifconfig -v wlan0 list sta" > > in src/sbin/ifconfig/ifieee80211.c look at > setdefregdomain(), setregdomain_cb(), print_channels() and list_channels() > > * print_channels() queries net80211 for the list of channels > * list_channels() calls it :-) > * setregdomain_cb() sucks in the lib80211 regdomain code, does a bunch of > hijinx, and then calls into net80211 using the IEEE80211_IOC_REGDOMAIN > ioctl to set the sku/country and the channel list. > > > > -adrian > > So much for limiting myself to XML parsing. I'll grab some source files > and take a look, I can code but might be too removed from what's being done > here to get my ahead around it. Thanks all. > Oh! It's ok! If this is too big a thing then we can look around for other bits and pieces that need doing. :-) I'd still like to get the regdomain stuff discussed! -a