net/mlx5e: Improve ethtool rxnfc callback structure
[sfrench/cifs-2.6.git] / drivers / net / ethernet / mellanox / mlx5 / core / en_fs_ethtool.c
index ea3a490b569a58c46b49196b3637bec4923b7843..a66589816e21b2ae98c818160a8b13de9f2d8239 100644 (file)
@@ -887,10 +887,10 @@ static int mlx5e_get_rss_hash_opt(struct mlx5e_priv *priv,
        return 0;
 }
 
-int mlx5e_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
+int mlx5e_ethtool_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
 {
-       int err = 0;
        struct mlx5e_priv *priv = netdev_priv(dev);
+       int err = 0;
 
        switch (cmd->cmd) {
        case ETHTOOL_SRXCLSRLINS:
@@ -910,16 +910,13 @@ int mlx5e_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
        return err;
 }
 
-int mlx5e_get_rxnfc(struct net_device *dev,
-                   struct ethtool_rxnfc *info, u32 *rule_locs)
+int mlx5e_ethtool_get_rxnfc(struct net_device *dev,
+                           struct ethtool_rxnfc *info, u32 *rule_locs)
 {
        struct mlx5e_priv *priv = netdev_priv(dev);
        int err = 0;
 
        switch (info->cmd) {
-       case ETHTOOL_GRXRINGS:
-               info->data = priv->channels.params.num_channels;
-               break;
        case ETHTOOL_GRXCLSRLCNT:
                info->rule_cnt = priv->fs.ethtool.tot_num_rules;
                break;