aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index e44f0052687c..290ececd4f11 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -829,21 +829,12 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
829 reset_regdomains(); 829 reset_regdomains();
830 830
831 /* Country IE parsing coming soon */ 831 /* Country IE parsing coming soon */
832 switch (last_request->initiator) { 832
833 case REGDOM_SET_BY_CORE: 833 if (!is_valid_rd(rd)) {
834 case REGDOM_SET_BY_DRIVER: 834 printk(KERN_ERR "cfg80211: Invalid "
835 case REGDOM_SET_BY_USER: 835 "regulatory domain detected:\n");
836 if (!is_valid_rd(rd)) { 836 print_regdomain_info(rd);
837 printk(KERN_ERR "cfg80211: Invalid " 837 return -EINVAL;
838 "regulatory domain detected:\n");
839 print_regdomain_info(rd);
840 return -EINVAL;
841 }
842 break;
843 case REGDOM_SET_BY_COUNTRY_IE: /* Not yet */
844 WARN_ON(1);
845 default:
846 return -EOPNOTSUPP;
847 } 838 }
848 839
849 if (unlikely(last_request->intersect)) { 840 if (unlikely(last_request->intersect)) {