ar71xx: fix ethernet initialization on QCA953x-based boards (TP-Link TL-WR841N/ND...
[openwrt/openwrt.git] / target / linux / ar71xx / files / arch / mips / ath79 / mach-wpj531.c
index bc13d7019f0fa896977f4340de55f6b40cd7c9c7..e665a2e993665e4077d3aa0a25a520bfb2795103 100644 (file)
@@ -105,12 +105,19 @@ static void __init common_setup(void)
        ath79_register_mdio(0, 0x0);
 
        /* LAN */
+       ath79_eth0_data.duplex = DUPLEX_FULL;
+       ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
+       ath79_eth0_data.speed = SPEED_100;
+       ath79_eth0_data.phy_mask = BIT(4);
        ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
        ath79_register_eth(0);
 
        /* WAN */
        ath79_switch_data.phy4_mii_en = 1;
+       ath79_eth1_data.duplex = DUPLEX_FULL;
        ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
+       ath79_eth1_data.speed = SPEED_100;
+       ath79_switch_data.phy_poll_mask |= BIT(4);
        ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
        ath79_register_eth(1);