From: Rosen Penev Date: Thu, 19 Feb 2026 01:57:22 +0000 (-0800) Subject: treewide: linksys: use nvmem MAC for hw_mac_addr X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee5999cf78d8ce4d0a3800b785bca445291ee30c;p=thirdparty%2Fopenwrt.git treewide: linksys: use nvmem MAC for hw_mac_addr Given that Linksys is the same brand and probably use the same OEM, it stands to reason all devinfo hw_mac_addr implementations are the same. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/22092 Signed-off-by: Robert Marko --- diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index de93b590340..6613f4fb417 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -222,17 +222,6 @@ ipq40xx_setup_macs() wan_mac=$(get_mac_label) lan_mac=$(macaddr_add "$wan_mac" 1) ;; - linksys,ea6350v3|\ - linksys,ea8300|\ - linksys,mr6350|\ - linksys,mr8300) - wan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) - lan_mac=$(macaddr_add "$wan_mac" 1) - ;; - linksys,whw03) - wan_mac=$(mmc_get_mac_ascii devinfo hw_mac_addr) - lan_mac="$wan_mac" - ;; mikrotik,cap-ac|\ mikrotik,hap-ac2|\ mikrotik,hap-ac3|\ diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 7b959c54a0d..921e0aa3a06 100644 --- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -20,17 +20,6 @@ case "$FIRMWARE" in /usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \ /usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x212 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") ;; - linksys,ea8300|\ - linksys,mr6350|\ - linksys,mr8300) - caldata_extract "ART" 0x9000 0x2f20 - # OEM assigns 4 sequential MACs - ath10k_patch_mac $(macaddr_setbit_la $(macaddr_add "$(cat /sys/class/net/eth0/address)" 4)) - ;; - linksys,whw03) - caldata_extract_mmc "0:ART" 0x9000 0x2f20 - ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 3) - ;; netgear,rbr40|\ netgear,rbs40|\ netgear,rbr50|\ @@ -88,16 +77,6 @@ case "$FIRMWARE" in caldata_extract "ART" 0x1000 0x2f20 ath10k_patch_mac $(mtd_get_mac_ascii CFG1 RADIOADDR0) ;; - linksys,ea8300|\ - linksys,mr6350|\ - linksys,mr8300) - caldata_extract "ART" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2) - ;; - linksys,whw03) - caldata_extract_mmc "0:ART" 0x1000 0x2f20 - ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 1) - ;; mikrotik,cap-ac|\ mikrotik,hap-ac2|\ mikrotik,hap-ac3|\ @@ -180,16 +159,6 @@ case "$FIRMWARE" in caldata_extract "ART" 0x5000 0x2f20 ath10k_patch_mac $(mtd_get_mac_ascii CFG1 RADIOADDR1) ;; - linksys,ea8300|\ - linksys,mr6350|\ - linksys,mr8300) - caldata_extract "ART" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 3) - ;; - linksys,whw03) - caldata_extract_mmc "0:ART" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2) - ;; mikrotik,cap-ac|\ mikrotik,hap-ac2|\ mikrotik,hap-ac3|\ diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh index 3165c767bba..3ba21353483 100644 --- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh +++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh @@ -19,19 +19,6 @@ preinit_set_mac_address() { extreme-networks,ws-ap391x) ip link set dev eth0 address $(mtd_get_mac_ascii CFG1 ethaddr) ;; - linksys,ea8300|\ - linksys,mr6350|\ - linksys,mr8300) - base_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) - ip link set dev lan1 address $(macaddr_add "$base_mac" 1) - ip link set dev eth0 address $(macaddr_setbit "$base_mac" 7) - ;; - linksys,whw03) - base_mac=$(mmc_get_mac_ascii devinfo hw_mac_addr) - ip link set dev eth0 address "$base_mac" - ip link set dev lan address "$base_mac" - ip link set dev wan address "$base_mac" - ;; mikrotik,wap-ac|\ mikrotik,wap-ac-lte|\ mikrotik,wap-r-ac) diff --git a/target/linux/ipq40xx/config-6.12 b/target/linux/ipq40xx/config-6.12 index 58ae6b7799b..dd0dc77ccb5 100644 --- a/target/linux/ipq40xx/config-6.12 +++ b/target/linux/ipq40xx/config-6.12 @@ -331,6 +331,7 @@ CONFIG_NO_HZ_IDLE=y CONFIG_NR_CPUS=4 CONFIG_NVMEM=y CONFIG_NVMEM_LAYOUTS=y +CONFIG_NVMEM_LAYOUT_ASCII_ENV=y CONFIG_NVMEM_LAYOUT_U_BOOT_ENV=y CONFIG_NVMEM_QCOM_QFPROM=y # CONFIG_NVMEM_QCOM_SEC_QFPROM is not set diff --git a/target/linux/ipq40xx/dts/qcom-ipq4019-ea8300.dts b/target/linux/ipq40xx/dts/qcom-ipq4019-ea8300.dts index e08dc49d6ae..1b9276ede2f 100644 --- a/target/linux/ipq40xx/dts/qcom-ipq4019-ea8300.dts +++ b/target/linux/ipq40xx/dts/qcom-ipq4019-ea8300.dts @@ -93,11 +93,8 @@ qcom,ath10k-calibration-variant = "linksys-ea8300-fcc"; }; -&pcie_bridge0 { - wifi@0,0 { - compatible = "qcom,ath10k"; - reg = <0x00010000 0 0 0 0>; - ieee80211-freq-limit = <5490000 5835000>; - qcom,ath10k-calibration-variant = "linksys-ea8300-fcc"; - }; +&wifi2 { + status = "okay"; + ieee80211-freq-limit = <5490000 5835000>; + qcom,ath10k-calibration-variant = "linksys-ea8300-fcc"; }; diff --git a/target/linux/ipq40xx/dts/qcom-ipq4019-mr6350.dts b/target/linux/ipq40xx/dts/qcom-ipq4019-mr6350.dts index d936e720e49..6c84868adc0 100644 --- a/target/linux/ipq40xx/dts/qcom-ipq4019-mr6350.dts +++ b/target/linux/ipq40xx/dts/qcom-ipq4019-mr6350.dts @@ -18,7 +18,7 @@ // Top panel LEDs, above Linksys logo leds { compatible = "gpio-leds"; - + led_blue: led-blue { color = ; function = LED_FUNCTION_STATUS; @@ -64,7 +64,7 @@ reset-delay-us = <2000>; reset-post-delay-us = <5000>; }; - + &tlmm { status = "okay"; diff --git a/target/linux/ipq40xx/dts/qcom-ipq4019-mr8300.dts b/target/linux/ipq40xx/dts/qcom-ipq4019-mr8300.dts index 0d10a9c6d79..ab9a05c7887 100644 --- a/target/linux/ipq40xx/dts/qcom-ipq4019-mr8300.dts +++ b/target/linux/ipq40xx/dts/qcom-ipq4019-mr8300.dts @@ -79,11 +79,8 @@ qcom,ath10k-calibration-variant = "linksys-mr8300-v0-fcc"; }; -&pcie_bridge0 { - wifi@0,0 { - compatible = "qcom,ath10k"; - reg = <0x00010000 0 0 0 0>; - ieee80211-freq-limit = <5490000 5835000>; - qcom,ath10k-calibration-variant = "linksys-mr8300-v0-fcc"; - }; +&wifi2 { + status = "okay"; + ieee80211-freq-limit = <5490000 5835000>; + qcom,ath10k-calibration-variant = "linksys-mr8300-v0-fcc"; }; diff --git a/target/linux/ipq40xx/dts/qcom-ipq4019-whw03.dts b/target/linux/ipq40xx/dts/qcom-ipq4019-whw03.dts index 6187d125bf3..64019e81d5f 100644 --- a/target/linux/ipq40xx/dts/qcom-ipq4019-whw03.dts +++ b/target/linux/ipq40xx/dts/qcom-ipq4019-whw03.dts @@ -54,14 +54,72 @@ sd-ldo-gpios = <&tlmm 33 GPIO_ACTIVE_LOW>; vqmmc-supply = <&vqmmc>; + + card@0 { + compatible = "mmc-card"; + reg = <0>; + + block { + compatible = "block-device"; + partitions { + block-partition-art { + partname = "art"; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + precal_art_1000: pre-calibration@1000 { + reg = <0x1000 0x2f20>; + }; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; + + precal_art_9000: pre-calibration@9000 { + reg = <0x9000 0x2f20>; + }; + }; + }; + + block-partition-devinfo { + partname = "devinfo"; + + nvmem-layout { + compatible = "ascii-eq-delim-env"; + #address-cells = <1>; + #size-cells = <1>; + + hw_mac_addr: hw_mac_addr { + compatible = "mac-base"; + #nvmem-cell-cells = <1>; + }; + }; + }; + }; + }; + }; +}; + +&gmac { + nvmem-cells = <&hw_mac_addr 0>; + nvmem-cell-names = "mac-address"; }; &wifi0 { qcom,ath10k-calibration-variant = "linksys-whw03"; + + nvmem-cells = <&precal_art_1000>, <&hw_mac_addr 1>; + nvmem-cell-names = "pre-calibration", "mac-address"; }; &wifi1 { qcom,ath10k-calibration-variant = "linksys-whw03"; + + nvmem-cells = <&precal_art_5000>, <&hw_mac_addr 2>; + nvmem-cell-names = "pre-calibration", "mac-address"; }; &pcie_bridge0 { @@ -70,5 +128,7 @@ reg = <0x00010000 0 0 0 0>; ieee80211-freq-limit = <5490000 5835000>; qcom,ath10k-calibration-variant = "linksys-whw03"; + nvmem-cells = <&precal_art_9000>, <&hw_mac_addr 3>; + nvmem-cell-names = "pre-calibration", "mac-address"; }; }; diff --git a/target/linux/ipq40xx/dts/qcom-ipq4019-whw03.dtsi b/target/linux/ipq40xx/dts/qcom-ipq4019-whw03.dtsi index 3aeb70c8446..d693d17d841 100644 --- a/target/linux/ipq40xx/dts/qcom-ipq4019-whw03.dtsi +++ b/target/linux/ipq40xx/dts/qcom-ipq4019-whw03.dtsi @@ -8,7 +8,6 @@ / { aliases { - ethernet0 = &gmac; led-boot = &led_blue; led-failsafe = &led_red; led-running = &led_blue; diff --git a/target/linux/ipq40xx/dts/qcom-ipq4019-xx8300.dtsi b/target/linux/ipq40xx/dts/qcom-ipq4019-xx8300.dtsi index 2bcffa7b469..04cbadf271c 100644 --- a/target/linux/ipq40xx/dts/qcom-ipq4019-xx8300.dtsi +++ b/target/linux/ipq40xx/dts/qcom-ipq4019-xx8300.dtsi @@ -25,12 +25,6 @@ bootargs-append = " root=/dev/ubiblock0_0 rootfstype=squashfs ro"; }; - - aliases { - // TODO: Verify if the ethernet0 alias is needed - ethernet0 = &gmac; - }; - soc { tcsr@1949000 { compatible = "qcom,tcsr"; @@ -141,6 +135,24 @@ label = "ART"; reg = <0x400000 0x80000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + precal_art_1000: pre-calibration@1000 { + reg = <0x1000 0x2f20>; + }; + + precal_art_5000: pre-calibration@5000 { + reg = <0x5000 0x2f20>; + }; + + precal_art_9000: pre-calibration@9000 { + reg = <0x9000 0x2f20>; + }; + }; }; partition@480000 { @@ -165,6 +177,17 @@ label = "devinfo"; reg = <0x740000 0x40000>; read-only; + + nvmem-layout { + compatible = "ascii-eq-delim-env"; + #address-cells = <1>; + #size-cells = <1>; + + hw_mac_addr: hw_mac_addr { + compatible = "mac-base"; + #nvmem-cell-cells = <1>; + }; + }; }; partition@780000 { @@ -291,6 +314,9 @@ &gmac { status = "okay"; + + nvmem-cells = <&hw_mac_addr 1>; + nvmem-cell-names = "mac-address"; }; &switch { @@ -315,4 +341,28 @@ &swport5 { status = "okay"; + + nvmem-cells = <&hw_mac_addr 0>; + nvmem-cell-names = "mac-address"; +}; + +&wifi0 { + nvmem-cells = <&precal_art_1000>, <&hw_mac_addr 2>; + nvmem-cell-names = "pre-calibration", "mac-address"; +}; + +&wifi1 { + nvmem-cells = <&precal_art_5000>, <&hw_mac_addr 3>; + nvmem-cell-names = "pre-calibration", "mac-address"; +}; + +&pcie_bridge0 { + wifi2: wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x00010000 0 0 0 0>; + nvmem-cells = <&precal_art_9000>, <&hw_mac_addr 4>; + nvmem-cell-names = "pre-calibration", "mac-address"; + + status = "disabled"; + }; }; diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index 637439457ce..0d267ed5a13 100644 --- a/target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -17,10 +17,6 @@ case "$board" in [ "$PHYNBR" = "0" ] && echo $(mtd_get_mac_ascii CFG1 RADIOADDR0) > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && echo $(mtd_get_mac_ascii CFG1 RADIOADDR1) > /sys${DEVPATH}/macaddress ;; - linksys,ea7500-v1|\ - linksys,ea8500) - macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) $(($PHYNBR + 1)) > /sys${DEVPATH}/macaddress - ;; esac OPATH=${DEVPATH##/devices/platform/} diff --git a/target/linux/ipq806x/dts/qcom-ipq8064-eax500.dtsi b/target/linux/ipq806x/dts/qcom-ipq8064-eax500.dtsi index cdd10370676..36512c72c28 100644 --- a/target/linux/ipq806x/dts/qcom-ipq8064-eax500.dtsi +++ b/target/linux/ipq806x/dts/qcom-ipq8064-eax500.dtsi @@ -58,8 +58,8 @@ wifi@0,0 { compatible = "qcom,ath10k"; reg = <0x10000 0 0 0 0>; - nvmem-cells = <&precal_art_1000>; - nvmem-cell-names = "pre-calibration"; + nvmem-cells = <&precal_art_1000>, <&hw_mac_addr 1>; + nvmem-cell-names = "pre-calibration", "mac-address"; }; }; @@ -71,8 +71,8 @@ wifi@0,0 { compatible = "qcom,ath10k"; reg = <0x10000 0 0 0 0>; - nvmem-cells = <&precal_art_5000>; - nvmem-cell-names = "pre-calibration"; + nvmem-cells = <&precal_art_5000>, <&hw_mac_addr 2>; + nvmem-cell-names = "pre-calibration", "mac-address"; }; }; diff --git a/target/linux/mediatek/dts/mt7629-linksys-ea7500-v3.dts b/target/linux/mediatek/dts/mt7629-linksys-ea7500-v3.dts index 7c9b9a3d37d..50e159294f3 100644 --- a/target/linux/mediatek/dts/mt7629-linksys-ea7500-v3.dts +++ b/target/linux/mediatek/dts/mt7629-linksys-ea7500-v3.dts @@ -14,6 +14,7 @@ led-failsafe = &led_power; led-running = &led_power; led-upgrade = &led_power; + label-mac-device = &gmac0; serial0 = &uart0; }; @@ -212,6 +213,18 @@ label = "devinfo"; reg = <0x51c0000 0x40000>; read-only; + + nvmem-layout { + compatible = "ascii-eq-delim-env"; + #address-cells = <1>; + #size-cells = <1>; + + hw_mac_addr: hw_mac_addr { + compatible = "mac-base"; + + #nvmem-cell-cells = <1>; + }; + }; }; partition@5200000 { @@ -272,6 +285,16 @@ }; }; +&gmac0 { + nvmem-cells = <&hw_mac_addr 0>; + nvmem-cell-names = "mac-address"; +}; + +&gmac1 { + nvmem-cells = <&hw_mac_addr 0>; + nvmem-cell-names = "mac-address"; +}; + &ssusb { vusb33-supply = <®_3p3v>; vbus-supply = <®_5v>; diff --git a/target/linux/mediatek/mt7629/base-files/etc/board.d/02_network b/target/linux/mediatek/mt7629/base-files/etc/board.d/02_network index 875ed34dcc6..86cf63f2527 100644 --- a/target/linux/mediatek/mt7629/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/mt7629/base-files/etc/board.d/02_network @@ -29,11 +29,6 @@ mediatek_setup_macs() local board="$1" case $board in - linksys,ea7500-v3) - lan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) - wan_mac=$lan_mac - label_mac=$lan_mac - ;; netgear,ex6250-v2) lan_mac=$(mtd_get_mac_ascii Config mac) label_mac=$lan_mac diff --git a/target/linux/mediatek/mt7629/config-6.12 b/target/linux/mediatek/mt7629/config-6.12 index 57d3073e1ba..f54814b8d27 100644 --- a/target/linux/mediatek/mt7629/config-6.12 +++ b/target/linux/mediatek/mt7629/config-6.12 @@ -245,6 +245,7 @@ CONFIG_NO_HZ_IDLE=y CONFIG_NR_CPUS=2 CONFIG_NVMEM=y CONFIG_NVMEM_LAYOUTS=y +CONFIG_NVMEM_LAYOUT_ASCII_ENV=y # CONFIG_NVMEM_LAYOUT_ADTRAN is not set # CONFIG_NVMEM_MTK_EFUSE is not set CONFIG_NVMEM_SYSFS=y diff --git a/target/linux/ramips/dts/mt7621_linksys_e5600.dts b/target/linux/ramips/dts/mt7621_linksys_e5600.dts index 6acc50bbebb..7a3c5c22aff 100644 --- a/target/linux/ramips/dts/mt7621_linksys_e5600.dts +++ b/target/linux/ramips/dts/mt7621_linksys_e5600.dts @@ -15,6 +15,7 @@ led-failsafe = &led_power; led-running = &led_power; led-upgrade = &led_power; + label-mac-device = &gmac0; }; chosen { @@ -116,6 +117,18 @@ label = "devinfo"; reg = <0x140000 0x40000>; read-only; + + nvmem-layout { + compatible = "ascii-eq-delim-env"; + #address-cells = <1>; + #size-cells = <1>; + + hw_mac_addr: hw_mac_addr { + compatible = "mac-base"; + + #nvmem-cell-cells = <1>; + }; + }; }; partition@180000 { @@ -155,8 +168,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; + nvmem-cells = <&eeprom_factory_0>, <&hw_mac_addr 1>; + nvmem-cell-names = "eeprom", "mac-address"; }; }; @@ -164,15 +177,23 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_8000>; - nvmem-cell-names = "eeprom"; + nvmem-cells = <&eeprom_factory_8000>, <&hw_mac_addr 2>; + nvmem-cell-names = "eeprom", "mac-address"; }; }; +&gmac0 { + nvmem-cells = <&hw_mac_addr 0>; + nvmem-cell-names = "mac-address"; +}; + &gmac1 { status = "okay"; label = "wan"; phy-handle = <ðphy4>; + + nvmem-cells = <&hw_mac_addr 0>; + nvmem-cell-names = "mac-address"; }; ðphy4 { diff --git a/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi index 07aa44c9fb9..4db8cccdbf3 100644 --- a/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi +++ b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi @@ -12,6 +12,7 @@ led-failsafe = &led_power; led-running = &led_power; led-upgrade = &led_power; + label-mac-device = &gmac0; }; chosen { @@ -130,6 +131,18 @@ label = "devinfo"; reg = <0x140000 0x40000>; read-only; + + nvmem-layout { + compatible = "ascii-eq-delim-env"; + #address-cells = <1>; + #size-cells = <1>; + + hw_mac_addr: hw_mac_addr { + compatible = "mac-base"; + + #nvmem-cell-cells = <1>; + }; + }; }; partition@180000 { @@ -183,8 +196,8 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; + nvmem-cells = <&eeprom_factory_0>, <&hw_mac_addr 1>; + nvmem-cell-names = "eeprom", "mac-address"; }; }; @@ -192,15 +205,23 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_8000>; - nvmem-cell-names = "eeprom"; + nvmem-cells = <&eeprom_factory_8000>, <&hw_mac_addr 2>; + nvmem-cell-names = "eeprom", "mac-address"; }; }; +&gmac0 { + nvmem-cells = <&hw_mac_addr 0>; + nvmem-cell-names = "mac-address"; +}; + &gmac1 { status = "okay"; label = "wan"; phy-handle = <ðphy0>; + + nvmem-cells = <&hw_mac_addr 0>; + nvmem-cell-names = "mac-address"; }; ðphy0 { 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 091c8d2813a..2d62f9f1284 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 @@ -293,17 +293,6 @@ ramips_setup_macs() wan_mac=$lan_mac label_mac=$lan_mac ;; - linksys,e5600|\ - linksys,ea6350-v4|\ - linksys,ea7300-v1|\ - linksys,ea7300-v2|\ - linksys,ea7500-v2|\ - linksys,ea8100-v1|\ - linksys,ea8100-v2) - lan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) - wan_mac=$lan_mac - label_mac=$lan_mac - ;; belkin,rt1800|\ linksys,e7350) lan_mac=$(mtd_get_mac_ascii Config lan_hwaddr) 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 19e76b146c6..a7fae4f8de0 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 @@ -117,17 +117,6 @@ case "$board" in [ "$PHYNBR" = "1" ] && \ macaddr_setbit_la "$(mtd_get_mac_binary rf-eeprom 0x4)" > /sys${DEVPATH}/macaddress ;; - linksys,e5600|\ - linksys,ea6350-v4|\ - linksys,ea7300-v1|\ - linksys,ea7300-v2|\ - linksys,ea7500-v2|\ - linksys,ea8100-v1|\ - linksys,ea8100-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 - ;; belkin,rt1800|\ linksys,e7350) hw_mac_addr=$(mtd_get_mac_ascii Config wan_hwaddr) diff --git a/target/linux/ramips/mt7621/config-6.12 b/target/linux/ramips/mt7621/config-6.12 index d7d8ce07f5b..dac61e6ba18 100644 --- a/target/linux/ramips/mt7621/config-6.12 +++ b/target/linux/ramips/mt7621/config-6.12 @@ -200,6 +200,7 @@ CONFIG_NO_HZ_IDLE=y CONFIG_NR_CPUS=4 CONFIG_NVMEM=y CONFIG_NVMEM_LAYOUTS=y +CONFIG_NVMEM_LAYOUT_ASCII_ENV=y CONFIG_NVMEM_LAYOUT_MIKROTIK=y CONFIG_NVMEM_LAYOUT_U_BOOT_ENV=y CONFIG_OF=y