Ethtool is a small utility for examining and tuning the settings of Ethernet-based network interfaces. With ethtool, it is possible to control various parameters, such as:
- Speed
- Media type
- Duplex operation
- Getting/setting EEPROM register content
- Hardware check summing
- Wake-on-LAN
Drivers that need support from ethtool should include <linux/ethtool.h>. It relies on the struct ethtool_ops structure, which is the core of this feature, and contains a set of methods for ethtool operation support. Most of these methods are relatively straightforward; see include/linux/ethtool.h for details.
For ethtool support to fully be part of the driver, the driver should fill in an ethtool_ops structure and assign it to the .ethtool_ops ...