0017-ar71xx-fix-ethernet-initialization-on-QCA953x-based-boards-TP-Link-TL-WR841N-ND-v9-Compex-WPJ531.patch 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Thu, 6 Aug 2015 03:01:38 +0200
  3. Subject: ar71xx: fix ethernet initialization on QCA953x-based boards (TP-Link TL-WR841N/ND v9, Compex WPJ531)
  4. The initialization routines for these boards were relying on some (wrong)
  5. defaults for the QCA953x ethernet. Make these defaults explicit to prevent
  6. breaking them when the QCA953x defaults are fixed.
  7. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
  8. diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
  9. index c28afc6..3e5c2a2 100644
  10. --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
  11. +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c
  12. @@ -109,12 +109,18 @@ static void __init tl_ap143_setup(void)
  13. ath79_register_mdio(0, 0x0);
  14. /* LAN */
  15. + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
  16. + ath79_eth1_data.duplex = DUPLEX_FULL;
  17. + ath79_switch_data.phy_poll_mask |= BIT(4);
  18. ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0);
  19. ath79_register_eth(1);
  20. /* WAN */
  21. ath79_switch_data.phy4_mii_en = 1;
  22. ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
  23. + ath79_eth0_data.duplex = DUPLEX_FULL;
  24. + ath79_eth0_data.speed = SPEED_100;
  25. + ath79_eth0_data.phy_mask = BIT(4);
  26. ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1);
  27. ath79_register_eth(0);
  28. diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
  29. index bc13d70..e665a2e 100644
  30. --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
  31. +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c
  32. @@ -105,12 +105,19 @@ static void __init common_setup(void)
  33. ath79_register_mdio(0, 0x0);
  34. /* LAN */
  35. + ath79_eth0_data.duplex = DUPLEX_FULL;
  36. + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
  37. + ath79_eth0_data.speed = SPEED_100;
  38. + ath79_eth0_data.phy_mask = BIT(4);
  39. ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
  40. ath79_register_eth(0);
  41. /* WAN */
  42. ath79_switch_data.phy4_mii_en = 1;
  43. + ath79_eth1_data.duplex = DUPLEX_FULL;
  44. ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
  45. + ath79_eth1_data.speed = SPEED_100;
  46. + ath79_switch_data.phy_poll_mask |= BIT(4);
  47. ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
  48. ath79_register_eth(1);