stmmac: remove useless csum flag
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>
Wed, 21 Aug 2013 07:11:14 +0000 (09:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Aug 2013 03:38:16 +0000 (20:38 -0700)
This patch removes the no_csum_insertion private parameter that is not used anymore
and, also,  the "likely" annotation from the condition that is not in a critical path.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac.h
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index c922fde929a14a29cedc2fe03f3031e84fd13024..f16a9bdf45bb6738c7fca4063cf96307d6303462 100644 (file)
@@ -70,7 +70,6 @@ struct stmmac_priv {
        struct net_device *dev;
        struct device *device;
        struct mac_device_info *hw;
-       int no_csum_insertion;
        spinlock_t lock;
 
        struct phy_device *phydev ____cacheline_aligned_in_smp;
index 0a9bb9d30c3f0b78e28f9233e1775392d260aff4..be406911fd01e13668c2e8408cc25a61bc4e7da8 100644 (file)
@@ -1224,8 +1224,7 @@ static void free_dma_desc_resources(struct stmmac_priv *priv)
  */
 static void stmmac_dma_operation_mode(struct stmmac_priv *priv)
 {
-       if (likely(priv->plat->force_sf_dma_mode ||
-                  ((priv->plat->tx_coe) && (!priv->no_csum_insertion)))) {
+       if (priv->plat->force_sf_dma_mode || priv->plat->tx_coe) {
                /*
                 * In case of GMAC, SF mode can be enabled
                 * to perform the TX COE in HW. This depends on: