summaryrefslogtreecommitdiffstats
path: root/include/net/regulatory.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-12-06 15:47:38 +0100
committerJohannes Berg <johannes.berg@intel.com>2013-01-03 13:01:29 +0100
commit458f4f9e960b9a3b674c4b87d996eef186b1fe83 (patch)
treefebf655badc2a045b3aaaf63271226729c76e325 /include/net/regulatory.h
parent379b82f4c9dc6e67bf61aa61b096c06a2f320f60 (diff)
downloadop-kernel-dev-458f4f9e960b9a3b674c4b87d996eef186b1fe83.zip
op-kernel-dev-458f4f9e960b9a3b674c4b87d996eef186b1fe83.tar.gz
regulatory: use RCU to protect global and wiphy regdomains
To simplify the locking and not require cfg80211_mutex (which nl80211 uses to access the global regdomain) and also to make it possible for drivers to access their wiphy->regd safely, use RCU to protect these pointers. Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/regulatory.h')
-rw-r--r--include/net/regulatory.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/regulatory.h b/include/net/regulatory.h
index 7dcaa27..96b0f07 100644
--- a/include/net/regulatory.h
+++ b/include/net/regulatory.h
@@ -18,6 +18,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#include <linux/rcupdate.h>
/**
* enum environment_cap - Environment parsed from country IE
@@ -101,6 +102,7 @@ struct ieee80211_reg_rule {
};
struct ieee80211_regdomain {
+ struct rcu_head rcu_head;
u32 n_reg_rules;
char alpha2[2];
u8 dfs_region;
OpenPOWER on IntegriCloud