]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix ap_ht40_5ghz_disabled_sec false negative by using common finalizer
authorMasashi Honma <masashi.honma@gmail.com>
Tue, 25 Jun 2019 01:50:46 +0000 (10:50 +0900)
committerJouni Malinen <j@w1.fi>
Wed, 26 Jun 2019 17:42:20 +0000 (20:42 +0300)
ap_ht40_5ghz_disabled_sec 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>
tests/hwsim/test_ap_ht.py

index 2ee1af8496e755d7ead3373a841d7ea901989702..b1e2a10d6578f7c523b5cd6ad12d63b0b39dd883 100644 (file)
@@ -1288,7 +1288,7 @@ def test_ap_ht40_5ghz_disabled_sec(dev, apdev):
             if sec != "0":
                 raise Exception("Invalid 40 MHz channel accepted")
     finally:
-        set_world_reg(apdev[0], None, None)
+        clear_regdom(hapd, dev)
 
 def test_ap_ht40_scan_broken_ap(dev, apdev):
     """HT40 co-ex scan and broken legacy/HT AP"""