public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nl80211: allow the use of DFS channel in mesh
@ 2013-12-02  8:05 Chun-Yeow Yeoh
  2013-12-03 12:50 ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Chun-Yeow Yeoh @ 2013-12-02  8:05 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes, linville, devel, distro11s, Chun-Yeow Yeoh

This permits the use of DFS channel once the CAC is conducted and
no radar is detected.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
---
 net/wireless/mesh.c |   13 +++++++++++--
 1 file 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;
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] nl80211: allow the use of DFS channel in mesh
  2013-12-02  8:05 [PATCH] nl80211: allow the use of DFS channel in mesh Chun-Yeow Yeoh
@ 2013-12-03 12:50 ` Johannes Berg
  2013-12-04  1:26   ` Yeoh Chun-Yeow
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2013-12-03 12:50 UTC (permalink / raw)
  To: Chun-Yeow Yeoh; +Cc: linux-wireless, linville, devel, distro11s

On Mon, 2013-12-02 at 16:05 +0800, Chun-Yeow Yeoh wrote:
> This permits the use of DFS channel once the CAC is conducted and
> no radar is detected.

This seems pretty pointless right now? There's nothing supporting it, is
there?

johannes


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nl80211: allow the use of DFS channel in mesh
  2013-12-03 12:50 ` Johannes Berg
@ 2013-12-04  1:26   ` Yeoh Chun-Yeow
  2013-12-04  8:11     ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Yeoh Chun-Yeow @ 2013-12-04  1:26 UTC (permalink / raw)
  To: Johannes Berg
  Cc: linux-wireless@vger.kernel.org, John Linville,
	devel@lists.open80211s.org, distro11s@cozybit.com

> This seems pretty pointless right now? There's nothing supporting it, is
> there?
>
I have currently extended the iw to trigger the CAC on DFC channel
using NL80211_CMD_RADAR_DETECT. But not able to join mesh on DFS even
it is clear.

So this patch at least allows us to trigger beaconing and bring up the
mesh on DFS channel.

-----
Chun-Yeow

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nl80211: allow the use of DFS channel in mesh
  2013-12-04  1:26   ` Yeoh Chun-Yeow
@ 2013-12-04  8:11     ` Johannes Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2013-12-04  8:11 UTC (permalink / raw)
  To: Yeoh Chun-Yeow
  Cc: linux-wireless@vger.kernel.org, John Linville,
	devel@lists.open80211s.org, distro11s@cozybit.com

On Wed, 2013-12-04 at 09:26 +0800, Yeoh Chun-Yeow wrote:
> > This seems pretty pointless right now? There's nothing supporting it, is
> > there?
> >
> I have currently extended the iw to trigger the CAC on DFC channel
> using NL80211_CMD_RADAR_DETECT. But not able to join mesh on DFS even
> it is clear.
> 
> So this patch at least allows us to trigger beaconing and bring up the
> mesh on DFS channel.

Yeah, never mind. I was confused about the "TODO DFS" in the mesh code,
but that's with CSA *to* a radar channel.

I'll apply this.

johannes


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-12-04  8:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-02  8:05 [PATCH] nl80211: allow the use of DFS channel in mesh Chun-Yeow Yeoh
2013-12-03 12:50 ` Johannes Berg
2013-12-04  1:26   ` Yeoh Chun-Yeow
2013-12-04  8:11     ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox