summaryrefslogtreecommitdiffstats
path: root/net/wireless/core.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-10-31 14:16:12 +0100
committerJohannes Berg <johannes.berg@intel.com>2014-10-31 14:19:19 +0100
commitde4fcbadde68e3429cc533c29abf6fbceda4628f (patch)
tree6f797d624377a194d2a327f740b827898ce868d9 /net/wireless/core.c
parent579a05f29611dcef94b6bda21f1d059ab189a263 (diff)
downloadlinux-de4fcbadde68e3429cc533c29abf6fbceda4628f.tar.bz2
cfg80211: avoid using default in interface type switch
Most code avoids having a default case in interface type switch statements already, to make it easier to find places that need to be extended. Change the code in the __cfg80211_leave() and nl80211_key_allowed() functions to not have a default case. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r--net/wireless/core.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 87bb502bc8de..da4dcb65ade4 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -869,7 +869,19 @@ void __cfg80211_leave(struct cfg80211_registered_device *rdev,
case NL80211_IFTYPE_P2P_GO:
__cfg80211_stop_ap(rdev, dev, true);
break;
- default:
+ case NL80211_IFTYPE_WDS:
+ /* must be handled by mac80211/driver, has no APIs */
+ break;
+ case NL80211_IFTYPE_P2P_DEVICE:
+ /* cannot happen, has no netdev */
+ break;
+ case NL80211_IFTYPE_AP_VLAN:
+ case NL80211_IFTYPE_MONITOR:
+ /* nothing to do */
+ break;
+ case NL80211_IFTYPE_UNSPECIFIED:
+ case NUM_NL80211_IFTYPES:
+ /* invalid */
break;
}
}