tests: Clean up frequency list in scan_dfs
This makes the test log more readable by converting the values to integers and sorting the array. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
3960585785
commit
b25f04d44a
1 changed files with 3 additions and 2 deletions
|
@ -940,10 +940,11 @@ def _test_scan_dfs(dev, apdev, params):
|
||||||
"wlan.fc.type_subtype == 4", [ "radiotap.channel.freq" ])
|
"wlan.fc.type_subtype == 4", [ "radiotap.channel.freq" ])
|
||||||
if out is not None:
|
if out is not None:
|
||||||
freq = out.splitlines()
|
freq = out.splitlines()
|
||||||
|
freq = [int(f) for f in freq]
|
||||||
freq = list(set(freq))
|
freq = list(set(freq))
|
||||||
|
freq.sort()
|
||||||
logger.info("Active scan seen on channels: " + str(freq))
|
logger.info("Active scan seen on channels: " + str(freq))
|
||||||
for ff in freq:
|
for f in freq:
|
||||||
f = int(ff)
|
|
||||||
if (f >= 5260 and f <= 5320) or (f >= 5500 and f <= 5700):
|
if (f >= 5260 and f <= 5320) or (f >= 5500 and f <= 5700):
|
||||||
raise Exception("Active scan on DFS channel: %d" % f)
|
raise Exception("Active scan on DFS channel: %d" % f)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue