summaryrefslogtreecommitdiff
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-01-22 15:05:47 -0800
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 16:01:15 -0500
commit5eebade608d695e30e89d4c5ca6136a58f24ed14 (patch)
treee5c8319f8fb207e4a283809dc8363fe2fd227e2b /net/wireless/reg.c
parent34f573473a659f8c2727d8d408e17b241900c28e (diff)
cfg80211: process user requests only after previous user/driver/core requests
This prevents user regulatory changes to be considered prior to previous pending user, core or driver requests which have not be applied. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index d663795d6944..4d2d2d4cc0d4 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1091,6 +1091,16 @@ static int ignore_request(struct wiphy *wiphy, enum reg_set_by set_by,
if (last_request->initiator == REGDOM_SET_BY_USER &&
last_request->intersect)
return -EOPNOTSUPP;
+ /* Process user requests only after previous user/driver/core
+ * requests have been processed */
+ if (last_request->initiator == REGDOM_SET_BY_CORE ||
+ last_request->initiator == REGDOM_SET_BY_DRIVER ||
+ last_request->initiator == REGDOM_SET_BY_USER) {
+ if (!alpha2_equal(last_request->alpha2,
+ cfg80211_regdomain->alpha2))
+ return -EAGAIN;
+ }
+
return 0;
}