mbox series

[v2,00/15] mesh: enable DFS channels in mesh mode

Message ID cover.1523526306.git.peter.oh@bowerswilkins.com
Headers show
Series mesh: enable DFS channels in mesh mode | expand

Message

Peter Oh April 12, 2018, 9:48 a.m. UTC
From: Peter Oh <peter.oh@bowerswilkins.com>

This patchset enables DFS channels in mesh mode along with
CAC and channel switch.
It's been verified that works for non-dfs channels, dfs channels,
w/wo encryption (none and SAE), radar detection, channel switch,
and mesh re-association after channel switch.
Only left area to cover is in the case when multiple mesh points
detect radar at the same time, but they select different channels.
To cover the case I think we need a private patch for it,
because current 802.11s standard does not address it how to handle.

* v2: corrected wrong sender's email

Peter Oh (15):
  mesh: factor out mesh join function
  mesh: factor out rsn initialization
  mesh: relocate RSN init function
  mesh: use setup completion callback to complete mesh join
  mesh: reflect country setting to mesh configuration
  mesh: inform kernel driver DFS handler in userspace
  mesh: apply channel attributes before running Mesh
  mesh: set interface type to mesh before setting interface
  mesh: set mesh center frequency
  mesh: consider mesh interface on dfs event handler
  mesh: Allow DFS channels to be selected if dfs is enabled
  mesh: allow mesh to send channel switch request
  mesh: do not allow pri/sec channel switch
  mesh: do not allow scan result to swap pri/sec
  mesh: do not use offchan mgmt tx on DFS

 src/drivers/driver.h              |   1 +
 src/drivers/driver_nl80211.c      |  11 +-
 wpa_supplicant/ap.c               |  55 ++++++++--
 wpa_supplicant/events.c           |   1 +
 wpa_supplicant/mesh.c             | 226 +++++++++++++++++++++++---------------
 wpa_supplicant/mesh.h             |   2 +
 wpa_supplicant/wpa_supplicant.c   |  26 +++--
 wpa_supplicant/wpa_supplicant_i.h |   1 +
 8 files changed, 212 insertions(+), 111 deletions(-)

Comments

Masashi Honma April 13, 2018, 8:31 a.m. UTC | #1
On 2018/04/12/ 18:48, peter.oh@bowerswilkins.com wrote:
> From: Peter Oh <peter.oh@bowerswilkins.com>
>
> This patchset enables DFS channels in mesh mode along with
> CAC and channel switch.
> It's been verified that works for non-dfs channels, dfs channels,
> w/wo encryption (none and SAE), radar detection, channel switch,
> and mesh re-association after channel switch.
> Only left area to cover is in the case when multiple mesh points
> detect radar at the same time, but they select different channels.
> To cover the case I think we need a private patch for it,
> because current 802.11s standard does not address it how to handle.
>
> * v2: corrected wrong sender's email

Thanks !

Though I tried your patch with my test, it looks not work for me.
The wlan0 could receieve DFS-CAC-START but wlan1 not.
--------------
sudo ./run-tests.py wpas_mesh_open_dfs
DEV: wlan0: 02:00:00:00:00:00
DEV: wlan1: 02:00:00:00:01:00
DEV: wlan2: 02:00:00:00:02:00
APDEV: wlan3
APDEV: wlan4
START wpas_mesh_open_dfs 1/1
Test: wpa_supplicant open MESH network with DFS
Test exception: Couldn't leave mesh
Traceback (most recent call last):
   File "./run-tests.py", line 466, in main
     t(dev, apdev)
   File "/home/honma/git/hostap/tests/hwsim/test_wpas_mesh.py", line 
1073, in test_wpas_mesh_open_dfs
     check_mesh_group_removed(dev[i])
   File "/home/honma/git/hostap/tests/hwsim/test_wpas_mesh.py", line 92, 
in check_mesh_group_removed
     raise Exception("Test exception: Couldn't leave mesh")
Exception: Test exception: Couldn't leave mesh
FAIL wpas_mesh_open_dfs 15.229537 2018-04-13 17:27:53.780874
passed 0 test case(s)
skipped 0 test case(s)
failed tests: wpas_mesh_open_dfs
--------------

My Linux kernel is letest wireless-testing commit
a07a0eb946c5bf461258fcccd374dc61c89566d5 "Add localversion to identify 
builds
from this tree"

And I found some compiler warnings and a memory leak in your patches.
I will send some patches for these and my test case.

Masashi Honma.
Jouni Malinen April 13, 2018, 8:48 a.m. UTC | #2
On Fri, Apr 13, 2018 at 05:31:57PM +0900, Masashi Honma wrote:
> And I found some compiler warnings and a memory leak in your patches.
> I will send some patches for these and my test case.

The patches 1 and 2 are fixing issues in patches that have not been
applied to hostap.git. As such, those fixes should be merged into the
not-yet-applied patches before they get applied. Patch 3 is a new test
case, so that could go in on its own, but obviously the mesh DFS design
needs to work first properly. I'm dropping these three from my queue now
and expect Peter to fix his patches. Please re-send the new mesh test
case (or get Peter to include it with his patchset) once this
functionality seems to be working reliably.
Peter Oh April 13, 2018, 6:40 p.m. UTC | #3
First of all, thank you for your time to review it.


On 04/13/2018 01:31 AM, Masashi Honma wrote:
>
> Though I tried your patch with my test, it looks not work for me.
> The wlan0 could receieve DFS-CAC-START but wlan1 not.
> --------------
> Test exception: Couldn't leave mesh
> Traceback (most recent call last):
>   File "./run-tests.py", line 466, in main
>     t(dev, apdev)
>   File "/home/honma/git/hostap/tests/hwsim/test_wpas_mesh.py", line 
> 1073, in test_wpas_mesh_open_dfs
>     check_mesh_group_removed(dev[i])
>   File "/home/honma/git/hostap/tests/hwsim/test_wpas_mesh.py", line 
> 92, in check_mesh_group_removed
>     raise Exception("Test exception: Couldn't leave mesh")
> Exception: Test exception: Couldn't leave mesh
>
This error is not due to DFS-CAC-START error, but something else if I 
read your test script correct.
CAC did not start - assume not supported
+        ev = wait_dfs_event(dev[i], "DFS-CAC-START", 5)
+        if "DFS-CAC-START" not in ev:
+            # For now, assume DFS is not supported by all kernel builds.
+            raise HwsimSkip("CAC did not start - assume not supported")


Thanks,
Peter
Masashi Honma April 13, 2018, 8:53 p.m. UTC | #4
On 2018/04/14 03:40, Peter Oh wrote:
> This error is not due to DFS-CAC-START error, but something else if I 
> read your test script correct.
> CAC did not start - assume not supported
> +        ev = wait_dfs_event(dev[i], "DFS-CAC-START", 5)
> +        if "DFS-CAC-START" not in ev:
> +            # For now, assume DFS is not supported by all kernel builds.
> +            raise HwsimSkip("CAC did not start - assume not supported")
> 

The error "DFS event timed out" is sent by function wait_dfs_event().
By some retrials, the DFS-CAC-START event does not always come.
This looks not be caused by your patches.
I will drop this test case until I can find out the cause.

Masashi Honma.