diff options
Diffstat (limited to 'drivers/net/ethernet/freescale/fec_main.c')
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 5ed94160f9ed..7f99cc6bd868 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -259,6 +259,7 @@ MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address"); /* flags */ #define FEC_FLAG_BUFDESC_EX BIT(0) +#define FEC_FLAG_RX_CSUM BIT(1) #define TSO_HEADER_SIZE 128 /* Max number of allowed TCP segments for software TSO */ @@ -914,7 +915,7 @@ fec_restart(struct net_device *ndev) #if !defined(CONFIG_M5272) /* set RX checksum */ val = readl(fep->hwp + FEC_RACC); - if (fep->csum_flags & FLAG_RX_CSUM_ENABLED) + if (fep->flags & FEC_FLAG_RX_CSUM) val |= FEC_RACC_OPTIONS; else val &= ~FEC_RACC_OPTIONS; @@ -1329,7 +1330,7 @@ fec_enet_rx(struct net_device *ndev, int budget) skb_hwtstamps(skb)); if (fep->flags & FEC_FLAG_BUFDESC_EX && - (fep->csum_flags & FLAG_RX_CSUM_ENABLED)) { + fep->flags & FEC_FLAG_RX_CSUM) { if (!(bdp->ebd.cbd_esc & FLAG_RX_CSUM_ERROR)) { /* don't check it */ skb->ip_summed = CHECKSUM_UNNECESSARY; @@ -2528,9 +2529,9 @@ static int fec_set_features(struct net_device *netdev, /* Receive checksum has been changed */ if (changed & NETIF_F_RXCSUM) { if (features & NETIF_F_RXCSUM) - fep->csum_flags |= FLAG_RX_CSUM_ENABLED; + fep->flags |= FEC_FLAG_RX_CSUM; else - fep->csum_flags &= ~FLAG_RX_CSUM_ENABLED; + fep->flags &= ~FEC_FLAG_RX_CSUM; } /* Set the appropriate minimum transmit ring free threshold */ @@ -2653,7 +2654,7 @@ static int fec_enet_init(struct net_device *ndev) /* enable hw accelerator */ ndev->features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM | NETIF_F_SG | NETIF_F_TSO); - fep->csum_flags |= FLAG_RX_CSUM_ENABLED; + fep->flags |= FEC_FLAG_RX_CSUM; } if (ndev->features & NETIF_F_SG) { |