summaryrefslogtreecommitdiff
path: root/include/linux/ethtool.h
diff options
context:
space:
mode:
authorScott Feldman <scott.feldman@intel.com>2003-10-14 05:52:16 -0400
committerStephen Hemminger <shemminger@osdl.org>2003-10-14 05:52:16 -0400
commit06191dd615af60ddb97a894f76ca88d68f7a79ed (patch)
tree7bcaa2358ab8921c40ba76d10a5c996a522fb933 /include/linux/ethtool.h
parent019904d0dee2a4bf329f1778551dda0b3686a83a (diff)
[PATCH] ethtool_ops eeprom stuff
Finally got around to adding ethtool_ops to e100-3.0.x. I found a bug with get_eeprom() and it seems to work best if we add get_eeprom_len() to the ops list. Also moved check for offest + len < size into ethtool.c. I was able to test [GS]EEPROM, PHYS_ID, GSTATS, GSTRINGS, and TEST, and everything looks good. Should I send same for 2.4?
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r--include/linux/ethtool.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index cc942f675ae9..8d4d0e397ed5 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -307,14 +307,14 @@ int ethtool_op_set_tso(struct net_device *dev, u32 data);
*
* get_eeprom:
* Should fill in the magic field. Don't need to check len for zero
- * or wraparound but must check offset + len < size. Fill in the data
- * argument with the eeprom values from offset to offset + len. Update
- * len to the amount read. Returns an error or zero.
+ * or wraparound. Fill in the data argument with the eeprom values
+ * from offset to offset + len. Update len to the amount read.
+ * Returns an error or zero.
*
* set_eeprom:
* Should validate the magic field. Don't need to check len for zero
- * or wraparound but must check offset + len < size. Update len to
- * the amount written. Returns an error or zero.
+ * or wraparound. Update len to the amount written. Returns an error
+ * or zero.
*/
struct ethtool_ops {
int (*get_settings)(struct net_device *, struct ethtool_cmd *);
@@ -328,6 +328,7 @@ struct ethtool_ops {
void (*set_msglevel)(struct net_device *, u32);
int (*nway_reset)(struct net_device *);
u32 (*get_link)(struct net_device *);
+ int (*get_eeprom_len)(struct net_device *);
int (*get_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *);
int (*set_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *);
int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *);