diff options
| author | Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> | 2012-02-25 13:13:17 +0400 |
|---|---|---|
| committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-03-01 10:33:45 +0400 |
| commit | e5348a1e3341dca3e53a6db568c2d4d48929dd95 (patch) | |
| tree | 1d3d08d0d6c66afc774fcb3c540764494b293a39 | |
| parent | b796f0934ae07fdd26d265ac9bf87e18921d7fef (diff) | |
| download | linux-e5348a1e3341dca3e53a6db568c2d4d48929dd95.tar.xz | |
ath6kl: Make sure wiphy is registered before calling regulatory_hint()
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>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| -rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 4 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath6kl/core.h | 2 | ||||
| -rw-r--r-- | 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 bad92441b78a..50b76d0a4c6a 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -3097,12 +3097,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 5bbc595f23d1..b6bdece63361 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h @@ -666,6 +666,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 c0393b344a1f..dc6230dea86c 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]; |
