aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/mt7621
diff options
context:
space:
mode:
authorMikhail Zhilkin <csharper2005@gmail.com>2023-04-22 06:58:01 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2023-04-29 22:34:51 +0200
commit15e21d373b3ad6ec17be76c48d5ad32266bc4fe7 (patch)
tree5d6bb99862a6215b84fdd81a81aebc99ee097c98 /target/linux/ramips/mt7621
parentc31319b66934f554f6c337b4cfa888b1fb74faa4 (diff)
downloadupstream-15e21d373b3ad6ec17be76c48d5ad32266bc4fe7.tar.gz
upstream-15e21d373b3ad6ec17be76c48d5ad32266bc4fe7.tar.bz2
upstream-15e21d373b3ad6ec17be76c48d5ad32266bc4fe7.zip
ramips: TP-Link EC330-G5u v1: switch to mac-address-ascii
The TP-Link EC330-G5u v1 router has MAC address that stored in factory mtd in ascii format. This commit makes the router use of "mac-address-ascii" in dts. After the change: 1. All MAC addresses are explicitly assigned in dts (the workarounds in network scripts are no longer needed); 2. gmac0 (eth0) MAC address is no longer random. Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Diffstat (limited to 'target/linux/ramips/mt7621')
-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
2 files changed, 0 insertions, 10 deletions
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 871d7fc7d9..a986e9bac9 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
@@ -245,11 +245,6 @@ 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 9db115fcae..746a88bd12 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
@@ -161,11 +161,6 @@ 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