]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ath79: wndap360: switch MACs to newer firmware 22895/head
authorRosen Penev <rosenp@gmail.com>
Sat, 11 Apr 2026 22:31:22 +0000 (15:31 -0700)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Wed, 10 Jun 2026 07:06:06 +0000 (09:06 +0200)
Original ar71xx has this setup:

define WNDAP360_WMAC0_MAC_OFFSET               0x120c
define WNDAP360_WMAC1_MAC_OFFSET               0x520c

/* Reusing wifi MAC with offset of 1 as eth0 MAC */
ath79_init_mac(ath79_eth0_data.mac_addr,
               art + WNDAP360_WMAC0_MAC_OFFSET, 1);

ap94_pci_init(art + WNDAP360_CALDATA0_OFFSET,
              art + WNDAP360_WMAC0_MAC_OFFSET,
              art + WNDAP360_CALDATA1_OFFSET,
              art + WNDAP360_WMAC1_MAC_OFFSET);

The ath79 port made a questionable change for eth0 being just art with
no offset. That MAC ends up being the OUI for Atheros.

WNDAP360_WMAC1_MAC_OFFSET is the same as WNDAP360_WMAC0_MAC_OFFSET
except with the first hex value being subtracted by 2, which is not a
valid OUI.

And newer Netgear firmware seems to assign differently as well,
art_120C as a base and the others incremented by 0x8.

Switch the assignment to the latest firmware and add label-mac-device to
document that the first Wi-FI MAC address is printed on the device.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22895
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/ath79/dts/ar7161_netgear_wndap360.dts

index bf91693d67a719c3da2ce287e6c449bf0603b291..05c50ca4dd8943a09b74ef100da4af9ae4e8fd03 100644 (file)
@@ -19,6 +19,7 @@
                led-failsafe = &led_power_orange;
                led-running = &led_power_green;
                led-upgrade = &led_power_orange;
+               label-mac-device = &ath9k;
        };
 
        leds {
@@ -64,7 +65,7 @@
        phy-mode = "rgmii";
        phy-handle = <&phy1>;
 
-       nvmem-cells = <&macaddr_art_0>;
+       nvmem-cells = <&macaddr_art_120c 10>;
        nvmem-cell-names = "mac-address";
 };
 
                                        #address-cells = <1>;
                                        #size-cells = <1>;
 
-                                       macaddr_art_0: macaddr@0 {
-                                               reg = <0x0 0x6>;
-                                       };
-
                                        macaddr_art_120c: macaddr@120c {
-                                               reg = <0x120c 0x6>;
-                                       };
-
-                                       macaddr_art_520c: macaddr@520c {
                                                compatible = "mac-base";
-                                               reg = <0x520c 0x6>;
+                                               reg = <0x120c 0x6>;
                                                #nvmem-cell-cells = <1>;
                                        };
 
 &pcie0 {
        status = "okay";
 
-       wifi@11,0 {
+       ath9k: wifi@11,0 {
                compatible = "pci168c,0029";
                reg = <0x8800 0 0 0 0>;
-               nvmem-cells = <&macaddr_art_120c>, <&calibration_art_1000>;
+               nvmem-cells = <&macaddr_art_120c 0>, <&calibration_art_1000>;
                nvmem-cell-names = "mac-address", "calibration";
 
                led {
        wifi@12,0 {
                compatible = "pci168c,0029";
                reg = <0x9000 0 0 0 0>;
-               nvmem-cells = <&macaddr_art_520c 1>, <&calibration_art_5000>;
+               nvmem-cells = <&macaddr_art_120c 8>, <&calibration_art_5000>;
                nvmem-cell-names = "mac-address", "calibration";
 
                led {