summaryrefslogtreecommitdiff
path: root/net/wireless/reg.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2019-02-05 23:08:29 +0300
committerJohannes Berg <johannes.berg@intel.com>2019-02-11 17:46:29 +0300
commite646a0257b64dbef9d168e0f90daafa3fc1a83af (patch)
tree305a86576873ac7e682a2f2639c760731be6026c /net/wireless/reg.h
parent61edb116cab9bf7d623e31bf7455a82bc042c087 (diff)
downloadlinux-e646a0257b64dbef9d168e0f90daafa3fc1a83af.tar.xz
cfg80211: restore regulatory without calling userspace
Jouni reports that in some cases it is possible that getting disconnected (or stopping AP, after previous patches) results in further operations hitting the window within the regulatory core restoring the regdomain to the defaults. The reason for this is that we have to call out to CRDA or otherwise do some asynchronous work, and thus can't do the restore atomically. However, we've previously seen all the data we need to do the restore, so we can hang on to that data and use it later for the restore. This makes the whole thing happen within a single locked section and thus atomic. However, we can't *always* do this - there are unfortunately cases where the restore needs to re-request, because this is also used (abused?) as an error recovery process, so make the new behaviour optional and only use it when doing a regular restore as described above. Reported-by: Jouni Malinen <j@w1.fi> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/reg.h')
-rw-r--r--net/wireless/reg.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/reg.h b/net/wireless/reg.h
index 9ceeb5f3a7cb..504133d76de4 100644
--- a/net/wireless/reg.h
+++ b/net/wireless/reg.h
@@ -5,6 +5,7 @@
/*
* Copyright 2008-2011 Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
+ * Copyright (C) 2019 Intel Corporation
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -22,6 +23,7 @@
enum ieee80211_regd_source {
REGD_SOURCE_INTERNAL_DB,
REGD_SOURCE_CRDA,
+ REGD_SOURCE_CACHED,
};
extern const struct ieee80211_regdomain __rcu *cfg80211_regdomain;