summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/mii.h
diff options
context:
space:
mode:
authorMichael Brown2015-03-10 22:23:51 +0100
committerMichael Brown2015-03-10 22:31:07 +0100
commit6ad02e78bb85f5afebe3d897bc629b26f89abc17 (patch)
treed7bd31a2d9bad2b2a7a0fa3f95491f68e75e69c4 /src/include/ipxe/mii.h
parent[legal] Relicense Davicom DM96xx drivers (diff)
downloadipxe-6ad02e78bb85f5afebe3d897bc629b26f89abc17.tar.gz
ipxe-6ad02e78bb85f5afebe3d897bc629b26f89abc17.tar.xz
ipxe-6ad02e78bb85f5afebe3d897bc629b26f89abc17.zip
[mii] Add generic mii_check_link() function
Most devices expose at least the link up/down status via a bit in a MAC register, since the MAC generally already needs to know whether or not the link is up. Some devices (e.g. the SMSC75xx USB NIC) expose this information to software only via the MII registers. Provide a generic mii_check_link() implementation to check the BMSR and report the link status via netdev_link_{up,down}(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/mii.h')
-rw-r--r--src/include/ipxe/mii.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/ipxe/mii.h b/src/include/ipxe/mii.h
index daf29dac..c2245b49 100644
--- a/src/include/ipxe/mii.h
+++ b/src/include/ipxe/mii.h
@@ -114,5 +114,7 @@ mii_dump ( struct mii_interface *mii ) {
extern int mii_restart ( struct mii_interface *mii );
extern int mii_reset ( struct mii_interface *mii );
+extern int mii_check_link ( struct mii_interface *mii,
+ struct net_device *netdev );
#endif /* _IPXE_MII_H */