lede/package/network/services/hostapd/patches/016-tests-DFS-test-for-wpa_supplicant-mesh.patch
AmadeusGhost b1677a562c
mac80211: bump to 5.8-rc2, add ath10k VHT support and very basic support for ipq807x ath11k (#5288)
* mac80211: bump to 5.8-rc2

changelog:
  dfe0bc8 mac80211: allow ACS restriction with fixed channel
  727685c mac80211: rt2x00: define RF5592 in init_eeprom routine
  cfd2f3b mac80211: create channel list for fixed channel operation
  d1100c7 mac80211: Update to version 5.7.5-1
  ed2015c mac80211: Update to version 5.8-rc2-1
  a956c14 mac80211: util: don't warn on missing sband iftype data
  8b3e170 hostapd: fix incorrect service name
  68bf5a9 mac80211: don't kill wireless daemon on teardown
  25e0ae6 mac80211: make cfg80211 testmode support optional (and disabled by default)
  b7727a8 mac80211: fix AQL issues
  3d731fc mac80211: merge performance improvement patches

* mt76: update to 2020-07-22

Signed-off-by: Felix Fietkau <nbd@nbd.name>

* mac80211: allow VHT on 2.4GHz

Allow VHT rate on 2.4GHz in order to use 256-QAM

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>

* ath10k: allow VHT on 2.4GHz

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>

* hostapd: add vendor_vht option

hostapd has vendor_vht option to enable VHT (256-QAM) on 2.4GHz
Add this option to hostapd.sh so users can enable it via uci

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>

* ipq807x: Refresh kernel configuration

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

* ipq807x: Add WCSS bus

This is needed to build ath11k.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

* mac80211: Add ath11k

This adds the Qualcomm 802.11ax wireless chipset support.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

Co-authored-by: Felix Fietkau <nbd@nbd.name>
Co-authored-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-08-07 23:53:02 +08:00

95 lines
3.4 KiB
Diff

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])