aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2018-04-06 21:33:35 +0200
committerJohn Crispin <john@phrozen.org>2018-04-06 21:33:35 +0200
commitbfed38254076d576914251689a2e1f85d514783d (patch)
tree1fb310d806ea47dd82f9dc5b437077d8299e12de
parent424a9ae128bd2045cd4bfd6e3229f2529d150a25 (diff)
downloadupstream-bfed38254076d576914251689a2e1f85d514783d.tar.gz
upstream-bfed38254076d576914251689a2e1f85d514783d.tar.bz2
upstream-bfed38254076d576914251689a2e1f85d514783d.zip
ramips: fix build error caused by missing ifdef guard in hwnat code
Signed-off-by: John Crispin <john@phrozen.org>
-rw-r--r--target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/mtk_eth_soc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/mtk_eth_soc.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/mtk_eth_soc.c
index 0fce0efc94..49505eab86 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/mtk_eth_soc.c
+++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/mtk_eth_soc.c
@@ -879,15 +879,18 @@ static int fe_poll_rx(struct napi_struct *napi, int budget,
skb_checksum_none_assert(skb);
skb->protocol = eth_type_trans(skb, netdev);
+#ifdef CONFIG_NET_MEDIATEK_OFFLOAD
if (mtk_offload_check_rx(priv, skb, trxd.rxd4) == 0) {
+#endif
stats->rx_packets++;
stats->rx_bytes += pktlen;
napi_gro_receive(napi, skb);
+#ifdef CONFIG_NET_MEDIATEK_OFFLOAD
} else {
dev_kfree_skb(skb);
}
-
+#endif
ring->rx_data[idx] = new_data;
rxd->rxd1 = (unsigned int)dma_addr;