netdev/fec.c: add phylib supporting to enable carrier detection (v2)
BugLink: http://bugs.launchpad.net/bugs/457878
v2:
- remove duplicated phy_speed caculation
- fix the phy_speed caculation according to the DataSheet
v1:
- removed old MII phy control code
- add phylib supporting
- add ethtool interface to make user space NetworkManager works
Tested on Freescale i.MX51 Babbage board.
This patch is based on a patch from Frederic Rodo <
[email protected]>
Cc: Frederic Rodo <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
Acked-by: Amit Kucheria <[email protected]>
Acked-by: Sascha Hauer <[email protected]>
Signed-off-by: David S. Miller <[email protected]>