Improve the wgd.sh according to the new design

This commit is contained in:
Xianjun Jiao 2022-03-28 11:20:22 +02:00
parent 80ccea555a
commit 4a12fa0498

View File

@ -26,18 +26,47 @@ done
if [ -z $last_input ]
then
last_input="xxxxxxxxx"
last_input="unset"
test_mode=0
else
if [ $1 -eq 1 ]
then
test_mode=1
elif [ $1 -eq 2 ]
then
test_mode=2
elif [ $1 -eq 3 ]
then
test_mode=3
elif [ $1 -eq 4 ]
then
test_mode=4
elif [ $1 -eq 5 ]
then
test_mode=5
elif [ $1 -eq 6 ]
then
test_mode=6
elif [ $1 -eq 7 ]
then
test_mode=7
else
test_mode=0
fi
fi
#if ((($test_mode & 0x2) != 0)); then
tx_offset_tuning_enable=0
#else
# tx_offset_tuning_enable=1
#fi
echo last_input $last_input
echo test_mode $test_mode
echo tx_offset_tuning_enable $tx_offset_tuning_enable
service network-manager stop
depmod
modprobe mac80211
lsmod
@ -52,13 +81,6 @@ if [ -f /lib/modules/$(uname -r)/ad9361_drv.ko ]; then
mv /lib/modules/$(uname -r)/ad9361_drv.ko .
fi
SUBMODULE=ad9361_drv
if [ $last_input == "remote" ]
then
rm $SUBMODULE.ko
sync
wget ftp://192.168.10.1/driver/ad9361/$SUBMODULE.ko
sync
fi
rmmod $SUBMODULE
insmod $SUBMODULE.ko
@ -76,13 +98,6 @@ if [ -f /lib/modules/$(uname -r)/xilinx_dma.ko ]; then
mv /lib/modules/$(uname -r)/xilinx_dma.ko .
fi
SUBMODULE=xilinx_dma
if [ $last_input == "remote" ]
then
rm $SUBMODULE.ko
sync
wget ftp://192.168.10.1/driver/$SUBMODULE/$SUBMODULE.ko
sync
fi
rmmod $SUBMODULE
insmod $SUBMODULE.ko
@ -117,24 +132,7 @@ then
fi
sleep 0.5
# SUBMODULE=ad9361_drv
# if [ $last_input == "remote" ]
# then
# rm $SUBMODULE.ko
# sync
# wget ftp://192.168.10.1/driver/ad9361/$SUBMODULE.ko
# sync
# fi
# rmmod $SUBMODULE
# insmod $SUBMODULE.ko
# echo check $SUBMODULE module is loaded or not
# checkModule $SUBMODULE
# if [ $? -eq 1 ]
# then
# return
# fi
# sleep 1
echo "set RF frontend"
# if [ $last_input == "remote" ]
@ -146,7 +144,13 @@ echo "set RF frontend"
# chmod +x rf_init.sh
# sync
# fi
./rf_init.sh
# if [ $tx_offset_tuning_enable = "1" ]
# then
./rf_init_11n.sh
# else
# ./rf_init.sh tx_offset_tuning_disable
# fi
#sleep 1