All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath6kl: Make sure wiphy is registered before calling regulatory_hint()
@ 2012-02-25  9:13 Vasanthakumar Thiagarajan
  2012-02-28  9:23 ` Kalle Valo
  2012-03-01  6:34 ` Kalle Valo
  0 siblings, 2 replies; 4+ messages in thread
From: Vasanthakumar Thiagarajan @ 2012-02-25  9:13 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, ath6kl-devel

As regulatory events are processed even before the wiphy is registered,
calling regulatory_hint() at early stage should be fixed.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c |    4 ++++
 drivers/net/wireless/ath/ath6kl/core.h     |    2 ++
 drivers/net/wireless/ath/ath6kl/wmi.c      |    2 +-
 3 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index e82f220..af3d0ab 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -3021,12 +3021,16 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
 		return ret;
 	}
 
+	ar->wiphy_registered = true;
+
 	return 0;
 }
 
 void ath6kl_cfg80211_cleanup(struct ath6kl *ar)
 {
 	wiphy_unregister(ar->wiphy);
+
+	ar->wiphy_registered = false;
 }
 
 struct ath6kl *ath6kl_cfg80211_create(void)
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
index 8d8677d..cb5ddda 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -654,6 +654,8 @@ struct ath6kl {
 
 	bool p2p;
 
+	bool wiphy_registered;
+
 #ifdef CONFIG_ATH6KL_DEBUG
 	struct {
 		struct sk_buff_head fwlog_queue;
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 0527933..97680a2 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -914,7 +914,7 @@ static void ath6kl_wmi_regdomain_event(struct wmi *wmi, u8 *datap, int len)
 				regpair->regDmnEnum);
 	}
 
-	if (country) {
+	if (country && wmi->parent_dev->wiphy_registered) {
 		alpha2[0] = country->isoName[0];
 		alpha2[1] = country->isoName[1];
 
-- 
1.7.0.4


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

* Re: [PATCH] ath6kl: Make sure wiphy is registered before calling regulatory_hint()
  2012-02-25  9:13 [PATCH] ath6kl: Make sure wiphy is registered before calling regulatory_hint() Vasanthakumar Thiagarajan
@ 2012-02-28  9:23 ` Kalle Valo
  2012-02-28 14:36   ` Vasanthakumar Thiagarajan
  2012-03-01  6:34 ` Kalle Valo
  1 sibling, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2012-02-28  9:23 UTC (permalink / raw)
  To: Vasanthakumar Thiagarajan; +Cc: linux-wireless, ath6kl-devel

On 02/25/2012 11:13 AM, Vasanthakumar Thiagarajan wrote:
> As regulatory events are processed even before the wiphy is registered,
> calling regulatory_hint() at early stage should be fixed.
> 
> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

I take it that this depeneds on your netdev init rework patchset you
sent earlier, so I don't take this quite yet. Please correct me if I
misunderstood.

Kalle

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

* Re: [PATCH] ath6kl: Make sure wiphy is registered before calling regulatory_hint()
  2012-02-28  9:23 ` Kalle Valo
@ 2012-02-28 14:36   ` Vasanthakumar Thiagarajan
  0 siblings, 0 replies; 4+ messages in thread
From: Vasanthakumar Thiagarajan @ 2012-02-28 14:36 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath6kl-devel

On Tue, Feb 28, 2012 at 11:23:52AM +0200, Kalle Valo wrote:
> On 02/25/2012 11:13 AM, Vasanthakumar Thiagarajan wrote:
> > As regulatory events are processed even before the wiphy is registered,
> > calling regulatory_hint() at early stage should be fixed.
> > 
> > Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
> 
> I take it that this depeneds on your netdev init rework patchset you
> sent earlier, so I don't take this quite yet. Please correct me if I
> misunderstood.

Yeah, this patch depends on my recent 5 patch series. I'll address the comments
in that patch series.

Vasanth

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

* Re: [PATCH] ath6kl: Make sure wiphy is registered before calling regulatory_hint()
  2012-02-25  9:13 [PATCH] ath6kl: Make sure wiphy is registered before calling regulatory_hint() Vasanthakumar Thiagarajan
  2012-02-28  9:23 ` Kalle Valo
@ 2012-03-01  6:34 ` Kalle Valo
  1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2012-03-01  6:34 UTC (permalink / raw)
  To: Vasanthakumar Thiagarajan; +Cc: linux-wireless, ath6kl-devel

On 02/25/2012 11:13 AM, Vasanthakumar Thiagarajan wrote:
> As regulatory events are processed even before the wiphy is registered,
> calling regulatory_hint() at early stage should be fixed.
> 
> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

Thanks, applied.

Kalle

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

end of thread, other threads:[~2012-03-01  6:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-25  9:13 [PATCH] ath6kl: Make sure wiphy is registered before calling regulatory_hint() Vasanthakumar Thiagarajan
2012-02-28  9:23 ` Kalle Valo
2012-02-28 14:36   ` Vasanthakumar Thiagarajan
2012-03-01  6:34 ` Kalle Valo

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.