]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: MBO STA supported operating classes
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 24 Feb 2016 10:31:09 +0000 (12:31 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 24 Feb 2016 10:31:09 +0000 (12:31 +0200)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_mbo.py

index 74c6623a15c42da6ffdf92f3b2666a6506cc81e8..4be547bdd351009e9f714f9115dcf876d35e3512 100644 (file)
@@ -198,3 +198,22 @@ def test_mbo_non_pref_chan(dev, apdev):
     logger.debug("STA: " + str(sta))
     if 'non_pref_chan[0]' in sta:
         raise Exception("Unexpected non_pref_chan[0] value (update 4)")
+
+def test_mbo_sta_supp_op_classes(dev, apdev):
+    """MBO STA supported operating classes"""
+    ssid = "test-wnm-mbo"
+    params = { 'ssid': ssid, 'mbo': '1' }
+    hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+
+    dev[0].connect(ssid, key_mgmt="NONE", scan_freq="2412")
+
+    addr = dev[0].own_addr()
+    sta = hapd.get_sta(addr)
+    logger.debug("STA: " + str(sta))
+    if 'supp_op_classes' not in sta:
+        raise Exception("No supp_op_classes")
+    supp = bytearray(sta['supp_op_classes'].decode("hex"))
+    if supp[0] != 81:
+        raise Exception("Unexpected current operating class %d" % supp[0])
+    if 115 not in supp:
+        raise Exception("Operating class 115 missing")