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 ] if [ -z $last_input ]
then then
last_input="xxxxxxxxx" last_input="unset"
test_mode=0 test_mode=0
else else
if [ $1 -eq 1 ] if [ $1 -eq 1 ]
then then
test_mode=1 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 else
test_mode=0 test_mode=0
fi fi
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 last_input $last_input
echo test_mode $test_mode echo test_mode $test_mode
echo tx_offset_tuning_enable $tx_offset_tuning_enable
service network-manager stop
depmod depmod
modprobe mac80211 modprobe mac80211
lsmod lsmod
@ -52,13 +81,6 @@ if [ -f /lib/modules/$(uname -r)/ad9361_drv.ko ]; then
mv /lib/modules/$(uname -r)/ad9361_drv.ko . mv /lib/modules/$(uname -r)/ad9361_drv.ko .
fi fi
SUBMODULE=ad9361_drv 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 rmmod $SUBMODULE
insmod $SUBMODULE.ko 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 . mv /lib/modules/$(uname -r)/xilinx_dma.ko .
fi fi
SUBMODULE=xilinx_dma 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 rmmod $SUBMODULE
insmod $SUBMODULE.ko insmod $SUBMODULE.ko
@ -117,24 +132,7 @@ then
fi fi
sleep 0.5 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" echo "set RF frontend"
# if [ $last_input == "remote" ] # if [ $last_input == "remote" ]
@ -146,7 +144,13 @@ echo "set RF frontend"
# chmod +x rf_init.sh # chmod +x rf_init.sh
# sync # sync
# fi # 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 #sleep 1