All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] cfg80211: process pending regulatory requests
@ 2013-12-19 20:53 Luis R. Rodriguez
  2013-12-19 20:53 ` [PATCH 1/3] cfg80211: allow reprocessing of pending requests Luis R. Rodriguez
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Luis R. Rodriguez @ 2013-12-19 20:53 UTC (permalink / raw)
  To: johannes; +Cc: linux, linux-wireless, Luis R. Rodriguez

Sander spotted that regulatory requests get stalled when
cfg80211 is built-in. This issue is hit since regulatory
requests only trigger a udev rule to run CRDA when
being processed and if cfg80211 is built-in the udev rule
that kicks CRDA could end up doing nothing as the filesystem
path that has CRDA may not be mounted yet. This series of
patches addresses this situation by allowing us to reprocess
the last pending regulatory request. We add support for that
by first taking into consideration the RCU case where the
request being processed is the last request, then by
trying to reprocess the last request if we find it hasn't
been processed yet when checking the queues, and lastly by
adding some opportunistic checks of the pending regulatory
work when bringing an interface up or down.

If folks want to consider this for stable the first two
seem least intrusive and address the issue but those two
patches still require a trigger to process the queue.
Typically the queues will be processed on a system after
bootup after the interface comes up and finds some beacon
hints on 5 gHz, or when a user asks to change regulatory
domains. The last patch tries to avoid requiring this
and I consider it more an enhancement.

Luis R. Rodriguez (3):
  cfg80211: allow reprocessing of pending requests
  cfg80211: fix processing world regdomain when non modular
  cfg80211: processing regulatory requests on netdev notifier

 net/wireless/core.c |  2 ++
 net/wireless/reg.c  | 21 ++++++++++++++-------
 net/wireless/reg.h  |  1 +
 3 files changed, 17 insertions(+), 7 deletions(-)

-- 
1.8.4.3


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

* [PATCH 1/3] cfg80211: allow reprocessing of pending requests
  2013-12-19 20:53 [PATCH 0/3] cfg80211: process pending regulatory requests Luis R. Rodriguez
@ 2013-12-19 20:53 ` Luis R. Rodriguez
  2014-01-07 15:34   ` Johannes Berg
  2013-12-19 20:53 ` [PATCH 2/3] cfg80211: fix processing world regdomain when non modular Luis R. Rodriguez
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 21+ messages in thread
From: Luis R. Rodriguez @ 2013-12-19 20:53 UTC (permalink / raw)
  To: johannes; +Cc: linux, linux-wireless, Luis R. Rodriguez

This addresses the RCU component of allowing us to reprocess
the last regulatory request.

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
 net/wireless/reg.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 9b897fc..5be2d7c 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -244,19 +244,21 @@ static char user_alpha2[2];
 module_param(ieee80211_regdom, charp, 0444);
 MODULE_PARM_DESC(ieee80211_regdom, "IEEE 802.11 regulatory domain code");
 
-static void reg_kfree_last_request(void)
+static void reg_kfree_last_request(struct regulatory_request *lr)
 {
-	struct regulatory_request *lr;
-
-	lr = get_last_request();
-
 	if (lr != &core_request_world && lr)
 		kfree_rcu(lr, rcu_head);
 }
 
 static void reg_update_last_request(struct regulatory_request *request)
 {
-	reg_kfree_last_request();
+	struct regulatory_request *lr;
+
+	lr = get_last_request();
+	if (lr == request)
+		return;
+
+	reg_kfree_last_request(lr);
 	rcu_assign_pointer(last_request, request);
 }
 
-- 
1.8.4.3


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

* [PATCH 2/3] cfg80211: fix processing world regdomain when non modular
  2013-12-19 20:53 [PATCH 0/3] cfg80211: process pending regulatory requests Luis R. Rodriguez
  2013-12-19 20:53 ` [PATCH 1/3] cfg80211: allow reprocessing of pending requests Luis R. Rodriguez
@ 2013-12-19 20:53 ` Luis R. Rodriguez
  2014-01-07 15:35   ` Johannes Berg
  2013-12-19 20:53 ` [PATCH 3/3] cfg80211: processing regulatory requests on netdev notifier Luis R. Rodriguez
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 21+ messages in thread
From: Luis R. Rodriguez @ 2013-12-19 20:53 UTC (permalink / raw)
  To: johannes; +Cc: linux, linux-wireless, Luis R. Rodriguez

