From: Padmanabh Ratnakar Date: Thu, 12 Jul 2012 03:56:11 +0000 (+0000) Subject: be2net: Fix error while toggling autoneg of pause parameters X-Git-Tag: v3.6-rc1~125^2~192 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c871c5f29315aaf27acf6ceed7a69f9069049639;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git be2net: Fix error while toggling autoneg of pause parameters Autonegotiation of pause parameters is possible only on some PHYs. Ability of autoneg of pause parameters is reported by adapter. Autoneg of pause parameters cannot be changed from driver. Fix driver to give error when autoneg mode is toggled by user. Signed-off-by: Padmanabh Ratnakar Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c index 63e51d4..e34be1c 100644 --- a/drivers/net/ethernet/emulex/benet/be_ethtool.c +++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c @@ -648,7 +648,7 @@ be_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *ecmd) struct be_adapter *adapter = netdev_priv(netdev); int status; - if (ecmd->autoneg != 0) + if (ecmd->autoneg != adapter->phy.fc_autoneg) return -EINVAL; adapter->tx_fc = ecmd->tx_pause; adapter->rx_fc = ecmd->rx_pause;