aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/mt7621/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ramips/mt7621/base-files')
-rw-r--r--target/linux/ramips/mt7621/base-files/etc/board.d/01_leds5
-rw-r--r--target/linux/ramips/mt7621/base-files/etc/board.d/02_network5
-rw-r--r--target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac5
-rwxr-xr-xtarget/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh1
4 files changed, 16 insertions, 0 deletions
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
index 985eefb860..0f0d8009ca 100644
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
@@ -153,6 +153,11 @@ tplink,archer-c6u-v1)
ucidef_set_led_netdev "lan" "LAN" "green:lan" "br-lan"
ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan"
;;
+tplink,ec330-g5u-v1)
+ ucidef_set_led_netdev "lan" "Ethernet" "blue:ethernet" "br-lan" "link tx rx"
+ ucidef_set_led_netdev "wan" "Internet" "blue:internet" "wan" "link tx rx"
+ ucidef_set_led_netdev "wan-off" "Internet-off" "amber:internet" "wan" "link"
+ ;;
tplink,re350-v1)
ucidef_set_led_netdev "wifi2g" "Wifi 2.4G" "blue:wifi2G" "wlan0"
ucidef_set_led_netdev "wifi5g" "Wifi 5G" "blue:wifi5G" "wlan1"
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index 027457d39c..c5196c1448 100644
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -231,6 +231,11 @@ ramips_setup_macs()
label_mac=$(cat "/sys/firmware/mikrotik/hard_config/mac_base")
lan_mac=$label_mac
;;
+ tplink,ec330-g5u-v1)
+ label_mac="$(mtd_get_mac_text factory 0x165)"
+ lan_mac=$label_mac
+ wan_mac=$(macaddr_add $label_mac 1)
+ ;;
tplink,er605-v2)
CI_UBIPART="firmware"
label_mac=$(mtd_get_mac_uci_config_ubi "tddp")
diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index 161bd942db..079f07956d 100644
--- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -131,6 +131,11 @@ case "$board" in
hw_mac_addr="$(mtd_get_mac_binary product-info 0x8)"
macaddr_add "$hw_mac_addr" "$PHYNBR" > "/sys${DEVPATH}/macaddress"
;;
+ tplink,ec330-g5u-v1)
+ hw_mac_addr="$(mtd_get_mac_text factory 0x165)"
+ [ "$PHYNBR" = "0" ] && echo -n $hw_mac_addr > /sys${DEVPATH}/macaddress
+ [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
+ ;;
yuncore,ax820)
[ "$PHYNBR" = "1" ] && \
macaddr_setbit_la "$(mtd_get_mac_binary Factory 0xe000)" > /sys${DEVPATH}/macaddress
diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
index 53ff9c016c..830061231d 100755
--- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
@@ -102,6 +102,7 @@ platform_do_upgrade() {
sercomm,na502|\
sercomm,na502s|\
sim,simax1800t|\
+ tplink,ec330-g5u-v1|\
xiaomi,mi-router-3g|\
xiaomi,mi-router-3-pro|\
xiaomi,mi-router-4|\