This allows processing of the last regulatory request when
we determine its still pending. This fixes the issue reported
by Sander of when cfg80211 is built-in and no further regulatory
domain processing can happen. This occurred because if the
filesystem was not mounted upon kicking off the udev rule
to run CRDA then the last request will always be left
unprocessed.

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
 net/wireless/reg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 5be2d7c..ecf364e 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1737,7 +1737,7 @@ static void reg_process_pending_hints(void)
 
 	/* When last_request->processed becomes true this will be rescheduled */
 	if (lr && !lr->processed) {
-		REG_DBG_PRINT("Pending regulatory request, waiting for it to be processed...\n");
+		reg_process_hint(lr);
 		return;
 	}
 
-- 
1.8.4.3


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

* [PATCH 3/3] cfg80211: processing regulatory requests on netdev notifier
  2013-12-19 20:53 [PATCH 0/3] cfg80211: process pending regulatory requests Luis R. Rodriguez
  2013-12-19 20:53 ` [PATCH 1/3] cfg80211: allow reprocessing of pending requests Luis R. Rodriguez
  2013-12-19 20:53 ` [PATCH 2/3] cfg80211: fix processing world regdomain when non modular Luis R. Rodriguez
@ 2013-12-19 20:53 ` Luis R. Rodriguez
  2014-01-07 15:35   ` Johannes Berg
  2013-12-20 12:19 ` [PATCH 0/3] cfg80211: process pending regulatory requests Sander Eikelenboom
  2014-01-06 13:10 ` Sander Eikelenboom
  4 siblings, 1 reply; 21+ messages in thread
From: Luis R. Rodriguez @ 2013-12-19 20:53 UTC (permalink / raw)
  To: johannes; +Cc: linux, linux-wireless, Luis R. Rodriguez

This adds a trigger to review any pending regulatory
requests whenever an 802.11 device interface is brought
down or up. We use this as an opportunistic trigger
for checking the regulatory work queues as otherwise
they they're only checked upon an initial regulatory
request or when beacon hints are found.

This opportunistic mechanism can be used to trigger
kicking the queues regulatory queues at any time from
userspace without having to change the regulatory state.

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
 net/wireless/core.c | 2 ++
 net/wireless/reg.c  | 5 +++++
 net/wireless/reg.h  | 1 +
 3 files changed, 8 insertions(+)

diff --git a/net/wireless/core.c b/net/wireless/core.c
index d89dee2..bc0f518 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -812,6 +812,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
 		SET_NETDEV_DEVTYPE(dev, &wiphy_type);
 		break;
 	case NETDEV_REGISTER:
