From b649fa4f4260c7a071b953df74e5736c420ee349 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 21 Jun 2020 17:32:00 +0300 Subject: [PATCH] tests: nl80211 control port in AP mode disabled/enabled Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_psk.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/test_ap_psk.py b/tests/hwsim/test_ap_psk.py index 116733a1b..e79380e90 100644 --- a/tests/hwsim/test_ap_psk.py +++ b/tests/hwsim/test_ap_psk.py @@ -3362,10 +3362,17 @@ def test_ap_wpa2_psk_no_control_port(dev, apdev): def test_ap_wpa2_psk_ap_control_port(dev, apdev): """WPA2-PSK AP with nl80211 control port in AP mode""" + run_ap_wpa2_psk_ap_control_port(dev, apdev, ctrl_val=1) + +def test_ap_wpa2_psk_ap_control_port_disabled(dev, apdev): + """WPA2-PSK AP with nl80211 control port in AP mode disabled""" + run_ap_wpa2_psk_ap_control_port(dev, apdev, ctrl_val=0) + +def run_ap_wpa2_psk_ap_control_port(dev, apdev, ctrl_val): ssid = "test-wpa2-psk" passphrase = 'qwertyuiop' params = hostapd.wpa2_params(ssid=ssid, passphrase=passphrase) - params['driver_params'] = "control_port_ap=1" + params['driver_params'] = "control_port_ap=%d" % ctrl_val hapd = hostapd.add_ap(apdev[0], params) flags = hapd.request("DRIVER_FLAGS").splitlines()[1:]