sta2.stop()
ap1.stop()
ap2.stop()
+ fst_test_common.fst_clear_regdom()
def connect_two_ap_sta_pairs(ap1, ap2, dev1, dev2, rsn=False):
"""Connects a pair of stations, each one to a separate AP"""
# See README for more details.
import subprocess
+import time
import logging
import hostapd
raise Exception("Cannot restore regulatory domain")
logger.debug("fst hostapd: regulatory domain ready")
+
+def fst_clear_regdom():
+ cmd = subprocess.Popen([ "iw", "reg", "get" ], stdout=subprocess.PIPE)
+ res = cmd.stdout.read()
+ cmd.stdout.close()
+ if "country 00:" not in res:
+ subprocess.call(['iw', 'reg', 'set', '00'])
+ time.sleep(0.1)
while len(self.cfgs_to_run) != 0:
cfg = self.cfgs_to_run[0]
self.remove_cfg(cfg)
+ fst_test_common.fst_clear_regdom()
def kill_pid(self, pidfile, try_again=False):
"""Kills process by PID file"""
run_fst_ap_start_session_oom(apdev, ap1)
finally:
ap1.stop()
+ fst_test_common.fst_clear_regdom()
def run_fst_ap_start_session_oom(apdev, ap1):
with alloc_fail(ap1, 1, "fst_iface_create"):
# This is allowed to complete currently
ap1.stop()
+ fst_test_common.fst_clear_regdom()
def test_fst_send_oom(dev, apdev, test_params):
"""FST send action OOM"""