+		reg_process_pending_work();
 		/*
 		 * NB: cannot take rdev->mtx here because this may be
 		 * called within code protected by it when interfaces
@@ -871,6 +872,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
 		wake_up(&rdev->dev_wait);
 		break;
 	case NETDEV_UP:
+		reg_process_pending_work();
 		cfg80211_update_iface_num(rdev, wdev->iftype, 1);
 		wdev_lock(wdev);
 		switch (wdev->iftype) {
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index ecf364e..1a049b3 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -196,6 +196,11 @@ static DECLARE_WORK(reg_work, reg_todo);
 static void reg_timeout_work(struct work_struct *work);
 static DECLARE_DELAYED_WORK(reg_timeout, reg_timeout_work);
 
+void reg_process_pending_work(void)
+{
+	schedule_work(&reg_work);
+}
+
 /* We keep a static world regulatory domain in case of the absence of CRDA */
 static const struct ieee80211_regdomain world_regdom = {
 	.n_reg_rules = 6,
diff --git a/net/wireless/reg.h b/net/wireless/reg.h
index 02bd8f4..063fb7a 100644
--- a/net/wireless/reg.h
+++ b/net/wireless/reg.h
@@ -36,6 +36,7 @@ void regulatory_exit(void);
 int set_regdom(const struct ieee80211_regdomain *rd);
 
 bool reg_last_request_cell_base(void);
+void reg_process_pending_work(void);
 
 /**
  * regulatory_hint_found_beacon - hints a beacon was found on a channel
-- 
1.8.4.3


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

* Re: [PATCH 0/3] cfg80211: process pending regulatory requests
  2013-12-19 20:53 [PATCH 0/3] cfg80211: process pending regulatory requests Luis R. Rodriguez
                   ` (2 preceding siblings ...)
  2013-12-19 20:53 ` [PATCH 3/3] cfg80211: processing regulatory requests on netdev notifier Luis R. Rodriguez
@ 2013-12-20 12:19 ` Sander Eikelenboom
  2014-01-06 13:10 ` Sander Eikelenboom
  4 siblings, 0 replies; 21+ messages in thread
From: Sander Eikelenboom @ 2013-12-20 12:19 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: johannes, linux-wireless


Thursday, December 19, 2013, 9:53:16 PM, you wrote:

> Sander spotted that regulatory requests get stalled when
> cfg80211 is built-in. This issue is hit since regulatory
> requests only trigger a udev rule to run CRDA when
> being processed and if cfg80211 is built-in the udev rule
> that kicks CRDA could end up doing nothing as the filesystem
> path that has CRDA may not be mounted yet. This series of
> patches addresses this situation by allowing us to reprocess
> the last pending regulatory request. We add support for that
> by first taking into consideration the RCU case where the
> request being processed is the last request, then by
> trying to reprocess the last request if we find it hasn't
> been processed yet when checking the queues, and lastly by
> adding some opportunistic checks of the pending regulatory
> work when bringing an interface up or down.

> If folks want to consider this for stable the first two
> seem least intrusive and address the issue but those two
> patches still require a trigger to process the queue.
> Typically the queues will be processed on a system after
> bootup after the interface comes up and finds some beacon
> hints on 5 gHz, or when a user asks to change regulatory
> domains. The last patch tries to avoid requiring this
> and I consider it more an enhancement.

> Luis R. Rodriguez (3):
>   cfg80211: allow reprocessing of pending requests
>   cfg80211: fix processing world regdomain when non modular
>   cfg80211: processing regulatory requests on netdev notifier

>  net/wireless/core.c |  2 ++
>  net/wireless/reg.c  | 21 ++++++++++++++-------
>  net/wireless/reg.h  |  1 +
>  3 files changed, 17 insertions(+), 7 deletions(-)


Hi Luis,

I have tested the patches with 3.13-rc4 with wireless-next pulled on top
(patch 1 doesn't apply cleanly to 3.13-rc4 vanilla).

I can report that it works for me with both cases you describe:
- only patches 1 and 2 applied
- all patches applied

Thanks for fixing it !

--

Sander


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

* Re: [PATCH 0/3] cfg80211: process pending regulatory requests
  2013-12-19 20:53 [PATCH 0/3] cfg80211: process pending regulatory requests Luis R. Rodriguez
                   ` (3 preceding siblings ...)
  2013-12-20 12:19 ` [PATCH 0/3] cfg80211: process pending regulatory requests Sander Eikelenboom
@ 2014-01-06 13:10 ` Sander Eikelenboom
  2014-01-06 13:32   ` Johannes Berg
  4 siblings, 1 reply; 21+ messages in thread
From: Sander Eikelenboom @ 2014-01-06 13:10 UTC (permalink / raw)
  To: Luis R. Rodriguez, John W. Linville
  Cc: johannes, linux-wireless, Linus Torvalds, David S. Miller

Hi All,

"Give me a ping, Vasili. One ping only, please."

Or in other words .. what is the status of this patchset by Luis ?
It doesn't seem to be in wireless-next yet, nor does it seem to be backported for 3.13 and older ?

--

Sander


Thursday, December 19, 2013, 9:53:16 PM, you wrote:

> Sander spotted that regulatory requests get stalled when
> cfg80211 is built-in. This issue is hit since regulatory
> requests only trigger a udev rule to run CRDA when
> being processed and if cfg80211 is built-in the udev rule
> that kicks CRDA could end up doing nothing as the filesystem
> path that has CRDA may not be mounted yet. This series of
> patches addresses this situation by allowing us to reprocess
> the last pending regulatory request. We add support for that
> by first taking into consideration the RCU case where the
> request being processed is the last request, then by
> trying to reprocess the last request if we find it hasn't
> been processed yet when checking the queues, and lastly by
> adding some opportunistic checks of the pending regulatory
> work when bringing an interface up or down.

> If folks want to consider this for stable the first two
> seem least intrusive and address the issue but those two
> patches still require a trigger to process the queue.
> Typically the queues will be processed on a system after
> bootup after the interface comes up and finds some beacon
> hints on 5 gHz, or when a user asks to change regulatory
> domains. The last patch tries to avoid requiring this
> and I consider it more an enhancement.

> Luis R. Rodriguez (3):
>   cfg80211: allow reprocessing of pending requests
>   cfg80211: fix processing world regdomain when non modular
>   cfg80211: processing regulatory requests on netdev notifier

>  net/wireless/core.c |  2 ++
>  net/wireless/reg.c  | 21 ++++++++++++++-------
>  net/wireless/reg.h  |  1 +
>  3 files changed, 17 insertions(+), 7 deletions(-)










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

* Re: [PATCH 0/3] cfg80211: process pending regulatory requests
  2014-01-06 13:10 ` Sander Eikelenboom
@ 2014-01-06 13:32   ` Johannes Berg
  0 siblings, 0 replies; 21+ messages in thread
From: Johannes Berg @ 2014-01-06 13:32 UTC (permalink / raw)
  To: Sander Eikelenboom
  Cc: Luis R. Rodriguez, John W. Linville, linux-wireless,
	Linus Torvalds, David S. Miller

On Mon, 2014-01-06 at 14:10 +0100, Sander Eikelenboom wrote:
> Hi All,
> 
> "Give me a ping, Vasili. One ping only, please."
> 
> Or in other words .. what is the status of this patchset by Luis ?

Well, I went on vacation the day Luis posted it, and now I'm back ...
I'll need to review it, etc. If anyone wants to port it to 3.13, be my
guest, but since this is not an immediate regression I doubt it makes
sense to try to bubble it into 3.13 from my tree at this point just
before the release.

johannes


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

* Re: [PATCH 1/3] cfg80211: allow reprocessing of pending requests
  2013-12-19 20:53 ` [PATCH 1/3] cfg80211: allow reprocessing of pending requests Luis R. Rodriguez
@ 2014-01-07 15:34   ` Johannes Berg
  2014-01-23 13:16     ` Sander Eikelenboom
  2014-02-19  0:51     ` Luis R. Rodriguez
  0 siblings, 2 replies; 21+ messages in thread
From: Johannes Berg @ 2014-01-07 15:34 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux, linux-wireless

On Thu, 2013-12-19 at 12:53 -0800, Luis R. Rodriguez wrote:
> This addresses the RCU component of allowing us to reprocess
> the last regulatory request.

That commit message makes very little sense to me.

johannes


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

* Re: [PATCH 2/3] cfg80211: fix processing world regdomain when non modular
  2013-12-19 20:53 ` [PATCH 2/3] cfg80211: fix processing world regdomain when non modular Luis R. Rodriguez
@ 2014-01-07 15:35   ` Johannes Berg
  2014-02-19  1:10     ` Luis R. Rodriguez
  0 siblings, 1 reply; 21+ messages in thread
From: Johannes Berg @ 2014-01-07 15:35 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux, linux-wireless

On Thu, 2013-12-19 at 12:53 -0800, Luis R. Rodriguez wrote:
> This allows processing of the last regulatory request when
> we determine its still pending. This fixes the issue reported
> by Sander of when cfg80211 is built-in and no further regulatory
> domain processing can happen. This occurred because if the
> filesystem was not mounted upon kicking off the udev rule
> to run CRDA then the last request will always be left
> unprocessed.

It'd be good to comment on what this actually changes and what happens,
in addition to discussing the user-visible effect?

johannes


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

* Re: [PATCH 3/3] cfg80211: processing regulatory requests on netdev notifier
  2013-12-19 20:53 ` [PATCH 3/3] cfg80211: processing regulatory requests on netdev notifier Luis R. Rodriguez
@ 2014-01-07 15:35   ` Johannes Berg
  2014-02-19  1:24     ` Luis R. Rodriguez
  0 siblings, 1 reply; 21+ messages in thread
From: Johannes Berg @ 2014-01-07 15:35 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux, linux-wireless

On Thu, 2013-12-19 at 12:53 -0800, Luis R. Rodriguez wrote:
> This adds a trigger to review any pending regulatory
> requests whenever an 802.11 device interface is brought
> down or up. We use this as an opportunistic trigger
> for checking the regulatory work queues as otherwise
> they they're only checked upon an initial regulatory
> request or when beacon hints are found.
> 
> This opportunistic mechanism can be used to trigger
> kicking the queues regulatory queues at any time from
> userspace without having to change the regulatory state.

I don't like this. Can't we just have a self-contained timeout on the
userspace request instead?

johannes


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

* Re: [PATCH 1/3] cfg80211: allow reprocessing of pending requests
  2014-01-07 15:34   ` Johannes Berg
@ 2014-01-23 13:16     ` Sander Eikelenboom
  2014-01-24 23:14       ` Luis R. Rodriguez
  2014-02-19  0:51     ` Luis R. Rodriguez
  1 sibling, 1 reply; 21+ messages in thread
From: Sander Eikelenboom @ 2014-01-23 13:16 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Luis R. Rodriguez, linux-wireless


Tuesday, January 7, 2014, 4:34:09 PM, you wrote:

> On Thu, 2013-12-19 at 12:53 -0800, Luis R. Rodriguez wrote:
>> This addresses the RCU component of allowing us to reprocess
>> the last regulatory request.

> That commit message makes very little sense to me.

> johannes

Hi Luis,

It seems i haven't seen any response from you regarding this
patch series ? (could have been i missed it, i'm not subscribed to linux-wireless)

 --
 Sander


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

* Re: [PATCH 1/3] cfg80211: allow reprocessing of pending requests
  2014-01-23 13:16     ` Sander Eikelenboom
@ 2014-01-24 23:14       ` Luis R. Rodriguez
  2014-01-27 10:48         ` Sander Eikelenboom
  0 siblings, 1 reply; 21+ messages in thread
From: Luis R. Rodriguez @ 2014-01-24 23:14 UTC (permalink / raw)
  To: Sander Eikelenboom; +Cc: Johannes Berg, linux-wireless

On Thu, Jan 23, 2014 at 5:16 AM, Sander Eikelenboom
<linux@eikelenboom.it> wrote:
>
> Tuesday, January 7, 2014, 4:34:09 PM, you wrote:
>
>> On Thu, 2013-12-19 at 12:53 -0800, Luis R. Rodriguez wrote:
>>> This addresses the RCU component of allowing us to reprocess
>>> the last regulatory request.
>
>> That commit message makes very little sense to me.
>
>> johannes
>
> Hi Luis,
>
> It seems i haven't seen any response from you regarding this
> patch series ? (could have been i missed it, i'm not subscribed to linux-wireless)

I quit my job, went on vacation and during vacation lost my phone and
the ChromeBook PIxel [0] I bought and had installed my own OS on
decided to poop out thanks to the stupidity behind Google's policy on
a half assed developer mode on that thing. In summary I have been
ramping up a development environment, ramping up on a new job, have no
802.11 hardware to even test any alternative I come up with so -- I
think this will take a bit of time, but am starting to get at least a
development environment going again. Hope to look at this by next
week.

[0] https://plus.google.com/101487746899672598413/posts/9rS6qvGU8Q1

  Luis

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

* Re: [PATCH 1/3] cfg80211: allow reprocessing of pending requests
  2014-01-24 23:14       ` Luis R. Rodriguez
@ 2014-01-27 10:48         ` Sander Eikelenboom
  0 siblings, 0 replies; 21+ messages in thread
From: Sander Eikelenboom @ 2014-01-27 10:48 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: Johannes Berg, linux-wireless


Saturday, January 25, 2014, 12:14:37 AM, you wrote:

> On Thu, Jan 23, 2014 at 5:16 AM, Sander Eikelenboom
> <linux@eikelenboom.it> wrote:
>>
>> Tuesday, January 7, 2014, 4:34:09 PM, you wrote:
>>
>>> On Thu, 2013-12-19 at 12:53 -0800, Luis R. Rodriguez wrote:
>>>> This addresses the RCU component of allowing us to reprocess
>>>> the last regulatory request.
>>
>>> That commit message makes very little sense to me.
>>
>>> johannes
>>
>> Hi Luis,
>>
>> It seems i haven't seen any response from you regarding this
>> patch series ? (could have been i missed it, i'm not subscribed to linux-wireless)

> I quit my job, went on vacation and during vacation lost my phone and
> the ChromeBook PIxel [0] I bought and had installed my own OS on
> decided to poop out thanks to the stupidity behind Google's policy on
> a half assed developer mode on that thing. In summary I have been
> ramping up a development environment, ramping up on a new job, have no
> 802.11 hardware to even test any alternative I come up with so -- I
> think this will take a bit of time, but am starting to get at least a
> development environment going again. Hope to look at this by next
> week.

NP, good luck with getting everything back together,
I was just wondering if it was still on someone's todo :-)


> [0] https://plus.google.com/101487746899672598413/posts/9rS6qvGU8Q1

>   Luis



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

* Re: [PATCH 1/3] cfg80211: allow reprocessing of pending requests
  2014-01-07 15:34   ` Johannes Berg
  2014-01-23 13:16     ` Sander Eikelenboom
@ 2014-02-19  0:51     ` Luis R. Rodriguez
  1 sibling, 0 replies; 21+ messages in thread
From: Luis R. Rodriguez @ 2014-02-19  0:51 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Sander Eikelenboom, linux-wireless

On Tue, Jan 7, 2014 at 7:34 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Thu, 2013-12-19 at 12:53 -0800, Luis R. Rodriguez wrote:
>> This addresses the RCU component of allowing us to reprocess
>> the last regulatory request.
>
> That commit message makes very little sense to me.

Yeah sorry about that, it was a run-on sentence following the subject,
specifically it addressed the issue observed when trying to reprocess
the last regulatory request. I'll send something more coherent.

  Luis

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

* Re: [PATCH 2/3] cfg80211: fix processing world regdomain when non modular
  2014-01-07 15:35   ` Johannes Berg
@ 2014-02-19  1:10     ` Luis R. Rodriguez
  0 siblings, 0 replies; 21+ messages in thread
From: Luis R. Rodriguez @ 2014-02-19  1:10 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Sander Eikelenboom, linux-wireless

On Tue, Jan 7, 2014 at 7:35 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Thu, 2013-12-19 at 12:53 -0800, Luis R. Rodriguez wrote:
>> This allows processing of the last regulatory request when
>> we determine its still pending. This fixes the issue reported
>> by Sander of when cfg80211 is built-in and no further regulatory
>> domain processing can happen. This occurred because if the
>> filesystem was not mounted upon kicking off the udev rule
>> to run CRDA then the last request will always be left
>> unprocessed.
>
> It'd be good to comment on what this actually changes and what happens,
> in addition to discussing the user-visible effect?

Sure.

  Luis

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

* Re: [PATCH 3/3] cfg80211: processing regulatory requests on netdev notifier
  2014-01-07 15:35   ` Johannes Berg
@ 2014-02-19  1:24     ` Luis R. Rodriguez
  2014-02-19 18:08       ` Luis R. Rodriguez
  0 siblings, 1 reply; 21+ messages in thread
From: Luis R. Rodriguez @ 2014-02-19  1:24 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Sander Eikelenboom, linux-wireless

On Tue, Jan 7, 2014 at 7:35 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Thu, 2013-12-19 at 12:53 -0800, Luis R. Rodriguez wrote:
>> This adds a trigger to review any pending regulatory
>> requests whenever an 802.11 device interface is brought
>> down or up. We use this as an opportunistic trigger
>> for checking the regulatory work queues as otherwise
>> they they're only checked upon an initial regulatory
>> request or when beacon hints are found.
>>
>> This opportunistic mechanism can be used to trigger
>> kicking the queues regulatory queues at any time from
>> userspace without having to change the regulatory state.
>
> I don't like this. Can't we just have a self-contained timeout on the
> userspace request instead?

Sure I'll add this and send a v2 series.

  Luis

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

* Re: [PATCH 3/3] cfg80211: processing regulatory requests on netdev notifier
  2014-02-19  1:24     ` Luis R. Rodriguez
@ 2014-02-19 18:08       ` Luis R. Rodriguez
  0 siblings, 0 replies; 21+ messages in thread
From: Luis R. Rodriguez @ 2014-02-19 18:08 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Sander Eikelenboom, linux-wireless

On Tue, Feb 18, 2014 at 5:24 PM, Luis R. Rodriguez
<mcgrof@do-not-panic.com> wrote:
> On Tue, Jan 7, 2014 at 7:35 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
>> On Thu, 2013-12-19 at 12:53 -0800, Luis R. Rodriguez wrote:
>>> This adds a trigger to review any pending regulatory
>>> requests whenever an 802.11 device interface is brought
>>> down or up. We use this as an opportunistic trigger
>>> for checking the regulatory work queues as otherwise
>>> they they're only checked upon an initial regulatory
>>> request or when beacon hints are found.
>>>
>>> This opportunistic mechanism can be used to trigger
>>> kicking the queues regulatory queues at any time from
>>> userspace without having to change the regulatory state.
>>
>> I don't like this. Can't we just have a self-contained timeout on the
>> userspace request instead?
>
> Sure I'll add this and send a v2 series.

Come to think of it -- I am not a fan of the timer. What time do we
set for it? What is reasonable? This is what made me instead want to
use the notifier hooks. You shouldn't be able to bring up an interface
without firmware so hence the hook there, the other one upon register
was just another opportunistic one.

Please consider this and if you still think a timer is best let me
know what the timer value should be :D

  Luis

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

* Re: [PATCH 3/3] cfg80211: processing regulatory requests on netdev notifier
  2014-02-27 17:20     ` Luis R. Rodriguez
@ 2014-02-27 20:31       ` Arik Nemtsov
  0 siblings, 0 replies; 21+ messages in thread
From: Arik Nemtsov @ 2014-02-27 20:31 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: Johannes Berg, linux-wireless, Sander Eikelenboom

On Thu, Feb 27, 2014 at 7:20 PM, Luis R. Rodriguez
<mcgrof@do-not-panic.com> wrote:
> On Thu, Feb 27, 2014 at 5:21 AM, Arik Nemtsov <arik@wizery.com> wrote:
>> Seems the actual patch is missing?
>
> Yeah sorry I sent out a v3.

Yea finally noticed. Thanks.

Arik

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

* Re: [PATCH 3/3] cfg80211: processing regulatory requests on netdev notifier
  2014-02-27 13:21   ` Arik Nemtsov
@ 2014-02-27 17:20     ` Luis R. Rodriguez
  2014-02-27 20:31       ` Arik Nemtsov
  0 siblings, 1 reply; 21+ messages in thread
From: Luis R. Rodriguez @ 2014-02-27 17:20 UTC (permalink / raw)
  To: Arik Nemtsov; +Cc: Johannes Berg, linux-wireless, Sander Eikelenboom

On Thu, Feb 27, 2014 at 5:21 AM, Arik Nemtsov <arik@wizery.com> wrote:
> Seems the actual patch is missing?

Yeah sorry I sent out a v3.

 Luis

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

* Re: [PATCH 3/3] cfg80211: processing regulatory requests on netdev notifier
  2014-02-26  1:09 ` [PATCH 3/3] cfg80211: processing regulatory requests on netdev notifier Luis R. Rodriguez
@ 2014-02-27 13:21   ` Arik Nemtsov
  2014-02-27 17:20     ` Luis R. Rodriguez
  0 siblings, 1 reply; 21+ messages in thread
From: Arik Nemtsov @ 2014-02-27 13:21 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: Johannes Berg, linux-wireless, linux

On Wed, Feb 26, 2014 at 3:09 AM, Luis R. Rodriguez
<mcgrof@do-not-panic.com> wrote:
> This adds a trigger to review any pending regulatory
> requests whenever an 802.11 device interface is brought
> down or up. We use this as an opportunistic trigger
> for checking the regulatory work queues as otherwise
> they they're only checked upon an initial regulatory
> request or when beacon hints are found.
>
> This opportunistic mechanism can be used to trigger
> kicking the queues regulatory queues at any time from
> userspace without having to change the regulatory state.
>
> A timer just waiting upon init is not that appropriate
> as when it should be triggered will depend on systems,
> a much better approach is to use and add opportunistic
> triggers. The interface coming up is typically a good
> indicator that filesystems have been mounted since
> firmware is required for some devices.
>
> Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
> ---
>  net/wireless/reg.h | 1 +
>  1 file changed, 1 insertion(+)

Seems the actual patch is missing?

Arik

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

* [PATCH 3/3] cfg80211: processing regulatory requests on netdev notifier
  2014-02-26  1:09 [PATCH v2 0/3] cfg80211: respin reprocessing pending requests Luis R. Rodriguez
@ 2014-02-26  1:09 ` Luis R. Rodriguez
  2014-02-27 13:21   ` Arik Nemtsov
  0 siblings, 1 reply; 21+ messages in thread
From: Luis R. Rodriguez @ 2014-02-26  1:09 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, linux, Luis R. Rodriguez

This adds a trigger to review any pending regulatory
requests whenever an 802.11 device interface is brought
down or up. We use this as an opportunistic trigger
for checking the regulatory work queues as otherwise
they they're only checked upon an initial regulatory
request or when beacon hints are found.

This opportunistic mechanism can be used to trigger
kicking the queues regulatory queues at any time from
userspace without having to change the regulatory state.

A timer just waiting upon init is not that appropriate
as when it should be triggered will depend on systems,
a much better approach is to use and add opportunistic
triggers. The interface coming up is typically a good
indicator that filesystems have been mounted since
firmware is required for some devices.

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
 net/wireless/reg.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/wireless/reg.h b/net/wireless/reg.h
index 37c180d..51912b3 100644
--- a/net/wireless/reg.h
+++ b/net/wireless/reg.h
@@ -37,6 +37,7 @@ unsigned int reg_get_max_bandwidth(const struct ieee80211_regdomain *rd,
 				   const struct ieee80211_reg_rule *rule);
 
 bool reg_last_request_cell_base(void);
+void reg_process_pending_work(void);
 
 /**
  * regulatory_hint_found_beacon - hints a beacon was found on a channel
-- 
1.8.5.3


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

end of thread, other threads:[~2014-02-27 20:31 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-19 20:53 [PATCH 0/3] cfg80211: process pending regulatory requests Luis R. Rodriguez
2013-12-19 20:53 ` [PATCH 1/3] cfg80211: allow reprocessing of pending requests Luis R. Rodriguez
2014-01-07 15:34   ` Johannes Berg
2014-01-23 13:16     ` Sander Eikelenboom
2014-01-24 23:14       ` Luis R. Rodriguez
2014-01-27 10:48         ` Sander Eikelenboom
2014-02-19  0:51     ` Luis R. Rodriguez
2013-12-19 20:53 ` [PATCH 2/3] cfg80211: fix processing world regdomain when non modular Luis R. Rodriguez
2014-01-07 15:35   ` Johannes Berg
2014-02-19  1:10     ` Luis R. Rodriguez
2013-12-19 20:53 ` [PATCH 3/3] cfg80211: processing regulatory requests on netdev notifier Luis R. Rodriguez
2014-01-07 15:35   ` Johannes Berg
2014-02-19  1:24     ` Luis R. Rodriguez
2014-02-19 18:08       ` Luis R. Rodriguez
2013-12-20 12:19 ` [PATCH 0/3] cfg80211: process pending regulatory requests Sander Eikelenboom
2014-01-06 13:10 ` Sander Eikelenboom
2014-01-06 13:32   ` Johannes Berg
2014-02-26  1:09 [PATCH v2 0/3] cfg80211: respin reprocessing pending requests Luis R. Rodriguez
2014-02-26  1:09 ` [PATCH 3/3] cfg80211: processing regulatory requests on netdev notifier Luis R. Rodriguez
2014-02-27 13:21   ` Arik Nemtsov
2014-02-27 17:20     ` Luis R. Rodriguez
2014-02-27 20:31       ` Arik Nemtsov

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.