blob: ae70bd4d9ff10e1ef68404652f84861bc8b5b0d7 [file] [log] [blame]
developer84bc3592022-10-31 15:53:09 +08001devidx=0
2phyidx=0
3
4for _dev in /sys/class/ieee80211/*; do
5 [ -e "$_dev" ] || continue
6 if [ "$(uci get wireless.radio${phyidx}.disabled)" == "1" ]; then
7 phyidx=$((phyidx + 1))
8 continue
9 fi
10
11 echo "dev: $devidx"
12 echo "phy: $phyidx"
13
14 band="$(uci get wireless.radio${phyidx}.band)"
15
16 if [ "$band" == "2g" ]; then
17 echo "APINDEX_2G_PUBLIC_WIFI=$devidx" >> /etc/tdk_platform.properties
18 sed -i "s/\(AP_IF_NAME_2G *= *\).*/\1wifi$devidx/" /etc/tdk_platform.properties
19 sed -i "s/\(RADIO_IF_2G *= *\).*/\1wlan$devidx/" /etc/tdk_platform.properties
20 elif [ "$band" == "5g" ]; then
21 echo "APINDEX_5G_PUBLIC_WIFI=$devidx" >> /etc/tdk_platform.properties
22 sed -i "s/\(AP_IF_NAME_5G *= *\).*/\1wifi$devidx/" /etc/tdk_platform.properties
23 sed -i "s/\(RADIO_IF_5G *= *\).*/\1wlan$devidx/" /etc/tdk_platform.properties
24 elif [ "$band" == "6g" ]; then
25 echo "PRIVATE_6G_AP_INDEX=$devidx" >> /etc/tdk_platform.properties
26 echo "AP_IF_NAME_6G=wifi$devidx" >> /etc/tdk_platform.properties
27 echo "RADIO_IF_6G=wlan$devidx" >> /etc/tdk_platform.properties
28 fi
29
30 devidx=$(($devidx + 1))
31 phyidx=$(($phyidx + 1))
32done
33
34
35echo "DEFAULT_CHANNEL_BANDWIDTH=20MHz,20MHz" >> /etc/tdk_platform.properties
36echo "RADIO_MODES_2G=n:11NGHT40MINUS:4,n:11NGHT40MINUS:8,ax:11AXHE40MINUS:32,ax:11AXHE40MINUS:0" >> /etc/tdk_platform.properties
37echo "RADIO_MODES_5G=ac:11ACVHT80:16,n:11NAHT40MINUS:8,ax:11AXHE80:32,ax:11AXHE80:0" >> /etc/tdk_platform.properties
38echo "getAp0DTIMInterval=1" >> /etc/tdk_platform.properties
39echo "getAp1DTIMInterval=1" >> /etc/tdk_platform.properties