linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] cfg80211: set regulatory request processed for initiator core
@ 2013-12-07  3:54 Avinash Patil
  2013-12-11 17:38 ` Luis R. Rodriguez
  0 siblings, 1 reply; 4+ messages in thread
From: Avinash Patil @ 2013-12-07  3:54 UTC (permalink / raw)
  To: johannes, linux-wireless

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 <patila@marvell.com>
---
 net/wireless/reg.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

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:
 		treatment = reg_process_hint_user(reg_request);
-- 
1.7.3.4


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

* Re: [RFC] cfg80211: set regulatory request processed for initiator core
  2013-12-07  3:54 [RFC] cfg80211: set regulatory request processed for initiator core Avinash Patil
@ 2013-12-11 17:38 ` Luis R. Rodriguez
  2013-12-11 18:01   ` Luis R. Rodriguez
  0 siblings, 1 reply; 4+ messages in thread
From: Luis R. Rodriguez @ 2013-12-11 17:38 UTC (permalink / raw)
  To: Avinash Patil; +Cc: Johannes Berg, linux-wireless

On Sat, Dec 7, 2013 at 4:54 AM, Avinash Patil <patila@marvell.com> wrote:
> 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 <patila@marvell.com>
> ---
>  net/wireless/reg.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> 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:
>                 treatment = reg_process_hint_user(reg_request);

NACK, the reg_process_hint() is supposed to *process* a request, and
then call the internal regdb if its there and also call CRDA. Later
whoever sends the regulatory domain and gets cfg80211 to process it
will have reg_set_request_processed() called.

Can you verify if CRDA is sending the regulatory domains to cfg80211?

  Luis

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

* Re: [RFC] cfg80211: set regulatory request processed for initiator core
  2013-12-11 17:38 ` Luis R. Rodriguez
@ 2013-12-11 18:01   ` Luis R. Rodriguez
  2013-12-13 12:11     ` Avinash Patil
  0 siblings, 1 reply; 4+ messages in thread
From: Luis R. Rodriguez @ 2013-12-11 18:01 UTC (permalink / raw)
  To: Avinash Patil; +Cc: Johannes Berg, linux-wireless

On Wed, Dec 11, 2013 at 6:38 PM, Luis R. Rodriguez
<mcgrof@do-not-panic.com> wrote:
> On Sat, Dec 7, 2013 at 4:54 AM, Avinash Patil <patila@marvell.com> wrote:
>> 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 <patila@marvell.com>
>> ---
>>  net/wireless/reg.c |    2 ++
>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> 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:
>>                 treatment = reg_process_hint_user(reg_request);
>
> NACK, the reg_process_hint() is supposed to *process* a request, and
> then call the internal regdb if its there and also call CRDA. Later
> whoever sends the regulatory domain and gets cfg80211 to process it
> will have reg_set_request_processed() called.
>
> Can you verify if CRDA is sending the regulatory domains to cfg80211?

Also are you seeing this with wireless-testing ?

  Luis

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

* RE: [RFC] cfg80211: set regulatory request processed for initiator core
  2013-12-11 18:01   ` Luis R. Rodriguez
@ 2013-12-13 12:11     ` Avinash Patil
  0 siblings, 0 replies; 4+ messages in thread
From: Avinash Patil @ 2013-12-13 12:11 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Johannes Berg, linux-wireless, Bing Zhao, Nishant Sarmukadam,
	Amitkumar Karwar

Hi Luis,

I am using 3.13rc2 kernel; last commit on this branch is "ad17d104284ea4a301126b475df3bef03258142a".

If we set regulatory domain via "iw reg set US" we see following in dmesg logs:
cfg80211: Pending regulatory request, waiting for it to be processed...
Udevm monitor (via udevadm monitor --environment kernel) also does not print any CRDA domain change messages.

I have pasted dmesg logs at following location:
http://pastebin.com/kkNagpSu

If we apply below mentioned patch, last request is set to processed enabling cfg80211 to send further requests.

Thanks,
Avinash Patil


________________________________________
From: mcgrof@gmail.com [mcgrof@gmail.com] On Behalf Of Luis R. Rodriguez [mcgrof@do-not-panic.com]
Sent: Wednesday, December 11, 2013 11:31 PM
To: Avinash Patil
Cc: Johannes Berg; linux-wireless
Subject: Re: [RFC] cfg80211: set regulatory request processed for initiator core

On Wed, Dec 11, 2013 at 6:38 PM, Luis R. Rodriguez
<mcgrof@do-not-panic.com> wrote:
> On Sat, Dec 7, 2013 at 4:54 AM, Avinash Patil <patila@marvell.com> wrote:
>> 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 <patila@marvell.com>
>> ---
>>  net/wireless/reg.c |    2 ++
>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> 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:
>>                 treatment = reg_process_hint_user(reg_request);
>
> NACK, the reg_process_hint() is supposed to *process* a request, and
> then call the internal regdb if its there and also call CRDA. Later
> whoever sends the regulatory domain and gets cfg80211 to process it
> will have reg_set_request_processed() called.
>
> Can you verify if CRDA is sending the regulatory domains to cfg80211?

Also are you seeing this with wireless-testing ?

  Luis

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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-07  3:54 [RFC] cfg80211: set regulatory request processed for initiator core Avinash Patil
2013-12-11 17:38 ` Luis R. Rodriguez
2013-12-11 18:01   ` Luis R. Rodriguez
2013-12-13 12:11     ` Avinash Patil

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).