[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#591012: Use netif_carrier_ok() for link detection



severity 591012 wishlist
user debian-qa@lists.debian.org
usertags gift
thanks

The more time passes, the more I think this is a good idea.  It looks like
everything (or nearly everything) supports it, wifi interfaces support it
(which gives it better compatibility than ethtool/MII anyway), and it
eradicates about 50 lines of low-level code.

I think this would be a good newbie project; basically it just involves
rewriting ethtool_lite() (in ethtool-lite.c) to read
/sys/class/net/<if_name>/carrier; if you get EINVAL then the interface isn't
up (bad puppy, no cookie for you) otherwise it's '1' if link, '0' otherwise. 
Couldn't be easier.



Reply to: