Beispiel #1
0
def test_ap_track_sta_no_probe_resp(dev, apdev):
    """Dualband AP not replying to probes from dualband STA on 2.4 GHz"""
    try:
        params = {
            "ssid": "track",
            "country_code": "US",
            "hw_mode": "g",
            "channel": "6",
            "beacon_int": "10000",
            "no_probe_resp_if_seen_on": apdev[1]['ifname']
        }
        hapd = hostapd.add_ap(apdev[0], params)

        params = {
            "ssid": "track",
            "country_code": "US",
            "hw_mode": "a",
            "channel": "40",
            "track_sta_max_num": "100"
        }
        hapd2 = hostapd.add_ap(apdev[1], params)

        _test_ap_track_sta_no_probe_resp(dev, apdev[0]['bssid'],
                                         apdev[1]['bssid'])
    finally:
        disable_hapd(hapd)
        disable_hapd(hapd2)
        clear_regdom_dev(dev, 2)
Beispiel #2
0
def test_ap_track_sta_no_auth_passive(dev, apdev):
    """AP rejecting authentication from dualband STA on 2.4 GHz (passive)"""
    try:
        params = {
            "ssid": "track",
            "country_code": "US",
            "hw_mode": "g",
            "channel": "6",
            "no_auth_if_seen_on": apdev[1]['ifname']
        }
        hapd = hostapd.add_ap(apdev[0], params)

        params = {
            "ssid": "track",
            "country_code": "US",
            "hw_mode": "a",
            "channel": "40",
            "interworking": "1",
            "venue_name": "eng:Venue",
            "track_sta_max_num": "100"
        }
        hapd2 = hostapd.add_ap(apdev[1], params)

        _test_ap_track_sta_no_auth_passive(dev, apdev[0]['bssid'],
                                           apdev[1]['bssid'])
    finally:
        disable_hapd(hapd)
        disable_hapd(hapd2)
        clear_regdom_dev(dev)
Beispiel #3
0
def test_ap_track_sta_force_2ghz(dev, apdev):
    """Dualband AP forcing dualband STA to connect on 2.4 GHz"""
    try:
        params = {
            "ssid": "track",
            "country_code": "US",
            "hw_mode": "g",
            "channel": "6",
            "track_sta_max_num": "100"
        }
        hapd = hostapd.add_ap(apdev[0], params)

        params = {
            "ssid": "track",
            "country_code": "US",
            "hw_mode": "a",
            "channel": "40",
            "no_probe_resp_if_seen_on": apdev[0]['ifname'],
            "no_auth_if_seen_on": apdev[0]['ifname']
        }
        hapd2 = hostapd.add_ap(apdev[1], params)

        _test_ap_track_sta_force_2ghz(dev, apdev[0]['bssid'],
                                      apdev[1]['bssid'])
    finally:
        disable_hapd(hapd)
        disable_hapd(hapd2)
        clear_regdom_dev(dev)
Beispiel #4
0
def test_ap_track_sta(dev, apdev):
    """Dualband AP tracking unconnected stations"""

    try:
        params = {
            "ssid": "track",
            "country_code": "US",
            "hw_mode": "g",
            "channel": "6",
            "track_sta_max_num": "2"
        }
        hapd = hostapd.add_ap(apdev[0], params)

        params = {
            "ssid": "track",
            "country_code": "US",
            "hw_mode": "a",
            "channel": "40",
            "track_sta_max_num": "100",
            "track_sta_max_age": "1"
        }
        hapd2 = hostapd.add_ap(apdev[1], params)

        _test_ap_track_sta(dev, hapd, apdev[0]['bssid'], hapd2,
                           apdev[1]['bssid'])
    finally:
        disable_hapd(hapd)
        disable_hapd(hapd2)
        clear_regdom_dev(dev, 3)
Beispiel #5
0
def test_wpas_ap_async_fail(dev):
    """wpa_supplicant AP mode - Async failure"""
    id = dev[0].add_network()
    dev[0].set("country", "FI")
    try:
        dev[0].set_network(id, "mode", "2")
        dev[0].set_network_quoted(id, "ssid", "wpas-ap-open")
        dev[0].set_network(id, "key_mgmt", "NONE")
        dev[0].set_network(id, "frequency", "5180")
        dev[0].set_network(id, "scan_freq", "5180")
        dev[0].set_network(id, "vht", "1")
        dev[0].set_network(id, "vht_center_freq1", "5210")
        dev[0].set_network(id, "max_oper_chwidth", "1")
        dev[0].set_network(id, "ht40", "1")

        with alloc_fail(dev[0], 1,
                        "nl80211_get_scan_results;ieee80211n_check_scan"):
            dev[0].select_network(id)
            dev[0].wait_disconnected()
    finally:
        clear_regdom_dev(dev)