def test_wext_rfkill(dev, apdev): """WEXT and rfkill block/unblock""" wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5') wpas.interface_add("wlan5") rfk = get_rfkill(wpas) wpas.interface_remove("wlan5") wpas = get_wext_interface() hapd = hostapd.add_ap(apdev[0], { "ssid": "open" }) wpas.connect("open", key_mgmt="NONE", scan_freq="2412") try: logger.info("rfkill block") rfk.block() wpas.wait_disconnected(timeout=10, error="Missing disconnection event on rfkill block") logger.info("rfkill unblock") rfk.unblock() wpas.wait_connected(timeout=20, error="Missing connection event on rfkill unblock") hwsim_utils.test_connectivity(wpas, hapd) finally: rfk.unblock()
def test_wext_rfkill(dev, apdev): """WEXT and rfkill block/unblock""" wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5') wpas.interface_add("wlan5") rfk = get_rfkill(wpas) wpas.interface_remove("wlan5") wpas = get_wext_interface() hapd = hostapd.add_ap(apdev[0]['ifname'], {"ssid": "open"}) wpas.connect("open", key_mgmt="NONE", scan_freq="2412") try: logger.info("rfkill block") rfk.block() wpas.wait_disconnected( timeout=10, error="Missing disconnection event on rfkill block") logger.info("rfkill unblock") rfk.unblock() wpas.wait_connected(timeout=20, error="Missing connection event on rfkill unblock") hwsim_utils.test_connectivity(wpas, hapd) finally: rfk.unblock()