From owner-freebsd-arch@FreeBSD.ORG Mon Aug 8 10:14:24 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E91A1065673 for ; Mon, 8 Aug 2011 10:14:24 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id D128D8FC12 for ; Mon, 8 Aug 2011 10:14:23 +0000 (UTC) Received: by vxh11 with SMTP id 11so1680440vxh.13 for ; Mon, 08 Aug 2011 03:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=ZKBGNLmL6K8BAbyty2UDKL9qPt3Uttsorn/E7DVrC1A=; b=I0+aXzasqLY25KDXY36Ed8g78h33Vu7YUdmuPNeedjMYV+dmtQDud30mYGFYOlvdQC C0Miz8m7q+20myJJml8u8nQt9Sc6qlCLGDeKYZHCh/NrcErC2F/uPU8ky3LJkIOCyPza 92PLsgrAkw37EWmKL0Er8WmBLAxKRkUqIS244= MIME-Version: 1.0 Received: by 10.52.95.163 with SMTP id dl3mr4978233vdb.229.1312796978268; Mon, 08 Aug 2011 02:49:38 -0700 (PDT) Received: by 10.52.157.193 with HTTP; Mon, 8 Aug 2011 02:49:38 -0700 (PDT) Date: Mon, 8 Aug 2011 17:49:38 +0800 Message-ID: From: Adrian Chadd To: freebsd-arch@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org Subject: [RFQ] net80211 regulatory changes: what I'd like to see before 9.0-RELEASE X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2011 10:14:24 -0000 Hi all, I've been knee-deep in the net80211 regulatory code (among other things) and after doing some regulatory DFS related work, there's a couple of short-comings I'd like to try and fix before 9.0-RELEASE is fixed. Firstly, the current way that regulatory domains in net80211 are setup is very Atheros-specific. Specifically, the notion of "SKU" as the regulatory domain. net80211 knows about a small subset of SKU values which mostly map to what the Atheros driver/HAL code uses to figure out the regulatory domain. But it makes it impossible to extend the regulatory domain database (regdomain.xml) to encompass the different regulatory domains that exist for different countries. For example, if I wanted to add an Australia specific regulatory domain (which would include information different to the "ROW" (rest-of-world) regulatory domain it currently defaults to using), I'd have to teach net80211 about a new SKU (call it "APAC".) But since the Atheros HAL doesn't have an Australia specific SKU value, I'd have to choose a value which didn't conflict. Since the regdomain.xml database is indexed by the SKU value, I can't have more than one regulatory domain with the same SKU. Since net80211/atheros rejects SKUs it doesn't know about, I'd have to add each new (fake) SKU to both in order to get things working. What I'd like to do is modify the regdomain.xml database, net80211 and ifconfig to use the ISOCC (ISO country code) numeric value as the primary key. This means an ABI change, as the primary key won't be an SKU any longer, but keep the SKU as a field so people using atheros devices can see what's going on. Once that's done, I/others can then spend the next few months slowly adding updated entries to regdomain.xml that reflect what each of the current country regulatory requirements are. The second change would be brought in with the first change. I'd like to add another field to regdomain.xml which includes what the radar requirements are - specifically for now, whether it's FCC, Japan, ETSI. The atheros driver seems to support combinations of the above when using one of the world regulatory domains (FCC and ETSI together) so it likely should be some more flags. I can knock up some public code in the next few days to submit for review. Thanks, Adrian