aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJonathan Afek <jonathan@wizery.com>2016-05-19 13:06:45 (GMT)
committerJouni Malinen <j@w1.fi>2016-05-28 13:33:56 (GMT)
commita73cdd69c7cd0f7408006c378809d173d86dbb27 (patch)
tree12823d64f3c6ce87ea27c124e477a5b6baa2a504 /tests
parent04fd8ea1bad3ba540bcdffa82953a41fa0f0a7f4 (diff)
downloadhostap-a73cdd69c7cd0f7408006c378809d173d86dbb27.zip
hostap-a73cdd69c7cd0f7408006c378809d173d86dbb27.tar.gz
hostap-a73cdd69c7cd0f7408006c378809d173d86dbb27.tar.bz2
tests/remote: Extend get_monitor_params() to support P2P interfaces
This function is used for remote tests when a monitor interface is needed on the channel on which the AP operates. This change enables us to also query P2P interfaces for the channel information to use for monitor interfaces. Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/remote/monitor.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/remote/monitor.py b/tests/remote/monitor.py
index fe67592..e5bcaad 100644
--- a/tests/remote/monitor.py
+++ b/tests/remote/monitor.py
@@ -138,17 +138,21 @@ def remove(host):
host.monitors.remove(monitor)
-# get monitor params from hostapd
-def get_monitor_params(hapd):
- freq = hapd.get_status_field("freq")
+# get monitor params from hostapd/wpa_supplicant
+def get_monitor_params(wpa, is_p2p=False):
+ if is_p2p:
+ get_status_field_f = wpa.get_group_status_field
+ else:
+ get_status_field_f = wpa.get_status_field
+ freq = get_status_field_f("freq")
bw = "20"
center_freq1=""
center_freq2=""
- vht_oper_chwidth = hapd.get_status_field("vht_oper_chwidth")
- secondary_channel = hapd.get_status_field("secondary_channel")
- vht_oper_centr_freq_seg0_idx = hapd.get_status_field("vht_oper_centr_freq_seg0_idx")
- vht_oper_centr_freq_seg1_idx = hapd.get_status_field("vht_oper_centr_freq_seg1_idx")
+ vht_oper_chwidth = get_status_field_f("vht_oper_chwidth")
+ secondary_channel = get_status_field_f("secondary_channel")
+ vht_oper_centr_freq_seg0_idx = get_status_field_f("vht_oper_centr_freq_seg0_idx")
+ vht_oper_centr_freq_seg1_idx = get_status_field_f("vht_oper_centr_freq_seg1_idx")
if vht_oper_chwidth == "0" or vht_oper_chwidth is None:
if secondary_channel == "1":
bw = "40"