tests: Use apdev[0] more consistently in ap_ht
authorJonathan Afek <jonathan@wizery.com>
Tue, 7 Jun 2016 13:42:41 +0000 (16:42 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 27 Jun 2016 18:10:35 +0000 (21:10 +0300)
The test cases ap_ht40_5ghz_invalid_pair and ap_ht40_5ghz_disabled_sec
mixed use of apdev[0] and apdev[1] while only needing a single AP. This
works when both the devices are on the same host (e.g., with
mac80211_hwsim), but not when using separate remote hosts. Fix this by
using apdev[0] more consistently in these test cases.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
tests/hwsim/test_ap_ht.py

index 804e56d..6048d8a 100644 (file)
@@ -1122,7 +1122,7 @@ def test_ap_ht40_5ghz_invalid_pair(dev, apdev):
                    "channel": "40",
                    "country_code": "US",
                    "ht_capab": "[HT40+]"}
-        hapd = hostapd.add_ap(apdev[1], params, wait_enabled=False)
+        hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
         ev = hapd.wait_event(["AP-DISABLED", "AP-ENABLED"], timeout=10)
         if not ev:
             raise Exception("AP setup failure timed out")
@@ -1142,7 +1142,7 @@ def test_ap_ht40_5ghz_disabled_sec(dev, apdev):
                    "channel": "48",
                    "country_code": "US",
                    "ht_capab": "[HT40+]"}
-        hapd = hostapd.add_ap(apdev[1], params, wait_enabled=False)
+        hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False)
         ev = hapd.wait_event(["AP-DISABLED", "AP-ENABLED"], timeout=10)
         if not ev:
             raise Exception("AP setup failure timed out")