summaryrefslogtreecommitdiffstats
path: root/net/wireless/mesh.c
diff options
context:
space:
mode:
authorKalle Valo <kvalo@qca.qualcomm.com>2013-12-23 08:35:19 +0200
committerKalle Valo <kvalo@qca.qualcomm.com>2013-12-23 08:35:19 +0200
commit248544dc4e6c1b9265781e2d7a409a7badc1871a (patch)
tree3df38aafd0840811e1f9371d82b2b602b6c33e1b /net/wireless/mesh.c
parentd354181f4d9a4b91ddbc90327cba6692ef3779a1 (diff)
parent39731b78b4afebb7501c05b68e2443a1b250b41c (diff)
downloadop-kernel-dev-248544dc4e6c1b9265781e2d7a409a7badc1871a.zip
op-kernel-dev-248544dc4e6c1b9265781e2d7a409a7badc1871a.tar.gz
Merge remote-tracking branch 'wireless-next/master' into ath-next
Diffstat (limited to 'net/wireless/mesh.c')
-rw-r--r--net/wireless/mesh.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/net/wireless/mesh.c b/net/wireless/mesh.c
index b0e1869..9c7a11a 100644
--- a/net/wireless/mesh.c
+++ b/net/wireless/mesh.c
@@ -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;
BUILD_BUG_ON(IEEE80211_MAX_SSID_LEN != IEEE80211_MAX_MESH_ID_LEN);
@@ -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,
- CHAN_MODE_SHARED);
+ 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,
+ setup->chandef.chan,
+ CHAN_MODE_SHARED,
+ radar_detect_width);
if (err)
return err;
OpenPOWER on IntegriCloud