update default setting

This commit is contained in:
padavanonly 2024-04-18 10:54:59 +08:00
parent 8a8561c2e0
commit e9a25ac501
6 changed files with 10 additions and 12 deletions

View File

@ -155,7 +155,7 @@ generate_network() {
static)
local ipad
case "$1" in
lan) ipad=${ipaddr:-"192.168.1.1"} ;;
lan) ipad=${ipaddr:-"192.168.6.1"} ;;
*) ipad=${ipaddr:-"192.168.$((addr_offset++)).1"} ;;
esac

View File

@ -39,10 +39,10 @@ iptables_stop() {
echo "10 0" > /sys/kernel/debug/hnat/hnat_setting
echo "11 30" >/sys/kernel/debug/hnat/hnat_setting
for i in $(seq 0 31); do
echo 0 0 0 0 0 4 4 > $hqos_path/qdma_txq$i
echo 0 0 0 0 0 4 4 > /sys/kernel/debug/hnat/qdma_txq$i
done
for i in $(seq 32 63); do
echo 1 0 0 0 0 4 4 > $hqos_path/qdma_txq$i
echo 1 0 0 0 0 4 4 > /sys/kernel/debug/hnat/qdma_txq$i
done
echo 0 wrr 10000000 > /sys/kernel/debug/hnat/qdma_sch0
echo 0 wrr 10000000 > /sys/kernel/debug/hnat/qdma_sch1
@ -70,7 +70,7 @@ iptables_start_inital() {
echo 0 wrr 10000000 > /sys/kernel/debug/hnat/qdma_sch0
echo 0 wrr 10000000 > /sys/kernel/debug/hnat/qdma_sch1
echo 0 0 0 0 0 0 0 > /sys/kernel/debug/hnat/qdma_txq0
echo 1 0 0 0 0 0 0 > /sys/kernel/debug/hnat/qdma_txq8
echo 1 0 0 0 0 0 0 > /sys/kernel/debug/hnat/qdma_txq32
echo "11 5" >/sys/kernel/debug/hnat/hnat_setting
uci -q set "turboacc.config.fastpath_mh_eth_hnat_bind_rate"="5"
uci -q commit "turboacc"
@ -90,8 +90,8 @@ case "$1" in
iptables_start_prepare
start_qos $2 $3
iptables_start_inital
echo 0 wrr $(($3*1000)) > /sys/kernel/debug/hnat/qdma_sch2
echo 0 wrr $(($2*1000)) > /sys/kernel/debug/hnat/qdma_sch3
echo 1 wrr $(($3*1000)) > /sys/kernel/debug/hnat/qdma_sch2
echo 1 wrr $(($2*1000)) > /sys/kernel/debug/hnat/qdma_sch3
;;
"add")
ip="$2"

View File

@ -198,6 +198,3 @@ msgstr "HNAT PPE数量"
msgid "Bind Entrys"
msgstr "已绑定连接数"
msgid "Number of HNAT PPE Entry"
msgstr "HNAT PPE条目数量"

View File

@ -20,7 +20,6 @@ if [ -e "/lib/modules/$kernel_ver/mtkhnat.ko" ]; then
uci -q set "turboacc.config.fastpath_mh_eth_hnat_v6"="1"
uci -q set "turboacc.config.fastpath_mh_eth_hnat_macvlan"="0"
uci -q set "turboacc.config.fastpath_mh_eth_hnat_bind_rate"="30"
local mem="$(awk '/^MemTotal:/ {print $2}' /proc/meminfo)"
uci -q set "turboacc.config.fastpath_mh_eth_hnat_ppenum"="2"
elif [ -e "/lib/modules/$kernel_ver/fast-classifier.ko" ]; then
uci -q set "turboacc.config.fastpath"="fast_classifier"

View File

@ -460,7 +460,7 @@ function mtwifi_cfg_setup(argv)
if dats.ApCliEnable == 1 then
dats.MUTxRxEnable = 3
else
dats.MUTxRxEnable =3
dats.MUTxRxEnable = 1
end
dats.ITxBfEn = 1
else

View File

@ -22,6 +22,7 @@ detect_mtwifi() {
htbsscoex="1"
ssid="ImmortalWrt-2.4G"
dbdc_main="1"
txpower="100"
channel="auto"
else
band="5g"
@ -30,6 +31,7 @@ detect_mtwifi() {
htbsscoex="0"
ssid="ImmortalWrt-5G"
channel="36"
txpower="100"
dbdc_main="0"
fi
uci -q batch <<-EOF
@ -40,7 +42,7 @@ detect_mtwifi() {
set wireless.${dev}.band=${band}
set wireless.${dev}.dbdc_main=${dbdc_main}
set wireless.${dev}.channel=${channel}
set wireless.${dev}.txpower=100
set wireless.${dev}.txpower=${txpower}
set wireless.${dev}.htmode=${htmode}
set wireless.${dev}.country=CN
set wireless.${dev}.mu_beamformer=1