summaryrefslogtreecommitdiff
path: root/net/wireless/reg.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-12-04 03:48:59 +0400
committerJohannes Berg <johannes.berg@intel.com>2013-01-03 16:01:28 +0400
commit6913b49a5071064f49f7a74b432286fa735f7612 (patch)
tree15b54b8dd9d5eef07e8a9366b3f9e391043499f1 /net/wireless/reg.h
parent540f6f2cc545da9ae2baa9faa3152fc550bedb57 (diff)
downloadlinux-6913b49a5071064f49f7a74b432286fa735f7612.tar.xz
regulatory: fix reg_is_valid_request handling
There's a bug with the world regulatory domain, it can be updated any time which is different from all other regdomains that can only be updated once after a request for them. Fix this by adding a check for "processed" to the reg_is_valid_request() function and clear that when doing a request. While looking at this I also found another locking bug, last_request is protected by the reg_mutex not the cfg80211_mutex so the code in nl80211 is racy. Remove that code as it only tries to prevent an allocation in an error case, which isn't necessary. Then the function can also become static and locking in nl80211 can have a smaller scope. Also change __set_regdom() to do the checks earlier and not different for world/other regdomains. Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/reg.h')
-rw-r--r--net/wireless/reg.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/wireless/reg.h b/net/wireless/reg.h
index 37891e813a74..d391b50d2829 100644
--- a/net/wireless/reg.h
+++ b/net/wireless/reg.h
@@ -19,7 +19,6 @@
extern const struct ieee80211_regdomain *cfg80211_regdomain;
bool is_world_regdom(const char *alpha2);
-bool reg_is_valid_request(const char *alpha2);
bool reg_supported_dfs_region(u8 dfs_region);
int regulatory_hint_user(const char *alpha2,