stmmac: fix autoneg in set_pauseparam
Giuseppe CAVALLARO [Thu, 12 May 2011 20:28:05 +0000 (20:28 +0000)]
This patch fixes a bug in the set_pauseparam
function that didn't well manage the ANE
field and returned broken values when use
ethtool -A|-a.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

drivers/net/stmmac/stmmac_ethtool.c

index 9c05cf0..ae5213a 100644 (file)
@@ -234,6 +234,7 @@ stmmac_set_pauseparam(struct net_device *netdev,
                new_pause |= FLOW_TX;
 
        priv->flow_ctrl = new_pause;
+       phy->autoneg = pause->autoneg;
 
        if (phy->autoneg) {
                if (netif_running(netdev))