aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/mt7621/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ramips/mt7621/base-files')
-rwxr-xr-xtarget/linux/ramips/mt7621/base-files/etc/board.d/01_leds7
-rwxr-xr-xtarget/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_mac18
-rwxr-xr-xtarget/linux/ramips/mt7621/base-files/etc/init.d/bootcount3
-rwxr-xr-xtarget/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh1
5 files changed, 34 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 cc114da4ee..e4052441a0 100755
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
@@ -34,6 +34,13 @@ gnubee,gb-pc2)
ucidef_set_led_netdev "lan1" "lan1" "$boardname:green:lan1" "lan1"
ucidef_set_led_netdev "lan2" "lan2" "$boardname:green:lan2" "lan2"
;;
+linksys,ea7500-v2)
+ ucidef_set_led_netdev "lan1" "lan1 link" "$boardname:green:lan1" "lan1" "link"
+ ucidef_set_led_netdev "lan2" "lan2 link" "$boardname:green:lan2" "lan2" "link"
+ ucidef_set_led_netdev "lan3" "lan3 link" "$boardname:green:lan3" "lan3" "link"
+ ucidef_set_led_netdev "lan4" "lan4 link" "$boardname:green:lan4" "lan4" "link"
+ ucidef_set_led_netdev "wan" "wan link" "$boardname:green:wan" "wan" "link"
+ ;;
mikrotik,routerboard-m11g)
ucidef_set_rssimon "wlan0" "200000" "1"
ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:green:rssi0" "wlan0" "1" "100"
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 34be067085..7734c02d37 100755
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -91,6 +91,11 @@ ramips_setup_macs()
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
label_mac=$wan_mac
;;
+ linksys,ea7500-v2)
+ lan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
+ wan_mac=$lan_mac
+ label_mac=$lan_mac
+ ;;
mikrotik,routerboard-750gr3|\
mikrotik,routerboard-m11g|\
mikrotik,routerboard-m33g)
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
new file mode 100644
index 0000000000..e05078648b
--- /dev/null
+++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -0,0 +1,18 @@
+[ "$ACTION" == "add" ] || exit 0
+
+PHYNBR=${DEVPATH##*/phy}
+
+[ -n $PHYNBR ] || exit 0
+
+. /lib/functions.sh
+. /lib/functions/system.sh
+
+board=$(board_name)
+
+case "$board" in
+ linksys,ea7500-v2)
+ hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
+ [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress
+ [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
+ ;;
+esac
diff --git a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount
index b4d72abafc..e92912bbcc 100755
--- a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount
+++ b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount
@@ -8,6 +8,9 @@ boot() {
[ -n "$(fw_printenv bootcount bootchanged 2>/dev/null)" ] &&\
echo -e "bootcount\nbootchanged\n" | /usr/sbin/fw_setenv -s -
;;
+ linksys,ea7500-v2)
+ mtd resetbc s_env || true
+ ;;
samknows,whitebox-v8)
fw_setenv bootcount 0
;;
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 864c59c8e5..824c2dfbdb 100755
--- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
@@ -45,6 +45,7 @@ platform_do_upgrade() {
asus,rt-ac65p|\
asus,rt-ac85p|\
hiwifi,hc5962|\
+ linksys,ea7500-v2|\
netgear,r6220|\
netgear,r6260|\
netgear,r6350|\