From owner-freebsd-wireless@freebsd.org Tue Jul 21 21:56:41 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 5B3103694CA for ; Tue, 21 Jul 2020 21:56:41 +0000 (UTC) (envelope-from notjanedeere@gmail.com) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (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 4BBC9N4Cmvz4K3V for ; Tue, 21 Jul 2020 21:56:40 +0000 (UTC) (envelope-from notjanedeere@gmail.com) Received: by mail-qk1-x731.google.com with SMTP id x69so176831qkb.1 for ; Tue, 21 Jul 2020 14:56:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=6lZPkaos76bySE3s2vwfAARMnGYZ4lIq/+yvhp4tw24=; b=qaodDDwz250+pZZf6Rzkc+zqljCzTT28VmWjqqzIHcm9jAf9WX2CCaUeJwKlz+HXU3 YzcmkLON0hGdErZWdVL1ThqnQBIT+PwweWyxh59Mv6jA3KnjZ32PTUPOzZWu6Jm+c0QV 2o+uzNVaMiheDgu98+XxH0R9JvmTajyaJTbaUmVbBNQBqeiswTYFfo7byZ/nVj9w1NVb jobiyb9zIkxIRoZ4/k7XJsFAGtpzgVGN0+6Zgw48GCKtqDcCtwm3srlzd+MDCti4NiN8 /BQOstV399ePQKgWkqWqgQCFw1h/8TaNw7CuwgX9kAxFv5/aW18RWyFXoTr/9qDOcYOC i9tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=6lZPkaos76bySE3s2vwfAARMnGYZ4lIq/+yvhp4tw24=; b=gkH/fgQTvgNa99yk3/xDysCF8Um3xBFigzSTXS4o2i59rGN11eP6cmalXDJFdKJWVv 8AOE0zhevI1mbC5wXHEBLBztoJntOBQorsfafTxABkulU2lLYiY5Gl6xVCWOcy9ChgGr xTBMAMFrKhtRm4Z1gE+CTRLl3+I4odTybUli4nIF9a4iX8Aq6NNMMfpRKZ0MYPGNcuHO JYcqyPWnpC59PCcrnpOPtb4hMlHe+hHPXwKJR+OLYxa3cUEvJhs5eYPZCI8JLduSiRZY 0DIbqvcmcM5TB48uu5E2bBMEHyJcYO5NuIl5CI52EY1Q3rnTqYfje58k+hKXcfGbkG0E +VmQ== X-Gm-Message-State: AOAM530yNQuAAv3zmTW5gujaR+YI6sylOUkrVML01qGZmS5lrG0UnS+x d6bYnLdJ9SaOIyacd6wGFIS6l1Mt X-Google-Smtp-Source: ABdhPJygrBxmR4qocYrrKXLo62nGP/kQ7D3R09to2+Dua/kzv/0NgsJ/41+f9tCNFgvM7vxxqxCyhg== X-Received: by 2002:a05:620a:40c1:: with SMTP id g1mr29286327qko.391.1595368599366; Tue, 21 Jul 2020 14:56:39 -0700 (PDT) Received: from [10.5.0.2] ([162.219.176.188]) by smtp.gmail.com with ESMTPSA id m32sm23925425qtd.94.2020.07.21.14.56.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Jul 2020 14:56:39 -0700 (PDT) Subject: Re: regdomain.xml To: freebsd-wireless References: <7a0f5e2c-a9e2-a476-6d99-f4591211bbe5@gmail.com> <31f9101a-1892-ea26-a5ed-460023e1c0f6@gmail.com> From: Aaron Message-ID: Date: Tue, 21 Jul 2020 17:56:38 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Rspamd-Queue-Id: 4BBC9N4Cmvz4K3V X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=qaodDDwz; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of notjanedeere@gmail.com designates 2607:f8b0:4864:20::731 as permitted sender) smtp.mailfrom=notjanedeere@gmail.com X-Spamd-Result: default: False [-3.44 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.04)[-1.038]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-wireless@freebsd.org]; NEURAL_HAM_LONG(-0.99)[-0.987]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::731:from]; NEURAL_HAM_SHORT(-0.41)[-0.411]; TO_MATCH_ENVRCPT_ALL(0.00)[]; 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]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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:56:41 -0000 On 7/21/2020 5:52 PM, Adrian Chadd wrote: > 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 No, I'm down - until I see what the code looks like of course.  If it's modular enough to be understood without too many adjacent systems I might be alright.  At present I'm less interested in changing the code that operates on the XML file and more interested in a refactoring.  (Which will necessitate code changes, but I expect I'll be less involved there.)  I'm good at data design work, I'll try and stay in my lane.