]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
stmmac: fix max coal timer parameter
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>
Wed, 3 Dec 2014 11:32:58 +0000 (12:32 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Dec 2014 18:25:18 +0000 (13:25 -0500)
This patch is to fix the max coalesce timer setting that can be provided
by ethtool.
The default value (STMMAC_COAL_TX_TIMER) was used in the set_coalesce helper
instead of the max one (STMMAC_MAX_COAL_TX_TICK, so defined but not used).

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c

index 3a08a1f78c732b49992cc711907131d74b5e18e8..771cda2a48b2a932daa17600446e29a0bb26823a 100644 (file)
@@ -696,7 +696,7 @@ static int stmmac_set_coalesce(struct net_device *dev,
            (ec->tx_max_coalesced_frames == 0))
                return -EINVAL;
 
-       if ((ec->tx_coalesce_usecs > STMMAC_COAL_TX_TIMER) ||
+       if ((ec->tx_coalesce_usecs > STMMAC_MAX_COAL_TX_TICK) ||
            (ec->tx_max_coalesced_frames > STMMAC_TX_MAX_FRAMES))
                return -EINVAL;