From 815c7db5c809ea3d5735de3131ecdf758b0e14ff Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 6 Sep 2011 13:49:12 +0000 Subject: ethtool: Clean up definitions of rule location arrays in RX NFC Correct the description of ethtool_rxnfc::rule_locs; it is an array of currently used locations, not all possible valid locations. Add note that drivers must not use ethtool_rxnfc::rule_locs. The rule_locs argument to ethtool_ops::get_rxnfc is either NULL or a pointer to an array of u32, so change the parameter type accordingly. Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller --- include/linux/ethtool.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/linux/ethtool.h') diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index b5d189367a02..5d4a06accd82 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -479,7 +479,7 @@ struct ethtool_rx_flow_spec { * @data: Command-dependent value * @fs: Flow classification rule * @rule_cnt: Number of rules to be affected - * @rule_locs: Array of valid rule locations + * @rule_locs: Array of used rule locations * * For %ETHTOOL_GRXFH and %ETHTOOL_SRXFH, @data is a bitmask indicating * the fields included in the flow hash, e.g. %RXH_IP_SRC. The following @@ -497,7 +497,8 @@ struct ethtool_rx_flow_spec { * For %ETHTOOL_GRXCLSRLALL, @rule_cnt specifies the array size of the * user buffer for @rule_locs on entry. On return, @data is the size * of the rule table and @rule_locs contains the locations of the - * defined rules. + * defined rules. Drivers must use the second parameter to get_rxnfc() + * instead of @rule_locs. * * For %ETHTOOL_SRXCLSRLINS, @fs specifies the rule to add or update. * @fs.@location specifies the location to use and must not be ignored. @@ -939,7 +940,7 @@ struct ethtool_ops { int (*set_priv_flags)(struct net_device *, u32); int (*get_sset_count)(struct net_device *, int); int (*get_rxnfc)(struct net_device *, - struct ethtool_rxnfc *, void *); + struct ethtool_rxnfc *, u32 *rule_locs); int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); int (*flash_device)(struct net_device *, struct ethtool_flash *); int (*reset)(struct net_device *, u32 *); -- cgit v1.2.3