sta = hapd.get_sta(dev[0].own_addr())
logger.info("hostapd STA: " + str(sta))
+ res = dev[0].request("SIGNAL_POLL")
+ logger.info("STA SIGNAL_POLL:\n" + res.strip())
+ sig = res.splitlines()
+ if "WIDTH=40 MHz" not in sig:
+ raise Exception("Not a 40 MHz connection")
+
+ if 'supp_op_classes' not in sta or len(sta['supp_op_classes']) < 2:
+ raise Exception("No Supported Operating Classes information for STA")
+ opclass = int(sta['supp_op_classes'][0:2], 16)
+ if opclass != 84:
+ raise Exception("Unexpected Current Operating Class from STA: %d" % opclass)
+
def test_ap_ht_wifi_generation(dev, apdev):
"""HT and wifi_generation"""
clear_scan_cache(apdev[0])
ampdu_density="1", disable_ht40="1", disable_sgi="1",
disable_ldpc="1", rx_stbc="2", tx_stbc="1")
+ sta = hapd.get_sta(dev[0].own_addr())
+ if 'supp_op_classes' not in sta or len(sta['supp_op_classes']) < 2:
+ raise Exception("No Supported Operating Classes information for STA")
+ opclass = int(sta['supp_op_classes'][0:2], 16)
+ if opclass != 81:
+ raise Exception("Unexpected Current Operating Class from STA: %d" % opclass)
+
def test_ap_ht_stbc(dev, apdev):
"""HT STBC overrides"""
params = {"ssid": "ht"}
raise Exception("Missing STA flag: HT")
if "[VHT]" not in sta['flags']:
raise Exception("Missing STA flag: VHT")
+ if 'supp_op_classes' not in sta or len(sta['supp_op_classes']) < 2:
+ raise Exception("No Supported Operating Classes information for STA")
+ opclass = int(sta['supp_op_classes'][0:2], 16)
+ if opclass != 128:
+ raise Exception("Unexpected Current Operating Class from STA: %d" % opclass)
except Exception as e:
if isinstance(e, Exception) and str(e) == "AP startup failed":
if not vht_supported():
hapd = hostapd.add_ap(ap, params)
dev.connect("test-vht20", scan_freq="5180", key_mgmt="NONE")
hwsim_utils.test_connectivity(dev, hapd)
+
+ sta = hapd.get_sta(dev.own_addr())
+ if 'supp_op_classes' not in sta or len(sta['supp_op_classes']) < 2:
+ raise Exception("No Supported Operating Classes information for STA")
+ opclass = int(sta['supp_op_classes'][0:2], 16)
+ if opclass != 115:
+ raise Exception("Unexpected Current Operating Class from STA: %d" % opclass)
finally:
dev.request("DISCONNECT")
clear_regdom(hapd, devs)
hapd = hostapd.add_ap(ap, params)
dev.connect("test-vht40", scan_freq="5180", key_mgmt="NONE")
hwsim_utils.test_connectivity(dev, hapd)
+
+ sta = hapd.get_sta(dev.own_addr())
+ if 'supp_op_classes' not in sta or len(sta['supp_op_classes']) < 2:
+ raise Exception("No Supported Operating Classes information for STA")
+ opclass = int(sta['supp_op_classes'][0:2], 16)
+ if opclass != 116:
+ raise Exception("Unexpected Current Operating Class from STA: %d" % opclass)
finally:
dev.request("DISCONNECT")
clear_regdom(hapd, devs)
raise Exception("Unexpected SIGNAL_POLL value(1): " + str(sig))
if "WIDTH=160 MHz" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(2): " + str(sig))
+
+ sta = hapd.get_sta(dev[0].own_addr())
+ if 'supp_op_classes' not in sta or len(sta['supp_op_classes']) < 2:
+ raise Exception("No Supported Operating Classes information for STA")
+ opclass = int(sta['supp_op_classes'][0:2], 16)
+ if opclass != 129:
+ raise Exception("Unexpected Current Operating Class from STA: %d" % opclass)
except Exception as e:
if isinstance(e, Exception) and str(e) == "AP startup failed":
if not vht_supported():
raise Exception("Unexpected SIGNAL_POLL value(3): " + str(sig))
if "CENTER_FRQ2=5775" not in sig:
raise Exception("Unexpected SIGNAL_POLL value(4): " + str(sig))
+
+ sta = hapd2.get_sta(dev[1].own_addr())
+ if 'supp_op_classes' not in sta or len(sta['supp_op_classes']) < 2:
+ raise Exception("No Supported Operating Classes information for STA")
+ opclass = int(sta['supp_op_classes'][0:2], 16)
+ if opclass != 130:
+ raise Exception("Unexpected Current Operating Class from STA: %d" % opclass)
except Exception as e:
if isinstance(e, Exception) and str(e) == "AP startup failed":
if not vht_supported():