ramips: fix build error caused by missing ifdef guard in hwnat code
[openwrt/openwrt.git] / target / linux / ramips / files-4.14 / drivers / net / ethernet / mtk / mtk_eth_soc.c
index 0fce0efc94e2885622d4187260ac1b73f0981f7e..49505eab86628e60ba050314c6eb55b80dff809a 100644 (file)
@@ -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;