Skip to content

Commit

Permalink
ar71xx: fix swapped LAN/WAN MAC address for Archer C60 v1/v2
Browse files Browse the repository at this point in the history
The MAC addresses for lan/wan are swapped compared to the vendor
firmware. This adjusts to vendor configuration, which is:

lan   *:7b   label
wan   *:7c   label+1
2.4g  *:7b   label
5g    *:7a   label-1

Only one address is stored in <&mac 0x8>, corresponding to the label.

This has been checked on revisions v1, v2 and v3.

Since ar71xx calculates the ath10k MAC address based on the ethernet
addresses, the number there is adjusted, too.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
  • Loading branch information
adschm committed Mar 11, 2020
1 parent 88aead0 commit 14eb549
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ case "$FIRMWARE" in
ath10kcal_extract "art" 0x5000 0x2f20
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -1)
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -1)
;;
cf-e385ac)
ath10kcal_extract "art" 0x5000 0x2f20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ static void __init archer_c60_v1_setup(void)
ath79_register_mdio(0, 0x0);
ath79_register_mdio(1, 0x0);

ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);

/* WAN port */
ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
Expand Down Expand Up @@ -199,8 +199,8 @@ static void __init archer_c60_v2_setup(void)
ath79_register_mdio(0, 0x0);
ath79_register_mdio(1, 0x0);

ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);
ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);

/* WAN port */
ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
Expand Down

0 comments on commit 14eb549

Please sign in to comment.