From c1475079bbfafb990c62bf034f2fdfd43de7546c Mon Sep 17 00:00:00 2001 From: jitendracandela <78074038+jitendracandela@users.noreply.github.com> Date: Fri, 10 Feb 2023 19:14:32 +0530 Subject: [PATCH] Modified DFS path for liteon_wpx8324 AP (#763) * Modified DFS path for liteon_wpx8324 AP Signed-off-by: jitendracandela * Fixed DFS path issue for liteon ap Signed-off-by: jitendracandela --------- Signed-off-by: jitendracandela --- libs/tip_2x/ap_lib.py | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/libs/tip_2x/ap_lib.py b/libs/tip_2x/ap_lib.py index fc06085f1..669e03f52 100644 --- a/libs/tip_2x/ap_lib.py +++ b/libs/tip_2x/ap_lib.py @@ -410,7 +410,19 @@ class APLIBS: else: cmd = "cd && cd /sys/kernel/debug/ieee80211/phy0/ath10k/ && echo 1 > dfs_simulate_radar" elif type_.lower() == "wifi6" or type_.lower() == "wifi6e": - cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && ls && echo 1 > dfs_simulate_radar' + # cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && ls && echo 1 > dfs_simulate_radar' + cmd1 = '[ -f /sys/kernel/debug/ath11k/qcn6122_2/mac0/dfs_simulate_radar ] && echo "True" || echo "False"' + output = self.run_generic_command(cmd=cmd1, idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.JSON) + ret = output.split("\n") + status_count = int(ret.count("True")) + logging.info("Status count: " + str(status_count)) + if status_count == 1: + cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd qcn6122_2 && cd mac0 && ls && echo 1 > dfs_simulate_radar' + else: + cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && ls && echo 1 > dfs_simulate_radar' output = self.run_generic_command(cmd=cmd, idx=idx, print_log=print_log, attach_allure=attach_allure, @@ -434,7 +446,18 @@ class APLIBS: # cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && logread | grep DFS" # print("cmd: ", cmd) elif type_.lower() == "wifi6" or type_.lower() == "wifi6e": - cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && logread | grep DFS' + cmd1 = '[ -f /sys/kernel/debug/ath11k/qcn6122_2/mac0/dfs_simulate_radar ] && echo "True" || echo "False"' + output = self.run_generic_command(cmd=cmd1, idx=idx, + print_log=print_log, + attach_allure=attach_allure, + expected_attachment_type=allure.attachment_type.JSON) + ret = output.split("\n") + status_count = int(ret.count("True")) + logging.info("Status count: " + str(status_count)) + if status_count == 1: + cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd qcn6122_2 && cd mac0 && logread | grep DFS' + else: + cmd = f'cd && cd /sys/kernel/debug/ath11k/ && cd ipq* && cd mac0 && logread | grep DFS' try: output = self.run_generic_command(cmd=cmd, idx=idx, print_log=print_log,