From a91849871371d35cf1cd6d52a9287082d3628a1a Mon Sep 17 00:00:00 2001 From: Xianjun Jiao Date: Mon, 28 Mar 2022 12:16:41 +0200 Subject: [PATCH] Add script to restrict openwifi only use a fixed frequency: to avoid extra tuning/scanning operation/procedure bringing ad9361 calibration and Linux channenl setting activities --- user_space/set_restrict_freq.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 user_space/set_restrict_freq.sh diff --git a/user_space/set_restrict_freq.sh b/user_space/set_restrict_freq.sh new file mode 100755 index 0000000..a9e9428 --- /dev/null +++ b/user_space/set_restrict_freq.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +home_dir=$(pwd) + +if test -d "/sys/devices/platform/fpga-axi@0/fpga-axi@0:sdr"; then + cd /sys/devices/platform/fpga-axi@0/fpga-axi@0:sdr +else + cd /sys/devices/soc0/fpga-axi\@0/fpga-axi\@0\:sdr +fi + +# set +if [[ -n $1 ]]; then + echo $1 > restrict_freq_mhz +fi + +# show +cat restrict_freq_mhz + +cd $home_dir +