diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2014-02-20 16:36:20 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-02-21 09:31:19 +0100 |
commit | e5d2f954714bccd4a87e042720ae8e85f9a0aada (patch) | |
tree | 4c08defedfee1b6cb3e7c78f94b61ae187dd8c42 /net/wireless | |
parent | 30f55dc171a32d60e3753c9e0a3cf33a4d6c4610 (diff) | |
download | linux-e5d2f954714bccd4a87e042720ae8e85f9a0aada.tar.bz2 |
nl80211: make sure we check for DFS with mesh channel switch
Since mesh support for DFS channels was added, we also need to check
for DFS channels when performing a channel switch with
NL80211_IFTYPE_MESHPOINT.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
[use switch statement, slight code cleanup]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 1e5a434e4224..2c38b28a85b9 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -5913,17 +5913,22 @@ skip_beacons: if (!cfg80211_reg_can_beacon(&rdev->wiphy, ¶ms.chandef)) return -EINVAL; - if (dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP || - dev->ieee80211_ptr->iftype == NL80211_IFTYPE_P2P_GO || - dev->ieee80211_ptr->iftype == NL80211_IFTYPE_ADHOC) { + switch (dev->ieee80211_ptr->iftype) { + case NL80211_IFTYPE_AP: + case NL80211_IFTYPE_P2P_GO: + case NL80211_IFTYPE_ADHOC: + case NL80211_IFTYPE_MESH_POINT: err = cfg80211_chandef_dfs_required(wdev->wiphy, ¶ms.chandef); - if (err < 0) { + if (err < 0) return err; - } else if (err) { + if (err) { radar_detect_width = BIT(params.chandef.width); params.radar_required = true; } + break; + default: + break; } err = cfg80211_can_use_iftype_chan(rdev, wdev, wdev->iftype, |