Commit 33dde2bf authored by Chun-Yeow Yeoh's avatar Chun-Yeow Yeoh Committed by Johannes Berg

nl80211: allow the use of DFS channel in mesh

This permits the use of DFS channel once the CAC is conducted and
no radar is detected.
Signed-off-by: default avatarChun-Yeow Yeoh <>
Signed-off-by: default avatarJohannes Berg <>
parent ad7e718c
......@@ -99,6 +99,7 @@ int __cfg80211_join_mesh(struct cfg80211_registered_device *rdev,
const struct mesh_config *conf)
struct wireless_dev *wdev = dev->ieee80211_ptr;
u8 radar_detect_width = 0;
int err;
......@@ -177,8 +178,16 @@ int __cfg80211_join_mesh(struct cfg80211_registered_device *rdev,
if (!cfg80211_reg_can_beacon(&rdev->wiphy, &setup->chandef))
return -EINVAL;
err = cfg80211_can_use_chan(rdev, wdev, setup->chandef.chan,
err = cfg80211_chandef_dfs_required(wdev->wiphy, &setup->chandef);
if (err < 0)
return err;
if (err)
radar_detect_width = BIT(setup->chandef.width);
err = cfg80211_can_use_iftype_chan(rdev, wdev, wdev->iftype,
if (err)
return err;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment