cfg80211: remove switch from __set_regdom()
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 12 Nov 2008 22:21:57 +0000 (14:21 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 25 Nov 2008 21:41:22 +0000 (16:41 -0500)
We have control over the REGDOM_SET_BY_* macros passed
so remove the switch.

This patch has no functional changes.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/reg.c

index e44f0052687c500eb68cf1bb9e0f5dd1be6dbf9d..290ececd4f1189888a2280d43ab68a8b751d4824 100644 (file)
@@ -829,21 +829,12 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
        reset_regdomains();
 
        /* Country IE parsing coming soon */
-       switch (last_request->initiator) {
-       case REGDOM_SET_BY_CORE:
-       case REGDOM_SET_BY_DRIVER:
-       case REGDOM_SET_BY_USER:
-               if (!is_valid_rd(rd)) {
-                       printk(KERN_ERR "cfg80211: Invalid "
-                               "regulatory domain detected:\n");
-                       print_regdomain_info(rd);
-                       return -EINVAL;
-               }
-               break;
-       case REGDOM_SET_BY_COUNTRY_IE: /* Not yet */
-               WARN_ON(1);
-       default:
-               return -EOPNOTSUPP;
+
+       if (!is_valid_rd(rd)) {
+               printk(KERN_ERR "cfg80211: Invalid "
+                       "regulatory domain detected:\n");
+               print_regdomain_info(rd);
+               return -EINVAL;
        }
 
        if (unlikely(last_request->intersect)) {