From owner-freebsd-wireless@freebsd.org Tue Jul 21 21:48:31 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 3ACC836941B for ; Tue, 21 Jul 2020 21:48:31 +0000 (UTC) (envelope-from notjanedeere@gmail.com) Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (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 4BBBzx0Rfnz4JFM; Tue, 21 Jul 2020 21:48:28 +0000 (UTC) (envelope-from notjanedeere@gmail.com) Received: by mail-qt1-x833.google.com with SMTP id s16so336686qtn.7; Tue, 21 Jul 2020 14:48:28 -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=c9PWh6WqByLqd8LH2JQablfZrL4FMbJ7rBz0w7llaPM=; b=msK9l3af5ZjZ/PDxqiiuB7dSpXmcTUJM/u+xwNzsleIzY4Y2ol0iTcnCyKsHTiiWPR xptFaDVE2ZYjsyuI1ego3IFdQFJFjIBQgz2m0Bc8jZU8eG04louO+E/F433KpdduJMEq PysrrgVbQzAdWNUpgffFsLxhb/YzHJUlNBZibPwwydXLhccumFdbu7/3rg7wDkEBHljs ERuhKzFUuIbaUqR3YwtmOD3qPsX2KUmnw0tcqOBhe7Zj7ElzOyCUnBnwQ5LyMMCfWF8w mhu6jwzvzRrTnw+DdcoxxCOPmsq0FfOTgVGMcJ4Ve5YkOA93rVc1YNVW9cg9SExPXWhp 7a1w== 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=c9PWh6WqByLqd8LH2JQablfZrL4FMbJ7rBz0w7llaPM=; b=YTaWPINndSJzS8F6tRWL8DU5omhznL40kt78ZmV2Fhn8730DYlVPE5QbKOAmuZ3AuT PIK5NWiKz7kFCEBYINbyxlzdhvanhwq2IlQ/dmN4OcX//MEV6h+GYiz7/YuCJ4Uu8jM6 fNqW8+MG1U5rkDnJyj1aVhUWQcglQqg912IB1OoQH5135V81sQVFfB0tbtI/y8Mxh7w4 CR37DvrgT8+9scwjuSI/w7/K/xqGuPwxRXnpQkk/xDlxf2B/qbCp0YDxPbTlgKN2oMVD 6WH/+pg0+UTe5GVeLwywoQnyvyVR9qMOUAaxqeChrsfUOgC6/WhCmBhOfQWiATmwYTjo fQdw== X-Gm-Message-State: AOAM531Mz70YvwXpb0VpuPp00YGZlKsZ5xzbdgafT9zhf3at2Y3bEs4V L+BxVt30rUiopGaRArwYkE6DKNbt X-Google-Smtp-Source: ABdhPJxKu9zEkkvPK62lWFFqWIHjnfmILqIiNsjTNDB1xVMIA0Z06IXVkPTwdrsVSKELG9h/cwRByQ== X-Received: by 2002:ac8:13c9:: with SMTP id i9mr31620486qtj.284.1595368106924; Tue, 21 Jul 2020 14:48:26 -0700 (PDT) Received: from [10.5.0.2] ([162.219.176.188]) by smtp.gmail.com with ESMTPSA id g1sm3422178qkl.86.2020.07.21.14.48.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Jul 2020 14:48:26 -0700 (PDT) Subject: Re: regdomain.xml To: Adrian Chadd , freebsd-wireless References: <7a0f5e2c-a9e2-a476-6d99-f4591211bbe5@gmail.com> From: Aaron Message-ID: <31f9101a-1892-ea26-a5ed-460023e1c0f6@gmail.com> Date: Tue, 21 Jul 2020 17:48:25 -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: 4BBBzx0Rfnz4JFM X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=msK9l3af; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of notjanedeere@gmail.com designates 2607:f8b0:4864:20::833 as permitted sender) smtp.mailfrom=notjanedeere@gmail.com X-Spamd-Result: default: False [-3.33 / 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.03)[-1.031]; 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]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.98)[-0.979]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::833:from]; NEURAL_HAM_SHORT(-0.32)[-0.320]; 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:48:31 -0000 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.