Matthew Wilcox wrote:
After a conversation with acme, I realised that ethtool_ops is far too
narrow scope. What we need are netdev_ops. This patch renames the
ethtool_ops to netdev_ops and fixes some other minor flaws:
- add _len() ops for operations which previously had to kmalloc their
- move the netdev_ops from ethtool.h to netdevice.h
- makes some ops generic as requested by Jeff Garzik.
I think netdev_ops is still a little too ethtool-specific; something
I'd like to do is convert the parameters to be a little less
ethtool-related. For example, instead of ->get_drvinfo, I'd like to
see ethtool_get_drvinfo() call several methods and fill in all the data
But let's see what everyone thinks of this patch first ...
+ * Each operation is passed a &struct net_device as its first parameter.
Some of these are missing their netdevice arg?
+ int (*get_regs_len)(struct ethtool_regs *);
+ int (*self_test_len)(struct ethtool_test *);
+ int (*get_strings_len)(struct ethtool_gstrings *);
+ int (*get_stats_len)(struct ethtool_stats *);
Ben Greear <greearb@xxxxxxxxxxxxxxx> <Ben_Greear AT excite.com>
President of Candela Technologies Inc http://www.candelatech.com
ScryMUD: http://scry.wanfear.com http://scry.wanfear.com/~greear