Commit 5203cdb6 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by John W. Linville

cfg80211: remove switch from __regulatory_hint()

We have complete control over REGDOM_SET_BY_* enum passed
down to __regulatory_hint() as such there is no need to
account for unexpected REGDOM_SET_BY_*'s, lets just remove
the switch statement as this code does not change and
won't change even when we add 802.11d support.

This patch has no functional changes.
Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 91e99004
...@@ -698,11 +698,6 @@ int __regulatory_hint(struct wiphy *wiphy, enum reg_set_by set_by, ...@@ -698,11 +698,6 @@ int __regulatory_hint(struct wiphy *wiphy, enum reg_set_by set_by,
else if (r) else if (r)
return r; return r;
switch (set_by) {
case REGDOM_SET_BY_CORE:
case REGDOM_SET_BY_COUNTRY_IE:
case REGDOM_SET_BY_DRIVER:
case REGDOM_SET_BY_USER:
request = kzalloc(sizeof(struct regulatory_request), request = kzalloc(sizeof(struct regulatory_request),
GFP_KERNEL); GFP_KERNEL);
if (!request) if (!request)
...@@ -717,15 +712,11 @@ int __regulatory_hint(struct wiphy *wiphy, enum reg_set_by set_by, ...@@ -717,15 +712,11 @@ int __regulatory_hint(struct wiphy *wiphy, enum reg_set_by set_by,
kfree(last_request); kfree(last_request);
last_request = request; last_request = request;
r = call_crda(alpha2); r = call_crda(alpha2);
#ifndef CONFIG_WIRELESS_OLD_REGULATORY #ifndef CONFIG_WIRELESS_OLD_REGULATORY
if (r) if (r)
printk(KERN_ERR "cfg80211: Failed calling CRDA\n"); printk(KERN_ERR "cfg80211: Failed calling CRDA\n");
#endif #endif
break;
default:
r = -ENOTSUPP;
break;
}
return r; return r;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment