diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c index 767c22983c178229884bb681b4c317939d8100c5..ce14f11c0de59566bd1e995af820c9f1e6323c73 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c @@ -2241,7 +2241,7 @@ static int bnx2x_set_phys_id(struct net_device *dev, } static int bnx2x_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info, - void *rules __always_unused) + u32 *rules __always_unused) { struct bnx2x *bp = netdev_priv(dev); diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index 90b4921cac9b432ac0b414692f698ca192f17aa0..40b395f932cf1ea4662b8d19b446098f50ca0a8c 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c @@ -1902,7 +1902,7 @@ static int set_rss_table(struct net_device *dev, } static int get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info, - void *rules) + u32 *rules) { const struct port_info *pi = netdev_priv(dev); diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c index 25a8c2adb001892acc1c2531de8ed8b62b30d8e0..42238301c42534f1e167879594f1821b216702f2 100644 --- a/drivers/net/ethernet/freescale/gianfar_ethtool.c +++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c @@ -1712,7 +1712,7 @@ static int gfar_set_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd) } static int gfar_get_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd, - void *rule_locs) + u32 *rule_locs) { struct gfar_private *priv = netdev_priv(dev); int ret = 0; @@ -1728,7 +1728,7 @@ static int gfar_get_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd, ret = gfar_get_cls(priv, cmd); break; case ETHTOOL_GRXCLSRLALL: - ret = gfar_get_cls_all(priv, cmd, (u32 *) rule_locs); + ret = gfar_get_cls_all(priv, cmd, rule_locs); break; default: ret = -EINVAL; diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index 11e1d5cd40b95b38569c2d9a20371943c3c25a27..c0003babc06b46a5034273b14aef9c2d1f0aad19 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c @@ -2287,7 +2287,7 @@ static int ixgbe_get_ethtool_fdir_all(struct ixgbe_adapter *adapter, } static int ixgbe_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd, - void *rule_locs) + u32 *rule_locs) { struct ixgbe_adapter *adapter = netdev_priv(dev); int ret = -EOPNOTSUPP; @@ -2305,8 +2305,7 @@ static int ixgbe_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd, ret = ixgbe_get_ethtool_fdir_entry(adapter, cmd); break; case ETHTOOL_GRXCLSRLALL: - ret = ixgbe_get_ethtool_fdir_all(adapter, cmd, - (u32 *)rule_locs); + ret = ixgbe_get_ethtool_fdir_all(adapter, cmd, rule_locs); break; default: break; diff --git a/drivers/net/ethernet/sfc/ethtool.c b/drivers/net/ethernet/sfc/ethtool.c index 93f1fb99432d20556c74a040004ee29087e2b009..9536925f5bdd47647d10cdc9f894818260d6fc6c 100644 --- a/drivers/net/ethernet/sfc/ethtool.c +++ b/drivers/net/ethernet/sfc/ethtool.c @@ -824,7 +824,7 @@ static int efx_ethtool_reset(struct net_device *net_dev, u32 *flags) static int efx_ethtool_get_rxnfc(struct net_device *net_dev, - struct ethtool_rxnfc *info, void *rules __always_unused) + struct ethtool_rxnfc *info, u32 *rules __always_unused) { struct efx_nic *efx = netdev_priv(net_dev); diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c index cad58f26c47c476f81b0bb7087ad9016f1976ac6..5e1e1d2748aed21f10c8aae40c79ce72d97fa944 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c @@ -7303,7 +7303,7 @@ static int niu_get_ethtool_tcam_all(struct niu *np, } static int niu_get_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd, - void *rule_locs) + u32 *rule_locs) { struct niu *np = netdev_priv(dev); int ret = 0; @@ -7322,7 +7322,7 @@ static int niu_get_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd, ret = niu_get_ethtool_tcam_entry(np, cmd); break; case ETHTOOL_GRXCLSRLALL: - ret = niu_get_ethtool_tcam_all(np, cmd, (u32 *)rule_locs); + ret = niu_get_ethtool_tcam_all(np, cmd, rule_locs); break; default: ret = -EINVAL; diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c index 27400edeef55466ec2a82d63072d3945bcb6b844..e662cbc8bfbda34c8f158fd89ffb82ecfacebf61 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethtool.c +++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c @@ -558,7 +558,7 @@ vmxnet3_set_ringparam(struct net_device *netdev, static int vmxnet3_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *info, - void *rules) + u32 *rules) { struct vmxnet3_adapter *adapter = netdev_priv(netdev); switch (info->cmd) { diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index b5d189367a023e3daaa39acee49b25138b403f94..5d4a06accd825aff0230148dc163bbbec90ede09 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 *);