mbox series

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

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

Message

Peter Oh June 1, 2018, 1:01 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.
* v3: rebased on top of "mesh: Properly handle sae_password".
      fix compiler warnings on unused variables and parentheses.
* v4: updated "allow mesh to send channel switch request" patch
      based on "2dd5fbbff wpa_supplicant: Rename wpas_event_*".
      fix channel switch error during CAC.
* v5: some changes in "Allow DFS channels to be selected"
      moves to "consider mesh interface on dfs event handler" to
      group the similar changes together.
* v6: fixed memory leak.
      updated ieee80211_is_dfs() usage based on "d239ab396 DFS:
      Mark channels required DFS based on reg-domain" commit.
      removed "mesh: allow mesh to send channel switch request"
      which is already merged to master branch.
      move "mesh: inform kernel driver DFS handler in userspace"
      patch to the last.

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: 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: 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
  mesh: fix channel switch error during CAC
  mesh: inform kernel driver DFS handler in userspace

 src/drivers/driver.h              |   1 +
 src/drivers/driver_nl80211.c      |  16 ++-
 wpa_supplicant/ap.c               |  71 +++++++---
 wpa_supplicant/events.c           |   7 +-
 wpa_supplicant/mesh.c             | 267 ++++++++++++++++++++++++--------------
 wpa_supplicant/mesh.h             |   1 +
 wpa_supplicant/wpa_supplicant.c   |  26 +++-
 wpa_supplicant/wpa_supplicant_i.h |   1 +
 8 files changed, 265 insertions(+), 125 deletions(-)

Comments

Masashi Honma June 2, 2018, 1:03 a.m. UTC | #1
On 2018/06/01 10:01, 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.
> * v3: rebased on top of "mesh: Properly handle sae_password".
>        fix compiler warnings on unused variables and parentheses.
> * v4: updated "allow mesh to send channel switch request" patch
>        based on "2dd5fbbff wpa_supplicant: Rename wpas_event_*".
>        fix channel switch error during CAC.
> * v5: some changes in "Allow DFS channels to be selected"
>        moves to "consider mesh interface on dfs event handler" to
>        group the similar changes together.
> * v6: fixed memory leak.
>        updated ieee80211_is_dfs() usage based on "d239ab396 DFS:
>        Mark channels required DFS based on reg-domain" commit.
>        removed "mesh: allow mesh to send channel switch request"
>        which is already merged to master branch.
>        move "mesh: inform kernel driver DFS handler in userspace"
>        patch to the last.
> 
> 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: 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: 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
>    mesh: fix channel switch error during CAC
>    mesh: inform kernel driver DFS handler in userspace
> 
>   src/drivers/driver.h              |   1 +
>   src/drivers/driver_nl80211.c      |  16 ++-
>   wpa_supplicant/ap.c               |  71 +++++++---
>   wpa_supplicant/events.c           |   7 +-
>   wpa_supplicant/mesh.c             | 267 ++++++++++++++++++++++++--------------
>   wpa_supplicant/mesh.h             |   1 +
>   wpa_supplicant/wpa_supplicant.c   |  26 +++-
>   wpa_supplicant/wpa_supplicant_i.h |   1 +
>   8 files changed, 265 insertions(+), 125 deletions(-)
> 

This series of patches looks causes failure of auto test
"wpas_mesh_secure_sae_missing_password".
By bisecting, the patch 03/15 "mesh: relocate RSN init function"
could cause this.

And gcc 7.3.0 outputs this warning.

mesh.c: In function ‘wpas_mesh_complete_cb’:
mesh.c:412:7: warning: implicit declaration of function 
‘hostapd_set_freq_params’; did you mean ‘hostapd_set_security_params’? 
[-Wimplicit-function-declaration]
    if (hostapd_set_freq_params(&params->freq,
        ^~~~~~~~~~~~~~~~~~~~~~~
        hostapd_set_security_params

Regards,
Masashi Honma.
Peter Oh June 4, 2018, 4:54 a.m. UTC | #2
> This series of patches looks causes failure of auto test
> "wpas_mesh_secure_sae_missing_password".
> By bisecting, the patch 03/15 "mesh: relocate RSN init function"
> could cause this.
>
Is the failure on DFS channels only or non-DFS channels also?
What is the command line to run the hwsim test case?

> And gcc 7.3.0 outputs this warning.
>
> mesh.c: In function ‘wpas_mesh_complete_cb’:
> mesh.c:412:7: warning: implicit declaration of function 
> ‘hostapd_set_freq_params’; did you mean ‘hostapd_set_security_params’? 
> [-Wimplicit-function-declaration]
>    if (hostapd_set_freq_params(&params->freq,
>        ^~~~~~~~~~~~~~~~~~~~~~~
>        hostapd_set_security_params
hostapd_set_freq_params() is the right one. I'll add 
hw_features_common.h in the file once your first comment cleared.

Thanks,
Peter
Masashi Honma June 4, 2018, 7:12 a.m. UTC | #3
On 2018/06/04 13:54, Peter Oh wrote:> Is the failure on DFS channels 
only or non-DFS channels also?

This is a test case on the non-DFS channel (freq=2412).
This test was passed before your patch.

> What is the command line to run the hwsim test case?

These are the commands.

$ ./stop.sh
$ ./start.sh
$ sudo ./run-tests.py wpas_mesh_secure_sae_missing_password

To build the test environment, refer tests/hwsim/README at hostap tree.

Though this test expects failure of MESH creation, MESH creation 
succeeded unexpectedly.

I attached my log of this test.

Regards,
Masashi Honma.
Masashi Honma June 4, 2018, 7:15 a.m. UTC | #4
On 2018/06/04 16:12, Masashi Honma wrote:> I attached my log of this test.

I have sent a wrong file, this is the correct one.

Regards,
Masashi Honma.