Forum Discussion
Altera_Forum
Honored Contributor
13 years agoMaybe this would be helpful for those who need to know link status.
I've added this to lwip_tse_mac.c int tse_link_status(int iface, struct ethernetif *ethernetif) { np_tse_mac *mi_base; mi_base = tse[iface].mi.base; alt_tse_mac_info *pmac_info; tse_sgdma_read_init(&tse[iface]); pmac_info = alt_tse_get_mac_info(mi_base); alt_tse_phy_wr_mdio_addr(pmac_info->pphy_info, pmac_info->pphy_info->mdio_address); int link_alive; link_alive = alt_tse_phy_rd_mdio_reg(pmac_info->pphy_info, TSE_PHY_MDIO_STATUS, TSE_PHY_MDIO_STATUS_AN_COMPLETE, 1) != 0; return link_alive; } Or is there another way to check for link status ?