diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-10-21 09:57:41 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-31 19:00:42 -0400 |
commit | f3b407fba52e1b86ca286ee7c218a4fb00bd29e0 (patch) | |
tree | df5c4fce124d0792e4a52aa269f42cb734cefb12 | |
parent | cf03268e6ed6cfacaa5e32db41ea832c4d10438b (diff) | |
download | linux-f3b407fba52e1b86ca286ee7c218a4fb00bd29e0.tar.gz linux-f3b407fba52e1b86ca286ee7c218a4fb00bd29e0.tar.bz2 linux-f3b407fba52e1b86ca286ee7c218a4fb00bd29e0.zip |
wireless: remove cfg80211_reg_mutex
This mutex is wrong, we use cfg80211_drv_mutex (which should
possibly be renamed to just cfg80211_mutex) everywhere except
in one place, fix that and get rid of the extra mutex.
Also get rid of a spurious regulatory_requests list definition.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | net/wireless/core.c | 6 | ||||
-rw-r--r-- | net/wireless/reg.c | 3 | ||||
-rw-r--r-- | net/wireless/reg.h | 1 |
3 files changed, 2 insertions, 8 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index 5031db7b275b..72825afe2bf6 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -301,12 +301,10 @@ int wiphy_register(struct wiphy *wiphy) /* check and set up bitrates */ ieee80211_set_bitrate_flags(wiphy); + mutex_lock(&cfg80211_drv_mutex); + /* set up regulatory info */ - mutex_lock(&cfg80211_reg_mutex); wiphy_update_regulatory(wiphy, REGDOM_SET_BY_CORE); - mutex_unlock(&cfg80211_reg_mutex); - - mutex_lock(&cfg80211_drv_mutex); res = device_add(&drv->wiphy.dev); if (res) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 626dbb688499..581273d86844 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -52,7 +52,6 @@ struct regulatory_request { }; static LIST_HEAD(regulatory_requests); -DEFINE_MUTEX(cfg80211_reg_mutex); /* To trigger userspace events */ static struct platform_device *reg_pdev; @@ -63,8 +62,6 @@ static u32 supported_bandwidths[] = { MHZ_TO_KHZ(20), }; -static struct list_head regulatory_requests; - /* Central wireless core regulatory domains, we only need two, * the current one and a world regulatory domain in case we have no * information to give us an alpha2 */ diff --git a/net/wireless/reg.h b/net/wireless/reg.h index a4845b140a84..0c1572b92fef 100644 --- a/net/wireless/reg.h +++ b/net/wireless/reg.h @@ -1,7 +1,6 @@ #ifndef __NET_WIRELESS_REG_H #define __NET_WIRELESS_REG_H -extern struct mutex cfg80211_reg_mutex; bool is_world_regdom(const char *alpha2); bool reg_is_valid_request(const char *alpha2); |