mirror of
https://github.com/Telecominfraproject/wlan-testing.git
synced 2025-10-30 18:38:06 +00:00
Added path checking logic for dfs (#590)
Signed-off-by: jitendracandela <jitendra.kushavah@candelatech.com>
This commit is contained in:
@@ -606,13 +606,22 @@ class APNOS:
|
|||||||
return status
|
return status
|
||||||
|
|
||||||
def dfs(self):
|
def dfs(self):
|
||||||
if self.type == "wifi5":
|
if self.type.lower() == "wifi5":
|
||||||
cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && echo 1 > dfs_simulate_radar"
|
#cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && echo 1 > dfs_simulate_radar"
|
||||||
print("cmd: ", cmd)
|
#print("cmd: ", cmd)
|
||||||
if self.mode:
|
if self.mode:
|
||||||
|
client = self.ssh_cli_connect()
|
||||||
|
cmd1 = '[ -f /sys/kernel/debug/ieee80211/phy1/ath10k/dfs_simulate_radar ] && echo "True" || echo "False"'
|
||||||
|
stdin, stdout, stderr = client.exec_command(cmd1)
|
||||||
|
output = str(stdout.read())
|
||||||
|
if output.__contains__("False"):
|
||||||
|
cmd = "cd /sys/kernel/debug/ieee80211/phy0/ath10k/ && echo 1 > dfs_simulate_radar"
|
||||||
|
else:
|
||||||
|
cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && echo 1 > dfs_simulate_radar"
|
||||||
|
client.close()
|
||||||
command = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
command = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
||||||
f"cmd --value \"{cmd}\" "
|
f"cmd --value \"{cmd}\" "
|
||||||
elif self.type == "wifi6":
|
elif self.type.lower() == "wifi6":
|
||||||
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'
|
||||||
print("cmd: ", cmd)
|
print("cmd: ", cmd)
|
||||||
if self.mode:
|
if self.mode:
|
||||||
@@ -621,13 +630,23 @@ class APNOS:
|
|||||||
client = self.ssh_cli_connect()
|
client = self.ssh_cli_connect()
|
||||||
stdin, stdout, stderr = client.exec_command(command)
|
stdin, stdout, stderr = client.exec_command(command)
|
||||||
output = stdout.read()
|
output = stdout.read()
|
||||||
print("hey", output)
|
print("Output", output)
|
||||||
client.close()
|
client.close()
|
||||||
|
|
||||||
def dfs_logread(self):
|
def dfs_logread(self):
|
||||||
if self.type == "wifi5":
|
if self.type == "wifi5":
|
||||||
cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && logread | grep DFS"
|
client = self.ssh_cli_connect()
|
||||||
print("cmd: ", cmd)
|
cmd1 = '[ -f /sys/kernel/debug/ieee80211/phy1/ath10k/dfs_simulate_radar ] && echo "True" || echo "False"'
|
||||||
|
stdin, stdout, stderr = client.exec_command(cmd1)
|
||||||
|
output = str(stdout.read())
|
||||||
|
print("Output", output)
|
||||||
|
if output.__contains__("False"):
|
||||||
|
cmd = "cd /sys/kernel/debug/ieee80211/phy0/ath10k/ && logread | grep DFS"
|
||||||
|
else:
|
||||||
|
cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && logread | grep DFS"
|
||||||
|
client.close()
|
||||||
|
#cmd = "cd /sys/kernel/debug/ieee80211/phy1/ath10k/ && logread | grep DFS"
|
||||||
|
#print("cmd: ", cmd)
|
||||||
if self.mode:
|
if self.mode:
|
||||||
cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
cmd = f"cd ~/cicd-git/ && ./openwrt_ctl.py {self.owrt_args} -t {self.tty} --action " \
|
||||||
f"cmd --value \"{cmd}\" "
|
f"cmd --value \"{cmd}\" "
|
||||||
|
|||||||
Reference in New Issue
Block a user