summaryrefslogtreecommitdiff
path: root/net/wireless/mesh.c
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-02-18 11:40:36 +0200
committerJohannes Berg <johannes.berg@intel.com>2014-04-09 10:55:41 +0200
commit2beb6dab2d799ee8934cb0801845e551ad8c70f2 (patch)
tree58261561098a2bc3aaf747041382324119b00128 /net/wireless/mesh.c
parentcb2d956dd329caa11b5ece454dc52253aa038e73 (diff)
cfg80211/mac80211: refactor cfg80211_chandef_dfs_required()
Some interface types don't require DFS (such as STATION, P2P_CLIENT etc). In order to centralize these decisions, make cfg80211_chandef_dfs_required() take the iftype into consideration. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/mesh.c')
-rw-r--r--net/wireless/mesh.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/wireless/mesh.c b/net/wireless/mesh.c
index 7031ee0afad8..6ebe883653a4 100644
--- a/net/wireless/mesh.c
+++ b/net/wireless/mesh.c
@@ -179,10 +179,13 @@ int __cfg80211_join_mesh(struct cfg80211_registered_device *rdev,
NL80211_IFTYPE_MESH_POINT))
return -EINVAL;
- err = cfg80211_chandef_dfs_required(wdev->wiphy, &setup->chandef);
+ err = cfg80211_chandef_dfs_required(wdev->wiphy,
+ &setup->chandef,
+ NL80211_IFTYPE_MESH_POINT);
if (err < 0)
return err;
- if (err)
+
+ if (err > 0)
radar_detect_width = BIT(setup->chandef.width);
err = cfg80211_can_use_iftype_chan(rdev, wdev, wdev->iftype,