All of lore.kernel.org
 help / color / mirror / Atom feed
* regulatory will stuck when cfg80211 is built-in
@ 2013-09-09  6:16 Eugene Krasnikov
  2013-09-09 20:01 ` Kalle Valo
  0 siblings, 1 reply; 5+ messages in thread
From: Eugene Krasnikov @ 2013-09-09  6:16 UTC (permalink / raw)
  To: linux-wireless

Hi All,

There is a problem with regulatory part of cfg80211 when cfg80211 is
built-in the kernel. On regulatory init cfg80211 will try to notify
user space about changing current domain to world regulatory but at
that time user space is not up and running yet and uevent message will
be lost. So what will happen is that cfg80211 will wait for the
response from user space and all requests to set current regulatory
will be dropped with the following error: “Pending regulatory request,
waiting for it to be processed...”.

I assume the problem is known so is there any information on wiki how
to fix this in official way? Of course one option is to have cfg80211
as a module but is it really the right wait to go?


-- 
Best regards,
Eugene

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: regulatory will stuck when cfg80211 is built-in
  2013-09-09  6:16 regulatory will stuck when cfg80211 is built-in Eugene Krasnikov
@ 2013-09-09 20:01 ` Kalle Valo
  2013-09-10 16:23   ` Eugene Krasnikov
  0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2013-09-09 20:01 UTC (permalink / raw)
  To: Eugene Krasnikov; +Cc: linux-wireless

Eugene Krasnikov <k.eugene.e@gmail.com> writes:

> There is a problem with regulatory part of cfg80211 when cfg80211 is
> built-in the kernel. On regulatory init cfg80211 will try to notify
> user space about changing current domain to world regulatory but at
> that time user space is not up and running yet and uevent message will
> be lost. So what will happen is that cfg80211 will wait for the
> response from user space and all requests to set current regulatory
> will be dropped with the following error: “Pending regulatory request,
> waiting for it to be processed...”.

Does CONFIG_CFG80211_INTERNAL_REGDB help?

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: regulatory will stuck when cfg80211 is built-in
  2013-09-09 20:01 ` Kalle Valo
@ 2013-09-10 16:23   ` Eugene Krasnikov
  2013-09-10 17:59     ` Kalle Valo
  0 siblings, 1 reply; 5+ messages in thread
From: Eugene Krasnikov @ 2013-09-10 16:23 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

No, the flag CONFIG_CFG80211_INTERNAL_REGDB  does not help and it should not.

The problem is that cfg80211 will stuck in situation when cfg80211 is
initialized before user space. One way to get cfg80211 out of this
state is to run crda once right after user space is up and running.
But again is this intentional? Or it is more like a workaround?

2013/9/9 Kalle Valo <kvalo@adurom.com>:
> Eugene Krasnikov <k.eugene.e@gmail.com> writes:
>
>> There is a problem with regulatory part of cfg80211 when cfg80211 is
>> built-in the kernel. On regulatory init cfg80211 will try to notify
>> user space about changing current domain to world regulatory but at
>> that time user space is not up and running yet and uevent message will
>> be lost. So what will happen is that cfg80211 will wait for the
>> response from user space and all requests to set current regulatory
>> will be dropped with the following error: “Pending regulatory request,
>> waiting for it to be processed...”.
>
> Does CONFIG_CFG80211_INTERNAL_REGDB help?
>
> --
> Kalle Valo



-- 
Best regards,
Eugene

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: regulatory will stuck when cfg80211 is built-in
  2013-09-10 16:23   ` Eugene Krasnikov
@ 2013-09-10 17:59     ` Kalle Valo
  2013-09-13 14:12       ` Eugene Krasnikov
  0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2013-09-10 17:59 UTC (permalink / raw)
  To: Eugene Krasnikov; +Cc: linux-wireless

Eugene Krasnikov <k.eugene.e@gmail.com> writes:

> No, the flag CONFIG_CFG80211_INTERNAL_REGDB  does not help and it should not.
>
> The problem is that cfg80211 will stuck in situation when cfg80211 is
> initialized before user space. One way to get cfg80211 out of this
> state is to run crda once right after user space is up and running.
> But again is this intentional? Or it is more like a workaround?

With the internal regdb you do not need crda anymore, so why does it still
get stuck? Where does it exactly get stuck?

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: regulatory will stuck when cfg80211 is built-in
  2013-09-10 17:59     ` Kalle Valo
@ 2013-09-13 14:12       ` Eugene Krasnikov
  0 siblings, 0 replies; 5+ messages in thread
From: Eugene Krasnikov @ 2013-09-13 14:12 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

Let me try to describe the problem in more details:

1) When user space is calling "iw reg set <contry_code>" iw utility
will send NL80211_CMD_REQ_SET_REG through nl80211 to cfg80211.
2) cfg80211 will process this call in reg_todo work that is defined
here https://git.kernel.org/cgit/linux/kernel/git/linville/wireless.git/tree/net/wireless/reg.c#n1621
3) reg_todo work is calling reg_process_pending_hints to process the
call from user space where it checks if last request was
processed(https://git.kernel.org/cgit/linux/kernel/git/linville/wireless.git/tree/net/wireless/reg.c#n1576).
But last request is still there! This last request is
"NL80211_REGDOM_SET_BY_CORE" request that cfg80211 sent on init for
first regulatory domain initialization.
So the problem is that the first request that is sent by inbuilt
cfg80211 will be never process and will always stay in last_request
variable(https://git.kernel.org/cgit/linux/kernel/git/linville/wireless.git/tree/net/wireless/reg.c#n91)

Kalle, did you ever tried inbuilt into kernel cfg80211? This problem
is 100% reproducible because inbuilt modules will be always initialize
before user space.


2013/9/10 Kalle Valo <kvalo@adurom.com>:
> Eugene Krasnikov <k.eugene.e@gmail.com> writes:
>
>> No, the flag CONFIG_CFG80211_INTERNAL_REGDB  does not help and it should not.
>>
>> The problem is that cfg80211 will stuck in situation when cfg80211 is
>> initialized before user space. One way to get cfg80211 out of this
>> state is to run crda once right after user space is up and running.
>> But again is this intentional? Or it is more like a workaround?
>
> With the internal regdb you do not need crda anymore, so why does it still
> get stuck? Where does it exactly get stuck?
>
> --
> Kalle Valo



-- 
Best regards,
Eugene

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-09-13 14:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-09  6:16 regulatory will stuck when cfg80211 is built-in Eugene Krasnikov
2013-09-09 20:01 ` Kalle Valo
2013-09-10 16:23   ` Eugene Krasnikov
2013-09-10 17:59     ` Kalle Valo
2013-09-13 14:12       ` Eugene Krasnikov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.