From 9490e4bde10fb57cc39ff27f5c1c2cadb633782e Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Wed, 3 Nov 2021 18:47:02 +0800 Subject: [PATCH] update 4019 --- .../ipq40xx/base-files/etc/board.d/01_leds | 12 ++++++-- .../ipq40xx/base-files/etc/board.d/02_network | 30 +++++++++++++++---- .../base-files/etc/board.d/03_gpio_switches | 3 +- 3 files changed, 37 insertions(+), 8 deletions(-) mode change 100755 => 100644 root/target/linux/ipq40xx/base-files/etc/board.d/01_leds mode change 100755 => 100644 root/target/linux/ipq40xx/base-files/etc/board.d/02_network mode change 100755 => 100644 root/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches diff --git a/root/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/root/target/linux/ipq40xx/base-files/etc/board.d/01_leds old mode 100755 new mode 100644 index a2a69eae..a615963c --- a/root/target/linux/ipq40xx/base-files/etc/board.d/01_leds +++ b/root/target/linux/ipq40xx/base-files/etc/board.d/01_leds @@ -45,12 +45,20 @@ engenius,ens620ext) ucidef_set_led_netdev "lan1" "LAN1" "green:lan1" "eth0" ucidef_set_led_netdev "lan2" "LAN2" "green:lan2" "eth1" ;; +mikrotik,sxtsq-5-ac) + ucidef_set_rssimon "wlan0" "200000" "1" + ucidef_set_led_rssi "rssilow" "rssilow" "green:rssilow" "wlan0" "1" "100" + ucidef_set_led_rssi "rssimediumlow" "rssimediumlow" "green:rssimediumlow" "wlan0" "21" "100" + ucidef_set_led_rssi "rssimedium" "rssimedium" "green:rssimedium" "wlan0" "41" "100" + ucidef_set_led_rssi "rssimediumhigh" "rssimediumhigh" "green:rssimediumhigh" "wlan0" "61" "100" + ucidef_set_led_rssi "rssihigh" "rssihigh" "green:rssihigh" "wlan0" "81" "100" + ;; mobipromo,cm520-79f) ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1" ucidef_set_led_switch "lan1" "LAN1" "blue:lan1" "switch0" "0x10" ucidef_set_led_switch "lan2" "LAN2" "blue:lan2" "switch0" "0x08" ;; -pangu,l1000) + pangu,l1000) ucidef_set_led_default "power" "POWER" "blue:power" "1" ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wlan2g" "phy0tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wlan5g" "phy1tpt" @@ -93,4 +101,4 @@ esac board_config_flush -exit 0 \ No newline at end of file +exit 0 diff --git a/root/target/linux/ipq40xx/base-files/etc/board.d/02_network b/root/target/linux/ipq40xx/base-files/etc/board.d/02_network old mode 100755 new mode 100644 index 0752f8be..89fc3448 --- a/root/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/root/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -17,6 +17,7 @@ ipq40xx_setup_interfaces() engenius,emr3500|\ engenius,ens620ext|\ luma,wrtq-329acn|\ + netgear,wac510|\ plasmacloud,pa1200|\ plasmacloud,pa2200) ucidef_set_interfaces_lan_wan "eth0" "eth1" @@ -28,6 +29,7 @@ ipq40xx_setup_interfaces() engenius,eap1300|\ engenius,emd1|\ meraki,mr33|\ + mikrotik,sxtsq-5-ac|\ netgear,ex6100v2|\ netgear,ex6150v2|\ zyxel,wre6606) @@ -47,6 +49,7 @@ ipq40xx_setup_interfaces() ucidef_set_interfaces_lan_wan "eth1" "eth0" ;; asus,rt-ac58u|\ + mikrotik,hap-ac2|\ zyxel,nbg6617) ucidef_set_interfaces_lan_wan "eth0" "eth1" ucidef_add_switch "switch0" \ @@ -54,7 +57,7 @@ ipq40xx_setup_interfaces() ;; avm,fritzbox-4040|\ linksys,ea6350v3|\ - pangu,l1000|\ + pangu,l1000|\ linksys,ea8300|\ linksys,mr8300) ucidef_set_interfaces_lan_wan "eth0" "eth1" @@ -63,7 +66,7 @@ ipq40xx_setup_interfaces() ;; avm,fritzbox-7530) ucidef_add_switch "switch0" \ - "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" + "0u@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" ;; avm,fritzrepeater-3000) ucidef_add_switch "switch0" \ @@ -104,13 +107,21 @@ ipq40xx_setup_interfaces() "0u@eth0" "3:lan:2" "4:lan:1" ucidef_set_interface_wan "eth1" ;; + netgear,rbr50|\ + netgear,rbs50|\ + netgear,srr60|\ + netgear,srs60) + ucidef_add_switch "switch0" \ + "0u@eth0" "2:lan" "3:lan" "4:lan" + ucidef_set_interface_wan "eth1" + ;; qxwlan,e2600ac-c1 |\ qxwlan,e2600ac-c2) ucidef_set_interfaces_lan_wan "eth0" "eth1" ucidef_add_switch "switch0" \ "0u@eth0" "3:lan" "4:lan" "0u@eth1" "5:wan" ;; - zbt,z4019) + zbt,z4019) ucidef_set_interfaces_lan_wan "eth0" "eth1" ucidef_add_switch "switch0" \ "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" @@ -164,7 +175,7 @@ ipq40xx_setup_macs() lan_mac=$(mtd_get_mac_ascii 0:APPSBLENV ethaddr) label_mac=$wan_mac ;; - zbt,z4019) + zbt,z4019) wan_mac=$(mtd_get_mac_binary "0:ART" 0x0) lan_mac=$(mtd_get_mac_binary "0:ART" 0x6) ;; @@ -179,6 +190,15 @@ ipq40xx_setup_macs() wan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) lan_mac=$(macaddr_add "$wan_mac" 1) ;; + mikrotik,hap-ac2) + wan_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base) + lan_mac=$(macaddr_add $wan_mac 1) + label_mac="$wan_mac" + ;; + mikrotik,sxtsq-5-ac) + lan_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base) + label_mac="$lan_mac" + ;; esac [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac @@ -192,4 +212,4 @@ ipq40xx_setup_interfaces $board ipq40xx_setup_macs $board board_config_flush -exit 0 \ No newline at end of file +exit 0 diff --git a/root/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches b/root/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches old mode 100755 new mode 100644 index a15f60b8..9029eb3a --- a/root/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches +++ b/root/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches @@ -1,3 +1,4 @@ + . /lib/functions/uci-defaults.sh board_config_update @@ -21,4 +22,4 @@ esac board_config_flush -exit 0 \ No newline at end of file +exit 0