]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
treewide: linksys: use nvmem MAC for hw_mac_addr main master 22092/head
authorRosen Penev <rosenp@gmail.com>
Thu, 19 Feb 2026 01:57:22 +0000 (17:57 -0800)
committerRobert Marko <robimarko@gmail.com>
Mon, 23 Feb 2026 09:56:00 +0000 (10:56 +0100)
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 <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22092
Signed-off-by: Robert Marko <robimarko@gmail.com>
20 files changed:
target/linux/ipq40xx/base-files/etc/board.d/02_network
target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
target/linux/ipq40xx/config-6.12
target/linux/ipq40xx/dts/qcom-ipq4019-ea8300.dts
target/linux/ipq40xx/dts/qcom-ipq4019-mr6350.dts
target/linux/ipq40xx/dts/qcom-ipq4019-mr8300.dts
target/linux/ipq40xx/dts/qcom-ipq4019-whw03.dts
target/linux/ipq40xx/dts/qcom-ipq4019-whw03.dtsi
target/linux/ipq40xx/dts/qcom-ipq4019-xx8300.dtsi
target/linux/ipq806x/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
target/linux/ipq806x/dts/qcom-ipq8064-eax500.dtsi
target/linux/mediatek/dts/mt7629-linksys-ea7500-v3.dts
target/linux/mediatek/mt7629/base-files/etc/board.d/02_network
target/linux/mediatek/mt7629/config-6.12
target/linux/ramips/dts/mt7621_linksys_e5600.dts
target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi
target/linux/ramips/mt7621/base-files/etc/board.d/02_network
target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
target/linux/ramips/mt7621/config-6.12

index de93b590340c9049e6088527168ebf571291ce6b..6613f4fb417499fb3520d196d94783a45b9bfced 100644 (file)
@@ -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|\
index 7b959c54a0d2f1d7abf05fe32247f14f893f6e70..921e0aa3a0623f39eeba1210f22c9102e4f12640 100644 (file)
@@ -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|\
index 3165c767bba005e051f9021a9671dce85a80381c..3ba21353483390ea1ce0a9ff913448140becad3f 100644 (file)
@@ -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)
index 58ae6b7799b689d564dccaef9eefe7a409ee30d1..dd0dc77ccb5dac7b2932fd0a32c9f949203a3e54 100644 (file)
@@ -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
index e08dc49d6ae968828e0ea19cdd5f367ac6115e63..1b9276ede2f8d6d8e6f563ad853bffe4b0419e23 100644 (file)
        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";
 };
index d936e720e4984175e1693079f52f9fb273138195..6c84868adc02f1cf2d729b7a2134c42a73ae31ae 100644 (file)
@@ -18,7 +18,7 @@
        // Top panel LEDs, above Linksys logo
        leds {
                compatible = "gpio-leds";
-               
+
                led_blue: led-blue {
                        color = <LED_COLOR_ID_BLUE>;
                        function = LED_FUNCTION_STATUS;
@@ -64,7 +64,7 @@
        reset-delay-us = <2000>;
        reset-post-delay-us = <5000>;
 };
-       
+
 &tlmm {
        status = "okay";
 
index 0d10a9c6d79adb2ce7fb4ea7b430de18024691a6..ab9a05c7887d9b27fb3e6b03cbef15053976e036 100644 (file)
        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";
 };
index 6187d125bf3cba65c4372f2b8438dd9e915e684d..64019e81d5f9bbeec6becbde0762c3f3321872ae 100644 (file)
        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 {
                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";
        };
 };
index 3aeb70c844652a7fbea5fff62e4882ba385a3992..d693d17d841f2aa789836fa8b04abc9daa353f2e 100644 (file)
@@ -8,7 +8,6 @@
 
 / {
        aliases {
-               ethernet0 = &gmac;
                led-boot = &led_blue;
                led-failsafe = &led_red;
                led-running = &led_blue;
index 2bcffa7b4695ce62e56fe2f2ee89cac8a85e63e7..04cbadf271c688cc34bd7b1d30ca7b1936eb866b 100644 (file)
                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";
                                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 {
                                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 {
 
 &gmac {
        status = "okay";
+
+       nvmem-cells = <&hw_mac_addr 1>;
+       nvmem-cell-names = "mac-address";
 };
 
 &switch {
 
 &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";
+       };
 };
index 637439457ce1ff9449ec05e21e71596e5e07437a..0d267ed5a13f20ad8e7ce49ba454ad0d640b367e 100644 (file)
@@ -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/}
index cdd103706769a696cc7c76e2995c4f64c09bd06f..36512c72c2866ea93cc08f1e7bb236e039b6a632 100644 (file)
@@ -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";
        };
 };
 
index 7c9b9a3d37d5d01fc490cdb6984ee1a693029afb..50e159294f35c00afe2fe7de9c6b3836901c062d 100644 (file)
@@ -14,6 +14,7 @@
                led-failsafe = &led_power;
                led-running = &led_power;
                led-upgrade = &led_power;
+               label-mac-device = &gmac0;
                serial0 = &uart0;
        };
 
                                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 {
        };
 };
 
+&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 = <&reg_3p3v>;
        vbus-supply = <&reg_5v>;
index 875ed34dcc61c01d8c90604bfe43cd33dfac8989..86cf63f252719e3f57fed8e8fc4f93369b34c5ef 100644 (file)
@@ -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
index 57d3073e1badc6b6bead4cd208e0f5bf163af8d0..f54814b8d270cb7555879f114c6f62ff1896dd31 100644 (file)
@@ -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
index 6acc50bbebbc380d797f51e0324dd0153c6759e1..7a3c5c22aff282db312a6475ea39a6a88be8d058 100644 (file)
@@ -15,6 +15,7 @@
                led-failsafe = &led_power;
                led-running = &led_power;
                led-upgrade = &led_power;
+               label-mac-device = &gmac0;
        };
 
        chosen {
                        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 {
        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";
        };
 };
 
        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 = <&ethphy4>;
+
+       nvmem-cells = <&hw_mac_addr 0>;
+       nvmem-cell-names = "mac-address";
 };
 
 &ethphy4 {
index 07aa44c9fb967e9eb6518dc43e9faeb794214a3a..4db8cccdbf35061f31d91e5899c97380ff847824 100644 (file)
@@ -12,6 +12,7 @@
                led-failsafe = &led_power;
                led-running = &led_power;
                led-upgrade = &led_power;
+               label-mac-device = &gmac0;
        };
 
        chosen {
                        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 {
        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";
        };
 };
 
        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 = <&ethphy0>;
+
+       nvmem-cells = <&hw_mac_addr 0>;
+       nvmem-cell-names = "mac-address";
 };
 
 &ethphy0 {
index 091c8d2813a47697a01b75e297a1e23b0d5353d4..2d62f9f1284210f5b702503410829be0ed9e2032 100644 (file)
@@ -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)
index 19e76b146c6eedd6581fe274e288f28aefea69d7..a7fae4f8de013a63a013e8760ac11862d79b5d4c 100644 (file)
@@ -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)
index d7d8ce07f5b69fc64274754622c53e3c362cbaa7..dac61e6ba184a04c05c8686915e1dbd15b2f2476 100644 (file)
@@ -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