developer | 84bc359 | 2022-10-31 15:53:09 +0800 | [diff] [blame] | 1 | devidx=0 |
| 2 | phyidx=0 |
| 3 | |
| 4 | for _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)) |
| 32 | done |
| 33 | |
| 34 | |
| 35 | echo "DEFAULT_CHANNEL_BANDWIDTH=20MHz,20MHz" >> /etc/tdk_platform.properties |
| 36 | echo "RADIO_MODES_2G=n:11NGHT40MINUS:4,n:11NGHT40MINUS:8,ax:11AXHE40MINUS:32,ax:11AXHE40MINUS:0" >> /etc/tdk_platform.properties |
| 37 | echo "RADIO_MODES_5G=ac:11ACVHT80:16,n:11NAHT40MINUS:8,ax:11AXHE80:32,ax:11AXHE80:0" >> /etc/tdk_platform.properties |
| 38 | echo "getAp0DTIMInterval=1" >> /etc/tdk_platform.properties |
| 39 | echo "getAp1DTIMInterval=1" >> /etc/tdk_platform.properties |