Skip to content

Commit

Permalink
cfg80211: remove switch from __set_regdom()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Nov 25, 2008
1 parent 5203cdb commit 8375af3
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 8375af3

Please sign in to comment.