Return-path: Received: from vserver.eikelenboom.it ([84.200.39.61]:41744 "EHLO smtp.eikelenboom.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750922Ab3LKTG5 (ORCPT ); Wed, 11 Dec 2013 14:06:57 -0500 Date: Wed, 11 Dec 2013 20:06:51 +0100 From: Sander Eikelenboom Message-ID: <716357837.20131211200651@eikelenboom.it> (sfid-20131211_200723_352970_BE753D4C) 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> <871324710.20131211191104@eikelenboom.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-wireless-owner@vger.kernel.org List-ID: Wednesday, December 11, 2013, 7:38:50 PM, you wrote: > On Wed, Dec 11, 2013 at 7:11 PM, Sander Eikelenboom > wrote: >> >> Wednesday, December 11, 2013, 6:53:07 PM, you wrote: >> >>> 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. > Its simply stupid to have the user be involved, period, the fact that > a user would be involved should only be for testing or helping > compliance for a busted device, development, research and obviously > hacking. Linux allows all these but by default a device with firmware > and a custom regdomain that will barf if you try to use a channel that > is not allowed is a restriction in firmware. Feel free to reverse > engineer that if you don't like it but it just won't be supported or > go upstream. Now, the common denominator is generally optimized for > best performance as well so you shouldn't have to do anything, and for > APs -- this is typically carefully crafted for a region, also highly > optimized. Well how about a car maker shipping al his cars capped to say 10 miles an hour, because somewhere in the world that's the lowest. So to prevent you from breaking the law we will cap your 500HP engine, owh in your country you have a higher speedlimit, ah wel bad luck for you then. We need to enforce this so no one is going to brake any law any where. It's just plain stupid in my opinion (but not something linux can do much about, but it's about enforcing this stuff in firmware in general and thinking too much for the user (fine if you are capable to do so, but in this case clearly not, since there is no automatic way to detect in which country the device is, except by relying on user input). Why just don't set the safe and restricted value on boot and let the user overrule that if he wishes. (that means the user has to invoke a action, so he also should be aware of the consequences). >>>>> 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. > Its unclear what results you got, and yeah if the device is restricted > then its just the fw telling the driver its channels and you can't use > them. That's it. You won't be able to override information then unless > you hack the firmware. Without the patch: - "iw reg get" gives country 00 - now do a "iw reg set US", no error so it should be fine - now do a "iw reg get" .. gives country 00 again, so it has not been set to the country requested. With the patch: - "iw reg get" gives country 00 - now do a "iw reg set US", no error so it should be fine - now do a "iw reg get" .. gives country US, so it has been set to the country requested. > Luis