summaryrefslogtreecommitdiff
path: root/smoketest/scripts
diff options
context:
space:
mode:
authorAlain Lamar <alain_lamar@yahoo.de>2026-04-17 17:20:26 +0200
committerChristian Breunig <christian@breunig.cc>2026-05-21 07:42:00 +0200
commitd3a26fceb0369fb78875ffff87036bfc4cc18a78 (patch)
treee0e0f0f902674fec9d14862e8bf94b577f1696e9 /smoketest/scripts
parentd8aab03bc85d9a01289bd400dee256ca8647f032 (diff)
downloadvyos-1x-d3a26fceb0369fb78875ffff87036bfc4cc18a78.tar.gz
vyos-1x-d3a26fceb0369fb78875ffff87036bfc4cc18a78.zip
wireless: T8528: add module config code for mt7916 based cards
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_wireless.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_wireless.py b/smoketest/scripts/cli/test_interfaces_wireless.py
index a61c7740e..6b2d3842d 100755
--- a/smoketest/scripts/cli/test_interfaces_wireless.py
+++ b/smoketest/scripts/cli/test_interfaces_wireless.py
@@ -82,6 +82,17 @@ class WirelessInterfaceTest(BasicInterfaceTest.TestCase):
cls.cli_set(cls, wifi_cc_path + [country])
+ def tearDown(self):
+ # Remove mt7915e module configuration file after each test
+ mt7915e_conf = f'/etc/modprobe.d/mt7915e.conf'
+ if os.path.isfile(mt7915e_conf):
+ tmp = call(f'sudo rm -f {mt7915e_conf}')
+ # Fail the test if file cannot be removed
+ if tmp != 0:
+ self.fail(f'Failed to remove {mt7915e_conf}')
+ # Call tearDown method from super class...
+ super().tearDown()
+
def test_wireless_add_single_ip_address(self):
# derived method to check if member interfaces are enslaved properly
super().test_add_single_ip_address()
@@ -218,6 +229,9 @@ class WirelessInterfaceTest(BasicInterfaceTest.TestCase):
for key in vht_opt:
self.cli_set(self._base_path + [interface, 'capabilities', 'vht'] + key.split())
+ # Load mt7915e to test module config generation
+ check_kmod('mt7915e')
+
self.cli_commit()
#
@@ -242,6 +256,11 @@ class WirelessInterfaceTest(BasicInterfaceTest.TestCase):
for key, value in vht_opt.items():
self.assertIn(value, tmp)
+ # mt7916 card configuration
+ tmp = read_file(f'/etc/modprobe.d/mt7915e.conf')
+ self.assertIsNotNone(tmp)
+ self.assertEqual('options mt7915e enable_6ghz=0', tmp)
+
def test_wireless_hostapd_vht_su_beamformer_config(self):
# Single-User-Beamformer
interface = self._interfaces[1] # wlan1
@@ -287,6 +306,9 @@ class WirelessInterfaceTest(BasicInterfaceTest.TestCase):
for key in vht_opt:
self.cli_set(self._base_path + [interface, 'capabilities', 'vht'] + key.split())
+ # Load mt7915e to test module config generation
+ check_kmod('mt7915e')
+
self.cli_commit()
#
@@ -311,6 +333,11 @@ class WirelessInterfaceTest(BasicInterfaceTest.TestCase):
for key, value in vht_opt.items():
self.assertIn(value, tmp)
+ # mt7916 card configuration
+ tmp = read_file(f'/etc/modprobe.d/mt7915e.conf')
+ self.assertIsNotNone(tmp)
+ self.assertEqual('options mt7915e enable_6ghz=0', tmp)
+
def test_wireless_hostapd_he_2ghz_config(self):
# Only set the hostapd (access-point) options - HE mode for 802.11ax at 2.4GHz
interface = self._interfaces[1] # wlan1
@@ -420,6 +447,9 @@ class WirelessInterfaceTest(BasicInterfaceTest.TestCase):
self.cli_set(self._base_path + [interface, 'capabilities', 'he', 'beamform', 'multi-user-beamformer'])
self.cli_set(self._base_path + [interface, 'capabilities', 'he', 'beamform', 'single-user-beamformer'])
+ # Load mt7915e to test module config generation
+ check_kmod('mt7915e')
+
self.cli_commit()
#
@@ -479,6 +509,11 @@ class WirelessInterfaceTest(BasicInterfaceTest.TestCase):
# Check for running process
self.assertTrue(process_named_running('hostapd'))
+ # mt7916 card configuration
+ tmp = read_file(f'/etc/modprobe.d/mt7915e.conf')
+ self.assertIsNotNone(tmp)
+ self.assertEqual('options mt7915e enable_6ghz=1', tmp)
+
def test_wireless_hostapd_wpa_config(self):
# Only set the hostapd (access-point) options
interface = self._interfaces[1] # wlan1