tests: bg_scan_period parameter configuration

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-12-20 19:44:40 +02:00
parent 6343f24d35
commit a42f88f8e7
3 changed files with 5 additions and 3 deletions

View file

@ -16,7 +16,8 @@ import hwsim_utils
def test_ap_open(dev, apdev): def test_ap_open(dev, apdev):
"""AP with open mode (no security) configuration""" """AP with open mode (no security) configuration"""
hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" }) hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
dev[0].connect("open", key_mgmt="NONE", scan_freq="2412") dev[0].connect("open", key_mgmt="NONE", scan_freq="2412",
bg_scan_period="0")
ev = hapd.wait_event([ "AP-STA-CONNECTED" ], timeout=5) ev = hapd.wait_event([ "AP-STA-CONNECTED" ], timeout=5)
if ev is None: if ev is None:
raise Exception("No connection event received from hostapd") raise Exception("No connection event received from hostapd")

View file

@ -24,7 +24,8 @@ def test_connect_cmd_open(dev, apdev):
wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5') wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5')
wpas.interface_add("wlan5", drv_params="force_connect_cmd=1") wpas.interface_add("wlan5", drv_params="force_connect_cmd=1")
wpas.connect("sta-connect", key_mgmt="NONE", scan_freq="2412") wpas.connect("sta-connect", key_mgmt="NONE", scan_freq="2412",
bg_scan_period="1")
wpas.request("DISCONNECT") wpas.request("DISCONNECT")
def test_connect_cmd_wep(dev, apdev): def test_connect_cmd_wep(dev, apdev):

View file

@ -790,7 +790,7 @@ class WpaSupplicant:
"disable_max_amsdu", "ampdu_factor", "ampdu_density", "disable_max_amsdu", "ampdu_factor", "ampdu_density",
"disable_ht40", "disable_sgi", "disable_ldpc", "disable_ht40", "disable_sgi", "disable_ldpc",
"ht40_intolerant", "update_identifier", "mac_addr", "ht40_intolerant", "update_identifier", "mac_addr",
"erp" ] "erp", "bg_scan_period" ]
for field in not_quoted: for field in not_quoted:
if field in kwargs and kwargs[field]: if field in kwargs and kwargs[field]:
self.set_network(id, field, kwargs[field]) self.set_network(id, field, kwargs[field])