diff options
author | John W. Linville <linville@tuxdriver.com> | 2014-03-13 22:21:43 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-03-13 22:21:43 +0400 |
commit | 42775a34d23027b19e984956a539448f5e7ff075 (patch) | |
tree | e344340c7f0aed4c8faf7534fabbc64607a8e784 /net/wireless/util.c | |
parent | 433131ba03c511a84e1fda5669c70cf8b44702e1 (diff) | |
parent | 4e3b3bcd81776527fa6f11624d68849de8c8802e (diff) | |
download | linux-42775a34d23027b19e984956a539448f5e7ff075.tar.xz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts:
drivers/net/wireless/ath/ath9k/recv.c
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r-- | net/wireless/util.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index ad03af385556..2bb685f3e8fc 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -1285,7 +1285,6 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev, enum cfg80211_chan_mode chmode; int num_different_channels = 0; int total = 1; - bool radar_required = false; int i, j; ASSERT_RTNL(); @@ -1293,35 +1292,7 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev, if (WARN_ON(hweight32(radar_detect) > 1)) return -EINVAL; - switch (iftype) { - case NL80211_IFTYPE_ADHOC: - case NL80211_IFTYPE_AP: - case NL80211_IFTYPE_AP_VLAN: - case NL80211_IFTYPE_MESH_POINT: - case NL80211_IFTYPE_P2P_GO: - case NL80211_IFTYPE_WDS: - /* if the interface could potentially choose a DFS channel, - * then mark DFS as required. - */ - if (!chan) { - if (chanmode != CHAN_MODE_UNDEFINED && radar_detect) - radar_required = true; - break; - } - radar_required = !!(chan->flags & IEEE80211_CHAN_RADAR); - break; - case NL80211_IFTYPE_P2P_CLIENT: - case NL80211_IFTYPE_STATION: - case NL80211_IFTYPE_P2P_DEVICE: - case NL80211_IFTYPE_MONITOR: - break; - case NUM_NL80211_IFTYPES: - case NL80211_IFTYPE_UNSPECIFIED: - default: - return -EINVAL; - } - - if (radar_required && !radar_detect) + if (WARN_ON(iftype >= NUM_NL80211_IFTYPES)) return -EINVAL; /* Always allow software iftypes */ |