aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd/patches/016-tests-DFS-test-for-wpa_supplicant-mesh.patch
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2020-07-23 18:34:00 +0100
committerDaniel Golle <daniel@makrotopia.org>2020-07-30 16:27:44 +0100
commit34705946e2e98d96bd3562ea0bd8a34a0aeba456 (patch)
tree5796975da180603ee37ec9466a831e85f38f0eeb /package/network/services/hostapd/patches/016-tests-DFS-test-for-wpa_supplicant-mesh.patch
parent68ac3f2cddab8422d7de0ce1a78d23edf29012e7 (diff)
downloadupstream-34705946e2e98d96bd3562ea0bd8a34a0aeba456.tar.gz
upstream-34705946e2e98d96bd3562ea0bd8a34a0aeba456.tar.bz2
upstream-34705946e2e98d96bd3562ea0bd8a34a0aeba456.zip
hostapd: update mesh DFS patches and add mesh HE support
Drop outdated and by now broken patchset originally supplied by Peter Oh in August 2018 but never merged upstream. Instead add the more promissing rework recently submitted by Markus Theil who picked up Peter's patchset, fixed and completed it and added support for HE (802.11ax) in mesh mode. This is only compile tested and needs some real-life testing. Fixes: FS#3214 Fixes: 167028b750 ("hostapd: Update to version 2.9 (2019-08-08)") Fixes: 0a3ec87a66 ("hostapd: update to latest Git hostap_2_9-1238-gdd2daf0848ed") Fixes: 017320ead3 ("hostapd: bring back mesh patches") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/network/services/hostapd/patches/016-tests-DFS-test-for-wpa_supplicant-mesh.patch')
-rw-r--r--package/network/services/hostapd/patches/016-tests-DFS-test-for-wpa_supplicant-mesh.patch94
1 files changed, 94 insertions, 0 deletions
diff --git a/package/network/services/hostapd/patches/016-tests-DFS-test-for-wpa_supplicant-mesh.patch b/package/network/services/hostapd/patches/016-tests-DFS-test-for-wpa_supplicant-mesh.patch
new file mode 100644
index 0000000000..b6a51b2f35
--- /dev/null
+++ b/package/network/services/hostapd/patches/016-tests-DFS-test-for-wpa_supplicant-mesh.patch
@@ -0,0 +1,94 @@
+From 6ee4e70d469b8ce05013ed524eea32ea303e6563 Mon Sep 17 00:00:00 2001
+From: Markus Theil <markus.theil@tu-ilmenau.de>
+Date: Tue, 30 Jun 2020 14:19:04 +0200
+Subject: [PATCH 16/19] tests: DFS test for wpa_supplicant mesh
+
+Add a test with uses a DFS channel, waits for CAC
+afterwards successfull mesh join and then triggers
+a radar event and check if the mesh comes up again
+on the same device.
+
+Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
+---
+ tests/hwsim/test_wpas_mesh.py | 56 +++++++++++++++++++++++++++++++++--
+ 1 file changed, 54 insertions(+), 2 deletions(-)
+
+--- a/tests/hwsim/test_wpas_mesh.py
++++ b/tests/hwsim/test_wpas_mesh.py
+@@ -80,8 +80,23 @@ def check_mesh_scan(dev, params, other_s
+ if '[MESH]' not in bss['flags']:
+ raise Exception("BSS output did not include MESH flag")
+
+-def check_mesh_group_added(dev):
+- ev = dev.wait_event(["MESH-GROUP-STARTED"])
++def check_dfs_started(dev, timeout=10):
++ ev = dev.wait_event(["DFS-CAC-START"], timeout=timeout)
++ if ev is None:
++ raise Exception("Test exception: CAC did not start")
++
++def check_dfs_finished(dev, timeout=70):
++ ev = dev.wait_event(["DFS-CAC-COMPLETED"], timeout=timeout)
++ if ev is None:
++ raise Exception("Test exception: CAC did not finish")
++
++def check_mesh_radar_handling_finished(dev, timeout=75):
++ ev = dev.wait_event(["CTRL-EVENT-CHANNEL-SWITCH", "MESH-GROUP-STARTED"], timeout=timeout)
++ if ev is None:
++ raise Exception("Test exception: Couldn't join mesh")
++
++def check_mesh_group_added(dev, timeout=10):
++ ev = dev.wait_event(["MESH-GROUP-STARTED"], timeout=timeout)
+ if ev is None:
+ raise Exception("Test exception: Couldn't join mesh")
+
+@@ -91,6 +106,10 @@ def check_mesh_group_removed(dev):
+ if ev is None:
+ raise Exception("Test exception: Couldn't leave mesh")
+
++def check_regdom_change(dev, timeout=10):
++ ev = dev.wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=timeout)
++ if ev is None:
++ raise Exception("Test exception: No regdom change happened.")
+
+ def check_mesh_peer_connected(dev, timeout=10):
+ ev = dev.wait_event(["MESH-PEER-CONNECTED"], timeout=timeout)
+@@ -167,6 +186,39 @@ def test_wpas_mesh_group_remove(dev):
+ check_mesh_group_removed(dev[0])
+ dev[0].mesh_group_remove()
+
++def dfs_simulate_radar(dev):
++ logger.info("Trigger a simulated radar event")
++ phyname = dev.get_driver_status_field("phyname")
++ radar_file = '/sys/kernel/debug/ieee80211/' + phyname + '/hwsim/dfs_simulate_radar'
++ with open(radar_file, 'w') as f:
++ f.write('1')
++
++@long_duration_test
++def test_wpas_mesh_peer_connected_dfs(dev):
++ """wpa_supplicant MESH peer connected"""
++ dev[0].set("country", "DE")
++ dev[1].set("country", "DE")
++
++ check_regdom_change(dev[0])
++ check_regdom_change(dev[1])
++
++ check_mesh_support(dev[0])
++ add_open_mesh_network(dev[0], freq="5500", beacon_int=160)
++ add_open_mesh_network(dev[1], freq="5500", beacon_int=160)
++ check_dfs_started(dev[0])
++ check_dfs_finished(dev[0])
++ check_mesh_joined_connected(dev, timeout0=10)
++
++ dfs_simulate_radar(dev[0])
++
++ check_mesh_radar_handling_finished(dev[0], timeout=75)
++
++ dev[0].set("country", "00")
++ dev[1].set("country", "00")
++
++ check_regdom_change(dev[0])
++ check_regdom_change(dev[1])
++
+ def test_wpas_mesh_peer_connected(dev):
+ """wpa_supplicant MESH peer connected"""
+ check_mesh_support(dev[0])