diff options
author | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2013-11-05 12:18:11 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-11-25 14:51:23 -0500 |
commit | f75c30ef084fb57d3edab6722077e0adf16ed8fd (patch) | |
tree | f8585cc786183f42890ceaca9332af2094c33491 | |
parent | fe6631ff093150eabc4ab73b948577e9b3bc5b76 (diff) |
cfg80211: allow only the core to request to update the world regdom
It seems some out of tree drivers were using a regulatory_hint("00")
to trigger off the wiphy regulatory notifier, for those cases just
setting the WIPHY_FLAG_CUSTOM_REGULATORY would suffice to call
the reg_notifier() for a world regulatory domain update. If drivers
find other needs for calling the reg_notifier() a proper implemenation
is preferred.
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/wireless/reg.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 130cfdaa7f4c..cd50bb56c7e7 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -2200,6 +2200,8 @@ static int __set_regdom(const struct ieee80211_regdomain *rd) | |||
2200 | return -EINVAL; | 2200 | return -EINVAL; |
2201 | 2201 | ||
2202 | if (is_world_regdom(rd->alpha2)) { | 2202 | if (is_world_regdom(rd->alpha2)) { |
2203 | if (lr->initiator != NL80211_REGDOM_SET_BY_CORE) | ||
2204 | return -EINVAL; | ||
2203 | update_world_regdomain(rd); | 2205 | update_world_regdomain(rd); |
2204 | return 0; | 2206 | return 0; |
2205 | } | 2207 | } |