tests: Fix regdom cleanup in some p2p_channel tests
cfg80211 may ignore user hints while there are active COUNTRY_IE hints, thus at some timings it may ignore the country setting back to world domain. Fix it by making sure the country is set only after all the interfaces are stopped. In addition, call a more robust clear_regdom_dev() function. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
This commit is contained in:
parent
3a00a86bb9
commit
a033e886b2
1 changed files with 4 additions and 2 deletions
|
@ -17,7 +17,7 @@ from tshark import run_tshark
|
||||||
from wpasupplicant import WpaSupplicant
|
from wpasupplicant import WpaSupplicant
|
||||||
from hwsim import HWSimRadio
|
from hwsim import HWSimRadio
|
||||||
from p2p_utils import *
|
from p2p_utils import *
|
||||||
from utils import clear_regdom_dev
|
from utils import *
|
||||||
|
|
||||||
def set_country(country, dev=None):
|
def set_country(country, dev=None):
|
||||||
subprocess.call(['iw', 'reg', 'set', country])
|
subprocess.call(['iw', 'reg', 'set', country])
|
||||||
|
@ -952,7 +952,8 @@ def _test_p2p_go_move_scm_peer_supports(dev, apdev):
|
||||||
dev[0].remove_group()
|
dev[0].remove_group()
|
||||||
finally:
|
finally:
|
||||||
dev[0].global_request("SET p2p_go_freq_change_policy 2")
|
dev[0].global_request("SET p2p_go_freq_change_policy 2")
|
||||||
set_country("00")
|
disable_hapd(hapd)
|
||||||
|
clear_regdom_dev(dev, 1)
|
||||||
|
|
||||||
def test_p2p_go_move_scm_peer_does_not_support(dev, apdev):
|
def test_p2p_go_move_scm_peer_does_not_support(dev, apdev):
|
||||||
"""No P2P GO move due to SCM operation (peer does not supports)"""
|
"""No P2P GO move due to SCM operation (peer does not supports)"""
|
||||||
|
@ -998,6 +999,7 @@ def _test_p2p_go_move_scm_peer_does_not_support(dev, apdev):
|
||||||
finally:
|
finally:
|
||||||
dev[0].global_request("SET p2p_go_freq_change_policy 2")
|
dev[0].global_request("SET p2p_go_freq_change_policy 2")
|
||||||
dev[1].request("DRIVER_EVENT AVOID_FREQUENCIES")
|
dev[1].request("DRIVER_EVENT AVOID_FREQUENCIES")
|
||||||
|
disable_hapd(hapd)
|
||||||
clear_regdom_dev(dev, 2)
|
clear_regdom_dev(dev, 2)
|
||||||
|
|
||||||
def test_p2p_go_move_scm_multi(dev, apdev):
|
def test_p2p_go_move_scm_multi(dev, apdev):
|
||||||
|
|
Loading…
Reference in a new issue