summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/fec_main.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-03-31 13:48:50 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-10-17 14:35:24 +0100
commit3793558b231361dc545e9e0e345b21cd9660e738 (patch)
tree3a0f2cd66a6adc0f5eb12725842861fb1c58fc59 /drivers/net/ethernet/freescale/fec_main.c
parentc44615ae10c0df303b484f580d3c2cd0d1c5f8aa (diff)
net: fec: move receive checksum flags into new flags member
The receive checksum flag is only changed upon ethtool configuration, so move it into the flags member. In any case, this is checked alongside the BUFDESC_EX flag. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/net/ethernet/freescale/fec_main.c')
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c11
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) {