aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-02-20 09:36:20 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-02-21 03:31:19 -0500
commite5d2f954714bccd4a87e042720ae8e85f9a0aada (patch)
tree4c08defedfee1b6cb3e7c78f94b61ae187dd8c42 /net/wireless/nl80211.c
parent30f55dc171a32d60e3753c9e0a3cf33a4d6c4610 (diff)
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/nl80211.c')
-rw-r--r--net/wireless/nl80211.c15
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:
5913 if (!cfg80211_reg_can_beacon(&rdev->wiphy, &params.chandef)) 5913 if (!cfg80211_reg_can_beacon(&rdev->wiphy, &params.chandef))
5914 return -EINVAL; 5914 return -EINVAL;
5915 5915
5916 if (dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP || 5916 switch (dev->ieee80211_ptr->iftype) {
5917 dev->ieee80211_ptr->iftype == NL80211_IFTYPE_P2P_GO || 5917 case NL80211_IFTYPE_AP:
5918 dev->ieee80211_ptr->iftype == NL80211_IFTYPE_ADHOC) { 5918 case NL80211_IFTYPE_P2P_GO:
5919 case NL80211_IFTYPE_ADHOC:
5920 case NL80211_IFTYPE_MESH_POINT:
5919 err = cfg80211_chandef_dfs_required(wdev->wiphy, 5921 err = cfg80211_chandef_dfs_required(wdev->wiphy,
5920 &params.chandef); 5922 &params.chandef);
5921 if (err < 0) { 5923 if (err < 0)
5922 return err; 5924 return err;
5923 } else if (err) { 5925 if (err) {
5924 radar_detect_width = BIT(params.chandef.width); 5926 radar_detect_width = BIT(params.chandef.width);
5925 params.radar_required = true; 5927 params.radar_required = true;
5926 } 5928 }
5929 break;
5930 default:
5931 break;
5927 } 5932 }
5928 5933
5929 err = cfg80211_can_use_iftype_chan(rdev, wdev, wdev->iftype, 5934 err = cfg80211_can_use_iftype_chan(rdev, wdev, wdev->iftype,