mirror of
https://github.com/ipxe/ipxe
synced 2025-12-22 21:11:03 +03:00
[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>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user