netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
To: Sander Eikelenboom <linux@eikelenboom.it>
Cc: "Berg, Johannes" <johannes.berg@intel.com>,
	"Grumbach, Emmanuel" <emmanuel.grumbach@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"ilw@linux.intel.com" <ilw@linux.intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [cfg80211 / iwlwifi] setting wireless regulatory domain doesn't work.
Date: Wed, 18 Dec 2013 11:42:05 -0800	[thread overview]
Message-ID: <20131218194205.GD5705@cerro.do-not-panic.com> (raw)
In-Reply-To: <116277577.20131218195446@eikelenboom.it>

On Wed, Dec 18, 2013 at 07:54:46PM +0100, Sander Eikelenboom wrote:
> 
> Wednesday, December 18, 2013, 7:29:10 PM, you wrote:
> 
> > On Mon, Dec 16, 2013 at 12:22:00PM +0100, Sander Eikelenboom wrote:
> >> 
> >> Wednesday, December 11, 2013, 7:38:50 PM, you wrote:
> >> 
> >> > On Wed, Dec 11, 2013 at 7:11 PM, Sander Eikelenboom
> >> > <linux@eikelenboom.it> 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.
> >> 
> >> >>>>> 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
> >> 
> >> Ping ?
> >> 
> >> Is there anymore information you need to *fix* the problem ?
> 
> > I was away on Travel back home, and will soon be traveling to
> > visit family so e-mail replies will be delayed, I'll jump on this
> > thread now but in short:
> 
> > You are confusing the main issue you reported (cannot override regulatory)
> > as a software issue rather than a firmware issue with intel firmware, you are
> > also making claims and making people believe things work in different ways
> > (I'll clarify things there, proper regulatory support without CRDA works, CRDA
> > is just a helper, we also do have a timeout on requests). Lastly there is one
> > issue that may be a software issue but I cannot reproduce which I am
> > interested in getting down to the bottom to.
> 
> To hopefully save you some time ...
> 
> I would suggest reading the thread from bottom to top ;-)
> 
> A summary .. it's now limited to:
> 
> Problem:    Not being able to set the regulator domain with userspace tools after boot although CRDA works.
> Condition:  This only occurs when i build the modules in, when i use loadable modules all is fine.
> What seems to happen:
>             - This seems to be due to the fact that when the modules are built-in the modules are initialized *before* the root-filesystem is mounted.
>             - Since the root-filesystem isn't mounted, the CRDA is also not accessible.
>             - The world regulatory domain is now set and the boot continues, but somehow the request keeps pending doesn't seem to be cleared.
>             - *All* subsequent requests to change the regulatory domain, also when the CRDA has become accessible, also keep pending because that first request (at boot) was never fullfilled (or cleared)
> 
> And IMHO that's a bug.

Thanks for the summary !

  Luis

  reply	other threads:[~2013-12-18 19:42 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18 17:43 [cfg80211 / iwlwifi] setting wireless regulatory domain doesn't work Sander Eikelenboom
     [not found] ` <1507831110.20131018194349-6SM94LqRVpn6gRhOQ7JHfg@public.gmane.org>
2013-10-23 12:28   ` Sander Eikelenboom
2013-12-11 15:17     ` Sander Eikelenboom
2013-12-11 15:38       ` Luis R. Rodriguez
2013-12-11 16:53         ` Sander Eikelenboom
2013-12-11 17:14           ` Luis R. Rodriguez
2013-12-11 17:28             ` Sander Eikelenboom
2013-12-11 17:53               ` Luis R. Rodriguez
2013-12-11 18:02                 ` Luis R. Rodriguez
2013-12-11 18:11                 ` Sander Eikelenboom
2013-12-11 18:38                   ` Luis R. Rodriguez
2013-12-11 19:06                     ` Sander Eikelenboom
2013-12-18 18:54                       ` Luis R. Rodriguez
2013-12-16 11:22                     ` Sander Eikelenboom
2013-12-16 11:37                       ` Arend van Spriel
2013-12-16 12:56                         ` Sander Eikelenboom
2013-12-17  2:17                           ` Julian Calaby
     [not found]                             ` <CAGRGNgXHemM2FfnXgW5RbzhFT+9SfUfVkjdysK3+=_u3hWSacw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-17  9:45                               ` Sander Eikelenboom
2013-12-17 20:33                                 ` Sander Eikelenboom
2013-12-17 21:27                                   ` Ben Hutchings
2013-12-17 21:49                                     ` Sander Eikelenboom
2013-12-17 22:06                                       ` Linus Torvalds
2013-12-18  9:16                                         ` Arend van Spriel
     [not found]                                           ` <52B167F6.5060209-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2013-12-18  9:18                                             ` Grumbach, Emmanuel
2013-12-18  9:25                                           ` Sander Eikelenboom
2013-12-18  9:26                                           ` Johannes Berg
2013-12-18 10:48                                             ` Sander Eikelenboom
2013-12-18 19:43                                               ` Luis R. Rodriguez
2013-12-18 19:45                                                 ` Sander Eikelenboom
2013-12-19  4:57                                                   ` Luis R. Rodriguez
2013-12-17 23:35                                       ` Julian Calaby
2013-12-18  7:50                                       ` Pontus Fuchs
2013-12-18  8:58                                         ` Arend van Spriel
2013-12-18 19:27                           ` Luis R. Rodriguez
2013-12-18 18:29                       ` Luis R. Rodriguez
2013-12-18 18:54                         ` Sander Eikelenboom
2013-12-18 19:42                           ` Luis R. Rodriguez [this message]
     [not found]         ` <CAJwzM1nwFa7z5gwh42aj39M2dxVXnuecDrhQkVyL+DDFAXwwbg@mail.gmail.com>
2013-12-11 17:00           ` Sander Eikelenboom
2013-12-11 17:17             ` Luis R. Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131218194205.GD5705@cerro.do-not-panic.com \
    --to=mcgrof@do-not-panic.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=ilw@linux.intel.com \
    --cc=johannes.berg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux@eikelenboom.it \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).