[openwrt/openwrt] ramips: fix build error caused by missing ifdef guard in hwnat code

LEDE Commits lede-commits at lists.infradead.org
Fri Apr 6 12:34:11 PDT 2018


blogic pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/bfed38254076d576914251689a2e1f85d514783d

commit bfed38254076d576914251689a2e1f85d514783d
Author: John Crispin <john at phrozen.org>
AuthorDate: Fri Apr 6 21:33:35 2018 +0200

    ramips: fix build error caused by missing ifdef guard in hwnat code
    
    Signed-off-by: John Crispin <john at phrozen.org>
---
 .../linux/ramips/files-4.14/drivers/net/ethernet/mtk/mtk_eth_soc.c   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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 0fce0ef..49505ea 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;
 



More information about the lede-commits mailing list