summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-03-31 14:33:07 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-10-17 14:35:29 +0100
commita1beb33c36178af3b1afda7ab47cbeb58d722b56 (patch)
treefc31f5fcbcbf870d7d756ef216bd82d25367d692
parentdfeb8560400126ece53da06c24fc25c53eed44f0 (diff)
net: fec: avoid checking more flags than necessary in rx path
Avoid checking for the enhanced buffer descriptor flag and the receive checksumming/vlan flags - we now only set these feature flags if we already know that we have enhanced buffer descriptors. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 2c8187950491..781b2c5a5abe 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1290,7 +1290,6 @@ fec_enet_rx(struct net_device *ndev, int budget)
/* If this is a VLAN packet remove the VLAN Tag */
vlan_packet_rcvd = false;
if (fep->flags & FEC_FLAG_RX_VLAN &&
- fep->flags & FEC_FLAG_BUFDESC_EX &&
bdp->ebd.cbd_esc & BD_ENET_RX_VLAN) {
/* Push and remove the vlan tag */
struct vlan_hdr *vlan_header =
@@ -1330,8 +1329,7 @@ fec_enet_rx(struct net_device *ndev, int budget)
fec_enet_hwtstamp(fep, bdp->ebd.ts,
skb_hwtstamps(skb));
- if (fep->flags & FEC_FLAG_BUFDESC_EX &&
- fep->flags & FEC_FLAG_RX_CSUM) {
+ if (fep->flags & FEC_FLAG_RX_CSUM) {
if (!(bdp->ebd.cbd_esc & FLAG_RX_CSUM_ERROR)) {
/* don't check it */
skb->ip_summed = CHECKSUM_UNNECESSARY;