summaryrefslogtreecommitdiff
path: root/net/wireless/mesh.c
diff options
context:
space:
mode:
authorBenjamin Berg <benjamin@sipsolutions.net>2017-05-16 12:23:11 +0300
committerJohannes Berg <johannes.berg@intel.com>2017-05-19 14:25:58 +0300
commitd37d49c2f18fb53c6315b2b0fd7f1fb3d8be57ac (patch)
tree57aa52c95e82c874c3a74963ee9111d877098854 /net/wireless/mesh.c
parent61b81b4010496e8e989307cf7ee196f83dd09681 (diff)
downloadlinux-d37d49c2f18fb53c6315b2b0fd7f1fb3d8be57ac.tar.xz
wireless: Only join DFS channels in mesh mode if userspace flags support
When joining a mesh network it is not guaranteed that userspace has a daemon listening for radar events. This is however required for channels requiring DFS. To flag that userspace will handle radar events, it needs to set NL80211_ATTR_HANDLE_DFS. This matches the current mechanism used for IBSS mode. Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/mesh.c')
-rw-r--r--net/wireless/mesh.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/wireless/mesh.c b/net/wireless/mesh.c
index ec0b1c20ac99..421a6b80ec62 100644
--- a/net/wireless/mesh.c
+++ b/net/wireless/mesh.c
@@ -174,6 +174,14 @@ int __cfg80211_join_mesh(struct cfg80211_registered_device *rdev,
scan_width);
}
+ err = cfg80211_chandef_dfs_required(&rdev->wiphy,
+ &setup->chandef,
+ NL80211_IFTYPE_MESH_POINT);
+ if (err < 0)
+ return err;
+ if (err > 0 && !setup->userspace_handles_dfs)
+ return -EINVAL;
+
if (!cfg80211_reg_can_beacon(&rdev->wiphy, &setup->chandef,
NL80211_IFTYPE_MESH_POINT))
return -EINVAL;