diff options
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c index f36c219dffcf..6f8044daec42 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | |||
| @@ -1006,7 +1006,8 @@ static int mlx4_en_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd, | |||
| 1006 | if ((cmd->cmd == ETHTOOL_GRXCLSRLCNT || | 1006 | if ((cmd->cmd == ETHTOOL_GRXCLSRLCNT || |
| 1007 | cmd->cmd == ETHTOOL_GRXCLSRULE || | 1007 | cmd->cmd == ETHTOOL_GRXCLSRULE || |
| 1008 | cmd->cmd == ETHTOOL_GRXCLSRLALL) && | 1008 | cmd->cmd == ETHTOOL_GRXCLSRLALL) && |
| 1009 | mdev->dev->caps.steering_mode != MLX4_STEERING_MODE_DEVICE_MANAGED) | 1009 | (mdev->dev->caps.steering_mode != |
| 1010 | MLX4_STEERING_MODE_DEVICE_MANAGED || !priv->port_up)) | ||
| 1010 | return -EINVAL; | 1011 | return -EINVAL; |
| 1011 | 1012 | ||
| 1012 | switch (cmd->cmd) { | 1013 | switch (cmd->cmd) { |
| @@ -1042,7 +1043,8 @@ static int mlx4_en_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd) | |||
| 1042 | struct mlx4_en_priv *priv = netdev_priv(dev); | 1043 | struct mlx4_en_priv *priv = netdev_priv(dev); |
| 1043 | struct mlx4_en_dev *mdev = priv->mdev; | 1044 | struct mlx4_en_dev *mdev = priv->mdev; |
| 1044 | 1045 | ||
| 1045 | if (mdev->dev->caps.steering_mode != MLX4_STEERING_MODE_DEVICE_MANAGED) | 1046 | if (mdev->dev->caps.steering_mode != |
| 1047 | MLX4_STEERING_MODE_DEVICE_MANAGED || !priv->port_up) | ||
| 1046 | return -EINVAL; | 1048 | return -EINVAL; |
| 1047 | 1049 | ||
| 1048 | switch (cmd->cmd) { | 1050 | switch (cmd->cmd) { |
