Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 278d436a authored by Ivan Vecera's avatar Ivan Vecera Committed by David S. Miller
Browse files

net/mlx4_en: do not ignore autoneg in mlx4_en_set_pauseparam()



The driver does not support pause autonegotiation so it should return
-EINVAL when the function is called with non-zero autoneg.

Cc: Amir Vadai <amirv@mellanox.com>
Signed-off-by: default avatarIvan Vecera <ivecera@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 208f7ca4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -487,6 +487,9 @@ static int mlx4_en_set_pauseparam(struct net_device *dev,
	struct mlx4_en_dev *mdev = priv->mdev;
	int err;

	if (pause->autoneg)
		return -EINVAL;

	priv->prof->tx_pause = pause->tx_pause != 0;
	priv->prof->rx_pause = pause->rx_pause != 0;
	err = mlx4_SET_PORT_general(mdev->dev, priv->port,