From patchwork Wed Dec 11 18:11:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sander Eikelenboom X-Patchwork-Id: 3327491 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1DFD4C0D4A for ; Wed, 11 Dec 2013 18:11:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DCF88207F4 for ; Wed, 11 Dec 2013 18:11:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 93230207B2 for ; Wed, 11 Dec 2013 18:11:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751825Ab3LKSLO (ORCPT ); Wed, 11 Dec 2013 13:11:14 -0500 Received: from vserver.eikelenboom.it ([84.200.39.61]:41318 "EHLO smtp.eikelenboom.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750968Ab3LKSLM (ORCPT ); Wed, 11 Dec 2013 13:11:12 -0500 Received: from 207-69-ftth.on.nl ([88.159.69.207]:53410 helo=[172.16.1.20]) by smtp.eikelenboom.it with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Vqo78-0005iF-LQ; Wed, 11 Dec 2013 19:02:26 +0100 Date: Wed, 11 Dec 2013 19:11:04 +0100 From: Sander Eikelenboom Organization: Eikelenboom IT services X-Priority: 3 (Normal) Message-ID: <871324710.20131211191104@eikelenboom.it> To: "Luis R. Rodriguez" CC: "Berg, Johannes" , "Grumbach, Emmanuel" , "linux-kernel@vger.kernel.org" , "ilw@linux.intel.com" , "netdev@vger.kernel.org" , "linux-wireless@vger.kernel.org" , "John W. Linville" Subject: Re: [cfg80211 / iwlwifi] setting wireless regulatory domain doesn't work. In-Reply-To: References: <1507831110.20131018194349@eikelenboom.it> <792757788.20131023142849@eikelenboom.it> <1819533168.20131211161710@eikelenboom.it> <1818324675.20131211175350@eikelenboom.it> <1342235583.20131211182804@eikelenboom.it> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Wednesday, December 11, 2013, 6:53:07 PM, you wrote: > On Wed, Dec 11, 2013 at 6:28 PM, Sander Eikelenboom > wrote: >> Wednesday, December 11, 2013, 6:14:16 PM, you wrote: >>> Yeap, that's the case for Intel Atheros, and I think nowadays new >>> broadcom upstream drivers too. Users should not have to be involved on >>> setting the regulatory domain, everything should just work >>> automatically. >> >> Erhmm yes that works, under the assumption that the device is not leaving the country it was programmed for at the factory. > Moving out of a region that you purchased a device is called to "world > roam". Believe it or not some devices are designed with the intent you > do not take it out of a country. The Playstation comes to mind as an > example but I believe some Apple tablets are also in the same > situation. Some devices like mobile phones obviously need to support > world roaming and they do, what they do then is build architecture to > support a base set and then rely on your APs around to see the country > IE to determine region. Some other devices rely on cellular base > station information, but that is allowed only in a few countries right > now and in the US at least this requires some sort of special review > from FCC on the design. We support all this in the Linux kernel today, > its up to system integrators to do things and certify things properly. >> (Or you like to be limited in your abilities, channel 12 and 13 are legal here) >> That there is a restriction on boot or on first use, i can understand. Crippling a device for it's life time though. > The best way to address all this is by automatic region awareness and > doing the right thing on devices, this however requires good > architecture / calibration data / etc and all that needs to be > verified by the system integrators, and finally they need to be > certified. If you want to hack your firmware and software go at it, > just be aware there are reasons for things. Well the general problem seems to be "we don't trust the user" so we FORCE him to the lowest common denominator (without a way to overrule that) so he is forced to operate *well* within the law. >>> It doesn't seem like you are getting your original requests getting >>> processed, so I don't think CRDA is passing it. Can you verify running >>> from CRDA code: >> >> They don't get processed unless i remove the return from the code as i indicated. >> If i remove that return it processes the request. >> >>> ./regdbdump /usr/lib/crda/regulatory.bin >> >> Although it's in a different location on Debian, /lib/crda/regulatory.bin >> the dump seems fine. > OK thanks. Can you send a patch of what exact change you made, it was > unclear from the paste you made. > diff -u file.c.orig file.c Well i just did a pull from wireless-next, to try Avinash Patil's patch. net/wireless/reg.c had already changed much so i couldn't apply his patch without. With his patch it sets the regulatory domain, although as now expected i still can not use channels 12 and 13 yet, probably due to those firmware restrictions. His patch is copy pasted below. > Luis ---------- Forwarded message ---------- From: "Avinash Patil" Date: Dec 6, 2013 8:31 PM Subject: [RFC] cfg80211: set regulatory request processed for initiator core To: , Cc: During cfg80211 init, cfg80211 initializes regulatory to set to world domain. Here we dont set last request processed flag. This results into further request set to pending indefinitely. This patch fixes this by setting last request to processed. Signed-off-by: Avinash Patil --- net/wireless/reg.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) treatment = reg_process_hint_user(reg_request); -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/wireless/reg.c b/net/wireless/reg.c index ec54e1a..70a8f0a 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1670,6 +1670,8 @@ static void reg_process_hint(struct regulatory_request *reg_request) switch (reg_request->initiator) { case NL80211_REGDOM_SET_BY_CORE: reg_process_hint_core(reg_request); + nl80211_send_reg_change_event(reg_request); + reg_set_request_processed(); return; case NL80211_REGDOM_SET_BY_USER: