That makes the file bigger again…another thought was moving led code into separate c file to compile/link only when the config is set…this way we can drop most of the ifdefs
But idk how to proceed with the config-callback which seems not called
also noted that speed was only 100 instead of 1000 Mbit…fixed it by changing & to | for common_adv_gb ![]()
lpagb = phy_read(phydev, MDIO_DEVAD_NONE, MII_STAT1000);
if (lpagb < 0 )
return lpagb;
advgb = phy_read(phydev, MDIO_DEVAD_NONE, MII_CTRL1000);
if (advgb < 0 )
return advgb;
common_adv_gb = (lpagb & (advgb << 2)); //why shifting and then & (=masking with returned value)...imho should be |
and after the link-check basicly only reads are done for autoneg…so i wonder why exiting before it breaks functionality…maybe startup should not return 0 more the result of AN
Mhm…genphy_parse_link also returns 0 and its return is used for return in genphy_startup
maybe we can use this function to drop the big codeblock for getting the link mode…
@1715173329 @dangowrt imho the changes are also usefultfor you (drop of some functions, change to HIWORD/LOWORD, 1g fix, drop of return on existing link - maybe you have an idea why this happens…return 0 should be ok).

