From: Luis R. Rodriguez Date: Tue, 5 Nov 2013 17:18:11 +0000 (-0800) Subject: cfg80211: allow only the core to request to update the world regdom X-Git-Tag: v3.14-rc1~94^2~3^2^2~258 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f75c30ef084fb57d3edab6722077e0adf16ed8fd;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 Signed-off-by: Johannes Berg --- diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 130cfda..cd50bb5 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -2200,6 +2200,8 @@ static int __set_regdom(const struct ieee80211_regdomain *rd) return -EINVAL; if (is_world_regdom(rd->alpha2)) { + if (lr->initiator != NL80211_REGDOM_SET_BY_CORE) + return -EINVAL; update_world_regdomain(rd); return 0; }