tests: GO with station interface on a P2P-disallowed channel
Verify that when setting up an autonomous GO and station interface is connected on a channel that is disallowed for P2P uses, the GO is instantiated on a different channel than the station mode connection. Requires MCC. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
This commit is contained in:
parent
9c69efc144
commit
4b47d977c5
1 changed files with 20 additions and 0 deletions
|
@ -233,3 +233,23 @@ def test_go_neg_with_bss_connected(dev, apdev):
|
||||||
if i_res2['freq'] != "2432":
|
if i_res2['freq'] != "2432":
|
||||||
raise Exception("Group formed on a different frequency than BSS")
|
raise Exception("Group formed on a different frequency than BSS")
|
||||||
hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
|
hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
|
||||||
|
|
||||||
|
def test_autogo_with_bss_on_disallowed_chan(dev, apdev):
|
||||||
|
"""P2P channel selection: Autonomous GO with BSS on a disallowed channel"""
|
||||||
|
|
||||||
|
dev[0].request("SET p2p_no_group_iface 0")
|
||||||
|
|
||||||
|
if dev[0].get_mcc() < 2:
|
||||||
|
logger.info("Skipping test because driver does not support MCC")
|
||||||
|
return "skip"
|
||||||
|
try:
|
||||||
|
hostapd.add_ap(apdev[0]['ifname'], { "ssid": 'bss-2.4ghz',
|
||||||
|
"channel": '1' })
|
||||||
|
dev[0].request("P2P_SET disallow_freq 2412")
|
||||||
|
dev[0].connect("bss-2.4ghz", key_mgmt="NONE", scan_freq="2412")
|
||||||
|
res = autogo(dev[0])
|
||||||
|
if res['freq'] == "2412":
|
||||||
|
raise Exception("GO set on a disallowed channel")
|
||||||
|
hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
|
||||||
|
finally:
|
||||||
|
dev[0].request("P2P_SET disallow_freq ")
|
||||||
|
|
Loading…
Reference in a new issue