tests: Fix ap_track_sta_no_auth false negative by using common finalizer
ap_track_sta_no_auth fails with this message. --------------- wlan0: Country code not reset back to 00: is US wlan0: Country code cleared back to 00 --------------- This patch fixes the issue. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
This commit is contained in:
parent
e891035f13
commit
fd62f3d3fa
1 changed files with 20 additions and 21 deletions
|
@ -127,29 +127,28 @@ def _test_ap_track_sta_no_probe_resp(dev, bssid, bssid2):
|
||||||
def test_ap_track_sta_no_auth(dev, apdev):
|
def test_ap_track_sta_no_auth(dev, apdev):
|
||||||
"""Dualband AP rejecting authentication from dualband STA on 2.4 GHz"""
|
"""Dualband AP rejecting authentication from dualband STA on 2.4 GHz"""
|
||||||
try:
|
try:
|
||||||
_test_ap_track_sta_no_auth(dev, apdev)
|
params = {"ssid": "track",
|
||||||
|
"country_code": "US",
|
||||||
|
"hw_mode": "g",
|
||||||
|
"channel": "6",
|
||||||
|
"track_sta_max_num": "100",
|
||||||
|
"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",
|
||||||
|
"track_sta_max_num": "100"}
|
||||||
|
hapd2 = hostapd.add_ap(apdev[1], params)
|
||||||
|
|
||||||
|
_test_ap_track_sta_no_auth(dev, apdev[0]['bssid'], apdev[1]['bssid'])
|
||||||
finally:
|
finally:
|
||||||
subprocess.call(['iw', 'reg', 'set', '00'])
|
disable_hapd(hapd)
|
||||||
time.sleep(0.1)
|
disable_hapd(hapd2)
|
||||||
|
clear_regdom_dev(dev, 2)
|
||||||
def _test_ap_track_sta_no_auth(dev, apdev):
|
|
||||||
params = {"ssid": "track",
|
|
||||||
"country_code": "US",
|
|
||||||
"hw_mode": "g",
|
|
||||||
"channel": "6",
|
|
||||||
"track_sta_max_num": "100",
|
|
||||||
"no_auth_if_seen_on": apdev[1]['ifname']}
|
|
||||||
hapd = hostapd.add_ap(apdev[0], params)
|
|
||||||
bssid = apdev[0]['bssid']
|
|
||||||
|
|
||||||
params = {"ssid": "track",
|
|
||||||
"country_code": "US",
|
|
||||||
"hw_mode": "a",
|
|
||||||
"channel": "40",
|
|
||||||
"track_sta_max_num": "100"}
|
|
||||||
hapd2 = hostapd.add_ap(apdev[1], params)
|
|
||||||
bssid2 = apdev[1]['bssid']
|
|
||||||
|
|
||||||
|
def _test_ap_track_sta_no_auth(dev, bssid, bssid2):
|
||||||
dev[0].scan_for_bss(bssid, freq=2437, force_scan=True)
|
dev[0].scan_for_bss(bssid, freq=2437, force_scan=True)
|
||||||
dev[0].scan_for_bss(bssid2, freq=5200, force_scan=True)
|
dev[0].scan_for_bss(bssid2, freq=5200, force_scan=True)
|
||||||
dev[1].scan_for_bss(bssid, freq=2437, force_scan=True)
|
dev[1].scan_for_bss(bssid, freq=2437, force_scan=True)
|
||||||
|
|
Loading…
Reference in a new issue