From patchwork Wed May 25 17:32:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 626367 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rFKCL62tCz9sdn for ; Thu, 26 May 2016 03:34:22 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b5cfX-0004Av-V4; Wed, 25 May 2016 17:32:31 +0000 Received: from fudo.makrotopia.org ([2001:41d0:8:c75d::1]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b5cfV-00045X-3S for lede-dev@lists.infradead.org; Wed, 25 May 2016 17:32:30 +0000 Received: from local by fudo.makrotopia.org with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1b5cf7-0001EM-4B for lede-dev@lists.infradead.org; Wed, 25 May 2016 19:32:05 +0200 Date: Wed, 25 May 2016 19:32:01 +0200 From: Daniel Golle To: lede-dev@lists.infradead.org Message-ID: <20160525173153.GA4219@makrotopia.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.6.1 (2016-04-27) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160525_103229_310727_020F0691 X-CRM114-Status: GOOD ( 10.37 ) X-Spam-Score: -3.3 (---) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-3.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH] mac80211: respect user-set regulatory domain by default X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org It turns out most device vendors don't set the correct country code in their devices' on-flash-EEPROM sections as they apparently rather provide a complete per-target-market firmware with patched drivers instead of just setting the country code. This results in the driver to incorrectly assume the value stored in the on-flash-EERPOM (usually US or China) being the regulatory domain inside which the device is being used. To work around this issue, OpenWrt introduced the ATH_USER_REGD config variable to decide during build whether or not to allow the user to override the regulatory domain setting. This option, however, is not enabled by default and thus ends up being disabled for snapshots builds and released binaries. As we know for a long time that most devices got borked regulatory domain values set in their EEPROMs we should allow our users to respect their local law (instead of just assume US or China laws). Note that also the current default has great potential of users not ever setting their regulatory domain and thus using inapproriate and potentially illegal frequencies and/or tx-power settings Signed-off-by: Daniel Golle --- Imho we should set World regulatory domain by default but also allow users to set their actual regulatory domain (e.g. ETSI). Obviously this will require the user to enter her country before being able to use AP, IBSS and 802.11s mode in the 5 GHz bands. Most wireless mesh communities' firmware projects are currently implemented as source-wrappers around OpenWrt instead of just using the SDK and ImageBuilder because of the official releases being useless in most places in the world due to ATH_USER_REGD being disabled. package/kernel/mac80211/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 8b053d4..28da0ec 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -161,6 +161,7 @@ define KernelPackage/ath/config if PACKAGE_kmod-ath config ATH_USER_REGD bool "Force Atheros drivers to respect the user's regdomain settings" + default y help Atheros' idea of regulatory handling is that the EEPROM of the card defines the regulatory limits and the user is only allowed to restrict the settings